Versions Compared

Key

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

This page provides a tutorial for simulating water pouring on a cosmetic bottle. Simulated using Chaos Phoenix for 3ds Max.

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 this setup to another shot may require a deeper understanding of the host platform's tools, and some modifications of the simulation settings.

Section
Column
width40%

The instructions on this page guide you through the process of setting up a simulation of water pouring on a cosmetic bottle that generates many of liquid splashes. We also take advantage of the new VoxelShader helper to create whitewater in the liquid.

This simulation requires at least Phoenix 5.0 and V-Ray 5, Update 2.3. You can download official Phoenix and V-Ray from https://download.chaos.com. The scene can be rendered in both V-Ray 5 and V-Ray 6, but due to some differences between the two versions, some of the materials will render slightly different. To achieve the exact same end result as in the tutorial, you will need to use V-Ray 6. You can download your desired Phoenix and V-Ray versions from the downloads page.

If you notice a major difference between the results shown here and the behavior of your setup, please reach us using the Support Form.

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

 

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

Column
width5%

 

Column
width55%
HTML
<iframe width="720" height="405" src="https://www.youtube.com/embed/E8aXNvlHr9o" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

Units Setup

...

Section
Column
width40%

Scale is crucial for the behavior of any simulation. The real-world size of the Phoenix Simulator in units is important for the simulation dynamics. Large-scale simulations appear to move slower, while mid-to-small scale simulations show a lot of vigorous movement. When you create your Simulator, inspect 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 CustomizeUnits Setup and set the Display Unit Scale to Metric Centimeters.

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

Column
width5%

 

Column
width55%

Scene Layout

...

Section
Column
width40%

The final scene consists of the following elements:

  1. A Phoenix Liquid Source;
  2. A Phoenix Liquid Simulator;
  3. A V-Ray Physical camera;
  4. Two V-Ray Lights for lighting;
  5. A Box001 geometry used as emitter in the Liquid Source;

  6. Box002~004 geometries as colliders or deflectors;
  7. A Cosmetic_bottle geometry;

  8. A Cosmetic_cap geometry;
  9. A VoxelShader helper;
Column
width5%
 
Column
width55%

...

Section
Column
width40%

Select the front side of the Box001, and set those polygons' face IDs to 2. This limits the fluid emission to only one side of the box. 

Add a Noise modifier to make the fluid emission more dynamic. Adjust its settings:

Fancy Bullets
typecircle
  • Set its Scale to 27.0, and enable the Fractal option
  • Set the Strength to XYZ: [ 1.5cm, 1.5cm, -1.5cm ]
  • Enable Animate Noise

Put three extra boxes around Box001, the liquid emitter. Box002 and Box003, which are situated at the sides of the emitter, play an important role for making the liquid stream thicker at its edge. Box004 serves as a deflector under the emitter.

UI Text Box
typetip

As a rule of thumb, liquid looks more realistic and visually appealing when it is colliding with something.

Column
width5%

 

Column
width55%

Scene Setup

...

Section
Column
width40%

Go to the Time Configuration and set the Animation Length to 90 so that the Time Slider goes from 0 to 90.

Column
width5%
 
Column
width55%

...

UI Text Box
typetip

This tutorial consists of many steps. To keep it concise, focus only on the Phoenix related steps. Feel free to use the camera and light settings in the provided sample scene.

For reference, below are the light and camera settings.

 

Expand
titleClick here to see the Camera, Light Settings, and Background color...


Camera Settings


 

Section
Column
width40%

Go to Create Panel → Cameras → V-Ray and create a VRayPhysicalCamera.

Fancy Bullets
typecircle
  • The exact position of the Camera is XYZ: [ 125.3, -22.45, 2.0 ]

  • The exact position of the Camera Target is XYZ: [ 11.45, -15.0, 2.0 ]

  • In the Sensor & Lens rollout:

Set the Film gate to 36.0mm
Set the Focal length to 80.0mm

  • In the Aperture rollout:

Set the Film speed to 300.0
Set the F-Number to 2.4
Set the Shutter Speed to 300.0

  • In DoF & Motion Blur rollout:

Enable Motion blur

  • In the Color & Exposure rollout, set the White Balance to Neutral
Column
width5%

 

Column
width55%

Lighting

 


 

Section
Column
width40%

From Create Panel → Lights → V-Ray → VRayLight, create two VRayLights in the scene. Rename them to VRayLight-L and VRayLight-R respectively.

For VRayLight-L:

Fancy Bullets
typecircle
  • The exact position of the VRayLight-L is XYZ: [ 144.0, -135.0, 50.0 ]

  • The exact position of the VRayLight-L Target is XYZ: [ 94.5, -4.0, 0.0 ]

  • Set the Length to 81.0cm; Set the Width to 72.0cm

  • Set the Multiplier to 30.0

  • Change the Color to light blue of RGB (108, 146, 255)

For VRayLight-R:

  • The exact position of the VRayLight-R is XYZ: [ 144.0, -135.0, 50.0 ]

  • The exact position of the VRayLight-R Target is XYZ: [ 94.5, -4.0, 0.0 ]

  • Set the Length to 200.0cm; Set the Width to 200.0cm

  • Decrease the Multiplier to 10.0

  • Leave the Color to the default white color

  • Attach a VRaySoftbox map to the map slot. Enable the Radial Vignette option of the VRaySoftbox

Column
width5%

 

Column
width55%

Background color


 

Section
Column
width40%

The background color options are located at Rendering→Environment→Background Color. Instead of the default pure black, set the color to a slightly higher value of RGB(1,1,1). This adds some touch of film photography to the shot.

Column
width5%

 

Column
width55%

Anatomy of the Water Splash

...

 

Section
Column
width40%

The image here is from the final render of this tutorial.

The frame is from the beginning of the animation, before the water touches the bottle. You can see the liquid takes on a tongue shape at its end. The two edges of the water splash are thicker than the middle.

UI Text Box
typetip

The cosmetic bottle is around 54 cm high and 22.4 cm wide. It is roughly 3 times larger than a regular cosmetic bottle. Usually small scale simulations require more simulation steps, which means more processing time, this is why in this case we use a larger bottle. Alternatively if you wish to work with small scale models, you can always adjust the Scene scale option inside of the Phoenix simulator settings.

Column
width5%

 

Column
width55%

...

Section
Column
width40%

As the water pours on the bottle, the bottle flips and you can see strongly rebounding splashes. Whitewater shading is also visible, as well as some droplets on the bottle.

Go through the steps of this tutorial to see how to build these features.

Column
width5%

 

Column
width55%

Phoenix Simulation

...

Section
Column
width40%

Let's create a Liquid Simulator. Go to Create Panel → Create → Geometry → PhoenixFD → PhoenixFDLiquid.

The exact position of the Simulator in the scene is XYZ: [ 5.25, 31.0, 61.0 ].

Open the Grid rollout and set the following values:

Fancy Bullets
typecircle
  • Scene Scale to 1.0
  • Cell Size to 0.3 cm
  • Size XYZ: [ 59, 172, 130 ] - the Simulator size is large enough to cover only the Box001 for liquid emission
  • Enable Adaptive Grid - the Adaptive Grid algorithm allows the bounding box of the simulation to dynamically expand on-demand
  • Enable Max Expansion and set its size to X: (0, 238), Y: (371, 0), Z: (409, 0) - this saves memory and simulation time by limiting the maximum size of the simulation grid
Column
width5%

 

Column
width55%

...

Section
Column
width40%

Open the Output rollout and enable the Particle Velocity, Particle ID, Grid Liquid, and Grid Velocity. Set the Special channel to Vorticity Smooth.

UI Text Box
typetip

Any channel that you intend to use after the simulation is complete, needs to be cached to disk. For example, Velocity is required at render time for Motion Blur, so it needs to be cached to disk.

UI Text Box
typenote

Be sure to set the Special channel to Vorticity Smooth. The Vorticity Smooth channel represents the blurred length of the curl of each voxel or in other words the whirling motion of the fluid. We will use it for whitewater shading in a later step of the tutorial.

UI Text Box
typeinfo

You can use either Vorticity or Vorticity Smooth for the whitewater effect. But the Vorticity Smooth is a better choice in this case, since it give less voxel artifacts in the rendering.

Column
width5%

 

Column
width55%

Add Liquid Source

...

 

Section
Column
width40%

Add a Liquid Source from Helpers → Phoenix FD → Liquid Source.

The Liquid Source is a Phoenix helper node. It determines which objects in the scene the Simulator emits from, how strong the emission is, etc.

Add the Box001 geometry to the Emitter Nodes list.

Column
width5%

 

Column
width55%

...

Section
Column
width40%

Go to the Preview rollout, and enable Show Mesh. Disable all other Voxel Preview channels, so they don't interfere.

Column
width5%

 

Column
width55%

Smooth the Mesh

...

 

Section
Column
width40%

Select the Simulator, and go to the Rendering rollout. In the Mesh Smoothing section, increase the Smoothness to 5.0. Enable the Use Liquid Particle option. Set the Particle Size to 1.0.

UI Text Box
typeinfo

The Mesh smoothing reduces the roughness of the liquid mesh. The higher the Smoothness value, the smoother the result, but the mesh will require more time to calculate.

UI Text Box
typeinfo

Enabling the Use Liquid Particles option overcomes the limitations of the basic smoothing without particles, which can flicker in animation and cause small formations in the mesh to shrink. 

UI Text Box
typeinfo

Particle Size is used to make the liquid thicker or thinner. In this case we are making a small scale liquid effect with stronger surface tension look, thus we increase the Particle Size to make the liquid thicker.

Column
width5%

 

Column
width55%

...

Section
Column
width40%

Here is a preview animation of the simulation so far. You can see the liquid mesh is too noisy. The mesh is torn and chaotic.

Column
width5%

 

Column
width55%
HTML
<iframe width="720" height="405" src="https://www.youtube.com/embed/_D2K9FF8PyU?autoplay=1&playlist=_D2K9FF8PyU&loop=1" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay=1; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

Increase Steps Per Frame

...

Section
Column
width40%

To make the liquid look less noisy and smoother, select the Simulator, and go to the Dynamics rollout. Increase the Steps Per Frame to 4.

With the new settings, run the simulation again.

Column
width5%
 
Column
width55%

...

Section
Column
width40%

Here is the simulation at this step. Now the liquid mesh is much smoother.

Column
width5%

 

Column
width55%
HTML
<iframe width="720" height="405" src="https://www.youtube.com/embed/GMb28esgo7k?autoplay=1&playlist=GMb28esgo7k&loop=1" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay=1; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

Increase Surface Tension

...

Section
Column
width40%

Water is a Newtonian fluid, so you need to adjust the surface tension settings to make it more realistic.

With the Simulator selected, go to the Dynamics rollout, and in the Surface Tension section:

Fancy Bullets
typecircle
  • Increase the Strength to 0.4

  • Set the Droplet Formation to 1.0

  • Decrease the Droplet Radius to 2.0

Run the simulation again.

 

UI Text Box
typeinfo

When increasing the Surface tension strength - it will make it harder for the liquid surface to split and will hold the liquid particles together. With high Strength, when an external force affects the liquid, it would either stretch out into tendrils, or split into large droplets.

UI Text Box
typeinfo

Droplet Formation toggles between the liquid forming tendrils or droplets. When set to a value of 0, the liquid forms long tendrils. When set to a value of 1, the liquid breaks up into separate droplets. The size of the droplets can be controlled by the Droplet Radius.

UI Text Box
typeinfo

The Droplet Radius controls the radius of the droplets formed by the Droplet Formation parameter, in voxels.


Column
width5%

 

Column
width55%

...

Section
Column
width40%

This is the simulation up to this step.

With the new Surface Tension settings, the flow appears thicker and the morphology is more suitable for a Newtonian fluid.

Column
width5%

 

Column
width55%
HTML
<iframe width="720" height="405" src="https://www.youtube.com/embed/T3Inc1k7ZwM?autoplay=1&playlist=T3Inc1k7ZwM&loop=1" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay=1; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

Increase Motion Velocity Effect

...

 

Section
Column
width40%

To make the pouring water bounce stronger when hitting the bottle, adjust the cosmetic geometries' Motion Velocity Effect.

Select both the Cosmetic_bottle and Cosmetic_cap. Right click and select Chaos Phoenix Properties. Increase the Motion Velocity Effect to 6.0.

Run the simulation again.

UI Text Box
typeinfo

The Motion Velocity Effect allows you to control the impact of a moving object over the fluid. The higher the value is, the stronger the fluid reaction to the body's movement is.

Column
width5%

 

Column
width55%

...

Section
Column
width40%

Now the rebounding liquid splashes are stronger as the cosmetic bottle flips. This makes the shot more dramatic.

Column
width5%

 

Column
width55%
HTML
<iframe width="720" height="405" src="https://www.youtube.com/embed/fySm0lHLc7w?autoplay=1&playlist=fySm0lHLc7w&loop=1" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay=1; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

Enable Wetting

...

 

Section
Column
width40%

To allow liquid to stick on the bottle, go to the Dynamics rollout of the Simulator. Enable the Wetting option. Set the Sticky Liquid to 0.6.

Column
width5%

 

Column
width55%

...

Section
Column
width40%

Here is a preview animation of the simulation.

Although Wetting is enabled, barely any droplets adhere on the surface of the bottle.

Column
width5%

 

Column
width55%
HTML
<iframe width="720" height="405" src="https://www.youtube.com/embed/p598KcrTN4g?autoplay=1&playlist=p598KcrTN4g&loop=1" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay=1; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

Increase Viscosity

...

 

Section
Column
width40%

Select the Liquid Simulator, and go to the Dynamics rollout. Set the Default Viscosity to 0.03.

 

UI Text Box
typeinfo

You need at least a little Viscosity in order for the Sticky Liquid to produce a connecting force between the WetMap particles at the geometry surface and nearby liquid particles. That's why we set the Viscosity to 0.03.

Column
width5%

 

Column
width55%

...

Section
Column
width40%

Here is a preview animation of the simulation.

Now the droplets temporarily adhere to the bottle.

Column
width5%

 

Column
width55%
HTML
<iframe width="720" height="405" src="https://www.youtube.com/embed/zvUduIkn6ok?autoplay=1&playlist=zvUduIkn6ok&loop=1" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay=1; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

Animate Time Scale

...

 

Section
Column
width40%

To make the shot more cinematic, let's add a bullet time effect to the liquid. As Phoenix allows animation of the Time Scale parameter directly, you can just set key frames to the Time Scale.

To simulate the full length of the simulation, enable the Timeline of the Stop Frame.

 

UI Text Box
typeinfo

Time Scale specifies a time multiplier that can be used for slow motion effects.

UI Text Box
typenote

Beware when you tweak the Time Scale with Particle/Voxel Tuners in the scene. Time Scale different than 1 will affect the Buildup Time of Particle/Voxel Tuners and the Phoenix Mapper. In order to get predictable results you will have to adjust the buildup time using this formula: Time Scale * Time in frames / Frames per second

Column
width5%

 

Column
width55%

...

Section
Column
width40%

Here is a preview animation of the simulation.

Now the bullet time effect makes the shot more interesting. However, when time slows down, the droplets aggregate and grow larger in an unrealistic way.

Column
width5%

 

Column
width55%
HTML
<iframe width="720" height="405" src="https://www.youtube.com/embed/HfDFp7SC6tc?autoplay=1&playlist=HfDFp7SC6tc&loop=1" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay=1; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

Animate Step Per Frame

...

 

Section
Column
width40%

During the bullet time effect, it is unnecessary for the Steps Per Frame option to have a high value. Animate Steps Per Frame according to the keyframes of the Time Scale.

The Steps Per Frame option is located in the Dynamics rollout of the Simulator.

Column
width5%

 

Column
width55%

...

Section
Column
width40%

Here is a preview animation of the simulation. Now the size of the droplets is consistent throughout the animation.

Column
width5%

 

Column
width55%
HTML
<iframe width="720" height="405" src="https://www.youtube.com/embed/oXmm4VmgWH4?autoplay=1&playlist=oXmm4VmgWH4&loop=1" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay=1; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

Water Material

...

Section
Column
width40%

This part of the tutorial focuses on the water material for the liquid.

Create a V-Ray Material.Assign it to the PhoenixFDLiquid Simulator. Set the Diffuse color to black.

Set the Reflection and Refraction colors to white. Set the IOR to 1.333, which is the physically accurate Index of Refraction of water.

Keep the Max depth to its default value of 8 for both Reflection and Refraction.

To slightly blur the specular highlights, produced by the light source in the scene, reduce the Reflection Glossiness to 0.85.

 

UI Text Box
typetip

When the Reflection and Refraction colors of a V-Ray material are set to white, and the IOR is set to 1, this creates a completely transparent material. This is because the Index of Refraction of clear air is 1.

Column
width5%

 

Column
width55%

...

Section
Column
width40%

Here is a rendered image with the water material applied to the Simulator. With the black background, it is hard to see the water in the shot. Usually with fast moving liquid, whitewater should be visible within it.

UI Text Box
typeinfo

In this case, the 22nd frame is rendered. However, you can render whichever frame you like.

Column
width5%

 

Column
width55%

Adding Whitewater Shading

...

 

Section
Column
width40%

Go to Create Panel → PhoenixFD and create a VoxelShader helper in the scene.

UI Text Box
typeinfo

The Voxel Shader node is used to shade Fire/Smoke simulations and meshes in a single Simulator. Phoenix has multiple rendering modes that can be divided into two types: Volumetrics and Surfaces. The volumetric modes are used for fire and smoke. 3ds Max materials can't be used to shade volumetrics because they don't have a surface. Instead their shading is described in the Volumetric Options tab.

Unlike the volumetric modes, in surface modes the Simulator behaves just as any regular geometry - 3ds Max materials can be applied to the Simulator and there is no need for a dedicated shader.

UI Text Box
typeinfo

As the liquid simulator does not use the Smoke channel, we can use it to output Special channel data - in this case the Vorticity Smooth.

The Voxel Shader then can read the vorticity smooth data from the liquid simulator and render it as smoke. This way we can achieve the whitewater shading in the liquid water.

Special channels can also be read by the Grid Texture and used for rendering.

Column
width5%

 

Column
width55%

...

Section
Column
width40%

Alternatively, instead of manually creating the Smoke Opacity curve yourself, you can load the render preset file from the provided example scene files here. Otherwise, skip this step.

UI Text Box
typewarning

Note that loading a preset file overwrites all your current render- and preview settings!

To load the render preset file, press the Render Presets button. It is located under the Rendering rollout of the VoxelShader node. Select Load from file, and open up the VoxelShader_RenderPreset.tpr file.

Column
width5%

 

Column
width55%

V-Ray Frame Buffer

...

Section
Column
width40%

Open the V-Ray Frame Buffer, and use the Create Layer to add layers for Lens Effects, White Balance, Exposure and Filmic tonemap.

Column
width5%
 
Column
width55%

...