This tutorial covers the basic workflows for using solid and non-solid bodies in Phoenix FD for 3ds Max. By the end of this tutorial, you will be able to use solid and non-solid bodies to control interactions and customize simulations.
To follow this tutorial, you will need to have the Phoenix FD for 3ds Max plugin installed. This tutorial is a companion to go along with the QuickStart video posted on our YouTube channel and available here:
To download the files used toward the end of this tutorial, please click the button below.
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, and then apply the same concepts to a practical setting: a spaceship crashing into an ocean.
Setting up a Simple Scene
In a blank scene, create a Sphere with a Radius of about 12.5cm. The exact size is not crucial.
With the sphere still selected, click the Large-scale Smoke sim preset icon in the toolbar.
In the Modify panel, open the Grid rollout. Adjust the sim’s resolution by clicking the Decrease resolution button six times to get a Total cells size of about 5000 voxels as seen below. This allows for faster sim feedback.
Disable the Adaptive Grid and set the X / Y / Z size of the Simulator to 20, 60, 60. This way the simulation is fairly flat and at a very low resolution that will resolve quickly.
Maximize the viewport for a better view of the sim.
Create a Box and place it above the sphere, slightly off to the right side as shown below.
Open the Time Configuration dialog (shown below) and change End Time to 1000 so we have more frames to play with.
End Time: 1000
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, and under GPU Preview, turn Off Enable In Viewport. Then, enable Draw Just a Slice with the Axis set to X as shown below.
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 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 in this manner is closed; don’t use planes or flat sheets of geometry. If you need to use flat geometry, you can use 3ds Max's Shell modifier to make that geometry into a closed volume to use in the sim.
In the upper left-hand corner of the viewport, change the mode from Realistic to Wireframe for better visibility.
The inside of the object is empty, and the smoke goes around the volume.
Now, select the object and right-click on it, and select the Phoenix FD Properties. A checkbox for Solid Object parameter is enabled by default. Turn it Off and click OK.
The smoke passes right through the box. 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, one that offer different results. With the simulator selected, go to the Interaction rollout. You can manage objects that do or don’t interact with the simulation in this rollout shown below.
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 Interaction rollout will not interact at all with the simulation.
Now we’ll make the smoke inside the non-solid box disappear.
Right-Click the box and open the Phoenix FD Properties. Enable the Clear Inside option, which lists the different channels of the sim that are affected. You can edit this list to control what kind of particle channels are 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 in the image below.
When creating or moving a solid object inside a Fire/Smoke simulation container, it can trap fluid channels inside itself. Note that this behavior 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 it may capture more. Again, that’s because by default, all objects are treated as solid objects, so the smoke can’t escape once inside.
Right-click on that second box, choose 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.
The box on the left is a Solid object and the box on the right is a Non-solid object. Moving the non-solid box inside (as shown below) 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 as shown below. If you move it around, the smoke gets pushed to the side.
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 as we crash a spaceship 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 Spaceship_Crash_2014_start.max. Seen below is a spaceship crashing into the ocean.
The ocean geometry plane is just for preview purposes; select the plane, right click to open the Quad Menu, and select Hide Selection.
Next, create a Phoenix Ocean: Select the spaceship and choose the Setup an Ocean preset from the PhoenixFD Toolbar shown below.
Select the simulator and navigate to the Grid rollout seen in the image below. Make the simulation grid a bit smaller with an X / Y / Z Size of 150, 150, 93.
Click the Decrease resolution button twice to have faster feedback. The Total Cells will decrease to around 500,000, and the grid dimensions will adjust as you can see here:
Reposition the Simulator around the spaceship's path, moving it closer to the camera in Y, and a little lower in Z to give the spaceship more space to splash down.
The Ocean preset assumes that the geometry in the simulation is a large sea vessel, but the spaceship is much smaller than this. So in the Dynamics rollout, decrease the Scene Scale to 0.04.
Now Start the simulation. Let it run, then Stop the simulation around frame 68 or so.
Switch to Perspective view and scrub the timeline to see the result. When the spaceship crashes, it makes a pretty small splash; not quite the magnitude for a dramatic effect.
In this case, it's not desirable to change the existing animation of the spaceship, so the only way to get a bigger splash is to adjust the simulation to react as if it produces a massive splash.
Select the ship and right-click for the Quad Menu and select Phoenix FD Properties.
Shown below is the Motion Velocity Effect parameter, and this will make the simulation act as if the speed of the ship is multiplied. Enter a value of 5. This means that the ship will affect the splash as if it were moving five times faster than its animation. Then click OK.
Re-position the grid a bit as needed to better center the splashdown on frame 49.
Start the sim. Notice that the ship creates much bigger and more dramatic splash.
Stop the sim around frame 35 and scrub the animation to study the new splash. You can see that there are some particles leaving the Simulator.
Let’s say we don’t need these splash and foam particles that go outside the simulator. We can even speed up the simulation time by deleting them once they leave the grid.
Go into the Create Panel and create a Box object. Make the box taller than the simulator and place it against the side of the grid where the particles are escaping. Position it so it overlaps into the simulator grid, making sure to have full coverage of the side. Note that the particle deletion only occurs where the box and Simulator overlap; the box cannot kill these particles once they leave the simulation grid.
The plan is to delete only the Foam and Splashes particles while leaving the liquid particles unaffected.
Right-click on the Box, and choose Phoenix FD 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. Then press OK.
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, however. More “kill boxes” can easily be created in the same way as the steps above to take care of those as well.
Switch to the Camera view and see how the splash looks when it is going to render it out.
First, a few rendering tips. Open the Scene Explorer and select the first PHXFoam object.
Change the Mode parameter to Point. Repeat this for the second PHXFoam object as well. This speeds up rendering quite a bit.
In the Point rollout shown below, change the Point Alpha to 0.3, and Shadow Strength to 20. Again, do this for both the foam objects and close the Scene Explorer. This makes the particles more opaque in the render, making them look nicer.
Open Render Settings and render out the view. Pretty quickly you will see the ocean, the splash, and a giant box! Stop the render.
Right click on the Box and choose Object Properties. Disable Renderable for the box as shown below, and now we can render the scene properly.
Here is the final render of frame 64:
And the rendered sequence can be viewed below: