The new Bullet Physics engine has been integrated into Blender and allows for rigid body physics simulations within the game engine. The engine allows objects to fall, roll, and collide with other objects in a realistic manner. It is an ongoing development process, but currently very much in a usable state.

Clearing rotation and applying size

For each object that will be involved in the simulation we need to first 'clear rotation' ALT-RKEY and then Apply Scale and Rotation (CTRL-AKEY in ObjectMode) otherwise the collision will be detected incorrectly giving you odd results (ie your objects could react like an explosion occurred just by sitting on a plane, etc). (You can reapply your rotation afterwards by hand.) This work around is necessitated by a bug that was discovered after release was finalized.

Simulation Baking

The physics engine does not have to be used strictly for playing games. Once a simulation has been created, it can be baked to IPOs (Blender animation curves) for rendering and modification. Each object's movement and rotation will be recorded as an IPO when this feature is enabled under the game menu. This allows for realistic animation for multiple colliding and falling objects to be built quickly with accurate results.

 

To create the IPO's a user must setup up their scene for the physics simulation. This includes identifying each object that will be affected as an actor and setting up each's attributes. Then the "Record Game Physics to IPO" option needs to be enabled in the Game menu, then start the game engine by using the "Start Game" in Game menu or pressing the 'P' Key in the 3D window. Each time the simulation is run the objects motion is recorded to IPO's.

 

To clear the IPO data, un-check the "Record Game Physics to IPO" option and rerun the simulation.

 

Here you find a video tutorial by MrFranz on Elysiun.com.

 

Set up

To enable the Bullet Physics Engine, you need to select it from the World Buttonsm "Stars, Mist, Physics" panel.

 

You can also set the gravitational constant in the World Material Panel. The Bullet Physics engine will use this to determine how fast objects fall in the world.

 

 

Actors

For each object that you wish to have interact in the physics simulation you need to enable it as an actor in the Logic window. Select the object, then in the Logic window (F4) press the Actor button to enable the object for simulation within the physics engine.

  • Do Fh: Not used with Bullet
  • Rot Fh: Not used with Bullet
  • Mass: The mass of a dynamic actor has an effect on how the actor reacts when forces are applied to it. You need a bigger force to move a heavier object. Note that heavier objects don't fall faster! It is the air drag that causes a difference in the falling speed in our environment (without air, e.g. on the moon, a feather and a hammer fall at the same speed). Use the "Damp" value to simliate air drag.
  • Size: The size of the bounding shape. The bounding shape determines the area with which collisions can occur.
  • Form: Not used with Bullet
  • Damp: General (movement) damping for the object. Use this value for simliating the damping an object receives from air or water. In a space scene you might want to use very low or zero damping, air needs a higher damping, use a very high damping to simliate water.
  • RotDamp: Same as "Damp" but for rotations of the object.
  • Anisotropic: Not used with Bullet

Bounds

You can also now select several ways to define to the physics engine how the bounds of your object is defined. It is simple to define a tennis ball's bounds as a sphere and a wooden crate's as a box. For more complex objects look to use the Concave Mesh and Convex Polytope.

  • Box: Uses a bounding box to define the object to the physics simliation.
  • Sphere: Uses a bounding sphere to define the object to the physics simliation.
  • Cylinder: Uses a bounding cylinder to define the object to the physics simliation.
  • Cone: Uses a bounding cone to define the object to the physics simliation.
  • Concave Mesh: Uses the triangles of the mesh to determine collisions. Best used for landscapes and static geometry (like buildings etc) that don't move.
  • Convex Polytope: Like wrapping the mesh with a tight balloon. Very useful for dynamic and moving objects
  • * Note: There is support for scaling, but currently there are bugs with the objects bounds when scaling. Also, the friction needs to be adjusted. Expect fixes in 2.41.

 

Example File

Here's an example file with several boxes and a ball.