Autodesk Maya Software Feature: Bullet Physics Engine

POSTED 11th OF Jan, 2022

Autodesk Maya Software Feature: Bullet Physics Engine Autodesk Maya Software Feature: Bullet Physics Engine

Autodesk Maya Bullet Rigid and Soft Body Dynamics

The Bullet physics engine lets you create large-scale, highly-realistic dynamic and kinematic simulations. You can use Bullet to create content for rendered animations for film and visualization, as well as for the setup of game engine and real-time simulations.

The Bullet plug-in provides seamless mapping of Bullet objects to Maya objects. The controls to the Bullet objects are exposed in Maya Objects, and the interaction follows the typical Maya dynamics paradigm. Bullet Physics is an open-source collision detection, rigid body and soft body dynamics library. The library provides a collection of objects each corresponding to the various aspects of dynamic simulations. For example, the Bullet solver, rigid bodies, soft bodies and constraints are all unique Bullet objects.

For information about loading the plug-in, see Load the Bullet plug-in.

Load the Bullet plug-in

The Bullet plug-in automatically installs with Maya. Before using the Bullet for the first time, you need to load the plug-in using the Plug-in Manager. To do this:

  1. Start Maya.
  2. Select Window > Settings/Preferences > Plug-in Manager.

    The Plug-in Manager opens.

  3. Locate bullet.mll and turn on Loaded. To load the plug-in automatically every time you start Maya, turn on Auto load.
  4. Click Close.
  5. In Maya, a Bullet menu is added to the Maya main menu bar and a Bullet item is added to the shelf. Use these items to access Bullet.

Run the Simulation

The Bullet physics simulation is driven by the Maya timeline. To run a simulation, play the animation from the solver's start frame, which by default is frame 1 in the Maya timeline. To increase the duration of the simulation, increase the length of the timeline.

Solve Process

Bullet operates in time (seconds) and has a fixed rate at which it takes simulation steps. The Bullet solver does not use frames as a time unit. The fixed rate determines the resolution of the simulation and is specified by the solver's Internal Fixed Frame Rate attribute, which is set to 60 steps per second by default. Note: You may want to change this to 120 Hz for improved solve quality. (Attribute Editor > Internal Fixed Frame Rate)For example, if Maya is set to playback at 30 fps, there would be 2 Bullet sub-steps per frame. This design and implementation better supports real-time gaming applications where drawing and computation time per-frame must remain near constant. Limiting the number of simulation steps slows down the drawing speed required for an accurate solve.Depending on the simulation, you may require additional iterations before you reach the desired solve effect. The solver’s Max Num Iterations option lets you set a maximum number of times the solve is iterated before the solver stops calculating and uses the last approximate solution as the final "good" solve. Setting a maximum amount of iterations lets you limit the time a simulation is processed. While this method may not provide as accurate results as more explicit solvers, this degree of accuracy is sufficient for most applications.See Bake Bullet Rigid Body Simulations for information on how to bake a simulation.

Bullet menu

  • The Bullet menu appears in the FX menu set.

It contains the settings and options you need for the initial construction of your bullet simulation.Note: Options in the Bullet menu are for the initial set-up of your bullet elements; once you configure these settings, they become a default setting and persist until you change them. For example, if you open the Active Rigid Body window, and choose Sphere as the Collider Shape Type, every subsequent Rigid Body you create will have a sphere-type Collider Shape Type. You can change these defaults if you choose another setting and click Apply.

The Bullet menu windows contain only the parameters required for the creation of a bullet simulation. See Bullet Attribute Editor Nodes for controls and settings that you can fine-tune the solver behavior.

Each option in the Bullet menu has a corresponding shelf icon. Hover over the icon for a second to see the name of the tool.

To access these icons, select Bullet from the shelf menu.

Active Rigid Body
Sets the selected object (or objects) as an Active Rigid Body. For additional settings available only in the Attribute Editor, see Rigid Body Nodes.

Select Bullet > Active Rigid Body > to view the Active Rigid Body Options.

Note: You can set your Rigid Bodies to use Maya Fields for greater control\s. See Use Maya Fields in the Solver Nodes topic.

Kinematic Rigid Body
Sets the selected object as a Kinematic Rigid Body. Kinematic Rigid Bodies can be animated during the simulation, but are not affected by the simulation itself. Because kinematic bodies can be moved, the Bullet physics simulation spends more time updating kinematic rigid bodies than static rigid bodies.

Passive Rigid Body
Sets the selected object as a Passive Rigid Body. For additional settings available only in the Attribute Editor, see Rigid Body Properties.

Select Bullet > Passive Rigid Body > to view the Passive Rigid Body Options options.

Note: The Passive Rigid Body menu item only overrides the body type, otherwise it shares the same settings as the active rigid body settings.

Ragdoll
Opens the Ragdoll Options window.

Select Bullet > Ragdoll > to view the Ragdoll Options.

Soft Body
Sets the selected object as an Soft Body. For additional settings available only in the Attribute Editor, see Soft Body Nodes.

Select Bullet >Soft Body > to view the Soft Body Options.

Rigid Set
Select Rigid Set so you can simulate multiple objects at the same time while treating them as a single rigid body. This is useful when you have to perform solves that involve a large number of objects.

There are two states described in the Rigid Set Solver: Rigid Initial State and Rigid Solved State.

Note: You can view these states as well as any other Rigid Set properties in the Attribute Editor when you select the Solver.

See Create a Rigid Set from Multiple Objects for information on how to group multiple objects in a Rigid Set.

Select Bullet > Rigid Set > to view the Rigid Set Options.

Rigid Body Constraint
Sets the select objects as elements used in a Rigid Body Constraint.

Select Bullet > Rigid Body Constraint > to view the Rigid Body Constraint Options.

Soft Body Anchor
Sets the selected objects as a Soft Body Anchor. See Create Bullet Soft Body Anchors for a workflow that involves creating a soft body anchor.

Rigid Sets
Lets you set the initial state of a simulation to a point in after the solve has already started, for example, walls comprised of stacked bricks might need to settled first before running the main simulation. The plugs will Mesh and Transform types.

For Rigid Sets menu options, see Rigid Sets Menu.

Soft Body Vertex Properties
Lets you create soft body vertex properties.

Mass

Opens a window where you can enter the per-particle Mass amount. The Mass setting represents the total mass of the soft body. The paintable particleMass attribute is a scaling factor of the total mass on each vertex.

Linear Stiffness
Opens a window where you can enter a value for the soft body Linear Stiffness, which represents the amount of stretch is used with the soft body.

Bend Resistance
Opens a window where you can enter a value to represent the soft body Bend Resistance, which controls how strongly the bend constraints resist parts of the soft body bending.

Note: This attribute has no effect if the Generate Bend Constraints option is off.

Paint Mass
Lets you paint the per-particle mass amount. The Mass setting represents the total mass of the soft body. The paintable particleMass attribute is a scaling factor of the total mass on each vertex.

Paint Linear Stiffness
Lets you paint the soft body Linear Stiffness, which represents the amount of stretch is used with the soft body.

Paint Bend Resistance
Lets you paint the soft body Bend Resistance, which controls how strongly the bend constraints resist parts of the soft body bending.

Note: This attribute does nothing if the Generate Bend Constraints option is off.

See Paint Soft Body Vertex Properties for instruction on how to paint the vertices of a soft body object.

Add Colliders to Skeleton
Lets you add colliders to the selected skeletons.

Select Bullet > Add Colliders to Skeleton > to view the Add Colliders to Skeleton Options.

Export selection to Alembic

Bakes the selected objects into an Alembic cache file, which you can use to transfer Bullet simulations between various stages of a production pipeline. The contents of Alembic cache files are evaluated as Maya geometry and can be modified with polygon, NURBS, and subdivision surface editing tools.

See Render a Bullet simulation with Alembic for an example of a workflow that uses Alembic caches with Bullet simulations. The Bullet > Export selection to Alembic setting only exports Bullet simulated objects. It does not export any other animated objects in the scene. If your scene has other, non-Bullet, animation, and you want to export these to an Alembic cache as well, make sure they are configured as kinematic rigid bodies.

Note: When you choose Bullet > Export Selection to Alembic, you are only exporting bullet objects (specifically objects with bulletRigidShapes as well as any objects that are members of bulletRigidSets). You can also select the bulletRigidCollection node (or "solved state") node, which has the same effect as selecting the rigid set.

Export All to Alembic
Bakes the entire scene into an Alembic cache file.

See About Alembic Caches for more information on how the Alembic caching system works.

Note:

  • Bullet Alembic export does not support namespaces. If the scene you are exporting from or to contains a namespace, you must remove it before the merge process. Use the Window > General > Namespace Editor to remove the Namespace before exporting.
  • Choose HDF5 format for the file export, as there is no Bullet support for Ogawa file format.
  • Currently, Bullet Alembic Export does not support workflows where the geometry has had scaling applied. Remove any scaling and/or local pivot from objects before attaching the Bullet Solver to the object.
Select Bullet Solver
Selects the solver in the scene and opens it in the Attribute Editor For additional information about Solver settings in the Attribute Editor, see Solver Properties.

Note: You can only view the Rigid Set properties in the Solver.

Remove Bullet from Selection
Disconnects only the selected objects from the bullet solve. This command also cleans up any nodes created to support the object, for example, if you remove a rigid set, the Initial State and Solved State are deleted as well.

To remove all Bullet solving from the scene, select Delete Entire Bullet System, below.

Delete Entire Bullet System
Lets you remove the entire bullet system from your scene, and restores the visibility of the original source geometry.

Bullet Help

Opens the Maya User Guide directly to the Bullet documentation.

See also the Bulletphysics.org blog for more information about Bullet Physics in a non-Maya context.

Interactive Playback

You cannot manipulate objects in the Maya scene during regular playback of a solve. But if you select Interactive Playback during normal animation playback, you can move scene objects, such as passive rigid bodies, and see them interact in the Bullet simulation.

To use Interactive Playback, the passive rigid body must have an additional transform as the parent so it does not interfere with the rigid body transform operation. Select the additional transform and start Interactive Playback mode. You can change the Maya move, rotate, and scale tools and see the simulation update according to these changes.

Select Interactive Playback during normal animation playback to move scene objects, such as passive rigid bodies, and see them interact in the Bullet simulation.

Note: Interactive Playback only works on passive rigid bodies.

You have just read a summary of the Bullet Physics Engine feature in the Autodesk Maya software.

Share: