Setting the Accuracy of Rigid Body Simulations

 
 
 

The rigid body dynamics operator solves the simulation for all elements that are part of its rigid body simulation environment: rigid bodies, forces, constraints, and the time controls. As a result, you can set the accuracy of the whole simulation by using the options in its property editor. This helps resolve simulation problems that may occur when rigid bodies' geometry interpenetrate during a collision.

The dynamics operator that is used depends on which dynamics engine is active for the current environment: PhysX or ODE (see Choosing a Dynamics Engine for general information on each).

For some information on other ways to stabilize the simulation, see Tips for Working with Rigid Bodies.

Setting the Simulation Accuracy for PhysX

  1. Open the PhysX Dynamics Operator property editor for the simulation environment by choosing Modify Rigid Body Edit Simulation Properties.

    You can also select the Curr. Envir. or Environments scope in the explorer, then click the PhysX Dynamics Operator icon to open this property editor.

  2. On the Simulation Accuracy page, set the Substeps value. This value is the number of times that the rigid body simulation is evaluated (sampled) for each frame. For example, at 30 frames per second, setting this value to 4 would mean that the simulation is updated 120 times a second.

    Increasing the substep value can make the simulations more accurate, especially with collisions that involve either fast-moving or complex-shaped rigid bodies. As well, it can make the constraints a bit stiffer. Of course, nothing's for free: increasing this value also increases the calculation time of the simulation. Sorry.

    You should start with a low level and gradually work up in small increments. Increasing this value gradually usually helps to stabilize a scene, at least enough to troubleshoot. You shouldn't usually need a value higher than 100 or lower than 4.

    TipFor information on the parameters, see the Advanced page in the PhysX Dynamics Operator property editor.

Setting the Accuracy of Collisions for PhysX

You can also set Adaptive Substepping options for all colliding rigid bodies in the simulation environment. You may want to set the collision accuracy level for fast-moving rigid bodies.

  • On the Simulation Accuracy page in the PhysX Dynamics Operator property editor, select the Adaptive Substepping Enabled option to use the Subdivision Depth value. This computes collisions more accurately by increasing the number of simulation substeps around the moment that the collisions occur.

    If you're using bounding shapes for the collision geometry, you should deselect the Adaptive Substepping option. Bounding-shape collisions do not usually need the added accuracy of adaptive levels, and this higher accuracy costs you speed (more levels = more time).

    If the collision detection can't be resolved with the current number of substeps, it increases the number and solves again. Each time, the number of substeps is doubled until either the collision can be resolved accurately or the Subdivision Depth that you specify is reached.

  • Set the Subdivision Depth value to determine how accurately the dynamics operator solves collisions.

    Increasing this value make the collisions more accurate, especially ones that involve either small or thin rigid bodies. Of course, increasing this value also increases the calculation time of the simulation. You should start with a low level and gradually work up in small increments.

    NoteIf you increase the Substeps value significantly (such as to 100), make sure to reduce the Subdivision Depth value (to 6 or less) because the combination of these two parameters can increase the calculations per frame immensely which can bring your system to a grinding halt!

Setting the Simulation Accuracy for ODE

  1. Open the ODE Dynamics Operator property editor for the simulation environment by choosing Modify Rigid Body Edit Simulation Properties.

    You can also select the Curr. Envir. or Environments scope in the explorer, then click the ODE Dynamics Operator icon to open this property editor.

  2. Set the Simulation Accuracy Sub steps value. This value is the number of times that the rigid body simulation is evaluated (sampled) for each frame.

Setting the Accuracy of Collisions for ODE

In the ODE Dynamics Operator property editor, you can set Collision Accuracy options for all colliding rigid bodies in the simulation environment. You may want to set the collision accuracy level for fast-moving rigid bodies, or for rigid bodies that use actual shape as the collision geometry.

  • In the Dynamics Operator property editor, select the Adaptive Collisions option to use the Adaptive Level value. This computes collisions more accurately by increasing the number of simulation substeps around the moment that the collisions occur.

    If the collision detection can't be resolved with the current number of substeps, it increases the number and solves again. Each time, the number of substeps is doubled until either the collision can be resolved accurately or the Adaptive Level that you specify is reached.

  • Set the Adaptive Level value to determine how accurately the dynamics operator solves collisions.

    Increasing this value make the collisions more accurate, especially ones that involve either small or thin rigid bodies, or ones that use the Actual Shape of the object as the collision geometry (see Selecting a Collision Geometry Type). Of course, increasing this value also increases the calculation time of the simulation. You should start with a low level and gradually work up in small increments.

    NoteIf you increase the Substeps value significantly (such as to 100), make sure to reduce the Adaptive Level value (to 6 or less) because the combination of these two parameters can increase the calculations per frame immensely which can bring your system to a grinding halt!

Creative Commons License Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License