Graphics Reference
In-Depth Information
Collision Boundary Types
By default, a Rigid Body object behaves like a sphere, rolling on the boundary defined by its Radius value. For
most shapes, this is not what you want. In order to have Bullet calculate the collision boundaries accurately for
the object, you must select a collision boundary type by clicking Bounds and selecting one of the following
options from the drop-down menu:
Box Box calculates the collision boundary as a cube-shaped box. If your object is a cube shape, this is the
fastest and most accurate option.
Sphere Sphere calculates the collision boundary as a sphere. If your object is a sphere, this is the fastest and
most accurate option.
Cylinder Cylinder calculates the collision boundary as a cylinder. If your object is a cylinder, use this.
Cone Cone calculates the collision boundary as a cone. If your object is a cone, use this.
Convex Hull Convex Hull calculates a “convex hull” around the shape of the object, yielding an accurate
collision boundary for many complex shapes. There are two important qualities to note about the Convex
Hull. The first is that it can represent only convex shapes; concavities, such as the inside of a cup or a bell,
are notaccurately simulated. The second point isthat it must bealowpolymesh. Meshes ofmore than about
100 vertices should not be used as Convex Hulls. Ideally, Convex Hull meshes should be between 4 and 30
vertices.
Triangle Mesh TriangleMeshessimulatehighlyaccurate,high-polyshapes,includingconcavities.Thereare
also two notable qualities of Triangle Meshes. The first is that they can be used only for static (nonmoving)
objects. Such objects cannot move on their own; however, a static object can move as the child of a dynamic
object. Because they are static, Triangle Mesh bounded objects will not receive Ipos from the physics simu-
lation. The second notable quality is that two static Triangle Meshes will not collide with each other. Rather,
Triangle Meshes will collide only with dynamic objects.
It is worth noting that there is no visual feedback for these boundary types. Regardless of which you choose,
the dotted sphere will be shown. To the right of the drop-down menu is the Compound button. This button must
be selected if the object has children. When you select this, the object and its children will be considered col-
lectively as a single compound object. The Compound option enables you to add multiple collision shapes in a
singleRigidBodyobject.ThesecretofdoingmoreadvancedphysicssimulationsiscleverlycombiningConvex
Hull andTriangle Mesh boundobjects asCompound objects insuchawaythat all the objects appear tointeract
with each other in an accurate way.
Example: Glass and Ball
In this example, the solution uses several boundary types together. The goal is to create a rigid body simulation
with a ball and a glass, in which the ball can fall into the glass in a natural way and the glass can interact with
both the ball and the floor plane correctly, as shown in Figure 8-32 .
 
Search WWH ::




Custom Search