Support

  Tips & Techniques - Dynamics

Dynamics:
Knocking Over a Stack of Boxes
Download:
Project
Works with:
XL, Dynamics
Requires:
Version 7.2
 
Special Notes: This tutorial requires the CINEMA 4D Dynamics plugin.


 
In this tutorial, you will use Dynamics to simulate a ball knocking over a stack of wooden crates.
click to view Quicktime movie

 
Step 1: Create a Cube and make it editable (Structure=>Make Editable). Dynamics will only work with polygonal objects or splines.

 
Step 2: Assign a Rigid Body Dynamic Tag to the Cube in the Object Manager (File=>New Tag=>Plugin Tags=>Rigid Body Dynamic Tag). Click the Collision tab and set Collision Detection to Full, Elasticity to 20%, Static Coeff. to 50% and Dynamic Coeff. to 50%.

 
Step 3: In the Object Manager, Ctrl+drag to create four copies of the Cube.

 
Step 4: Stack the Cubes, leaving a small gap between each.

 
Step 5: Create a new Cube. Double click on the Cube in the Object Manager to open its attributes. Set the Size to X=3000m Y=12m Z=3000m. Click OK.

 
Step 6: Convert the Cube into polygons (Structure=>Make Editable). Change the Cube's name to 'Floor' then place the Floor just below the stack.

 
Step 7: Create a Rigid Body Dynamic Tag for the Floor. In the dialog select the Mass tab. Set Total Mass to 0. (Later on Gravity will be added and this zero mass will prevent the Floor from being affected.) Click the Collision tab and set Collision Detection to Full, Elasticity to 20%, Static Coeff. to 50% and Dynamic Coeff. to 50%.

 
Step 8: Create a Solver Object (Plugins=>Dynamics=>Solver Object) and a Gravity Object (Plugins=>Dynamics=>Gravity). Make the Cubes, Floor and Gravity children of the Solver.

 
Step 9: Open the Solver's dialog by double-clicking its icon in the Object Manager. Set Integration Method to Midpoint (the best method for collision) and Oversampling to 32. Select the Details tab and set Energy Loss to 2%, Eps to 3 (to reduce the distance between colliding objects) and Rest Speed to 50 (so that the Cubes will be able slide as well as rebound).

 
Step 10: Click Play. As soon as the Cubes are stacked tightly, click Stop. Define this arragement to be the starting position by selecting Plugins=>Dynamics=>Initialize Scene. Now reset the time to Frame 0.

 
Step 11: Create a Sphere (Objects=>Primitive=>Sphere). Double click on the Sphere in the Object Manager to edit the attributes. Change the Radius to 50m. Convert the Sphere into a polygonal object and then make it a child of the Solver.

 
Step 12: In the Coordinates Manager, move the Sphere X=500m Y=400m Z=0m.

 
Step 13: Assign a Rigid Body Dynamic Tag to the Sphere. In the tag's dialog, set Total Mass to 0. This is to prevent the Dynamics engine from moving the Sphere and to allow the Sphere to be animated using keyframes. Select the Collision tab and set Collision Detection to Ellipsoid, Elasticity to 20%, Static Coeff. to 50% and Dynamic Coeff. to 50%.

 
Step 14: To ensure that the X Axis is the only axis active, disable the Y and Z Axes.

 
Step 15: Click play. Move the Sphere into the Cubes to knock the stack over.

 
Step 16: Currently, when the Sphere strikes the stack, the Cubes do not tumble as would be expected. This is due to their Rotation Mass being set too high. To lower the Rotational Mass, open the Rigid Body Dynamic Tag dialog for each Cube and set it to 20%.

 
Step 17: Click Play. If the playback is rather slow, animate the Sphere with keyframes and render out a file. Note that if keyframes are going to be created, the Solver should be switched off. Clicking the green check in the Object Manager will stop any calculations by the Solver. Remember to switch it back on before you render!


© 2001 All rights reserved. For the personal and/or professional use of Cinema 4D users only. Reprint without permission is strictly prohibited.

© 2012 All rights reserved
Copyright Information |
Privacy Policy | Terms of Use