Making a rain (or snow) effect
Simulating rain for still images or for animation is a frequent topic from beginners. This tutorial will try to show a simple way for getting good looking results, while using very basic materials and modeled geometries.
Simulate rain using particles, proof of concept
Simulate falling snowflakes using particles, proof of concept
For Blender: 2.50 Alpha 2 or better
1. The settings
We will make use of particles, in order to carry out this simulation. At first, we will need a particles emitter object, placed at the top of the scene, hovering like a cloud. For example, a simple plane will be fine, as it is not necessary to see it subdivided.
The other objects in our example scene: a ground (just a plan) and the main focus of the scene (a simple cube), would be obstacles for the particles (at least), and reactors for the particles (ideally), because they would interact with the rain drops.
You can also make sure that you will have at hand a very last object: the rain drop of your simulation.
Normals of the objects: the normals of the cloud should be orientated toward the ground, those of the ground orientated toward the cloud, and those of the cube should radiate outside of it. This will ease the management of the direction the particles will be emitted.
Location of the objects on the layers: to insure correct interaction, make sure that the emitters and reactors (or any object which would collide with the particles) belong to the same layers.
Names of the objects: they will be of importance, later, so please name your object a decent way.
2. The particles emitter
Select the particles emitter (here, this is our plane object named
Cloud) and in the em>Particles menu, click on the plus button in order to add a particle system. A new entry named
ParticleSystem is then attached to the emitter and is shown in the particles list of slots. Make sure this is an Emitter system type.
The Emission panel could be set like this:
5000(enough to provide a dense rain)
- Emit from, Faces
- Option Random (to make sure that the water falls are not too regular nor artificial)
- Option Even Distribution (for a proportional distribution of the drops, if the emitter is built from many faces with uneven dimensions)
- Particles distrubtion; Jittered (for a random distribution of the drops emitted by a single face)
In the other panels we should mainly set how the are particles emitted: which strength, in which direction, does it have to take into account the own speed of the emitter object, or to apply a random starting speed to each particle, etc. In this tutorial, in the Velocity panel, we would more specifically play with:
- Emitter Geometry, Normal:
1.000for a gentle rain,
10.000for a very dense and intense one
- Emitter Object: set X and Y values to define the direction the rain is fallings, if you want to simulate some constant and unidirectional wind to effect the rain drops ; for example, set Y to
The Physics panel enables to set the behavior of the particles, once emitted. Size and Mass can be set there, and will be properly taken into account during the simulation. External forces (air drag, damping...) can also be set. Please note that the Brownian parameter would be slightly increased to simulate snowflakes instead of rain drops. In this tutorial, we would more specifically set... :
0.5(relative to the size of the modeled rain drop)
0.001(considering a drop of rain is close to 1g)
...in order to simulate very small particles, as our raind drops are to be considered quite light and small. We also consider that the profile of the drops makes them insensible to any air drag phenomenon. We also activate the Die on hit option, as we don't really want our modeled raind drops to stay visible on the ground once making contact with it.
Finally, in the Render panel, select the Object option and in the Dupli.Object field, type the name of the water drop object:
Drop. This will actually replace all the particles by real modeled drops.
3. The reactor particles
Basically, all the objects that could be hit by any rain drop should be considered as a reactor. You will select them one after the other, and apply the same kind of settings to each of them.
3.1 Setting the objects as obstacles for the particles simulation
Ground selected (you will do the same for the
Cube on a later stage), shift to the Physics menu. In the Collision panel, use the Add button to set collision properties to the object. In our simulation of rain, the Kill Particles option is perhaps one of the most important, so please check it. As an option, specify some value for the Particle Damping and Particle Friction Factor values, but this is not absolutely necessary there.
When you are done with the
Plane, please apply the same settings to the
3.2 Setting reacting droplets upon contact
This is an interesting capability of Blender's particle system. When a particle for a A system hits an object, it is possible to set a B system for this object in order to emit particles (the same, or totally different ones) as a response to the contact. This is what is called a Reactor type of particles system. Let's see how to set that.
The Reactor type particles has still NOT yet been re-implemented into Blender 2.5x. The following instructions are still refering to instructions relative to Blender 2.48a. The article will be updated accordingly when the feature would be again officially available.
In the Particle Buttons, add a new system using the Add New button from the Particle System tab. Select Reactor as the system type, and set the other parameters as follow:
- Amount: 5000 (in order to generate enough particles to react to the rain drops)
5.0(the droplets will have a very short span life...)
0.5(... that could vary a lot from time to time)
- Emit from, Particle (so that the system will react to particles...)
OB: Cloud(...emitted by the target emitter
Psys 1(and we specify the number id of the particle system in case the emitter has many of them)
In the Physics panel, specify a Global effects, AccZ positive value, for example
10.00. Because you would like to see the reactor object showing on the render, do not forget to activate the Render, Emitter button in the Visualization panel.
As a final step, in the Children tab, we will enable the spawning, at each collision, of a cluster of particles instead of just one. Please set the panels parameters like this:
- Particles and Nothing
3(in order to spawn 3 child droplets by parent droplet emitted during the collision)
1.000(to obtain a circular distribution of the particles)
4. Playing the simulation
You can know play the animation
Ctr+A with the mouse cursor in the 3D view. Remember that you can set a Start frame and an End frame to the particle system in the Emission panel from the Particles menu. Likewise, it is also convenient to adjust the Start frame and End frame (in the Render menu, Dimensions panel, Frame Range parameters) with wider values that cover the previous ones so that the rendered animation shows a continuous rain instead of the very begining of it.
Obviously, before rendering your animation, remember to set materials for your rain drops, especially the droplets emitted by the reactors. Those ones should stay discreet in order to remain realist.
5. Variant: falling snow
The principles are quite identical that for rain. The main differences is that the snowflakes would be more sensible to air drag phenomenon. Moreover, snowflakes will have a natural tendancy to spin on themselves along a wavy, non-linear, trajectory. With the emitter selected, in the Particles menu and in the Physics panel, you will find the two parameters that will help you with these effects in the Forces area:
- Brownian: by setting non-zero values to this parameter, you will ensure that the particles will permanently "oscillate" around their "natural" positiond, very much like electrons around atoms. The greater the value, the more the particles will wander erratically away from the natural position. For snow, be sure to test only low values like
- Drag: this setting will make the slowflakes to be slowed by air resistance. High values, like
1.000, may be convenient most of the times.
On another hand, you will most probably not want that particles Die on hit, when colliding with objects, but instead stay glued to the surface.
- With the obstacles selected, Physics menu, Collision panel: make sure that the Kill particles option is unchecked
- With the emitter selected, Particles menu, Physics panel: make sure that the the Die on hit option is unchecked
You would also have some difficulties with the speed the snowflakes are falling. You can easily slow them using the Tweak parameter in the Physics panel of the Particles menu, when the emitter is selected. E.g., using a value of
0.25 will result in snowflakes falling at one fourth of the original speed. A value greater than one, along with some non zero X and Y Velocity, will suggest some sort of blizzard occuring.
Last, do not forget that you can always set some Force Fields, in the Physics menu, in order to bring some more realistic randomness to your precipitations: the Turbulence field, especially, can provide you with great results if used with subtle Noise values.
Article written on December the 24th, 2004.
Updated on November the 16th, 2008 for Blender 2.48a. Comments re-initialized
Updated on June the 12th, 2010 for Blender 2.50 Alpha 2.