Cinema 4D / BodyPaint 3D Program Documentation Tutorials MoGraph Tutorial
Function available in CINEMA 4D Broadcast, Studio

MoDynamics: Falling Chips

MoGraph’s MoDynamics offers very intuitive functions for easily creating natural-looking simulations. For example, not every dynamics animation requires the global application of gravity and this is where MoGraph can be used with Cinema 4D’s standard particle system to selectively apply forces such as attraction, friction and wind. In this tutorial we will use MoDynamics to make a wall of blue and white chips come crashing down.

Click on the following link to open the Cinema 4D file to get started:

Scene overview

The scene already contains all elements needed to start working with MoGraph. A camera has also been set up, which looks onto the plane from the front. The scene will later be rendered from this camera’s angle of view.

We will create a wall to cover up the Cinema 4D logo by duplicating the two Cube objects. We will do this while in the Default camera view and will disable the Camera object in the Object Manager.

Building the wall of chips

Create a Cloner from the MoGraph menu and make both Cube objects Child objects of this Cloner object. Set the Cloner object’s Mode to Grid Array and its Clone parameter to Random, which will prevent any recognizable pattern from forming. To make sure that the chips lie correctly next to each other the Count and Size values must attuned to each other. In our example we want a Count of 20 clones, each with a Size of 380 in the X direction and a Count of 15 clones, each with a Size of 280 in the Y direction. Set the Z direction of the clones to 1 and 500, respectively.

The wall of chips is now complete. All you have to do now is set the Y position to 150

… and the wall will stand exactly on the floor below it, facing towards the Camera object in the Z direction.

Defining the MoDynamics elements

Before we set the forces loose on the clone wall we must first add MoDynamics properties to the scene elements.

We’ll start with the floor - onto which the chips will fall. Assign a Rigid Body tag to the Floor object. This tag can be found in the Object Manager’s Tags | Simulation Tags menu.

The Dynamics Body tag’s Collision can be left disabled since the Floor object will only serve as a surface onto which the chips will fall. Leave all other values as they are.

Also add a Rigid Body tag to the "Background" object because we don’t want any chips passing through this object, either. The easiest way to do this is to simply copy the existing Dynamics Body tag (Ctrl/Cmd+click+drag) and drag it onto the "Background" object in the Object Manager.

Here you can again see the difference in MoDynamics between Cinema 4D Broadcast and Studio. Since almost all objects can be used for Dynamics in Cinema 4D Studio, many more options are available for the Plane in the background. Since the Plane should not be affected by Dynamics, set its Dynamic option to Off. In Cinema 4D Broadcast, this is not necessary because the Plane would not be a MoGraph object.

Next, assign a Rigid Body tag to the Cloner object as well and set the Dynamics tab’s Trigger option to Immediately. Since no global gravitational force will be applied to the scene we don’t have to worry about the wall collapsing too soon. To make the wall crumble and prevent the wall from falling as a whole, set the Collision tab’s Individual Elements parameter to All. The Bounce, Friction and Collision values ensure that the chips will rebound slightly from the floor and not come to rest where they initially hit the floor.

Press the Play button to play the animation. The wall of chips should collapse completely.

Setting up the Gravity object

What occurred in the previous animation was a result of the global gravitational parameter being enabled. Since we don’t need this global property for our project we can simply disable it in the Project Settings menu (Edit | Project Settings … | Dynamics tab) by setting the value to 0.

We will instead add a Gravity object from the Cinema 4D Simulate | Particles menu.

Set the Gravity object’s Acceleration value to 4000. This will cause the chips to fall quickly with a natural motion. We will move our Gravity object from one side of the wall to the other, making the wall collapse accordingly. To help us achieve this effect we will give our Gravity object a cube shape. In the Falloff tab, set the Shape option to Linear and set the Size values as shown in the image below. The Gravity object is now long enough to include the entire wall when it passes by and narrow enough so not too many chips are included at once.

We will use a start position for the Gravity object just to the right of the wall. Enter the coordinates shown in the image below. Also, rotate the object by 90° so the gravitational force works in the right direction.

Animating the Gravity object

Now all we have to do is animate the Gravity object to complete our animation.

In the Attribute Manager, set a keyframe for the Gravity object’s X position at its current position at Frame 0.

Create a keyframe by Ctrl/Cmd+clicking oin the X position’s animation circle.

We will allow the Gravity object 100 frames to move from one side of the wall to the other. Move the Timeslider to Frame 100.

To make sure all chips are affected by the gravitational force, set the Gravity object’s X position value to -450 - its end position.

Set a keyframe at Frame 100 with an X position value of -450.

If you click on the Play button now you will see how the Gravity object moves along the wall, causing the chips to fall as it passes.

To be exact, the chips still flicker a little when they lie on top of each other. This can be corrected by adding Steps per Frame. Set this value to 15 in your Project Settings menu, which will calculate the dynamics between frames more accurately.

For the final rendering, switch to the Camera object (Viewport’s Camera menu) we created especially for this scene.

Click on the link below to view the rendered animation:


Click on the link below to open the finished Cinema 4D file: