How to efficiently add complex bounding boxes to your objectsΒΆ

It is often important to simplify the bounding box of complex objects (ie, replace a complex Triangle Mesh by a set of simpler boxes or spheres for instance) to maintain the performances of the MORSE physics engine (Bullet).

Here is the “how-to”.

Let’s consider your object is named for instance RollingChair.

../../_images/object_grouping1.png
  1. Append a _mesh suffix to its name (for instance RollingChair_mesh).
  2. In the Physics properties panel, disable the physics for this object (No Collision).
  3. Create plain boxes and put them around your object to shape the bounds. Name them after your object, appending a suffix (like RollingChair_bb_xx, cf image above).
  4. Apply scaling (Ctrl-a) on each boxes.
  5. Create a new Empty and name it after your object (in our example RollingChair). Place the empty at the origin of your object (it will correspond to the position of the object in MORSE).
  6. Parent all bounding boxes + the original object mesh to this empty (select all object, ending with the empty, and press Shift+M).
  7. In the Physics properties, set the empty to be a RigidBody. Set here as well properties like the mass and the translation/rotation damping.
  8. Set the physics properties for all other boxes belonging to the bounding box to RigidBody, not forgetting to set the radius to be smaller than the box. All the boxes must have their Collision bounds set to Box and Compound must be selected. Let other physics properties to their defaults.
  9. All the bounding boxes can be set as well to Invisible in the same Physics panel.

Check the passive objects doc for details on creation of objects in general.

Previous topic

Understanding service internals

Next topic

List of MORSE developers and contributors

This Page