The Simulation Environment

 
 
 

All elements that are part of a rigid body simulation are controlled within a simulation environment. A simulation environment is created as soon as you make an object into a rigid body. You can also create environments so that you can have multiple simulation environments in one scene.

A simulation environment is a set of connection groups, one for each kind of element in the simulation: the rigid bodies, the rigid body constraints, and the forces. The environment keeps track of the relationships between the objects in the simulation and determines onto which objects the dynamics operator is applied (see Setting the Accuracy of Rigid Body Simulations).

The dynamics operator solves the simulation for all elements that are in this environment. The type of dynamics operator (PhysX or ODE engine) is set per environment, so you can have different operators within the same scene. As well, a time control determines how the simulation in this environment is played back.

A

Folder with all Environments in the scene.

B

Rigid bodies involved in the simulation

C

Rigid body constraints used in the simulation

D

Forces involved in the simulation

E

Dynamics operator that solves the rigid body simulation

F

Playback settings for the simulation

G

Cached simulation sources

The environment makes it easy to view all the elements of a simulation in their groups without having to browse the scene hierarchy. As well, you can easily add elements to or remove elements from the groups in the simulation environment and have the connections updated automatically. For example, you can drag and drop objects into the Rigid Body group in an environment, and it automatically becomes a rigid body that's part of the simulation.

When you import a model, a separate simulation environment is created for it. You can, however, merge two or more environments into one, making it easy to have rigid bodies from several models all interact with each other.

Note
  • The simulation environment applies only to rigid bodies, not to other types of simulations that may be in the scene (that is, hair, soft body, or cloth).
  • ICE particles use a simulation environment as well, but the contents are different — see The ICE Simulation Environment [ICE Guide] for information.

Creating Environments

To create an environment

  • Do either of the following:

    • Create a rigid body (see Creating Rigid Bodies).

      If there is no simulation environment in the scene, an environment is automatically created for you.

      or

    • Choose Create Rigid Body Environment from the Simulate toolbar.

      An environment is created an added to the list of environments, as you can see in the explorer.

To view the environment

  • Select either the Environments or Curr. Envir. scope in the explorer.

To edit the simulation properties

  • Choose Modify Rigid Body Edit Simulation Properties. This opens the Simulation Time Control and Dynamics Operator property pages for the current simulation environment.

Setting the Current Environment

As soon as you create an environment, it automatically becomes the current environment. This means that any rigid bodies, constraints, or forces that are created are automatically added to this environment. However, you can easily set any environment to be the current one.

To set the current environment

  1. In the explorer, select the environment you want to be current.

  2. Right-click on it and choose Set as Current Environment.

Adding and Removing Elements in a Simulation Environment

If a simulation environment already exists when you create a rigid body or force, that object is added to their appropriate group in the current simulation environment.

Each group in the simulation environment acts as a regular group in that you can add elements to and remove elements from them. When you do this, all the simulation connections are done automatically.

For example, you could drag a polygon mesh object into the Rigid Bodies group to automatically make it into a rigid body (apply rigid body properties), have it affected by the forces in the Forces group, and have the dynamics operator applied to it.

When you remove elements from the different groups, the simulation is automatically recalculated to reflect this.

TipWhen you select a group in the environment, all the group members are selected so that you can tell which objects are affected by the simulation environment.

To add elements to groups in the environment

  • Open two explorers, then drag and drop the objects from one into the appropriate groups in the environment of the other:

    • Rigid Body group: you can drag geometric objects in here to make them into rigid bodies (see Creating Rigid Bodies).

    • Forces group: you can drag force objects in here to make them automatically affect all objects that are in the Rigid Body and Constraints groups (see Applying Forces to Rigid Bodies).

      When you add a force to a scene, it is automatically added to the current environment's Forces group.

      NoteA force or object can belong to more than one environment. For example, a gravity force could belong to several different environments in a scene.

To remove elements from groups in the environment

  • Do either of the following:

    • In the explorer, right-click any object in any group in the environment and choose Remove from Group.

      or

    • Select a rigid body and choose Modify Rigid Body Remove Rigid Body.

Merging Multiple Environments

When you have two or more environments in a scene, you can merge them into one environment. Merging takes all the groups and elements that are in several simulation environments and brings them together in one. The simulation environments which are merged are then deleted.

Merging environments is useful for when you want to assemble a single rigid body simulation from the simulations contained in several models. When you import a model, a separate simulation environment is created for it. Merging allows you to have all rigid body elements from any number of models in a scene interact together in a single simulation.

To merge multiple environments

  1. In the explorer, multi-select the environments you want to merge.

    The first environment you select is the environment into which the others are merged, regardless of which one is set as the current environment.

  2. Right-click an environment and choose Merge Environments.

    All elements in the environments are merged together and the environments that were merged are deleted.

    Don't worry — you can always press Ctrl+Z and undo this if you made a mistake!

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