Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This page provides a tutorial on creating a Procedural Ground Dust simulation with Voxel Tuner in 3ds Max.

 

Page Contents

Table of Contents
maxLevel3
stylecircle

Overview

 

Overview

...

UI Text Box
typeinfo

This is an Intermediate Level tutorial. Even though no previous knowledge of Phoenix is required to follow along, re-purposing the setup shown here to another shot may require a deeper understanding of the host platform's tools, and some modifications of the simulation settings.

Section
Column
width40%

In this tutorial we explore how to create dust-like simulation using Chaos Phoenix FD smoke. We go through setting the right simulation units, appropriate geometry dimensions and scene setup suggestions. Most importantly, we guide you through how to make a realistic sand smoke coming up as the horses step on the ground using VrayDistanceTex, VRayCompTex and Smoke texture maps as a mask for the smoke emitVoxel Tuner. We compare how different values of some crucial parameters change the whole simulation's look.

Using multiple animated geometry meshes, we show how Phoenix FD handles large scale smoke simulations during animation.

 

This simulation requires Phoenix 4.10 Official Release and V-Ray Next Official Release for 3ds Max 2017 at least. You can download official Phoenix and V-Ray from https://download.chaos.com. If you notice a major difference between the results shown here and the behavior of your setup, please reach us using the Support Form. 

 

UI Button
sizelarge
titleDownload Project Files
urlhttps://drive.google.com/uc?export=download&id=1o91OPGjVWOCqcbhC5b27jSoKIq36C69c
UI Button
newWindowtrue
sizelarge
titleDownload Horses Alembic (700MB)
url
1CFpLXdkQtebBJBsNqx3WQ_jtkzdXcYoL

Column
width60%
Align
aligncenter
HTML
<iframe width="720" height="480" src="https://
drive
www.
google
youtube.com/embed/
uc?export=download&id=1JDGBkMj0FV9A4HSrSEG-NLg50Eb1KsSZ
Column
width60%

Image Removed

Units Setup

sgGt94GPe6g?version=3&loop=1&playlist=sgGt94GPe6g" frameborder="0" allowfullscreen></iframe>

 

Units Setup

...

...

Section
Column
width40%

Scale is crucial for the behavior of any simulation. The real-world size of the Simulator in units is important for the simulation dynamics. Large-scale simulations appear to move more slowly, while mid-to-small scale simulations have lots of vigorous movement. When you create your Simulator, you must check the Grid rollout where the real-world extents of the Simulator are shown. If the size of the Simulator in the scene cannot be changed, you can cheat the solver into working as if the scale is larger or smaller by changing the Scene Scale option in the Grid rollout.

The Phoenix FD solver is not affected by how you choose to view the Display Unit Scale - it is just a matter of convenience.

The

horses

horse used in the simulation

are

is modeled in centimeters and throughout the fluid simulation we keep using the same unit. If you want to simulate a massive scene, then you might consider using meters.

Go to Customize

>

Units Setup and set Display Unit Scale to Metric Centimeters.

Also, set the System Units such that 1 Unit equals 1 Centimeter.

 

Column
width60%

 

...


Section
Column
width40%

The horse's geometry is modeled with the following dimensions - 196 cm in height, 244 cm in length and width of 60 cm.

Column
width60%

Image Modified

 

Scene Layout

...

...

Section
Column
width40%

The final scene consists of the following elements:

Since the simulation scene requires usage of hundreds of horses, the horses' animated geometry is firstly exported to alembic file.

There is also a single
  1. An
  1. animated horse exported to an alembic file
to use during the development stage.

 

There is only one single V-Ray Dome light to light up the scene
  1. provided with the single_horse_01.ABC file.
  2. A dust emitting ground is set by a 3ds Max Standard Plane with Shell modifier applied.
  3. A V-Ray Infinite Plane is used for easily setting the ground.
  4. Phoenix Fire/Smoke Simulator with some tweaks in the Grid, Dynamics, and Rendering rollouts.
  5. A Voxel Tuner is used for a realistic sand smoke coming up as the horse steps on the ground. 
  6. Standard Physical Camera with minor tweaks for final rendering.
  7. A V-Ray Sun Light.

Column
width60%

Image RemovedImage Added

  

Scene Setup

...

Section
Column
width40%

A V-Ray Infinite Plane is used for easily setting the ground.

The dust emitting ground is set by a 3ds Max standard plane with dimensions covering the space under the running horses. Dimensions in this scene Create a 3ds Max Standard Plane. The exact dimensions of the plane are 6225 cm by 2793 cm.

Since Phoenix FD works best with closed geometry, add a Shell modifier to the created plane.

Set the Outer Amount as little as to 1.0 cm. The actual value does not have weight in the final render, as the plane will not be visible at all there.

 

The exact Position of the plane in the scene is [ X:0cm, Y:-4320cm, Z:-20cm ].

Column
width60%

 

...

 

Section
Column
width40%

With the plane selected, right-click on the Large-scale Smoke icon in the Phoenix FD toolbar.

 

This generates a simulator, a PHXSource and sets a smoke shader in the scene automatically.

Column
width60%

Image Removed

 

 

 

Section
Column
width40%

Select the PhoenixSource in the viewport.

Then go to Modifiers and add a Discharge Modifier.

 

We want the ground to emit dust only from the top visible part and not from all sides. Thus, set the Modify Outgoing Velocity to Normal Z.

In the grid, set the values of the two points to [0,0; 1,1].

Column
width30%

 Image Removed

Column
width30%

Image Removed

 

 

Import the single_horse_01.ABC geometry by going to File → Import → Import...

This tutorial starts off with pre-built geometry to save time setting up the scene. Feel free to use your own personal models.

 

The exact start Position of the alembic mesh in the scene is [ X:0cm, Y:0cm, Z:0cm ].

 

You can control the interaction strength between the horse mesh and the ground plane by adjusting the Motion Velocity Effect, located in the Phoenix Per-Node PropertiesThe higher the value is, the stronger the fluid reaction to the body's movement is. For this tutorial, its value is set to 2.0.

Column
width60%

Image Added


...

 

Section
Column
width40%

Create a V-Ray Infinite Plane used during rendering.

 

The exact Position of the V-Ray plane in the scene is [ X:0cm, Y:0cm, Z:-15cm ].

 

...

...

 

Section
Column
width40%

Now that you have the plane as a smoke source, let's explore the right settings for a nice looking simulationCreate a Fire Smoke Simulator.

 

The Outgoing Velocity is set to 1410 cm. The Smoke parameter has a value of 30.

 

There is a texture map set as a Mask.

exact Position of the simulator in the scene is [ X:0cm, Y:-1500cm, Z:-20cm ].

Column
width60%

Image RemovedImage Added 

  

Voxel Tuner

...

Section
Column
width40%

Let's try We are going to use VRayDistanceTex map as a Mask.

 

The VRayDistanceTex is a V-Ray specific procedural texture that returns a different color based on a point's distance to an object(s) specified in a selection list. It comes in handy here, where V-Ray will calculate the distance between the horse mesh and the plane and will generate a black-and-white mask procedurally. For that goal add your horse mesh(es) (the alembic file you created earlier) in the list of VRayDistanceTex Objects.

 

Distance is set to 8.0.

a Voxel Tuner to emit Smoke where the horse model touches the ground. We will do it in such a way, that we don't even need a Phoenix Source.

In this case, the Voxel Tuner will go through all the voxels of the Simulator, and check if each voxel is close to the ground plane and simultaneously close to the horse mesh. If it passes this condition, then the Tuner will create Smoke in this voxel.

The Voxel Tuner expression is created as follows:

  • If a voxel's Distance to Plane001 is Less Than 1.7 voxels and If the Distance to horse mesh is Less Than 1.7 voxels.
  • Then the Smoke will be Set to 15.0.

We picked very low values for both distance conditions - if you lower them even more, less voxels will pass the condition and Smoke will be emitted in fewer places. On the contrary, if you increase the distances, Smoke will start getting created in the air around the contact points between the horse and the ground.

We also create very dense Smoke - usually we don't need smoke above 1.0, but in this case we emit 15 units of smoke, which would make the smoke render very dense with the default render settings. Below we will enable Smoke Dissipation so the smoke will be thick at first, but then will quickly fade outSwap the far and near colors, so that the far color is black and the near color is white.

Column
width60%

Image RemovedImage Added

 

 


Section
Column
width40%

Plug in the VRayDistanceTex to the Diffuse channel of a 3ds Max Standard material.

 

Assign it to the plane.

50%

Image Added 

Column
width60%50%

Image RemovedImage Added

 

...

 

Section
Column
width40%

Render Run the simulation for a few frames and render out one frame with a the running horse.

 

Notice how VRayDistanceTex generates a white circle the Voxel Tuner generates smoke around the horse's hoof when touching it touches the ground. 

The mask is still too uniform, so we need to adjust the texture to make it look more organic.

Column
width60%

Image RemovedImage Added

  

Simulation

...

Section

Let's use the VRayCompTex in order to blend the VRayDistanceTex with a Smoke texture.

 

Set the Operator to Multiply (A*B).

Don't forget to assign the VRayCompTex as a Mask in the PhoenixSource after creating it.

Column
width40%
Column
width60%

Image Removed

 

 

Section
Column
width40%

Take a look at the settings of the Smoke texture.

 

Note that the Size parameter is set to a value of 10.0.

Column
width60%

Image Removed

 

 

Section
Column
width40%

This is how the resulting composited texture looks like. The mask is subtle, thus the produced dust will look more natural.

Column
width60%

Image Removed

Simulation

 

Section
Column
width40%

Moving on to the simulation grid.

 

Set the grid as the green box from the picture. It needs to be placed where the first two horses are positioned on the plane.

 

Then, with Adaptive Grid enabled, expand the red grid as shown in the image. That will be your Maximum expansion of the simulation (make sure to enable the checkbox from the Grid parameters first), which will reduce significantly the simulation time.

 

You could also allow the trailing end of the grid to collapse back as the smoke thins out. You can disable No Smaller Than Initial Grid from the Grid roll-out and this will help reduce RAM usage and simulation time. If the smoke gets clipped too quickly by the shrinking grid, you should decrease the Adaptive Grid threshold further.

Column
width60%

Image Removed

 

 

The Simulator → Grid parameters are tweaked as follows:

 

The Scene Scale is set to 5.0.

The Cell Size is set to 2.0cm.

The Size of the Simulator is set to [ X:150cm, Y:140cm, Z:70cm ] as a starting point.

The Adaptive Grid is set to Smoke. The Adaptive Grid allows the container to resize on-demand as the simulation progresses, saving you a lot of time. Instead of calculating a giant grid from the start, the specified channel is tracked (Smoke in this case) and the grid is automatically resized around it.

The Threshold is set to 0.002. The grid will expand when the content of a cell near one of the container walls crosses this value. In this case any Smoke value above 0.002 will cause the grid to expand.

The Extra Margin is set to 70

Section
Column
width40%

Let's take a closer look at the Grid's parameters.

 

The Cell size here is set to approximately 2.4 cm.

Set the Adaptive Grid to be based on the Smoke.

 

We have set the Extra Margin to 50. This is important, because if left at 0, the Adaptive Grid will not expand fast enough and the horses horse will be running without emitting dust.

The Expand and Don't Shrink is enabled

The Maximum Expansion is enabled. The limitations are set to [ -X/+X: 80/155, -Y/+Y: 950/30, -Z/+Z: 0/50 ].

Column
width60%

Image RemovedImage Added

 

...

 

Section
Column
width40%

The three images here compare the differences between Scene Scale values [set from top to bottom to 1, 5 and 10].

 

The higher the value of the Scene Scale, the slower the movement of the fluid would be. This will keep the smoke close to the ground.

 

Our The goal here is to make the smoke look like sand, so we don't need it too diffuse there is no need to be too diffused or raising high from the ground. We settle here for a value of At this tutorial the Scene Scale is set to 5, but feel free to experiment with other values as well.

Column
width60%

Image RemovedImage Added

 

...

 

 

 

Section
Column
width40%

In the Dynamics rollout menu, switch the Smoke dissipationDissipation to 0.1 2 and the Smoke buoyancyBuoyancy to 0.06.

 

The Randomize Amount is given a value of 1.0.

The Conservation Method is set to PCG Symmetric, with a Quality of 100. The PCG Symmetric method, in general, produces the most interesting smoke simulations, preserving both detail and symmetry. The high Conservation Quality will allow the dust to produce swirling motion. For in-depth information, please check the Conservation documentation.

The Material Transfer (Advection) Method is set to Multi-Pass.

The Steps per frame are set to 2.

Column
width60%

Image RemovedImage Added

 

...

 

Section
Column
width40%

Compare the difference in the Smoke Buoyancy values displayed in these two simulation three images.

 

Top: value of 1 (default value);

Bottom: value of 0.

The values are set as follows from top to bottom to [ 0, 0.6 and 1 ].


The Smoke Buoyancy could be even set With a value of 0 we get closer to a sand similar simulation, where the dust particles stay closer to the ground. You can even set this to a negative value so the dust would subside with time.

Column
width60%

Image RemovedImage Added

 

...

 

Section
Column
width40%

The Smoke dissipationDissipation parameter controls how fast the smoke will disappear. The maximum value of 1 will make the smoke disappear immediately after it was emitted.

 

Top image: default value of 0.0;

Bottom image: value of 0.1The three images here compare the differences between Smoke Dissipation values [set from top to bottom to 0, 0.2 and 0.7].

 

You might notice that with a value values of 0.1 2 and 0.7 there is a lot less detail in the smoke simulation because as it becomes more transparent, sharp edges and sharp shadows are diminished. However, the simulation here is done with only one horse and we have quite more in the final scene. They will add up to the total picture and in order not to be covered completely in dust, we choose to stick to a value above 0.0.

Column
width60%

Image RemovedImage Added

 

...

 

Section
Column
width40%

The Randomize parameter is responsible for the random fluctuations of the fluid's velocity for each grid voxel. 

Top image: value of 0 (default value);.

Bottom image: value of 1.0.

 

The We adopt the value of 1.0 is chosen for this parameter in order to break the natural fluid mushroom shapes and puffs and make the result look more chaotic.

Column
width60%

Image Added

 

...

 

Section
Column
width40%

Open the Output rollout menu, which holds the controls for the simulation result.

The Storage Quality is set to 20 to prevent artifacts in the simulation due to the cache compression.

Since the Temperature is not used in the scene, the Temperature Output Grid Channel is disabled.

The Smoke Output Channel is enabled.

 

Enable the Velocity Channel, if you'd like to render the simulation with Motion Blur or start a Resimulation.

Column
width60%

Image RemovedImage Added

 

...

 

Section
Column
width40%

Open the Rendering rollout menu to prepare the simulation for rendering.

 

The Sampler type parameter determines the blending method between adjacent grid cells. We The sampler is set it to Spherical.

Column
width60%

Image RemovedImage Added

 

...

 

Section
Column
width40%

In those two comparison images you see the default Sampler type, that is, Linear (topimages are compared two different Sampler types - Spherical (top) and Linear (bottom).

 

The With Linear Sampler Type the produced dust looks grainy, so we switch to Spherical sampling (bottom), that for this tutorial the Spherical sampling is used instead. That effectively reduces this issue.

Column
width60%

Image RemovedImage Added

 

...

 

Section
Column
width40%

Open the Volumetric Render Settings found by pressing the Volumetric Options button in the Rendering rollout menu.

Here you can control the smoke color and its opacity.

 

 

The Volumetric Render Settings are tweaked as follows:

 

The Fire's Based on is set to Disabled.

The Smoke Color is Based on Constant colorSet the color to be Constant. We aim at a sand-looking smoke, so we use RGB [ 225, 191, 163 ] for Constant color, but you can tweak it further.

The External Scatter Mult. is set to 0.3.

The Simple Smoke Opacity is adjusted to 0.3 is set to 0.7.

The Minimum Visible Opacity is set to 0.0.

The Scale Opacity by Scene Units is disabled.

Column
width60%

Image Added

 

Materials

...

Section
Column
width40%

The main focus in this tutorial is on the simulation, so the materials used for the Infinite Plane (ground) and the Horse mesh are standard V-Ray Materials.

 

The Diffuse color of the "vray_plane_material" is RGB [ 197, 135, 93 ].

All other parameters are left with their default values.

Column
width60%

Image Added

 

...

 

Section
Column
width40%

The Diffuse color of the "horse_material" is RGB [ 128, 128, 128 ].

All other parameters are left with their default values.

Column
width60%

Image Added

 

Lighting and Camera

...

Section
Column
width40%

The source of illumination in the scene is a single V-Ray Sun.

To add one, go to Create → Lights → VRaySun.

Set the Intensity multiplier to 0.02.

Column
width60%
Image Removed

Image Added

 

...

 

Section
Column
width40%

For this setup a Standard Physical Camera is used.

 

The Film / Sensor Preset is set to 35mm (Full Frame).

The Film / Sensor Width is set to 36.0 mm.

The Focal Length is set to 40.0.

The Aperture is set to 5.0.

The Film Speed (ISO) is set to 100.

The Shutter Duration is set to 1000.0.

 

The exact position of the Camera is [ -1730cm, -3785cm, 907cm ]

and of the Camera Target is [ 179.267cm, -2317.455cm, 36.06cm ].

Column
width60%

Image AddedImage Added

 

Render Settings

...

Section
Column
width40%

In the previous stepsIn the previous step, when setting the dust/smoke simulation , we worked around used the shelled plane and it was visible in the rendered images.

 

Now, As we don't need this plane to be rendered in the final image . So, - select the plane, right-click it and go to its Object Properties menu. Disable the Renderable option and enable Display as Box options.

Column
width60%

Image RemovedImage Added

 

...

 

Section
Column
width40%

In this tutorial we focus mainly on the simulation, so the material used for the Infinite Plane (ground) is a V-Ray Material with the following settings:

 

Diffuse [197, 135, 93].

All other parameters are left to their default values.

Assign the material to the infinite plane.

 

Lighting in this scene relies on a V-Ray Dome light with assigned HDRI map. You can also use V-Ray Sky and Sun system. Remember to set your camera exposure to be suitable for outdoor lighting.

the final render a Probabilistic Shading  is used. The option is located in Environment → Atmosphere → PhoenixFD Atmosphere Settings. When Use Probabilistic Shading is enabled, the volumetrics will select a only few samples (based on the smoke density) along each camera ray, and evaluate the volume lighting at those points. In some situations this will make the render time shorter.

The Use Probabilistic Shading is enabled.

All parameters are left with their default values.

Column
width60%

Image Added

 

...

 

Section
Column
width40%

In the Render Setup Tab:

 

The Image Sampler Type is set to Bucket.

The Min Subdivs are set to 1.

The Max Subdivs are set to 6.

The Bucket width is set to 24.0.

The Noise threshold is set to 0.005. 

Column
width60%
Image Removed

Image Added

 

...

 

Section
Column
width30%40%

A V-Ray Denoiser Render Element is added to the final image. The Denoiser takes an existing render and applies a denoising operation to it after the image is completely rendered in order to remove the noise in the image.

For this tutorial the Custom preset is used.

The strength is set to 0.5.

The radius is set to 10.0.

You are ready to run the simulation.

Here are the final render results.  

Column
width70%60%
Image Removed

Image Added

  

Final Results

...

Section
In this image you can see how a large number of animated geometry creates much dust/smoke detail in the in-betweens.
Column
width50%30%

Image Added

 

 

Column
width70%

Image Removed

 

50%

Image Added

...