SmartBody : Configuring Collision Detection

SmartBody has two collision detection modes (see pictures below):

single capsule mode (left), and multiple capsule mode (right).

 

To turn on collision detection, choose the mode inside Resource Viewer -> Service -> Collision, then check "enable"

 

To see the collision geometries, enable viewing of the bounding volume here:

 

The parameter "jointBVLenRadRatio" (length-radius ratio) gives the user control over the automatically generated capsule for each bone. Its default value is 4.0 as shown above. The result looks like these shown below when set to 2.0 (left) and 8.0 (right).

 

When enabling the collision detection service using multiple capsule mode, it automatically creates capsules for each joint on all the characters inside the scene (self-collision within each character is disabled), and it will also add all the pawns that have cubic collision shape into the collision space. The service will send out events when collisions are detected, in the form of the string "Collision detected between A and B". A and B are object names followed by "_BV" (meaning Bounding Volume), and then followed by ":JOINTNAME". Here is a list of such events as examples:

Collision detected between table_BV and table2_BV ('table' and 'table2" are colliding)

Collision detected between table2_BV and elder_BV:l_hip ('table2' and the l_hip joint on character 'elder' are colliding)

Collision detected between doctor_BV:l_shoulder and brad_BV:r_shoulder (the l_shoulder of 'doctor' is colliding with r_shoulder on 'brad')

 

If using single capsule mode, only one capsule is created for each character and no pawn is added in collision space, i.e. this mode only detects collisions between characters. The service will also send out events, in the form of "Collision detected between character A and character B", where A and B are character's names. For example:

Collision detected between character doctor and character brad