MassFX Tools: World Parameters Panel

The World Parameters panel on the MassFX Tools dialog provides global settings and controls for creating physical simulations in 3ds Max. These settings affect all objects in the simulation.

Interface

Scene Settings rollout

Environment group

These settings let you control ground collisions and gravity. To simulate gravity you can use the force included with MassFX or the Gravity space warp in 3ds Max. Or you can opt not to use gravity at all.

Use Ground Collisions
When on, MassFX uses an (invisible) infinite, planar, static rigid body at the Ground Height level; that is, parallel to or coplanar with the home grid. This body has fixed values for friction and bounciness. Default=on.
Tip: Use the ground plane as a handy testbed for your simulations.
Ground Height
The height of the ground rigid body when Use Ground Collisions is on. Specified in the active units.
Global Gravity
These settings apply to rigid bodies with Use World Gravity enabled and to mCloth objects with Use Global Gravity enabled.
  • Directional Gravity Applies the built-in gravitational force in MassFX. You can adjust this force with these settings:
    • Axis The global axis along which gravity (see Acceleration, following) is applied. For standard up/down gravity, set Axis to Z; this is the default.
    • Acceleration The force of gravity, specified in units per second per second. Using the Z axis, positive values cause gravity to pull objects upward, while negative values pull objects downward (the standard effect).

      For reference, Earth's gravity is approximately –981.001 cm/s2 = –386.221 in/s2 = –32.185 ft/s2 = –9.81 m/s2 .

  • Gravity by Force Object Lets you use a Gravity space warp to apply gravity to rigid bodies. First add the space warp to the scene, then use the Pick Gravity button to designate it for use in the simulation.

    This option uses the same scale as the MassFX gravity but with positive rather than negative values, so for earth-realistic gravity, set the space warp Strength to 386.221 if System Unit Scale is set to 1.0 Inches. For other system units, see Acceleration, preceding.

    The main benefit of using this option is that you can apply gravity in any direction by rotating the space warp object. The Decay option has no effect, and the gravity always uses the Planar option; setting it to Spherical has no effect.

    Tip: You can apply different gravity settings to individual objects with the Forces rollout settings.
  • No Gravity When chosen, gravity does not affect the simulation.
Rigid Bodies group

If collisions and constraints don't seem to be working properly in the simulation, try adjusting these settings.

Substeps
The number of simulation steps performed between each graphical update is determined by this formula: (Substeps + 1) * Frame Rate. A frame rate of 30fps with 0 substeps results in 30 simulation steps per second, 1 substep results in 60 steps per second, 2 substeps results in 180 simulation steps per second, and so on. The maximum value of Substeps is 159, which results in 4,800 simulation steps per second of animation at 30fps. Using a higher Substeps value produces greater precision in collision and constraint results, at a cost to performance, of course.
Solver Iter[ations]
A global setting for the number of times the constraint solver enforces collisions and constraints. Higher values might be necessary when the simulation uses many constraints, or the tolerance for joint errors is very low. Values higher than 30 are generally unnecessary.
Use High Velocity Collisions
A global setting for toggling continuous collision detection.

When rigid bodies are moving so fast that they travel a large distance from one simulation frame to the next, they can "tunnel" through one another. For example, a fast-moving bowling ball in an animation that uses a low frame rate might be on one side of a pin at one frame and move to the other side of the pin in the next. In such a case, the desired collision between the ball and the pin does not occur.

This can be fixed by increasing the frame rate and/or substeps of the simulation. However, these settings apply globally; increasing them enough to fix one fast-moving object can reduce the performance of the entire simulation. When Use High Velocity Collisions is on, MassFX finds any fast-moving rigid bodies and creates a simplified collision shape spanning the position between the previous frame and the current frame. For example, the bowling ball could have a capsule stretching from one side of the pin to the other; because the capsule overlaps the pin, MassFX detects the collision.

By default, MassFX sets the threshold speed above which it applies Use High Velocity Collisions for rigid bodies heuristically (that is, based on experiential data). To specify a custom value, use the High Velocity Collisions Min Speed setting.

Note: This mode applies only to a limited set of collision circumstances. The dynamic rigid body must also have Use High Velocity Collisions enabled, be moving faster the Min Speed threshold, and colliding with a static rigid body that uses a convex hull for the physical shape.
Use Adaptive Force
When on, MassFX reduces jittering in stacked and tightly clustered rigid bodies by shrinking the combined de-penetration forces as necessary.
Generate Shape Per Element
When on and you apply the MassFX Rigid Body modifier to an object, MassFX creates a separate physical shape for each element in the object. When off, MassFX creates a single physical shape for the entire object. The latter option tends to be less accurate, but can simulate faster.

For example, the Teapot primitive in 3ds Max consists of four elements: Body, Handle, Spout, and Lid. The following illustration compares the generated physical shapes for the teapot with Generate Shape Per Element on and off. The version on the left, with four physical shapes, still has some "blocked-off" concave areas, such as the inside of the handle, but it's closer to the actual shape of the teapot.

Left: Generate Shape Per Element=on

Right: Generate Shape Per Element=off

Note: This switch applies only to subsequently created rigid bodies. You cannot switch an existing Rigid Body modifier between single-shape and shape-per-element mode.

Advanced Settings rollout

Sleep Settings group
[sleep method]
Rigid bodies in the simulation moving slower than a certain rate automatically go into "sleep" mode and stop moving. This improves performance by letting MassFX tend to other, more-active objects. A sleeping object "wakes up" and starts moving again if bumped by another non-sleeping rigid body.
Choose how MassFX determines when a body sleeps:
  • Automatic MassFX automatically calculates reasonable sleep threshold values for both linear and angular velocities above which sleep will be applied. To do so it uses a heuristic, or experience-based, method.
  • Manual To override the heuristic values for speed and spin, choose Manual and adjust the following setting as necessary:
Sleep Energy
The Sleep mechanism measures how much an object is moving (combination of translating and rotating), and places the object in sleep mode when its motion falls below the Sleep Energy threshold. The threshold is independent of mass.
High Velocity Collisions group
[high velocity collisions method]
When Use High Velocity Collisions is on, these settings determine how MassFX calculates such collisions. Choose a method:
  • Automatic MassFX uses a heuristic algorithm to calculate a reasonable speed threshold value above which the high-velocity-collision method is applied.
  • Manual To override the automatic value for speed, choose Manual and set the desired Min Speed value:
Min(imum) Speed
Rigid bodies in the simulation moving faster than this speed (specified in units/second) automatically go into high-velocity-collision mode. Setting this value too high can cause a fast-moving object to tunnel through objects with which it should instead collide. Setting this value too low will cause more objects to go into high-velocity-collision mode, which can reduce performance as additional computation is required to calculate collision for slow-moving objects. Setting this value to 0.0 enables high-velocity-collision mode for all moving objects. For these settings to be applied, Use High Velocity Collisions must be on.
Bounce Settings group
[bounce method]
Choose a method for determining when rigid bodies bounce off each other:
  • Automatic MassFX uses a heuristic algorithm to calculate a reasonable minimum speed threshold above which to apply bounce.
  • Manual To override the heuristic value for speed, choose Manual and set the desired Min Speed value:
Min(imum) Speed
Rigid bodies in the simulation moving faster than this speed (specified in units/second) will bounce off one another as part of a collision. Setting this value too high will cause fast-moving objects not to bounce upon colliding with another object. Setting this value too low will cause more slow-moving objects to bounce around the scene, reducing simulation performance and possibly causing jittering. Setting this value to 0.0 enables bouncing for all moving objects.
Contact Shell group

Use these settings to determine the surrounding volume within which MassFX detects collisions between bodies in the simulation.

Tip: You can override these settings for individual rigid bodies using the Multi-Object Editor and the modifier controls.
Contact Distance
The distance that moving rigid bodies are allowed to overlap.

An excessively high value can cause objects to interpenetrate visibly. Setting this value too low can cause jittering because objects alternate between interpenetrating one frame and being forcibly separated the next.

The best value depends upon variety of factors, including the size of objects in the scene, the proximity of the camera to possible interpenetrations, the settings for Gravity Acceleration and Solver Iterations, the inflation amount of the physical shapes, and the frame rate of the simulation.

Rest Depth
The distance that resting bodies are allowed to overlap. This setting can come into play when using Capture Transform to set up bodies for their initial positions in the simulation.
Note: Changing the Contact Distance value automatically changes the Rest Depth value to the new Contact Distance value plus the difference between the two. For example, say Contact Distance is 10.0 and Rest Depth is 8.0 (difference=–2.0). If you then change Contact Distance to 6.5, Rest Depth automatically changes to 4.5 (6.5+(–2.0)). However, changing the Rest Depth value does not affect Contact Distance.

Engine rollout

These options can speed up the simulation if you have the required hardware.

Important: Using either or both of these options might improve performance slightly. However, when they are enabled, the simulation is not deterministic, meaning that every simulation run will produce different results. We recommend that you avoid this problem by leaving the options disabled, as the performance difference is often not substantial.
Use Multithreading
When on, if your CPU contains multiple cores, the CPU can execute multiple threads for faster calculation of the simulation. This can improve performance under some circumstances; however, the results between successive simulations can vary.
Hardware Acceleration
When on, if your system is equipped with an Nvidia GPU, your system can use hardware acceleration to perform certain computations. This can improve performance under some circumstances; however, the results between successive simulations can vary.
About MassFX
Opens a small dialog showing basic information about MassFX, including the PhysX version.