Table of Contents

This page provides a tutorial for manually creating a simple liquid simulation.

Overview


This is an Entry Level tutorial which requires no previous knowledge of Phoenix. A basic understanding of 3ds Max would be helpful but is not a prerequisite for being able to follow along.

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.


Steps


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.

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.




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




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




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.




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.




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.




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.




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.




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.

Show Mesh Off
Show Mesh On

 






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




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




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.

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


Extra Tips:


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.




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.