MassFX Physical Shape Types

This topic covers the parameters rollouts and settings for the various physical shape types in MassFX.

Interface

Physical Mesh Parameters rollout (Sphere)

Radius

The radius of the Sphere physical shape. Although the sphere is drawn as a mesh in the viewports, for simulation purposes it is an infinitely smooth sphere.

Physical Mesh Parameters rollout (Box)

Length

The size of the box on the local X axis.

Width

The size of the box on the local Y axis.

Height

The size of the box on the local Z axis.

Physical Mesh Parameters rollout (Capsule)

Radius

The radius of the Capsule physical shape. Although the capsule is drawn in the viewports as a mesh, for simulation purposes it is a perfectly smooth shape.

Height

The distance between the rounded ends of the capsule. (A capsule with a height of 0.0 is a sphere.) The end-to-end length of the capsule = Height + (2 x Radius).

Physical Mesh Parameters rollout (Original)

The Original shape type, which is available only for Static rigid body types, has no parameters. When you specify that a rigid body should use the Original shape type, MassFX uses the object's actual mesh as the physical shape in the simulation. This is useful for concave objects such as a box with the top polygon removed. In such cases, if you want dynamic objects to collide with the object's back faces (for example, to stay inside the box if they fall there), be sure to turn on Enable Backface Collision on the Advanced rollout (Multi-Object Editor or Modify panel) for the Static object.

Physical Mesh Parameters rollout (Convex)

The Convex physical shape is the default type in most cases. This shape type is calculated automatically to impose the least possible amount of computation overhead on the simulation engine. If you need to tweak its shape, you can convert it to a Custom shape with the Convert To Custom Shape button on the Physical Shapes rollout.

The shape responds in real time when you adjust parameters on the rollout, but if you edit the graphical mesh, use Regenerate Shapes to adapt the physical shape to the modified object.

# Vertices in Shape
This read-only field shows the actual number of vertices in the generated convex physical shape. This can vary from the Vertices setting (see following) depending on the graphical mesh and the other settings on this rollout.
Inflation
The amount to expand the convex shape outward from the vertex cloud of the graphical mesh (for positive values) or to shrink it within the graphical mesh (for negative values). Positive values are measured in world units, while negative values are based on a percentage reduction.

Inflating the convex hull beyond the graphical mesh is a simple way to help prevent interpenetration of fast-moving objects, but under slow-moving conditions it might cause objects to stand off from one another.

See also the Contact Shell settings.

Generate From
Choose the method for creating the convex hull:
  • Surface Creates a convex physical shape that wraps fully around the outside of the graphical mesh. This method sometimes creates a "messy" mesh.
  • Vertices Reuses a subset of existing vertices from the graphical mesh. This method creates cleaner shapes, but only the vertices themselves are guaranteed to be outside the graphical mesh. You might need to use a positive Inflation value to keep the convex hull completely outside the graphical mesh.
Vertices
The number of vertices targeted to be used for the convex hull: between 4 and 256. Using more vertices provides a better approximation of the original shape, at a slight cost to simulation speed.
Note: Setting Generate From to Surface might generate more vertices than this value. For the actual number of vertices created, see the # Vertices In Shape statistic at the top of the rollout.

Physical Mesh Parameters rollout (Concave)

The Concave shape type lets you represent a concave rigid body as a number of automatically generated convex hulls. It forms the hulls and fits them together into a composite physical shape that matches the graphical mesh.

Creating the hulls can take a long time, depending on the resolution of the graphical mesh, so it is necessary to click the Generate button to generate the hulls. The resulting hull count is displayed at the bottom of the rollout so that you can evaluate the potential performance impact of the (possibly numerous) convex hulls.

Note: The Concave shape type is useful mainly for Dynamic and Kinematic bodies, whose physical shape cannot actually be concave. To represent a concave Static body in the simulation with optimal performance, use the Original shape type instead.

Following are descriptions of the Composite Mesh parameters. After changing any of these settings, click Generate for the change to take effect.

Mesh Detail
The overall resolution of the physical shapes relative to that of the graphical mesh. Higher Mesh Detail values create more hulls, thus providing greater fidelity to the original mesh shape, at the cost of simulation speed.
Min(imum) Hull Size
The percentage of volume-split threshold for each piece of convex hull, relative to the volume of the entire object.

A high Size Difference value provides a better approximation of the original shape because it enables increased size variation for the convex hulls. This can lead to a greater number of convex hulls being created, resulting in a cost to simulation speed as well.

A low Size Difference value results in the creation of fewer hulls of similar size, thus improving the simulation speed at the cost of precision.

Max(imum) Verts Per Hull
The maximum number of vertices to use for each convex hull. Using more vertices gives you a better approximation of the original shape, at a slight cost to simulation speed.
Improve Fitting
Produces a better match between the shape of the composite hull and the graphical mesh, but takes longer to generate.
Generate

Click after choosing the Concave mesh type to create new convex hulls, and after changing any settings to recalculate the hulls.

Physical Mesh Parameters rollout (Custom)

Use the Custom physical shape type to extract a physical shape from another object in the scene. This option gives you control over the exact vertex placement of the physical shape.

For best results with Custom meshes, observe these precautions:
  • The object used as a Custom mesh must have no more than 256 vertices.
  • To use a Custom mesh with a Dynamic or Kinematic rigid body, it must be convex; with a Static body, it can be concave.
  • The default location of the physical shape derived from the Custom mesh is that of the source object, so in general you'll want to superimpose the Custom mesh object and the object to serve as a rigid body before you extract the mesh. Otherwise you can move the extracted mesh to the desired location at the Mesh Transform sub-object level of the Rigid Body modifier.
Pick Mesh From Scene
Click this button and then select another object in the scene to use as the custom shape. After selecting the mesh, the button label text is the name of the custom shape object.

Selecting a mesh copies the vertices of that mesh as the custom physical shape. If you change your custom shape in the scene, click Update From Source Object (see following) to copy the changes into the physical shape.

Select Mesh Source
After you associate an object in the scene as the source for the Custom physical shape, click this button to select that object. If you then edit the source object and click Update From Source Object, the custom shape picks up the edits.
Extract Mesh Object
When there is no associated Custom shape in the scene (possibly because it was deleted), click this button to create a new editable mesh object from the physical shape and associate it with the physical shape. You can then tweak its vertices, use Update From Source Object (see following), and then delete the editable mesh again if you like. Unavailable if the source object exists.
Update From Source Object
If you edit the vertices or transform the source object, click this button to copy the changes to the physical shape. Unavailable if the source object does not exist (for example, if you deleted it).