You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

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

Overview


This is an Intermediate Level tutorial. Even though no previous knowledge of Phoenix 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.

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 Liquid.

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

 

Units Setup


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.

 

Rigid Body Simulation


This tutorial is focused on the Phoenix 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.

 


 

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

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

 


 

Add a Position, Rotation, Shape Instance and mP Buoyancy operators to Event 002.

 


 

Select the fruit model in the scene as the Shape Instance.

 


 

Set mP Shape 001's Collision representation to Convex Hull

 


 

In the mP Buoyancy operator, select the plane geometry in your scene as the Plane Primitive.

This plane works as the water surface for simulating buoyancy.

 


 

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.

 

Phoenix Liquid Simulation


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

Overall Setup


The setup consists of one 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.

 

Simulator Properties


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.

 


 

Set the Initial Fill Up parameter to 40. This will fill 40% of the container with liquid at the start of the simulation.

Set the Scene Scale to 10 and the Surface Tension Strength to 0.1 (real water has a surface tension of ~0.05 - 0.1 )

 

As the water has to be deep enough for the fruits to dive into and not hit the tank's bottom, and there should be sufficient space for splashes at the top, make sure that the simulator size is adequate.

 

 


 

Scene Scale : 1

Scene Scale: 5

Scene Scale : 10

 


 

Set the Steps per Frame parameter to 5.

Higher SPF values will result in a smoother liquid at the cost of increased simulation times. In general, you should try to keep this as low as possible without compromising on the quality of your simulation.

 

 


 

SPF: 1

SPF: 3


SPF: 10




 

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 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.

 

 


 

Motion Velocity Effect: 1


Motion Velocity Effect: 2

 


 

Enable the Velocity channel output under the "Output" section of the simulator.


The grid velocity channel is required for rendering the liquid with Motion Blur.

 

 


 

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).

Phoenix'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.

 


 


Mesh mode


Cap Mesh mode




 

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 control and faster to work with than a pure simulation.

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

 




 


No Displacement


With Displacement


Lighting and Camera Settings


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

 


 

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

 

Materials


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].

 


 

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.

 

Rendering


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.

 


 

 The final image can be adjusted in the V-Ray Frame Buffer window with a LUT file. 

 


 


 


using a LUT file


without a LUT file

Table of Contents