3ds Max 2012 Bible - Kelly L. Murdock [461]
In addition to the object type, you can specify values for the object's Density, Mass, Friction, and Bounciness using the MassFX Tools dialog box. More on these values is presented later in this chapter.
When an object is assigned a type, it automatically assumes a proxy shape that surrounds the object that is used to calculate any collisions. To keep the simulation calculations simple, this default proxy shape is usually a simple box or sphere. MassFX allows you to use a more complex collision mesh, but doing so compounds the simulation calculations and should be used sparingly. Within the Edit panel of the MassFX Tools dialog box are several options for defining the collision mesh, including a tool to generate a custom collision mesh based on the object's geometry.
Establishing the simulation properties
The MassFX Tools dialog box, shown in Figure 43.2, is opened using the first button in the MassFX toolbar. The MassFX Tools dialog box holds the settings for the World values. These World values are the global settings for the simulation. The global values defined in the World panel apply to all objects included in the simulation, but these global values can be changed for each individual object using the settings in the Edit panel.
FIGURE 43.2
The MassFX Tools dialog box includes World settings.
By default, the ground plane acts as a static object, and gravity is enabled. You can change the value of gravity and even make it a positive value so objects float upward using the settings in the World panel.
The number of Substeps determines the amount of calculations that the simulation goes through. Generally, the higher the Substeps value, the more accurate the simulation collisions and the longer it takes to complete. This is also impacted by the Solver Iterations. More Solver Iterations are needed for simulations involving a lot of constraints and collisions, but a value larger than 30 is overkill.
The Collision Overlap value is the amount of overlap between collision meshes that is allowed. If this is set to 0, the objects can jitter about erratically, but values too high will allow the objects to penetrate each other noticeably.
If you know that some objects, such as a projectile, will travel very fast, you can enable the Use High Velocity Collisions option. This option uses a different algorithm that prevents gross overlapping of surfaces for high velocity objects.
Within the Advanced Settings rollout, you can set the minimum speed and spin values for the Sleep, High Velocity, and Bounce settings. These settings are global for all objects in the simulation unless overwritten by a setting for the individual object.
The Simulation Settings rollout includes several options that define what to do when the last frame of the animation is reached. The options are to simply continue the simulation. Be aware that any motion beyond the last frame will not be captured if you bake the motion down into keyframes. You can also choose to stop the simulation, loop the animation by resetting it or continuing it.
Finally, the Engine rollout includes an option for enabling multithreading if your system includes multiple cores. The Hardware Acceleration option can be used for Nvidia cards to speed the simulation calculations.
Starting and stopping the simulation
After the world and object properties are set, you can click the Start Simulation button in the MassFX toolbar and the results are immediately calculated and displayed within the viewport. The MassFX toolbar also includes a button to reset the simulation and another button to step through the simulation one frame at a time.
As a flyout option under the Start Simulation button is an option to Start the Simulation with Animation. This runs the simulation without changing the current frame on the Track Bar.
Tutorial: Filling a glass bowl
Imagine trying to animate a bunch of marbles falling into a glass bowl. If you were using keyframes, determining whether an object overlaps another would be difficult, but with this