Tutorial: Particle Flow for Water Dropping
Step 01
Hi to all. That’s my first tutorial here on CGCookie. I’ll publish tutorials about shading, lighting, rendering, procedural stuffs, particles fx, dynamics and fluids. The 1st one is based on PARTICLE FLOW and it is useful to create a simple but very useful setup to generate drop falling down from a specified object.
Visit my website at: http://www.alessandrocangelosi.com/
Step 02
Step 03
Step 04
Now add a NOISE modifier to the mesh and scale the parameters to obtain something similar to our deformed mesh, (use the FRACTAL option to deform it),
Step 05
Add a TURBOSMOOTH modifier to make it with a smoothed look, so we have more polygons to make more detailed deformation, please use max 2 or 3 as value of the ITERATIONS parameter,
Step 06
Now you can add a new NOISE modifier with FRACTAL option turned to ON, and try to change the parameters to obtain something like the mesh you can see in the figure,
Step 07
Now use the PERSPECTIVE navigation tool to find a good point of view to create the camera and press the CTRL+C shortcut to create a camera from the actual viewport configuration,
Step 08
Change the ITERATIONS parameter that you can find in the TURBOSMOOTH modifier just applied before, to obtain the right level of detail as in the figure,
Step 09
Now we can create the dynamic objects and SPACE WARPS to create the particle setup we need,
Create a GRAVITY space warp with STRENGHT set to 0.70,
Add a DUMP space warp and leave all the default value to all the parameters,
Step 10
Create a PFLOW particle system and click on the PARTICLE VIEW button to open the Particle Flow interface,
Step 11
We can start to setup the particle system modyfing the main setup, change the EMIT STOP to 50,
Step 12
Remove the POSITION ICON node and put a POSITION OBJECT node, add to the emitter object list, our deformed box and leave all the other parameters as default,
Step 13
Add a FORCE node and add the GRAVITY and the DUMP space warp we created before, so the particles will fall down with a little dumping effect like in the real world, you can change the INFLUENCE % value to 600.0,
Step 14
Add a FFD3×3x3 modifier to the box and move the control points to scale the mesh as in the figure
Step 15
Change the SHAPE mesh to SPHERE and the scale at 0,36,
Step 16
Change the DISPLAY setting to the TYPE “GEOMETRY” so you can see directly the real mesh in the viewport to simulate the drops,
Step 17
Close the Particle Flow viewport and try to move the time slide to see the animation, as you can see we have some water drops falling down from the upper rock we modeled before, it seems not bad, but we can add more realism to it,
Step 18
Now we have to add more nodes in our Particle flow setup as you can see in the figure, you can see the “Drop born event” we created before, and the new one “Drips creation”, “Drips collision” and “Drips killing”, we use it to control and cancel the spawned particles,
Step 19
You have to add a FORCE node in the “Drips creation”, and add the DRAG to the list and change the INFLUENCE % at 150.0,
Step 20
If you try to see the animation you can see something similar to the figure,
Step 21
Now copy the deformed box and change it trying to obtain the 2nd mesh you can see at the bottom of the scene, we used the mirror feature and we changed the NOISE modifier params,
Step 22
Now we can continue working on the main particle setup. In the “Drips creation” toolbox, you have to add a FORCE node and set it to use the DRAG we created before, then add an AGE TEST node and set the test value to 35 and the variation to 10, so we’ll act on particles with an age value between 25 and 45, these particles goes out to the next box called “Drips killing” as in the figure,
Step 23
To set the geometry used as shape for these particles you have to add a SHAPE node set to “Sphere” and with 0.123 as value of the “Size” parameter,
Step 24
To calculate the collision with the ground rock, you have to add a COLLISION SPAWN node, to simulate the breaking event of the drop colliding with the mesh. Set “deflector01” as deflector, leave it as “Spawn On First Collision” with “Delete Parent” active. Change “Variation %” to 74.0. In the “Speed” parameters, change “Inherited %” to 49.0, (so the particles mantain part of the previous speed value), “Variation %” to 58.0, “Divergence” to 19.5. Let’s change the “Scale Factor %” to 30.0 and “Variation %” to 62.0, so we created the secondary splashes with the right amount of chaos,
Step 25
From the “Collision Spawn” event you can goes out to a new box called “Drips collision” to calculate the properties of the particles spawned. Add a FORCE with the “Gravity” space warp inside, add a SPEED node set with “Speed” at 90.0,
Step 26
Try to check the animation, you’ll see something similar to the figure,
Step 27
Copy the “Collision Spawn” node from the “Drips creation” box to the “Drops born event” as you can see in the figure, and be prepared for the creation of two new boxes to control it, “Drops collision” and “Drops killing”,
Step 28
“Drops collision” contains a perfect copy of the nodes included in “Drips collision”, so copy it, then connect the “Age Test” of “Drips collision” to the box just created,
Step 29
As you can see the “Age test” moves the particles very quickly to the “killing” event to delete it from the scene,
Step 30
Now we have to assign a material to the particles, so you have to add a MATERIAL STATIC node in the main box called “PFSource 01” as showed in the figure, click in
the box name under “Assign material” to create a new “Raytrace” empty shader as in the figure,
Step 31
Change the diffuse as in the figure, and set “Self illum” to 36, “Transparency” to 100, “Specular level” to 104, “Glossiness” to 55, so we are creating a simple water shader for the drops,
Step 32
In the “Maps” panel, add a “Falloff” in the “Reflect” slot, a “Noise” map in the “Bump” slot, and an image you like to use as environment in the “Environment” slot,
Step 33
Enter in the “Falloff” map, set the “Type” to “Fresnel” to obtain more realistic reflection simulation, and change the “Mix curve” in a similar way as in the figure, so you have more reflection on the edge of the drop and less in the side perpendicular to the camera,
Step 34
In the “Noise” map, set the “Size” to 0.8 and leave all the parameters to the default value, only to make little irregularity on the drops,
Step 35
This is the visualization in the viewport of the final setup,
Step 36
Now you can try to render it using the default lights or adding some simple lights in the scene, and the look will be similar as in the figure, the lighting is not so
important so you can work more at the particles setup trying to change parameters and general nodes trying to simulate different situation or some kind of effects, like a simple rain system, (it will be part of a future tutorial).