From BlenderWiki

Jump to: navigation, search

Template:UM/navigator

Starting with Blender 2.41 you can bake game engine hard body dynamics into animation Ipo curves.

Setting up world physics

First set up the world physics. Go to Shading context (Template:K) [1], then the World sub-context [2], and control that the physics engine is set to Bullet [3]:

Setting up the physics engine.


Setting up your scene

Domino scene.

Now set up your scene. In our case we will place a line of dominoes on a plane.

Create a plane (Add → Mesh → Plane) and some dominoes (Add → Mesh → Cube), arranged as shown.

Setting up collision objects

Next select one of the objects that will collide - in our case the first of the dominoes in the line. Tilt it toward the second (rotate) - we’ll start it tipping over and let Blender do the rest.

Dominoes physics settings.

Now for each of the objects (in this case, the dominoes) that will collide:

  • Go to the Logic context (Template:K) and click on Actor.
  • Select RigidBody in the drop down list.
  • Click Bounds.
  • Change the Collision Bounds type to Convex Hull (other types can be done but are more complex to setup).

Do this for each object that will be involved in the collisions. The plane (ground) in this case should not have its logic Actor and Bounds set. Although it does interact with the other objects (in this case, supporting the dominoes), if we set it as a dynamic it too would fall away by gravity. So, it will be a static actor.

Also do not forget that physics objects have to have a material, or they will bounce around wildly because they need the damping values etc. which are not set on objects without materials.

Animation preview

Previewing the animation with Template:K.

Press Template:K to see a preview of the game animation.

Press Template:K when done.

Get ready to bake

Anim panel.

Go to the Scene context (Template:K).

Select the Keyframe start and end range you want the animation you record to start and end on.

Record the Ipo

Recording game physics to Ipos.

Select Game → Record Game Physics to IPO.

Press the Template:K.

Press Template:K when done

Scrub through the animation

Ipos of the baked game physics.

Now you can scrub forward and backwards through your animation with the arrow keys, and look at the animation curves in Ipo Curve Editor by selecting an object.

Replace the animation

If you change something and press the Template:K the old animation will be recorded over if you have Record Game Physics to IPO still enabled.

Troubleshooting and hints

As with all physics systems there are a number of limitations that you need to be aware of - please see this page for tips, tricks, and limitations.

Template:UM/foot