Setting a Rigid Body's Initial State

 
 
 

When you're working with rigid body simulations, you often need to have a certain state of a rigid body or constraint object be at the first frame of the simulation. You can transform the object as you like and then use that as the initial state. Setting an initial state prevents the need for doing pre-roll frames of the simulation to get the rigid body into its correct state for the beginning.

The initial state is the position, orientation, and linear and angular velocities of a rigid body or constraint at the first frame of the simulation. Scaling is not considered as part of the initial state properties because rigid body simulation does not drive scaling. The scale of an object is automatically taken into consideration for the initial state.

On the left, rigid body in current initial state for simulation.

On the right, the rigid body is transformed to a new position and orientation. This is now its initial state for the first frame of the simulation.

There are three ways in which you can set a rigid body or constraint object's initial state:

Any way you do it, the rigid body or constraint object's initial state property is updated with these values. Softimage then uses these values, along with the values in the simulation's time control, to recalculate the simulation.

Setting the Initial State by Transformation

You can interactively transform the rigid body or constraint object at any frame so that this new position and orientation is its initial state.

To change the object's transformation for its initial state

  1. Select a rigid body or constraint object.

  2. Go to the first frame of the simulation, or to a frame that comes before the first simulation frame.

  3. Transform the object so that it's in the desired position and orientation for its initial state. The parameters in its Dynamics Initial State property editor (see the next section) are automatically updated to reflect the current transformation values.

    TipFor best results, you should set up the rigid bodies so that their geometries don't interpenetrate at the initial state of the simulation.
  4. When you play back the simulation, you'll notice that the rigid body or constraint object's state at the first frame of the simulation is the initial state that you set.

Editing the Initial State Properties

The initial state property contains the initial global position, orientation, and linear and angular velocities of the rigid body or constraint object. These parameters define the object's position and motion.

To edit the initial state's properties

  1. Select one or more rigid body or constraint objects.

  1. Do either of the following to open the Dynamics Initial State property editor:

    • Choose Modify Rigid Body Edit Rigid Body and then click the Dynamics Initial State tab.

      or

    • Click the rigid body's Dynamics Initial State Property icon in the explorer.

  2. Set these options as you like to adjust the object's Position and/or Rotation (orientation) values for its initial state:

    Tip
    • When you select any of the FromAnim options (such as PosFromAnim), the rigid body's values are calculated from its animation — see Setting an Initial State for Animated Objects below.

    • All the X/Y/Z parameters in this property editor (Pose and Velocity tabs) are animatable so that it's easy for you to create proxy parameters with them or create custom parameters that are controlled by expressions. However, if you want to animate these parameters directly, it's recommended that you do so in the rigid body's Local or Global Transformation property editor instead.

Setting an Initial State for Animated Objects

If the rigid body or constraint object is animated, you can use its position, rotation, and velocity from its animation to calculate its initial state for the first frame of the simulation.

For example, you could animate an object moving quickly, make it a rigid body, and then use its position and velocity from its animation at the beginning of the simulation as it collides with another rigid body.

TipYou can animate the switching between a rigid body's active and passive state to determine when the simulation takes over its animation. The rigid body must be active to be affected by the simulation. See Switching between Active and Passive States for more information.

To use the rigid body or constraint object's animation as its initial state

  • Do either of the following:

    • Select the appropriate "FromAnim" options in the Dynamics Initial State property editor. For example, to use the rigid body's position from its animation, select the PosFromAnim option.

      or

    • Select the rigid body or constraint object and choose Modify Rigid Body Use Animation as Initial State. This automatically selects all FromAnim options in the Dynamics Initial State property editor.

    A

    If the object is animated, its linear and angular velocity is calculated and used at the first frame of the simulation.

    B

    If the object is animated, its position at the first frame of the simulation is used if you select the PosFromAnim option.

Selecting an Initial State from the Simulation

Although less likely than setting the position and orientation, you can take the state of a rigid body or constraint object at any frame during the simulation and set this state as its initial state. This will then be the state of the rigid body or constraint object at the first frame of the simulation.

To set the initial state for a rigid body or constraint object

  1. Select one or more active rigid bodies or constraint objects.

  2. Set up the simulation as you like, then go to any frame in the simulation that you want to set as the initial state.

  3. Select the rigid body and choose Modify Rigid Body Set Initial State from the Simulate toolbar.

    The parameters in its initial state property editor are updated to reflect the current state.

  4. When you play back the simulation, the rigid body's state at the first frame of the simulation is the initial state that you set.

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