Versions Compared

Key

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

This page provides a tutorial on creating a simulation of Fruit falling in water.

Image Removed

 

Overview

...

UI Text Box
sizemedium
typeinfo

This is an Intermediate Level tutorial. Even though no previous knowledge of Phoenix FD is required to follow along, re-purposing the setup shown here 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 fruit falling in a water tank. We use a 3ds Max MassFX particle system for the Rigid Body simulation of the fruit, and then we use that RBD simulation as a collider for the Phoenix

FD

Liquid.

The goal of this tutorial is to explain how to simulate and render a high-speed photography type of shot.

 

Column
width60%

Image Added

 

Units Setup

 

...

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 FD 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%

...

 

Rigid Body Simulation

...

...

Section
Column
width40%

This tutorial is focused on the Phoenix FD liquid simulation.
For the Rigid Body simulation, you can use the 3ds Max built-in MassFX or any other third-party plug-in.


The diameter of the fruits used for this tutorial is about 15 cm, and they fall into the water from a height of ~ 77cm.

Column
width60%

...

Section
Column
width40%

Create a new particle system. Right-click in the Particle View window:.

Select New -> Particle System -> mParticles Flow to generate a basic MassFX system.

Column
width60%

...

Section
Column
width40%

As no ground collision is required, disable Ground Collision Plane in the mpWorld operator. 

Once you are happy with the motion of the falling fruits, bake your PFlow particles into key-framed geometry using the free "Ani Baked" maxscript, or use the simulation as is. 

Column
width60%

 

...

Phoenix Liquid Simulation

...

...

With the RBD simulation done, we can continue with the second part of the tutorial. 

Overall Setup

 

...

Section
Column
width100%40%

The setup consists of one

PhoenixFD

Phoenix Liquid Simulator, three fruits and two lights: one is a V-Ray Dome Light for ambient lighting, and the other is a V-Ray Area Light used to boost the reflections and refractions in the water tank.

A V-Ray Physical camera is used for rendering.

 
Column
width60%

 

Simulator Properties

...

...

Section
Column
width50%

Create a Liquid Simulator that encompasses the animated fruits.

Keep the Boundary conditions set to Open.

Set the Cell size such that Total Cells is between 500.000 and 2M cells, depending on your machine's performance. Working at a low grid resolution until you've nailed down the general motion of the liquid is a huge time-saver.

The final cell size for this example is ~0.12cm.

Column
width50%

...

Section
Column
width40%

To make the splashes more dramatic, increase the Motion Velocity Effect parameter of every fruit geometry to a value of 2.


To do so, Select the fruit, Right click -> Phoenix FD Properties:

 

 

 

 

 

 

 

 

 

 

 

As the name implies, Motion Velocity will ijnect velocities based on the movement of your geometry, which in turn will make the interaction between the simulated fluid and your objects more realistic.

This value is a multiplier for the strength of the effect.

Column
width60%

 

...

Section
Column
width50%

Set the Render Mode to Cap Mesh.

Set the Ocean Level parameter to the same value as the Initial Fill Up parameter (in the Dynamics tab).

Info

Phoenix FD's default rendering mode is Mesh - this produces a solid geometry surface. Although it is more realistic, for this example we make an artistic decision to use the Cap Mesh mode instead.

Cap Mesh mode, on the other hand, won't produce geometry (and thus, reflections and refractions) on the sides of the simulator. Only the upper liquid surface is rendered.

Column
width50%

...

Section
Column
width50%

Enable Displacement and pipe a PhoenixFDOceanTex into the Map slot.

The PhoenixFDOceanTex is a special texture map that can emulate wavy water surfaces. It is easier to controll control and faster to work with than a pure simulation. 

 

Note

Disable Vector mode on the PhoenixFDOceanTex.
In this particular example, it may produce artifacts in the rendered image if left enabled.

 

 

Column
width50%

 



...

 

Section
Column
width50%


No Displacement

Column
width50%


With Displacement


Lighting and Camera Settings

...

...

Section
Column
width40%

A V-Ray HDR light used for ambient lighting.

A V-Ray Area Light placed in the upper left corner of the simulator.

A background plane with the diffuse color set to black

Column
width60%

...

Section
Column
width40%

For the V-Ray Camera, Enable Depth of Field and set the Bokeh parameters according to your scene requirements. 

Column
width60%

 

Materials

...

...

Section
Column
width40%

For the fruits, use a simple VRaySSS2 with the preset set to Marble (white).

For the Green colored fruit, set the Sub Surface Color to [9, 67, 0].

For the Red colored fruit, set the Sub Surface Color to [254, 5, 0].

For the Orange colored fruit, set the Sub Surface Color to [250, 67, 0].

Column
width60%

...

Section
Column
width40%

For the water, create V-Ray Standard Material and set the Diffuse to black.

Set Reflection and Refraction to white and the IOR to 1.33.

Column
width60%

...

 

Rendering

...

...

Section
Column
width40%

Set the Noise Threshold to 0, and increase the Render Time to a very large value.
This allows V-Ray to render for an indefinite amount of time.


You can stop the rendering once you've got a clear image that you're happy with.

Column
width60%

...

Section

 

Column
width50%


using a LUT file

Column
width50%


without a LUT file

 

 

 

 

 

...