Cg Cookie Education

SUBSCRIBE: RSS | E-Mail

Blender: Human Head Modeling Series
Blender Featured Video Education
Fire and Smoke in FumeFX

Tutorial: Procedural Lava Flow in 3DS Max


By: Visit my website at: http://www.alessandrocangelosi.com/

Step 01


Welcome back to everyone, this time we’ll work searching a fast and simple way to create realistic lava flow with a good shader to simulate hot zone and rock zone on the flow. This is one method, but as you can understand there’s so many ways to do it, using standard tools, fluid dynamic simulator and custom scripts. Let’s start to create the scene. Create a Pflow emitter and moves it trying to obtain a position like in the figure, set the animation lenght in 3ds
max to 300 frames at 25fps.

Procedural Lava Flow

Step 02


Now we need to define the path that must be followed by the magma. Create a spline, and if you want try to make it similar to the figure.

Procedural Lava Flow

Step 03


Select the Pflow source and click on “Particle View” button to open the Pflow interface. You have to setup it like in the figure, so you’ll have only an “Event” with “Birth”, “Position Icon”, “Spin”, “Shape” and “Display” inside it. Select the “Birth” node, and set Emit Start = -8, Emit Stop = 300, Rate = 35.

Procedural Lava Flow

Step 04


Select the Position Icon node and leave it set to “Volume”.

Procedural Lava Flow

Step 05


Select the Spin node and set Spin Rate = 45, Variation = 10, Spin Axis = “Speed Space Follow”, X=0, Y=-1, Z=0 so we have the right spin setup for the magma flowing down,

Procedural Lava Flow

Step 06


Select the Shape node and set it with Shape = Tetra and Size = 0.45m,

Procedural Lava Flow

Step 07


Try to go at the end of the animation, you’ll see that all the particles will stay on the emitter.

Procedural Lava Flow

Step 08


In the Pflow Event, add a “Speed by Icon” node, so with it we can change the speed moving a dummy icon, then select the Speed by Icon dummy and assign a “Path follow” controller to the movement,

Procedural Lava Flow

Step 09


Select the spline created before as path for the Speed by Icon object,

Procedural Lava Flow

Step 10


Now try to move forwad the time slider, you’ll see that the particles follow the path given,

Procedural Lava Flow

Step 11


Create a BlobMesh compound object, pick the particle flow source as “Blob Objects”, and set Size = 0.5m, Tension = 1.0, Render = 6.0, Viewport = 2.0, Relative Coarseness = active, Large Data Optimization = active, move forward the time slider and you’ll notice that the magma flow mesh is coming in the right way,

Procedural Lava Flow

Step 12


Add a UVW Mapping modifier set to Box and with Lenght = 1.5, Width = 1.5, Height = 1.5,

Procedural Lava Flow

Step 13


Add a Noise modifier set with Seed = 32, Scale = 25.0, Fractal = active, Strenght X = 0.28, Strenght Y = 0.26, Strenght Z = 0.15, so the flow is more turbulent,

Procedural Lava Flow

Step 14


Add a Turbosmooth modifier to the blobmesh, we use it to add more polygons instead to increase the coarseness to make it faster,

Procedural Lava Flow

Step 15


Add an other Noise modifier with Seed = 35, Scale = 61, Fractal = active, Roughness = 0.43, Strenght X = 0.11, Strenght Y = 0.11, Strenght Z = 0.04,

Procedural Lava Flow

Step 16


Set a point of view like in the figure and create a camera from it,

Procedural Lava Flow

Step 17


Create a Direct light and change its position as proposed in the figure, set it with Shadows = on, Shadows Type = Ray Traced Shadows, Multiplier = 1.7, Color = 254,248,225 , we’ll use this like to simulate the sun,

Procedural Lava Flow

Step 18


Create an Omni light to simulate a fill light in the scene, set Multiplier = 1.2, Color = 112,158,251 ,

Procedural Lava Flow

Step 19


Set Mental Ray as rendering engine, and try to render a test image, you’ll obtain something similar to the figure,

Procedural Lava Flow

Step 20


Let’s start to create the shader to simulate the lava look, in the material editor create a Standard Material, in the diffuse channel add a Noise procedual map, set Noise Type = Turbulence, Size = 55.0, High = 0.25, Low = 0.18, Levels = 6.0, Invert = active, try to render a test and you’ll obtain something similar to the figure, the white zone will be the hot magma and the black zone will became the rocked lava,

Procedural Lava Flow

Step 21


In the noise map, add a Noise map in the Color #2 slot, set it with Noise Type = Turbulence, Size = 3.3, High = 0.545, Low = 0.45, Levels = 3.1, Invert = active, and add in the Color #1 slot the map supplied with the tutorial scene or any kind of texture similar to a natural ground or concrete material, try to render it,

Procedural Lava Flow

Step 22


Now in the Color #1 slot of the 1st noise we put in the diffuse slot, add a Noise map, set it with Noise Type = Fractal, Size = 0.5, High = 0.645, Low = 0.235, Levels = 3.0, Color #1 = 154,0,0 , Color #2 = 255, 168, 0, Invert = active, try to render it and you’ll notice that we have the rock zone and the fluid map colored zone,

Procedural Lava Flow

Step 23


Add a Mix map in the Bump slot and set the bump amount = 61,

Procedural Lava Flow

Step 24


Set the Mix Amount = 40.0, add a Noise map in the Color #1 slot and an other Noise map in the Color #2 slot,

Procedural Lava Flow

Step 25


In the Color #1 Noise map set it as Noise Type = Turbulence, Size = 30.0, High = 0.895, Low = 0.07, Levels = 8.0, Bump amount = 0.49,

Procedural Lava Flow

Step 26


Set the Color #2 Noise map with Noise Type = Turbulence, Size = 3.0, High = 0.45, Low = 0.36, Levels = 6.0, Invert = active, you’ll obtain something similar at the figure if you’ll try to render it,

Procedural Lava Flow

Step 27


Now we have to add the incandescence effect to the hot magma zone, so add a Noise map in the Self illumination slot, and set it with Noise Type = Turbulence, Size = 55.0, High = 0.25, Low = 0.18, Levels = 6.0, Invert = active, Output amount = 10.0, RGB Level = 5.0, try to render it and the magma zone are now illuminated,

Procedural Lava Flow

Step 28


Now let’s go in the Effect tab in the Environment and Effect panel, add n.2 Glow effect, set the main Size = 3.0, in the 1st glow parameters set Size = 8.0, Intensity = 73.0, Use Source Color = 56.0, go in the Options Tab and set Image Source to “Whole”, Bright = active, Bright = 101,

Procedural Lava Flow

Step 29


Go in the 2nd glow effetc, change the Size = 3.0, Intensity = 33.0, Use Source Color = 50.0,

Procedural Lava Flow

Step 30


Go in the Options tab and set Image Source = Whole, Bright = active, Bright = 60,

Procedural Lava Flow

Step 31


If you try to make a render test you’ll obtain something similar to the figure, as you can see now the hot zone are self illuminated and has the flow effect,

Procedural Lava Flow

Step 32


In the Material Editor, choose the magma material and add a Noise map in the Displacement slot, and set the displacement amount at -20,

Procedural Lava Flow

Step 33


Enter in the noise map just applied and set it with Noise type = Turbulence, Size = 55.0, High = 0.3, Low = 0.18, Levels = 4.0, Invert = active,

Procedural Lava Flow

Step 34


Try to make a render test, you are ready to render the animation, we used the AA set to min = 1, max = 64, AA type = Gauss,

Procedural Lava Flow

Step 35


Here you can see a frame at the begining of the animation,

Procedural Lava Flow

Step 36


And this one iin the middle of the animation,

Procedural Lava Flow

Step 37


And now at the end of the animation, try to make different shader setup to simulate different kind of magma, and change all the path parameters trying to obtain different scenes and to adapt it to some shot you like to do.

Procedural Lava Flow

By: Visit my website at: http://www.alessandrocangelosi.com/

(Source files are Max 2008)

7 Responses to “Tutorial: Procedural Lava Flow in 3DS Max”

  1. Alex GenoveseNo Gravatar Says:

    Very nice!

  2. Benjat IsufiNo Gravatar Says:

    Thanks man it’s a very nice tutorial

  3. WarlordNo Gravatar Says:

    Nice tut, only got one problem how do you get the blobmesh to become a whole i got alot of seprate sphere’s

  4. cenk düzgitNo Gravatar Says:

    very nice tutorial,thanx for it.)

  5. TillsNo Gravatar Says:

    HOw do you guess the mesh to become a whole??

    it is a buncha small spheres?

  6. AdELNo Gravatar Says:

    hey men, you are great.. your tutorials are very good.. ;)

  7. Clayton WalkerNo Gravatar Says:

    Very interesting and well thought-out tutorial. I’m sure this will come in handy, I plan on using this style in Blender. Thank you.