How to master rigid-body simulation in Blender

Looking for ways to create convincing rigid-body simulations without paying a packet for software? Use our guide to rigid bodies in Blender and do it for free!


Blender's rigid-body simulation engine has been improved a lot over the recent years. Since Blender released 2.66, the Bullet Physics library has been integrated into the editor so we can use rigid-body simulations also outside of the game engine. It means simpler workflow and more flexibility in the simulation.

Now only mesh objects can be set as a rigid body, but we can use them as part of parent-child relationships, drivers and animation constraints . To create rigid bodies we can click on Rigid Body (in the physics tab) or use the Add Active/Passive buttons in the tools panel (on the left). On the left panel there are other useful options like calculate mass (use volume information to automatically calculate the mass of body) and copy from active button (copy setting from active object to selected).

Free Resources: Click here to download


Cube setup part 1

Open Blender, select Default Cube and Scale (S key > 0,1), apply Scale (Crtl A > Scale) and add an array modifier (count=10, relative offset 1,5) Duplicate and move the array to create a pyramid. Apply array modifier, jump to the Edit Mode tab, select all vertex and separate them by their loose parts (P key). Select the first cube, open Rigid Body panel (on the left side) and click Add Active. Change collision shape to 'box' then click on Calculate Mass button and choose a material. (If you want to assign a mass by hand use Physic panel).

Cube pyramid

Cube pyramid

Cube setup part 2

Select all the cubes, then Shift + RMB on the first cube and hit copy from active button. Now all the cubes are set as rigid body objects with the same setting. If you click on play animation button on the timeline the pyramid will explode! Don't worry! It could be caused from a wrong origin point in the meshes (select all cubes and click on origin button > to geometry) or because some cubes intersect each other (move them). Add a Plane under the pyramid and click on Add Passive. Now click the play button; the cubes will fall down on the plane... congratulations this is a rigid body simulation.

First simulation

Sphere setup 1

Let's see how to launch a mesh. Add a UV Sphere, Scale (S > 0,2), set Shading as Smooth and move to the front of the pyramid. Apply Scale (Ctrl+ A > Scale), click on Add Active button in the Rigid Body tools panel and change Shape to Sphere. Now click on Calculate Mass and choose a heavy material (like stone). We're ready to launch. Select the Sphere and open Physic panel, click on animated button (allow rigid body to be controlled by the animation system).

Sphere setup 1

Sphere setup 1

Sphere setup 2

Select the first frame, move the mouse cursor to the 3D viewport and click I > Location (Blender creates a location keyframe). Jump to frame number 2 and move the sphere just a little (G key) and create another location keyframe (I > Location). Blender will use the difference of the two positions to calculate the initial velocity of the Sphere. Now move the cursor to the animated flag and press 'I' (this keyframe controls the animated flag). Move to frame number 3, deselect animated flag and (with the cursor on the button) click 'I' to create another keyframe. Jump to frame number one and click play.

Sphere simulation

Render setting

Select Cycles Render engine, add a Plane to the top of the scene and set material as emission. Other materials are very simple; I used a mix of diffuse and glossy Shaders with a wood texture for the cubes and a glossy Shader for the spheres. In Render tab enable Motion Blur, click on the No Caustic button to improve render speed, set render samples to 100 and select a movie file as the output. Move the camera to a good position to see the animation, click Ctlr + F12 and wait for the rendering.

Simulating the Spheres hitting the cubes

Top tip: Simulation cache and animation

The length of simulation is different from the length of animation. In the Scene tab you can change simulation length in Rigid Body cache panel. About simulation; it's better if you don't use small objects, as they're currently unstable. Objects should be at least 20cm in diameter. If your simulation is unstable try to increase the Solver Iteration in Rigid Body World panel.

Fetching comments...

Post a comment