Simulating Physics with MassFX
 
 
 

With MassFX features, you can set up the objects in a scene to behave as they do in the physical world.

In this tutorial you create a simple simulation in which a falling sphere (maybe a child's toy ball) causes a bowl to fall off a coffee table.

The exercise highlights a few aspects of using MassFX:

Skill level: Beginner

Time to complete: 20 minutes

Preparation for This Tutorial

Set up the lesson:

Set up the coffee table:

The table is a box that doesn't move, so it is the simplest object in this simulation.

  1. If the MassFX toolbar isn't already visible, right-click the gray area at the right of the main toolbar, and from the pop-up menu, choose MassFX Toolbar.

    3ds Max opens the toolbar.

    MassFX toolbar

  2. Select the Coffee Table object.
  3. On the MassFX toolbar, open the Rigid Bodies flyout (the second button), and from the flyout list choose Set Selected As Static Rigid Body.

    A static rigid body is part of the simulation, but otherwise it doesn't move or change.

  4. Go to the Modify panel. MassFX sets up objects by applying a modifier, MassFX Rigid Body, to the objects you choose.
  5. Look at the Physical Meshes rollout. The default Mesh Type for a static body is Original.

    MassFX works with two kinds of geometry:

    • A graphical mesh is the original object geometry.

      Typically, you use graphical meshes (Original) for static bodies.

    • A physical mesh is geometry set up by the MassFX Rigid Body modifier, to simplify the physics calculations.

      Typically, you use physical meshes for dynamic bodies.

    The rule of thumb is to use the simplest geometry you can get away with. In this case, the coffee table is a simple box that is static, so Original will work fine. Don't change the Mesh Type.

    The other two objects in the simulation are dynamic.

Set up the ball:

  1. Select the Ball object.
  2. On the MassFX toolbar, open the Rigid Bodies flyout, and from the flyout list choose Set Selected As Dynamic Rigid Body.

    Dynamic rigid bodies are the objects that move under physical forces. In the case of the ball, the force is gravity.

  3. On the Modify panel Physical Meshes rollout, check the Mesh Type.

    The default mesh type for a dynamic body is Convex. This is a fair approximation of the shape of the ball, as you can see in the viewports.

    Convex physical mesh to approximate the ball

    However, the default shape is not one that will roll very well. The MassFX Rigid Body modifier has a better model for spherical objects.

  4. On the Physical Meshes rollout, open the Mesh Type drop-down list and choose Sphere.

    Now the physical mesh matches the shape of the original ball.

Set up the bowl:

The bowl requires a bit more setup because it is concave.

  1. Select the Bowl object.
  2. On the MassFX toolbar, click (Set Selected As Dynamic Rigid Body).

    (This button should be displayed after you used the same option for the ball.)

    The default Convex physical mesh is not a good approximation of the bowl, because it is a convex shape, as you can see in the viewports.

    MassFX works only with convex shapes. To model a concave shape, you must approximate it by a collection of smaller convex shapes. The MassFX Rigid Body modifier provides the Composite mesh type for this purpose.

  3. On the Modify panel Physical Meshes rollout, open the Mesh Type drop-down list and choose Composite.

    The physical mesh disappears. There is no default "Composite" mesh: You need to construct a custom Composite for every concave object in your simulation.

  4. On the Modify panel, scroll down to the Physical Mesh Parameters rollout. On this rollout, click Generate.

    3ds Max calculates for a little while. During this time it displays the status message "Calculating... Please Wait." When the physical mesh is complete, the status line displays information about the new Composite mesh: "60 Hulls / 1004 Vertices." In the viewports, you can see that the new physical mesh has an overall shape that is concave.

    That is all it takes to set up this simulation. Now you are ready to see it in action.

Play the simulation:

  1. On the MassFX toolbar, click (Start Simulation).

    There is a brief pause while 3ds Max does the calculations, then the ball falls into the bowl, bounces a bit, and ends by rolling off the table, taking the bowl with it.

  2. To play the simulation again, you can click MassFX toolbar (Reset Simulation), and then click (Start Simulation) once again.

    Another way to make the simulation repeatable is to bake it as a 3ds Max animaton. The next procedure shows you how to do this.

Bake the animation:

  1. On the MassFX toolbar, click (Display MassFX Tools Dialog).

    3ds Max opens the MassFX Tools dialog.

  2. On the MassFX Tools dialog, click the Tools tab.
  3. On the Tools tab, click Bake All.

    While it bakes the animation, 3ds Max displays a progress bar at the bottom of the 3ds Max window.

    Once the baking is complete, you can play the simulation as a regular 3ds Max animation, by clicking (Play Animation) near the lower-right corner of the 3ds Max window. You can also render the baked animation to a movie file.

    NoteA baked MassFX simulation is a "heavy" animation, with a key on each frame for every moving object. If you plan to edit the animation further, you might want to use the Track View (Reduce Keys) option to make the animation more manageable.

Save your work:

Summary

MassFX creates animation by simulating real-world physics.

Properties of objects in the simulation are provided by the MassFX Rigid Body modifier. Static objects can be represented by a geometric (Original) mesh; dynamic objects are represented by a physical mesh that can take a number of different shapes, depending on the original geometry. To simulate a concave object, choose the Composite physical mesh type, then click Generate to construct a set of convex meshes that approximates the concave object.

Once objects are set up, click (Start Simulation) to view the results.

You can bake the simulation into a standard 3ds Max animation.