You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Table of Contents

This page provides a tutorial on creating a Procedural Ground Dust simulation in Maya.

Overview


 

Requires Phoenix FD 3.12.00 for V-Ray Next and V-Ray Next for Maya Hotfix 1 Official Release for Maya 2015+. If you notice a major difference between the results shown here and the behavior of your setup, please send an email to support@chaosgroup.com .

In this tutorial we explore how to create dust-like simulation using 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 a V-Ray Distance Texture. We compare how different values of some crucial parameters change the whole look of the simulation.

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

Download Project Files

Download Horses Alembic (700MB)

Units Setup


 

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.

Go to Windows → Settings and Preferences → Preferences → Settings and set the Working Units to Centimeters.

Set the Time to 30fps. We do this to ensure the setup is identical to the Procedural Ground Dust tutorial for 3ds Max. You may skip this step if you find it unnecessary. Keep in mind the final result of your simulation may turn out slightly different.

 

 

Scene Layout


 

The final scene consists of the following elements:

  1. An Alembic file containing the baked horse animation.
  2. A Poly Plane extruded to give it some thickness. The plane is used as emission geometry for the Phoenix FD Source.
  3. A Phoenix FD Source emitting Smoke into the simulation. The Discharge is modified by a Distance Texture with the horse geometry inside the Distance Texture's set. Smoke is emitted only when the horse geometry (e.g. the hoofs) are close to the poly plane.
  4. A Phoenix FD Simulator with some tweaks to the Dynamics and Rendering parameters.
  5. A V-Ray Sun & Sky setup for lighting.
  6. A V-Ray Physical Camera for rendering.

 

 

Scene Setup


 

Let's start by importing the single_horse_01.abc file.

Go to Cache → Alembic Cache → Import Alembic... and select the file. Hit F to frame it in the Viewport.

The file will come with a parent group called All_trans. You may safely unparent the deer_trans node (using Shift + P), rename it to single_horse and delete the empty groups.

Since the baked animation for the horse has a length of 300 frames, set the Timeline accordingly.



 

Add a Polygon Plane to the scene and set it's Width / Height to 2800/6200.

Move the plane to X/Y/Z: [ 0 / 0/ 4320 ].

Rename it to ground_emit_geo.

The plane is used to emit smoke into the simulation. Naturally you want it to cover the entire path of the horse. We make it much wider than the single horse in anticipation for the multiple horses alembic file that we add at the end of this tutorial.

 



 

With the plane selected, go to Edit Mesh → Extrude and give the Thickness a value of 1.

Using open geometry or geometry with no thickness (such as the plane in this example) can give you unpredictable simulation results. Making sure that your geometry is clean is crucial for a smooth workflow. Phoenix FD (and many simulation packages in general) use a volumetric representation of the emission geometry for the simulation. The process of creating this volumetric representation is called voxelization. The algorithms responsible for voxelizing the geometry can fail when using open (with holes) or planar (no thickness) geometry.

The Extrusion is applied here to turn the plane into what is essentially a very thin box. This is enough to sort out any possible problems with the voxelization at simulation time.



 

Add a Phoenix FD Fire/Smoke Source and leave its settings to their defaults.

When creating a Source, a new emission set is automatically generated for you. The emission set is used to specify which objects in your scene are used as emission geometry.

Add ground_emit_geo to the emission set of the source so Phoenix FD knows to emit Smoke and Temperature from it.

Consider renaming the source node to phx_source_smoke and its emission set to phx_source_smoke_set. Keeping organized allows you to focus on the task at hand rather than spending time trying to find objects in the scene.

 

 


 

Create a new Phoenix FD Simulator and draw it such that it envelops the horse geometry.

If you'd like your setup to be identical to the tutorial files, here are the exact settings:

  • The Simulator is transformed to Translate X/Y/Z: [0, 0, 1500].
  • Grid → Cell Size is set to 2. The Cell Size parameter controls the resolution of the simulation grid. The lower this value is, the more resources the simulation will consume (both memory and time) but the more detailed the final result will be.
  • The Grid → X/Y/Z Size is set to 150 / 60 / 140 to envelop the horse geometry.

 


 

Now that a Source, a Simulator and Source with attached emitter geometry are all present in the scene, you may run the simulation to see how things are looking.

If you've used the exact coordinates mentioned in the tutorial so far, you may need to nudge ground_emit_geo a centimeter up in the Y axis in case no Smoke is produced when running the simulation. Because the geometry is so thin (1cm which is half the size of a single simulator cell) and right at the border, it's possible that it won't be considered as part of the simulation.

Currently the entire source geometry is emitting Smoke and Temperature. Instead, our goal is to limit the emission such that smoke is created only when the hooves of the horse intersect the ground.

We achieve this with the help of a V-Ray Distance texture.

 


 

Assign a V-Ray Material to ground_emit_geo and plug a V-Ray Distance Texture (available under the Utilities category) in the Diffuse Color slot.

Set the Distance parameter to 8 and swap the Far / Near Color.

Put the single_horse geometry in the V-Ray Distance Texture's set.

Lastly, open the Color Balance rollout and enable Alpha is Luminance. This is necessary because we later use the Distance Texture as a Discharge Map in the Phoenix FD Source. The Source looks at the Alpha channel of the texture thus enabling Alpha is Luminance will produce an Alpha channel for us based on the Luminance values.

Here's how the V-Ray Distance Texture works: when applied to an object, it computes the distance between that object and any geometry placed inside its Objects set. If the computed distance is below the Distance parameter, the Near Color is used. Otherwise, the Far Color is used.

In this example, we apply the Distance Texture to ground_emit_geo. We also add the single_horse geometry to the Objects set. Therefore, whenever the distance between a point on the ground and a point on the horse geometry is below 8, that point on the ground is considered close so Near Color (white) is used.

This can be quite useful for the Phoenix FD Source's Discharge Map parameter which expects black and white values.


 


 

Add the V-Ray Distance Texture to the Discharge map slot of the Phoenix FD Source.

You can do this either by manually typing the name of the texture and hitting enter, or by Middle-Mouse button drad&drop from the Hypershade.



 

The Phoenix FD Source should now be emitting only in those areas where the hooves of the horse intersect the ground.

In the next step we enable Adaptive Grid which allows the simulation box to automatically resize around the emitted smoke.

 To enable the GPU Preview as seen on the video to the right, go to Phoenix FD Simulator → Preview → GPU Shade Preview → Enable GPU Preview.



 

To allow the grid to automatically resize, go to Grid roll-out → Grid AdaptationAdaptive Grid : 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.

Set the Threshold to 0.01 - 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.01 will cause the grid to expand. Since the Smoke is emitting Smoke 1.0, this means that the grid will be quite sensitive to smoke coming near the grid walls.

Set the Extra Margin to 50 - this option allows the adaptation to keep a number of voxels close to the walls as a buffer zone and expand the grid earlier than usual. This can be especially useful when simulating fast-moving objects or explosions as it allows the simulator to expand before any clipping occurs.

Enable Manual Adaptation Limits and set the X / Y / Z dimensions such that the entire path of the horse is enveloped by the red bounding box indicating the maximal limits (for this example, the exact values are on the picture to the right).



 

The grid is now correctly expanding around the smoke generated by the horse.

There are a couple of issues that need to be addressed before proceeding:

  1. The Volumetric Rendering settings are set such that high temperature values are rendered as fire - if you look closely, you can see the illumination around the hooves of the horse.
  2. The horse geometry should be moved up in the +Y axis - at the moment, the legs of the horse are intersecting the ground all the way up to the knee.



 

Since we won't be using the Temperature for rendering, open the Output roll-out and disable the export of the Temperature Grid Channel. This will reduce the size of the cache files on disk.

If you'd like to render the simulation with Motion Blur, enable the export of Velocity.

 Note that despite disabling the export of Temperature, the Phoenix FD Fire Source will still be emitting it into the simulation, and the Simulator will still be using it for calculating the dynamics. Temperature contributes to the speed of ascension of the Smoke - disabling it completely from the Source will drastically change the look of your simulation.



 

Let's make some changes to the Volumetric Shader so the preview is closer to the appearance of sand. This will help out when tweaking the Dynamics parameters.

Open the SimulatorRendering roll-out → Fire and set the Based On parameter to Disabled. As mentioned earlier, Fire is not necessary for this simulation.

Under the Smoke Color roll-out, set the Constant Color to RGB: [ 0.882, 0.749, 0.639 ]. Reduce the External Scatter Mult. to 0.4 so the Smoke appears less translucent.

Under the Smoke Opacity roll-out, set the Simple Smoke Opacity to 0.3. This parameter can be used to control the thickness of Smoke.



 

Select the single_horse geometry and move it up in the Y axis so at Frame 3 the front left hoof is barely intersecting the ground geometry.

The exact value used in this example is Translate X/Y/Z: [0, 15, 0].



 

To the right is a playblast of 60 frames of the simulation in its current state.

We're now ready to start tweaking the parameters affecting the dynamics of the simulation.

 

 

 

Simulation Settings


 

 

Open the Simulator → Dynamics roll-out and set the Smoke Dissipation parameter to 0.1.

This will allow for some of the smoke to disappear as the simulation progresses. The Smoke Dissipation algorithm gradually removes smoke density as simulation time passes.

 


 

Here's a playblast of the simulation with Smoke Dissipation set to 0.1.

Overall there's less smoke in the container, and the smoke thins out as the simulation progresses.

To make the smoke move similar to sand, we need to tweak the Vorticity and Randomization parameters.

 


 

Under the Dynamics roll-out, set the Vorticity → Smoke Surface value to 0.3.

Reduce Vorticity → Temperature Surface to 0 and increase the Vorticity → Large Scale to 1.

Massive Vorticity creates turbulence at the surface of the smoke, thus producing interesting detail without breaking up the general shape. For detailed information and examples on Vorticity, please check the Vorticity documentation.

 


 

Some extra detail has appeared but it's barely visible at the moment.

Once we've increased the Conservation Quality, it should become more prominent.

 


 

Set the Conservation Method to PCG Symmetric, with a Quality of 100.

Conservation transforms straight-line movement of the fluid into swirling vortices. The higher the strength of the conservation, the farther the motion forces will be propagated throughout the container

The PCG Symmetric method is generally the best choice when simulating smoke or explosions.

The Quality parameter controls the strength of the Conservation.

For detailed information and examples on Conservation, please refer to the Conservation documentation.

 


 

With PCG Conservation and Quality of 100, the effect of the Vorticity settings set earlier is now more pronounced.

Because sand doesn't move as uniformly as a fluid, in the next step we add some randomization to further break-up the smoke.

 


 

Set Dynamics → Randomize → Amount to 1.

This will randomize the Velocity field, essentially 'ripping' the smoke apart.

 


 

With the Randomization options set up, the simulation is now starting to take shape.

In case your setup differs from this example, you can try playing with the Source's Discharge, the Dynamics → Smoke Dissipation and Smoke Buoyancy parameters as well as the Vorticity and Randomize options. All of those will have a pronounced effect on the final result.

In the next step we increase the Discharge on the Fire/Smoke Source and run a final simulation.

 


 

Select the Phoenix FD Source and set the Discharge to 1400. This will cause the source to pump in more smoke into the simulation grid at a higher velocity, further breaking up the shape.

Set the Noise parameter to 0.5. The Noise works as a random multiplier for the Discharge on each frame.

Select the Phoenix FD Simulator and hit Start to run a final simulation for the full 300 frames duration.

 


 

Here's a playblast of the final simulation.

In the next step, we prepare a lighting setup using V-Ray's Physical Sun&Sky system.

If you prefer the smoke to settle down faster, try reducing the Dynamics → Smoke Buoyancy parameter.
If the smoke is too dense for your needs, try reducing the Rendering → Smoke Opacity → Simple Smoke Opacity parameter.
You can also experiment with the Dynamics → Randomize and Dynamics → Vorticity parameters to change the behavior of the simulation.

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.

 

 

Lighting & Rendering


 

Add a new Camera by going to Create → Camera.

The exact position of the camera is:

Translate X/Y/Z: [-852, 146, 2936]
Rotate X/Y/Z: [-4, -50, 0]

The Film Back → Film Gate is set to 35mm Full Apperture, with the Camera Attributes → Angle of View set to 48.

Add Attributes → V-Ray → Physical Camera. Set the Shutter Speed to 400 and the White Balance to RGB: [ 0.996, 0.859, 0.678 ].

 


 

Go to the V-Ray Render Settings and under the Overrides tab → Environment, hit the Create Sun and Create Sky buttons.

This will generate a V-Ray Sun&Sky setup for you.

The exact position of the Sun in this example is Translate X/Y/Z: [ 1520, 6540, 4600 ].

 


 

To the right is a rendered image of frame 52:

The only thing left to do is to add a V-Ray Infinite plane as the ground.

The V-Ray Settings used when rendering this image are pretty much default with the only change being the VRay → Image Sampler → Sampler Type set to Bucket.

This is done so the Phoenix FD Light Cache can be efficiently calculated. When rendering with V-Ray's Progressive sampler the Phoenix FD Light Cache is much slower to show the first pixels, so it automatically defaults to disabled.

The Exposure in the V-Ray Frame Buffer is also bumped to 1.5 for a slightly brighter image.

 


 

Add a V-Ray Plane to the scene and assign a V-Ray Material to it.

Set the Diffuse Color of the material to RGB: [ 0.772, 0.529, 0.365 ].

 

 

Multiple Horses


 

Swapping the single horse model for the cached sequence of multiple horses is quite straight-forward.

Go to Cache → Alembic Cache → Import Alembic and select the horses.abc file.

Replace the single_horse mesh with the new one inside the Distance Texture's set and Start the simulation.

 


 

Here's a rendered image of frame 38 with the horses.abc file.