Versions Compared

Key

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

...

Section
Column
width40%

Requires Phoenix 3.12.00 Official Release and V-Ray Next Official Release for 3ds Max 2015+ at least. If you notice a major difference between the results shown here and the behaviour behavior of your setup, please reach us using the Support Form.

The instructions on this page guide you through the process of using Phoenix to create a simulation of a river flowing down a hill.

The Download button below provides you with an archive containing the scene file.

 

UI Button
sizelarge
icondownload
titleDownload Project Files
urlhttps://drive.google.com/uc?export=download&id=1PVaaAH_zpaWcpTWKESEFKjJE8JahT4Il

Column
width60%
videoautoplayloop
Align
0007_finalRender.mp4
1100%
2100%
3true
4false
5true

 

Units Setup

aligncenter
HTML
<iframe width="800" height="450" src="https://www.youtube.com/embed/1lIBTWdAIks?version=3&loop=1&playlist=1lIBTWdAIks" frameborder="0" allowfullscreen></iframe>

 

Units Setup

...

Section
Column
width40%

Scale is

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 solver is not affected by how you choose to view the Display Unit Scale - it is just a matter of convenience.

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%

...

true
Section
Column
width40%

Here's a preview of the simulation in its current state.

The entire riverBed geometry is emitting liquid into the Simulator. Instead, we want liquid to be emitted into the simulation only at the very start of the river.

We can accomplish this by giving the Phoenix Liquid Source a set of faces specified by us to use for the emission. The Polygon ID parameter at the bottom of the options panel for the Source can be used for this.

Column
width60%
videoautoplayloop
Align
0001_addSim_addSource.mp4
1100%
2100%
3true
4false
aligncenter
HTML
<iframe width="800" height="450" src="https://www.youtube.com/embed/QNFFQDRNIcs?version=3&loop=1&playlist=QNFFQDRNIcs" frameborder="0" allowfullscreen></iframe>
5

 

...

 

Section
Column
width40%

Select the riverBed geometry and assign an Edit Mesh modifier.

Go into Face Selection mode.

Select the faces at the very start of the stream and assign to them a Polygon ID of 2.

Column
width60%

...

true
Section
Column
width40%

Here's a preview of the simulation in its current state.

One major issue at the moment is the fact that it takes about 250 frames for the river bed to fill up with water. This can become a major issue when running high-res simulations and tweaking individual parameters for the Foam, Splashes, etc.

There are two ways to address this:

  1. Run the simulation for 200 or so frames and use the Simulation rollout → Load & Start button to start a new simulation from the last frame of the one before.
  2. Enable Dynamics → Initial Fill Up to fill the Liquid Simulator with water on the first frame of the simulation.

We go with the second approach.

Column
width60%
videoautoplayloop
Align
0002_polyID_for_emission.mp4
1100%
2100%
3true
4false
aligncenter
HTML
<iframe width="800" height="450" src="https://www.youtube.com/embed/rpSYyDOpX-k?version=3&loop=1&playlist=rpSYyDOpX-k" frameborder="0" allowfullscreen></iframe>
5

 

...

 

Section
Column
width40%

Enable Dynamics → Initial Fill Up and set the level to 40 (% of the simulator bounding box height).

Column
width60%

...

true
Section
Column
width40%

Here's a preview of the simulation in its current state.

Before we take care of the Foam/Splash particles, we take a quick look at Wetting in the next step.

Column
width60%
videoautoplayloop
Align
0003_enable_initialFillUp.mp4
1100%
2100%
3true
4false
aligncenter
HTML
<iframe width="800" height="450" src="https://www.youtube.com/embed/_w2TxT8vNrs?version=3&loop=1&playlist=_w2TxT8vNrs" frameborder="0" allowfullscreen></iframe>
5

 

Wetting 

...

Section
Column
width40%

For a realistic interaction between the scene geometry and the liquid, Phoenix provides you with the option to simulate the effect of Wetting.

Wetting is handled by a set of secondary WetMap Particles which are calculated along with the Liquid, Foam, Splashes, etc.

WetMap particles are created where the Liquid particles interact with the scene geometry.

You can use the WetMap Particles through a Particle Texture to generate a Black&White Texture Map which can be used as a mask for a Blend Material.

The preview of WetMap Particles can be Enabled/Disabled from the Phoenix Simulator → Preview rollout → Particle Preview options.

Column
width60%

...

Section
Column
width40%

Assign a V-Ray Blend Material to the riverBed geometry.

Plug two V-Ray materials to the Base and Coat 1 inputs of the Blend material. Set the Diffuse colors of those V-Ray materials to Red and Yellow respectively.

Finally, plug a Phoenix FD Particle Texture to the Blend 1 input of the Blend material. Click the None button below the Source Particle System option and select the Phoenix Simulator. When prompted to pick a particle system, select the Particles [ WetMap ] of [ PhoenixFDLiquid001 ] entry in the list.

Finally, set the Particle Area Radius to 5cm. This option controls the size of the white dots generated by each WetMap particle.

Column
width60%

 

...

 

Section
Column
width50%

 Particle Area Radius: 2.0

Column
width50%

 Particle Area Radius: 5.0

...

Section
Column
width40%

Here's a preview of the Splash particles on their own:

In the next step, we enable the simulation of Foam.

Column
width60%
videoautoplayloop
Align
0004_enableSplashParticles.mp4
1100%
2100%
3true
4false
5true
aligncenter
HTML
<iframe width="800" height="450" src="https://www.youtube.com/embed/cbnrVjXike0?version=3&loop=1&playlist=cbnrVjXike0" frameborder="0" allowfullscreen></iframe>

 

...

 

Section
Column
width40%

Open the Liquid Simulator →  Foam rollout and select the Enable checkbox.

Set the Foam Amount to 0. As discussed earlier, Foam particles should only be born by the Splash particles in this setup.

Set the Lifespan → Half Life to 6 seconds. After some trial and error, we decided on this value. This may be changed for your scene if you are following along with a different setup.

Set the Size to 0.6cm. The size of the liquid particles will affect how they interact with each-other when the B2B Interaction (Bubble-To-Bubble) is enabled (i.e. the value is greater than 0). Smaller Size will produce smaller clusters of particles and vice-versa.

Set the B2B Interaction to 50. The Bubble-To-Bubble interaction helps the Foam particles stick together rather than behaving like individual points in space.

Set the Patterns → Strength to 0.5 and the Patterns → Radius to 10cm. Those two options are entirely an artistic choice - please check the Example Videos in the Liquid Simulator's Foam rollout documentation for a more intuitive understanding of those controls.

Column
width60%

...

Section
Column
width40%

Here's a preview of the Foam particles on their own:

At the moment, the Foam looks a bit chaotic. Once we reduce the Cell Size for the final simulation, the Foam particles will start clumping and producing interesting detail under the influence of the Patterns settings.

Column
width60%

Videoautoplayloop
0005_enableFoamParticles.mp4
1100%
2100%
3true
4false
5true

Align
aligncenter
HTML
<iframe width="800" height="450" src="https://www.youtube.com/embed/0MMptZ4L8C0?version=3&loop=1&playlist=0MMptZ4L8C0" frameborder="0" allowfullscreen></iframe>

 

...

 

Section
Column
width40%

If you'd like to render the simulation with Motion Blur, enable the Velocity Channel Export from the Output rollout for both the Grid and the Particle Systems.

Column
width60%

...

Section
Column
width40%

Here's a preview of the final simulation:

We focus on the water material for the liquid, the Particle Shader settings and an example V-Ray Blend Material setup using a Wetmap for the river stones.

true
Column
width60%60%
Align
aligncenter
HTML
<iframe width="800" height="450" src="https://www.youtube.com/embed/vBRjALf9VcU?version=3&loop=1&playlist=vBRjALf9VcU" frameborder="0" allowfullscreen></iframe>
Videoautoplayloop
0006_finalSim.mp4
1100%
2100%
3true
4false
5

 

Rendering

...

Section
Column
width40%

Let's start by adding a V-Ray Sun&Sky system and a V-Ray Physical Camera so the lighting setup is taken care of from the get-go.

Add a V-Ray Physical Camera by going to Create → Cameras → VRay → VRayPhysicalCamera.

Here are the exact transformations:

Target Translate X/Y/Z: [ -14.3, 98.18, 566.646 ]
Camera Translate X/Y/Z: [ 434.102, 1014.203, 2463.551 ]

Sensor&Lens → Focal length (mm) is set to 43.2 and Color&ExposureExposure is disabled.

Column
width60%

...

Section
Column
width40%

Final image of all scene elements combined:.

Column
width60%