# Rigid Body Overview

A rigid body is an object in the physical simulation whose shape and size do not change. For instance, if you make a cylinder in your scene into a rigid body, it might bounce, roll, and slide around, but it never bends or snaps, no matter how much force is applied.

You can join multiple rigid bodies in a scene with constraints. For example, say you've added a door to your scene and made it a rigid body. It might start out precariously balanced upright in the door frame, but anything that bumps the door will make it fall flat on the floor. To hold the door onto the frame while allowing it to swing open and shut, you can use a hinge constraint.

## Physical Shapes versus Graphical Meshes

A graphical mesh (teapot) and its simplified physical shape

Without MassFX, every mesh in your scene is a graphical mesh: the visual representation of your object. To optimize a graphical mesh for a real-time game or faster render times, you would edit its polygons.

For physical simulation, you also want to be able to control the amount of information being processed. Often, the amount of information needed for simulation is far less than you need for the graphical representation. For example, as depicted in the preceding illustration, a (graphical) teapot might be represented by a simple convex (physical) hull, or shape, in the physics simulation.

A physical shape might be a collection of polygons, such as the one for the teapot, or it could be a simpler built-in shape. The available shapes in MassFX are Sphere, Box, and Capsule. Whenever possible, use these shapes for your physical shape, because they are both smoother and faster than a polygonal representation.

For example, a beach ball with a faceted convex hull for a physical shape will roll unevenly on the ground. Using the built-in Sphere physical shape to represent the ball lets it roll smoothly and yields better performance.

Tip: On the MassFX Tools dialog you set the physical shape on the Physical Mesh rollout with the Mesh Type parameter. On the Modify panel you set it with the Shape Type option on the Physical Shapes panel.

### Composing the Physical Representation

At this point, you might be asking: Beyond spherical beach balls and boxy crates, of what use are the simple shapes? Simulating a teapot as a sphere, box, or capsule is not very realistic.

The answer lies in the ability to compose shapes. While the most common case is a single physical shape for a single graphical mesh, it is possible to use any number of physical shapes to represent a single graphical mesh.

The following illustration shows a single graphical mesh for a wooden table. The single convex hull (the teal box), might work for the simulation as long as you don't need any chairs sitting at the table or objects trying to roll underneath it. If you do, and because dynamic rigid bodies can't use concave meshes (see the next section), you need to compose the physical representation from a set of joined physical shapes.

Table graphical mesh with convex physical shape

The next illustration shows the same table using one Box and four Capsule shapes for the physical representation.

Table graphical mesh with multiple physical shapes

For more information on adding multiple physical shapes to a rigid body, see the Physical Shapes rollout.

## Rigid Body Types: Dynamic, Kinematic, and Static

Each rigid body in the simulation can be only one of three types: Dynamic, Kinematic, or Static. For your convenience, there is a button for each of these types on the Rigid Body flyout on the MassFX toolbar, so you can apply the Rigid Body modifier and set the type simultaneously. Or you can use one of the Animation menu Simulation - MassFX Rigid Bodies Set Selected as ... commands. As well, you can change the type of a rigid body after creation using the Rigid Body type setting on the MassFX Tools dialog or the Modify panel.

Also, an mCloth object can be Dynamic or Kinematic, but not Static.

Dynamic A Dynamic rigid body or mCloth object is much like an object in the real world: It is subject to gravity and other forces; it bumps into other objects; and it can be pushed by those objects. The MassFX simulation moves the physical representation of the object--the physical shape--and the graphical mesh in the scene is updated from that. A Dynamic object cannot use a concave physical shape. However, you can simulate concavity in a Dynamic object with the Concave shape type.

Kinematic A Kinematic rigid body or mCloth object is a puppet moved by the strings of your animation. It is not subject to gravity or other forces. It can push any dynamic objects it encounters, but cannot be pushed by them. The graphical mesh is controlled by 3ds Max (animated or not), and this in turn controls the transform of the physical shape that represents the object in the simulation. A Kinematic object cannot use a concave physical shape. However, you can simulate concavity in a Kinematic object with the Concave shape type.
Note: In MassFX, an object can start out as a Kinematic rigid body and then switch over to Dynamic at any point in the simulation.
Static The Static rigid body type is similar to the Kinematic type, except that it cannot be animated. A Dynamic object can bump into a Static rigid body and bounce off of it, but the Static body never reacts. The Static rigid body type is useful for performance optimization and because it supports concave physical shapes.
Tip: Static is the only body type that can use the Original shape type, which uses the graphical object's actual geometry as the physical shape. So when using a concave object as a Static object, be sure to set it to the Original shape type, not the Concave type.