This page provides a step-by-step guide to understanding solid and non-solid bodies in Phoenix FD for Maya.


Page Contents

 

Introduction


This tutorial covers the basic workflows for using Solid and Non-solid bodies in Phoenix FD for Maya. By the end of it, you will be able to use solid and non-solid bodies to further control interactions and customize simulations.

To follow this tutorial, you need the Phoenix FD for Maya plugin installed. This page is a companion to go along with the QuickStart video posted on our YouTube channel and available here:

 

 

 


 

Tutorial Assets


To download the files used in this tutorial, please click the button below. Note: The scene file works in Maya 2014 or newer.

 

Download Project Files

 

Tutorial Steps


This tutorial shows how to use solid and non-solid bodies in simulation for greater flexibility and control over simulation particles. First, we will start with a simple scene, then apply the same concepts to a spaceship crashing into an ocean.

 

Setting up a Simple Scene

Start in a blank scene and create a Sphere. Scale it up so it is easier to work with. The exact size is not crucial here.

 

 

 

With the sphere still selected, click the Large-scale Smoke sim preset icon in the Phoenix FD Shelf.

 

 

 

In the Attribute Editor, open the Grid rollout. Adjust the Cell Size to decrease the simulation resolution to about 5000 Total Cells. This will allow faster feedback. In this case, a Cell Size of 0.660 produces the desired resolution.

 

 

 

Disable the Adaptive Grid. Set the X / Y / Z size of the Simulator to 20, 60, 60. This way we’ll have a flat simulation at a very low resolution that will resolve quickly.

 

 

 

Here is how the simulation volume looks so far:

 

 

 

Open the Dynamics rollout and change the Steps Per Frame to 1.0 for faster feedback.

 

 

 

Create a Cube and scale it to create a rectangular box. Place it above the sphere, slightly off to the right side, as shown below.

 

 

 

Adjust the end time playback range to 1200 so we have more frames to play with.

 

 

 

Now click the Start Simulation button in the toolbar. Let the simulation run while you continue with the next few steps.

 

 

 

In order to better see how the smoke interacts with the Simulation, go to the Preview rollout. Under the GPU Shade Preview section, turn Off Enable.

 

 

 

Then, scroll to the top of the Preview rollout and set Draw Just a Slice to Along X axis.

 

 

 

Now we can clearly see that the smoke collides with the box and goes around it. And we didn’t need to do anything to make that happen. That’s because, by default, meshes are treated by Phoenix FD as what are called Solid Objects, which means the object becomes an obstacle to the fluid's motion.

 

 

 

A word of advice here: make sure that any mesh you want to use like this is closed. Don’t use planes or flat sheets of geometry. If you need to use geometry that appears flat, you will need to add a small amount of thickness to it so it calculates properly within the simulation.

Press 4 to switch to Wireframe mode for better visibility. Notice that the inside of the object is empty, and the smoke goes around the volume, as shown below.

 

 

 

Select the cube. In the Attribute Editor, expand the Extra Phoenix FD Attributes. Notice that there is a checkbox for Solid that is enabled by default. Turn it Off.

 

 

 

The smoke will pass right through the box. Now, this box is a Non-Solid, which means the box is a part of the simulation, but won’t interact with it.

 

 

 

There is another way to make objects not interact with the simulation, which offer different results. With the simulator selected, go to the Scene Interaction rollout. The Interaction Set determines which objects interact with the simulation. If Exclude List is enabled, then the Interaction Set specifies which objects do not interact with the simulation.

 

 

 

There is a difference between having a non-solid object, like we have right now, and excluding an object from the interaction. A non-solid object, such as the one in the scene, can still be used with Forces (e.g. as an attractor for the Body Force) and also as an Emitter by Source objects. It can also be used as a Render Cutter, or a Birth (or ignition) Volume, and so on. On the other hand, objects excluded through the Scene Interaction rollout will not interact at all with the simulation.

Now we’ll make the smoke inside the non-solid box disappear. Select the cube and access the Extra Phoenix FD Attributes. Enable the Clear Inside option. The area shown below lists the different channels of the sim that are affected. You can edit this list to control what is cleared inside the non-solid.

 

 

 

Click OK and you can see that the smoke inside the box is gone.

 

 

 

The difference between the Solid object that we had before and this Non-solid with Clear Inside, is that the fluid moves around solids but passes right through the non-solids. This way you can use Non-solids with Clear Inside to erase smoke, temperature, liquid, or different particles from certain areas of the Simulator without effecting the fluid's behavior.

While the simulation continues, create another Box in the scene, that is a similar size to the first one. Move it up, inside the container in the path of the smoke, and it traps some of the smoke inside it as you can see here:

 

 

 

When creating or moving a solid object inside a Fire/Smoke simulation container, it can trap fluid channels inside it. But, that does not apply to a Liquid Simulator.

Move this box around some more and you can see that some of the smoke trapped inside the volume earlier is still stuck inside, and may capture more. Again, that’s because, by default, all objects are treated as solid objects, so the smoke can’t escape once inside.

 

 

 

Select that second cube and open its Extra Phoenix FD Properties. Turn on Clear Inside and press OK and the smoke is gone from inside that box.

 

 

 

 

 

Finally, select the first box and disable the Clear Inside, so the smoke goes right through it.

 

 

 

 

 

Now the box on the left is a Solid object and the box on the right is a Non-solid object. Let’s see what that means. Moving the non-solid box inside the Simulator changes nothing. It does not change the behavior of the simulation.

 

 

 

But if you move the Solid object box, it effects the smoke simulation. If you move it around, the smoke gets pushed around as shown below.

 

 

 

You can control how strongly a moving solid effects the simulation from its Phoenix FD Properties using the Motion Velocity Effect parameter. We will take a look at this in our next example.

 

Applying the Sim Setup to a Real-World Example

Let’s apply these same concepts to a scene where a spaceship crashes into a body of water. We will use solids, see how the Motion Velocity Effect works, and add foam and splashes in our simulation.

Open the provided scene file spaceshopCrash_begin.mb. Here we have a spaceship animated to crash into the ocean.

 

Frame 19

 

 

The ocean geometry plane (oceanSurfaceReference) in the scene was used for blocking the animation and is only for previewing purposes. Hide the plane by selecting it and pressing Ctrl + H.

 

 

 

Next, create a Phoenix Ocean: select the spaceship and choose the Setup an Ocean preset from the PhoenixFD Toolbar.

 

 

Reposition the Simulator along the spaceship's path.

 

 

Select the simulator and navigate to the Grid rollout. Make the simulation grid a bit smaller with a X / Y / Z Size of 250, 100, 250.

 

 

 

To keep the Total Cells of the simulation around 500,000, increase the Cell Size to about 477.

 

 

 

Afterwards, adjust the position of the simulator as necessary so that the spaceship stays inside throughout the splashdown.

 

 

 

The Ocean preset assumes that the geometry in the simulation is a large sea vessel. The spaceship is much smaller than this, so in the Grid rollout, decrease the Units Scale to 0.04.

 

 

 

Now Start the simulation long enough for the fluid preview to appear. Then Stop the simulation. Let's make sure our simulation's ocean surface matches the geometry we hid earlier so the impact is accurate.

 

 

 

Unhide the oceanSurfaceReference plane by selecting it in the Outliner and pressing Shift + H.

 

 

 

Adjust the simulator position so the water levels match. Hide the ocean geometry plane again, then Start the simulation.

 

 

 

Stop the simulation around frame 70. Scrub the timeline to see the result. When the spaceship crashes, it makes a pretty small splash. Not quite the magnitude we’re going for.

 

 

 

Since we don't want to change the ship animation or speed of the crash, we’ll need to adjust the simulation to react as if it produces a massive splash. This is where the Motion Velocity Effect attribute comes into play. It makes the simulation act as if the speed of the ship is multiplied.

Note that the main group for the spaceship does not have the Extra Phoenix FD Attributes. Instead, they can be  found in the shape node for each object that makes up the ship. So for each of the three spaceship part, open its Extra Phoenix FD Attributes rollout and set the Motion Velocity Effect to a value of 5. This means that the ship will affect the splash as if it were moving five times faster than its animation.

 

 

 

 

 

 

Start the simulation. Notice that it creates a much bigger and more dramatic splash. Stop the sim around frame 45 and scrub the animation to study the new splash. You can see that there are some particle that are going outside of the Simulator.

 

 

 

Let’s say we don’t need these splash and foam particles that leave the simulator. They have little impact on the final result, and may slow down the calculations, so we can delete them once they leave the grid.

Create a Cube and scale it to cover the top part of the simulator where the particles are escaping. Position the box so that it overlaps into the simulator grid, making sure to have full coverage. Note that the particle deletion will only occur where the box and Simulator overlap; there would be no effect on the particles after they leave the simulator.

 

 

 

Note that similar objects could be created along the other sides of the simulation grid. Now, let's selectively delete only the foam and splashes while leaving the liquid particles unaffected.

With the cube selected, add the Extra Phoenix FD Attributes to it by navigating to Attributes > Phoenix FD > Phoenix FD Node Properties.

 

 

 

Uncheck Solid Object, so the box won’t affect the simulation. Turn on Clear Inside and then type in Foam,Splashes to clear only those types of particles from the sim.

 

 

 

Start the sim again and notice that the particles that were going through this side are killed when they come into contact with the box. There are still a few rogue particles coming from the bottom and the sides, so we could always make more “kill boxes” to take care of those as well.

 

 

 

Now let's prepare the scene for rendering. First, adjust the Render Stats for the kill box so it won't be in the render: Open the Render Stats rollout and disable Cast Shadows, Receive Shadows, Primary Visibility, and Visible in Reflections and Refractions.

 

 

 

Switch to the Camera view, and let's see how the splash looks when rendered out. Find a good frame for testing out a render; here, we use frame 42.

 

 

 

In the Outliner, select the first Phoenix Particle Shader object, PhoenixFDPrtShader1, which controls how the foam particles render. Make sure the PhoenixFDFoam tab is selected in the Attribute Editor. Open the Geometry rollout and change Mode to Points. This will speed up rendering a considerable amount. Do the same with the other Phoenix Particle Shader, PhoenixFDPrtShader2, which controls the rendering of the splash particles. 

 

 

 

In the Point rollout, change the Point Alpha to 0.3 and the Shadow Strength to 20. This makes the particles more opaque in the render, making them look nicer. Repeat this for both particle shaders.

 

 

 

Select the place3dTexture1 node from the Outliner. This controls the ocean texture. In its Transform Attributes, reduce the Scale by about half so it better suits the spaceship's scale.

 

 

 

Next, let's look at our Render Settings. Navigate to the V-Ray tab and the Image sampler rollout. For the Sampler Type, either Bucket or Progressive will work. For rendering a single frame, Bucket may be the better choice. However, if you plan on rendering the entire sequence, Progressive offers other advantages.

Reduce Max subdivs down to 4, but feel free to increase it a bit for a higher quality render. Set the noise Threshold to 0.05. If you are rendering with the Progressive image sampler and you want the Subdivs and Threshold to be met regardless of render time, set the Max render time to 0.

 

 

 

In the GI tab, enable GI with the On option. Set the Primary and Secondary engines to Brute force and Light cache respectively.

 

 

 

Let's render a test frame. If you're render comes out with large blocky, white areas (like those seen below), there's an easy way to resolve that issue.

 

 

 

Create a V-Ray Plane (from the VRay Shelf), increase the Locator scale value from the Attribute Editor to something like 1000 to make it easier to see and select it in the viewport.

 

 

 

 

 

 

 

Then, from the Perspective camera, move the Plane down so it's positioned below the Simulator's volume as shown below.

 

 

 

Assign a V-Ray Material to the plane using the process you prefer or right-click the Plane, choose Assign New Material... from the menu, and then click VRayMtl from the Assign New Material window.

 

 

 

 

 

 

Adjust the Diffuse Color of the material to Black.

 

 

 

That's it. Now the volume will have a black backdrop behind it to help from causing issues with the ocean refracting in the scene. Creating another render should result in something like what's shown below. The resolution of the grid is still low (to help with render times in this tutorial) but the white refraction areas in teh water are fixed.

 

 

If you are satisfied with the results, you can increase the simulation quality, simulate again, and render. The resolution can be increased by decreasing the Cell Size in the Grid rollout. A Total Cells amount around 20 million can produce a nice result. Also, increasing the Steps per Frame in the Dynamics rollout will create a smoother simulation.

 

Below is an example rendered sequence from the time frame of this shot: