Particle Flow for Water Dropping

Tutorial: Particle Flow for Water Dropping

Particle Flow Tutorial

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/

Create a box with some subdivision like you can see in the figure, (4×15x2),

Step 02

Convert it to EDITABLE POLY and move some vertices as you can see in the figure.

Step 03

Add a FFD3×3x3 modifier to the box and move the control points to scale the mesh as in the figure

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).

3D Planet Render

3D Planet Render

Category: 3D Tutorials

3D planer render made in 3DS MAX

Picture 1. The final result of the 3D planet render tutorial.

This tutorial covers the creation of a 3D planet render in 3DS MAX. The texturing of the 3D planet is done with procedural maps only, so no bitmaps are needed. The 3D planet creation process consists of the the following steps:

  • Texturing a sphere with Diffuse, Bump, and Self-Illumination maps
  • Illuminating the planet with Omni lights
  • Creating rings by texturing a tube with an opacity map

In picture 1 you see the final 3D planet render. Click on the image to see a larger version at the bottom of this page.

3D Planet Geometry

Let's start by creating the planet geometry. Create a sphere (Create > Standard Primitives > Sphere) with the following settings:

  • Radius: 40
  • Segments: 100 (Use the Modify panel to change the parameters of the selected object Modify Panel)

You don't necessarily need 100 segments. It depends on what distance you look at the planet. If you need to avoid heavy geometry you might use less segments. The good thing is that you can always change this parameter later.

Sphere in 3D Studio MAX

Picture 2. A simple Sphere object is the geometry for 3D planet render.

Planet Material

The material creation is probably the most important and complicated part of this tutorial. The goal is to create a material that has both large and small details.

Apply a Standard Material to the Planet

Let's apply standard material to the planet:

  • Select the Sphere
  • Open Material Editor (Rendering > Material Editor...) Material Editor icon
  • Apply standard material to the selected object (Sphere) Button: Assign material to selection

Super Sampling

The planet material is going to utilize bump maps so we should turn SuperSampling on. Simply put, Supersampling is an antialiasing technique that increases the rendering quality. (As a rule of thumb you should turn SuperSampling on at least always when you utilize bump maps, reflection maps, or bitmaps as diffuse maps.) To turn Supersampling on:

  • Expand the SuperSampling rollout
  • Turn off: Use Global Settings
  • Turn on: Enable Local SuperSampler
  • Select Adaptive Halton from the drop-down list
  • Increase Quality value to 1,0

(These are settings for high quality supersampling which is very time consuming. If your rendering slows down too much I recommend changing the local supersampler from Adaptive Halton to Max 2.5 Star. Max 2.5 Star is not the best but it's very fast. You could for example use that for now and use Adaptive Halton for the final render.)

Bump Map

Bump maps are a very big part of this material. We are going to create bump details by combining several different procedural maps with the help of a Composite map. There are two reasons why we use several procedural maps (instead of just one):

  • By combining several procedural maps we can create both large and small scale details
  • Single procedural map isn't random enough to produce believable results

In picture 3 you see the whole bump map design of this material. You can just copy the settings or read along and take one step at a time to understand the reasoning behind these settings.

Bump map settings for a planet surface

Picture 3. The bump map design for the 3D planet material.

Large Scale Details with Splat

First we use a procedural map called Splat to create large craters:

  • Expand the Maps rollout
  • Add Composite Map as a bump map
  • Change the Opacity of the Layer 1 to 20 (this decreases the strength of the bump map effect)
  • Add Splat to the first slot of Layer 1 and make the following adjustments to it:
    • Size: 10
    • Iterations: 4
    • Threshold: 0,3
    • Color #1: Black
    • Color #2: White

(The composite map itself doesn't have any effect. It's just a container that is able to hold several maps. Inside a composite map, each map behaves as a separate layer. The layers work pretty much like in Photoshop, for example they have opacity settings and they can have masks.)

Render a test image to see the effect of the Splat bump map. The rendering should look like in picture 4.

Effect of Splat as bump map

Picture 4. The effect of Splat as bump map.

Small Scale Details with Splat

Let's add small scale details to the surface. We can do this easily by adding sub-maps to the Splat map:

  • Add Noise map to the black color component of the Splat. Make the following adjustments to the Noise map:
    • Noise Type: Turbulence
    • Levels: 10
    • Size: 0,8
  • Add Speckle map to the white color component of the Splat. Make the following adjustments to the Speckle map:
    • Size: 3

Now let's make a 3D planet render again to see how the surface looks like. Now the craters are less visible and covered with small scale details (picture 5).

Bump map work in progress

Picture 5. Very small details created with Noise and Speckle maps.

Another Layer of Small Scale Details

Let's enhance the effect by adding another layer of small scale details:

  • Create a new layer to the Composite map Icon: Create a new layer
  • Change the Opacity of the new layer to 40.
  • Add Speckle map to first slot of the Layer 2 and make the following adjustments to it:
    • Size: 2

Render a test image to see the effect (picture 6). Now there are even more small details. Craters are less visible and look more real.

Composite bump map render

Picture 6. 3D planet render after adding the Speckle bump map.

Third Layer Produces Small Mountains to Some Areas

The purpose of this final layer is to add small mountains to random areas of the surface. Mountains are created with a Noise map and randomness is achieved with Dent map mask.

  • Create a third layer to the Composite map Icon: Create a new layer
  • Add a Noise map to the first slot of Layer 3 and make the following adjustments to it:
    • Noise Type: Turbulence
    • Levels: 10
    • Size: 0,35
    • Color #1: White
    • Color #2: Black
  • Add a Dent map to the second slot (mask) of layer 3 and make the following adjustments to it:
    • Size: 700
    • Strength: 80
    • Iterations: 10

Now the bump effect is ready. Make a test render to see how it looks like. The rendering should look like picture 7.

Bump mapped 3D planet surface

Picture 7. Planet render with the final bump map. There are large craters, tiny mountains, and other small details.

Diffuse Map

Diffuse color is made with two procedural maps inside of a Composite map. In the image below (picture 8) you see the whole diffuse map design. You can just copy the settings or read along to understand the reasoning behind these settings.

Diffuse map settings

Picture 8. Diffuse map design for the 3D planet render.

Color Variations with Dent

Let's use Dent map to add some color with random intensity variations:

  • Expand the Maps rollout
  • Add Composite Map as a diffuse map
  • Add Dent to the first slot of Layer 1 and make the following adjustments to it:
    • Size: 700
    • Strength: 20
    • Iterations: 10
    • Color #1: 144,121,171 (RGB)
    • Color #2: 123,103,146 (RGB)

Now the rendered planet should look like in picture 9. Now there are some color variations but the overall coloring is still too monotonous.

Planet

Picture 9. First part of the diffuse map design is Dent.

Perlin Marble

Let's add some chaos to the coloring by using Masked Perlin Marble. (We use Mask because we want Perlin Marble to appear only in some parts of the surface.)

  • Create a new layer to the Composite map Icon: Create a new layer
  • Add a Perlin Marble map the first slot of Layer 2 and make the following adjustments to it:
    • Size: 50
    • Levels: 10
    • Color #1: 176,164,190 (RGB)
    • Color #2: 79,70,89 (RGB)
  • Add a Smoke map to the second slot (mask) of layer 2 and make the following adjustments to it:
    • Size: 40
    • Iterations: 20

Render the 3D planet to see the result. The image should look similar to picture 10.

3D planet model

Picture 10. 3D planet render with the final diffuse map.

Self-Illumination Map

Next we are going to add some self-illumination to the edges of the planet. Think of it as an atmosphere that picks up reflected light.

Settings of gradient ramp bar

Picture 11. Gradient Ramp parameters.

  • In the Maps rollout, set the Amount of Self-Illumination to 40.
  • Add Gradient Ramp as self-illumination map and make the following adjustments to it:
    • Click on the the gradient bar to add a new flag to it. Now there are total of 4 flags. Make the following adjustments to them (picture 11):
      • R=255,G=255,B=255, Pos=0
      • R=255,G=255,B=255, Pos=8
      • R=0,G=0,B=0, Pos=16
      • R=0,G=0,B=0, Pos=100
    • Gradient Type: Normal
    • Interpolation: Custom

Now there is small rim of light in the edges of the planet (picture 12).

Planet material in 3DS MAX

Picture 12. Rim of light is created with a Self-Illumination map.

Illuminating the 3D Planet

The illumination is carried out by using three back lights and one fill light (Here you can read more about back, fill, and key lights). First we illuminate the planet from the top left side:

  • Create an Omni light to the top left side of the planet (Create > Lights > Standard Lights> Omni)
  • Increase the Multiplier of the Omni light to 3.
  • Move the Omni light until the illumination looks like in picture 13.
Effect of a single Omni light

Picture 13. Planet render with a single Omni light.

Next we are going to create two additional Omni lights to illuminate the planet from the top and left sides:

  • Create second Omni light to the top side of the planet and third Omni light to the left side of the planet.
  • Increase the Multiplier of the second and third Omni light to 2.
  • Move the lights until the illumination looks like in picture 14.

Now the illumination is more interesting.

Planet illumination in 3D Studio MAX

Picture 14. Planet render with three Omni lights.

Reveal Details with Fill Light

Next we create a fill light to see more details in the planet surface:

  • Create a fourth Omni light to the top left side of the planet
  • Decrease the Multiplier of the Omni light to 0,8.

Move the fourth Omni light until the illumination matches picture 15.

3D planet rendering

Picture 15. 3D planet render with four Omni lights.

Atmosphere for the 3D Planet

There are many ways (materials, lens effects) to create an atmosphere for a planet but I think the best and easiest to control is to do it with Volume Fog Environment Effect.

Create a gizmo for the fog effect (gizmo is just a container that will hold the fog):

  • Create Sphere Gizmo (Create > Helpers > Atmospherics > Sphere Gizmo)
  • Use modify panel to change the Radius of the sphere gizmo to 43.
  • Use Align tool to place the gizmo exactly to the center of the planet. (you can also use snap or just place it manually approximately to the center of the planet.)

The gizmo should look like in picture 16. It's just a little larger than the planet.

Sphere gizmo for atmospheric effect

Picture 16. Sphere gizmo around the 3D planet.

Volume Fog Environment Effect

Let's add the fog effect to the sphere gizmo:

  • Open environment settings (Rendering > Environment...)
  • In Atmosphere rollout, click Add... button, select Volume Fog from the list and click OK.
  • In Volume Fog Parameters rollout, click Pick Gizmo button and then click the sphere gizmo to select it. Now the volume fog effect is applied to the sphere gizmo. Make the following adjustments in the Volume Fog Parameters rollout:
    • Color: 198,185,214 (RGB)
    • Density: 15
    • Noise Type: Turbulence
    • Uniformity: 1
    • Size: 5

Render an image to see the result. The image should look like in picture 17. Now the planet is ready. As you probably see there are endless possibilities to create different materials by using composite maps to combine several procedural maps.

If you want to add rings to the planet, read on.

3D planet rendered in 3DS MAX

Picture 17. The final 3D planet render.

Rings for the 3D Planet

Planet rings are pretty simple to create:

  • Create a Tube and make the following adjustments to it:
    • Radius 1: 43
    • Radius 2: 105
    • Height: 0
    • Height Segments: 1
    • Cap Segments: 1
    • Sides: 100
  • Use Align tool to place the tube to the center of the planet.
  • Rotate the tube if you want to

Apply a Standard Material to the Planet Rings

  • Select the Tube
  • Open Material Editor (Rendering > Material Editor...) Material Editor icon
  • Select a default material and apply it to the selected object (Tube) Button: Assign material to selection
  • Make the following adjustments in the Blinn Basic Parameters rollout:
    • Diffuse: 207,164,254 (RGB)
    • Self-Illumination: 100
    • Opacity: 0
  • Open Maps rollout, set the Amount of Opacity to 80 and add Gradient Ramp as Opacity map
  • Make the following adjustments to the Gradient Ramp map:
    Gradient Ramp bar

    Picture 18. Gradient Ramp parameters.

    • In Coordinates rollout:
      • Mapping:Planar from Object XYZ
    • In Gradient Ramp rollout, add 18 flags to the gradient bar (picture 18). Now there are total of 20 flags. Make the following adjustments to them (or you could just be creative and create something similar):
      • R=0,G=0,B=0, Pos=0
      • R=0,G=0,B=0, Pos=48
      • R=32,G=32,B=32, Pos=50
      • R=0,G=0,B=0, Pos=52
      • R=72,G=72,B=72, Pos=54
      • R=0,G=0,B=0, Pos=56
      • R=139,G=139,B=139, Pos=61
      • R=0,G=0,B=0, Pos=66
      • R=99,G=99,B=99, Pos=67
      • R=0,G=0,B=0, Pos=68
      • R=62,G=62,B=62, Pos=72
      • R=0,G=0,B=0, Pos=76
      • R=0,G=0,B=0, Pos=78
      • R=23,G=23,B=23, Pos=79
      • R=0,G=0,B=0, Pos=80
      • R=52,G=52,B=52, Pos=82
      • R=14,G=14,B=14, Pos=84
      • R=27,G=27,B=27, Pos=87
      • R=0,G=0,B=0, Pos=90
      • R=0,G=0,B=0, Pos=100
    • Gradient Type: Radial
    • Interpolation: Custom

The Final 3D Planet Render

In picture 19 you see the final planet render. If you learned how to master composite maps you should be able to create multitude of different materials that work well as 3D planet surfaces.

3D planet render

Picture 19. The final 3D planet render.