Versions Compared

Key

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

...

Section
Column
width40%

The instructions on this page will guide you in setting up a very simple liquid simulation from scratch using the Phoenix Simulator and other components.

For quickly producing physically accurate liquids, the Phoenix Shelf provides Quick Simulation buttons such as tap water, milk, and liquid chocolate. These buttons will also create realistic V-Ray materials for each option, allowing users to render the results right away. For an introductory guide to using the Quick Simulation buttons, see the Getting Started with Chaos Phoenix Tutorial.

Column
width60%
videoautoplayloop
Align
0
align
video.mp4
center
1100%
2100%
3true
4false
5true

 

HTML
<iframe width="720" height="405" src="https://www.youtube.com/embed/yGtc4ztFC00?version=3&loop=1&playlist=yGtc4ztFC00" frameborder="0" allowfullscreen></iframe>


Steps

...

Info

When possible, build emitters to real-world scale. Phoenix uses real-world calculations to create its effects, so working with real-world units will make your task much easier.

Section
Column
width40%

Start by creating a new project from File → Project Window
Click the New button at the top right corner of the window and give it a name.

This is important because Phoenix stores the simulation data in the data directory of the currently selected project. You can manually point to a different project directory from the File → Set Project... dialog.

Column
width60%

...

 


...


Section
Column
width40%

Go to File → Save As and select the scenes directory of your current project. 

Column
width60%

 

...


...


Section
Column
width40%

Create a piece of geometry to use as an emitter. In this example, a default poly sphere is used. 

Column
width60%

 

...


...


Section
Column
width40%

Create a Phoenix Simulator and position it and the emitter geometry as shown in the picture to the right. You can use the X/Y/Z Size parameters in the Grid rollout to edit the size of the simulator.

Set the Cell Size to 0.1.

The Cell Size parameter controls the 'resolution' of the simulation. The simulator grid consists of individual 'boxes' called voxels which are used to calculate the motion of the fluid. The more voxels your grid has, the more detailed your simulation will be. However, this comes at the cost of increased simulation time.

Column
width60%

 

...


...


Section
Column
width40%

Add a Phoenix Liquid Source.

The liquid source set is used to specify what objects in the scene are to be used as emitters.

The liquid source node itself contains the controls for the emission.

In the Outliner, middle mouse drag and drop the sphere node into the phxLiquidSource_set1.

Alternatively, you can select the sphere, then shift+click PhoenixFDLiquidSource1, and then press the Add Selected Objects button.

Column
width60%

 

...


...


Section
Column
width40%

Select the PhoenixFDSimulator1 node. In the Attribute Editor, go to the Grid rollout.

Set the Container Walls X and Z to Jammed Both, and for Y, choose Jammed(-).

Simply put, the boundaries of the simulator are the walls of the box. When a wall is jammed, the fluid will not be able to escape through it.

Boundaries are much faster to compute than 'real' geometry. If possible, use them. An example where this would be an option is a bath tub or a swimming pool.

Column
width60%

 

 


...


Section
Column
width40%

Go to the Liquid rollout and select Enabled.

When this option is unchecked, Phoenix assumes that the simulator will be used for Smoke/Fire simulations. If you ever find yourself wondering why your liquid sim setup is not working, make sure that Liquids are enabled.

Column
width60%

 

 


...


Section
Column
width40%

At the bottom of the Dynamics rollout is the parameter controlling the Steps Per Frame.

Set Steps Per Frame to 5.

When working with liquids, it's a good idea to try and keep this parameter set to 3 or more. This will ensure a predictable motion of the fluid and no loss of volume.

Column
width60%

 

 


...


Section
Column
width40%

Start the simulation.

Note that the liquid particles are emitted from the sphere and collide with the walls of the simulator, just as expected.

If you'd like to see a meshed version of your simulator, enable Show Mesh from the Preview rollout.

Column
width60%
Before after
afterLabelShow Mesh On
beforeLabelShow Mesh Off
Panel
borderStylenone

 

Panel
borderStylenone

 

 

 

 




...


Section
Column
width40%

The Meshing options are located in the Rendering → Mesh rollout of the Simulator.

Column
width60%

 

...


...


Section
Column
width40%

You may also preview the progress of the simulation and the total number of particles and voxels from the Simulation rollout of the Simulator.

Column
width60%

 

...


...


Section
Column
width40%

To assign a material to the liquid, select the Simulator and use the right mouse button menu → Assign New Material.

Choose a Vray Mtl and head over to the Attribute Editor tab to edit its properties.

For simple water, set the Reflection and Refraction colors to pure white, and the Refraction IOR to 1.33.

Note

If your setup consists of other refractive objects (such as a glass), make sure to enable Affect Shadows from the Refraction rollout.

Column
width60%

...

Section
Column
width40%

To easily select the material assigned to the grid, select the simulator node and right mouse button click and hold.

Select the Material Attributes... option from the menu.

Column
width60%

 

...


...


Section
Column
width40%

Whenever possible, use a V-Ray Sun/Sky setup rather than a Dome Light.

The Sun/Sky lighting setup setup produces a noise-free image faster.

Column
width60%