CollisionShapes on animated mesh (skeletal)

Post Reply
rawtass
Posts: 8
Joined: Sun Dec 30, 2012 8:56 pm

CollisionShapes on animated mesh (skeletal)

Post by rawtass »

I'm looking for advise on collision detection on animated meshes, actually GPU based skeletal animation (GPU skinning).

Some details:
- My animated model has a mesh (which can be split into sub-meshes), a set of bones/weights and a set of keyframes where the bones are moved.
- In a GPU based approach I do not have access of the animated vertices on the CPU side so I only have my vertices in the initial bind pose.

Here is an example of the standard Bob model with a convex hull collision shape added when the model is in it's bind pose. This particular model may be difficult becuase it has the body as one large mesh.
Image

I'm thinking I could split by mesh into smaller parts corresponding to bones and then calculate bounding boxes which could be animated by the bone/skinning matrix. Is this what is usually done?

What directions could I choose? What options do I have?
c6burns
Posts: 149
Joined: Fri May 24, 2013 6:08 am

Re: CollisionShapes on animated mesh (skeletal)

Post by c6burns »

You do have access to the transformed bones on the CPU side. So one option is to use kinematic primitives kept in alignment to the bones in order to make a close approximation to the actual character.
rawtass
Posts: 8
Joined: Sun Dec 30, 2012 8:56 pm

Re: CollisionShapes on animated mesh (skeletal)

Post by rawtass »

c6burns wrote:You do have access to the transformed bones on the CPU side. So one option is to use kinematic primitives kept in alignment to the bones in order to make a close approximation to the actual character.
Yes, I have the skinning matrices for each bone.
That requires some careful modelling though so you have a mesh per bone? Or at least one collision mesh for each bone.

In my Bob picture for example the body is one big mesh, but it has many bones.
c6burns
Posts: 149
Joined: Fri May 24, 2013 6:08 am

Re: CollisionShapes on animated mesh (skeletal)

Post by c6burns »

Basically, yes. One shape+body per bone. Some bones won't be necessary, like fingers and toes and so on. This is how I've done it. This is how I had seen it done in CryEngine3 before working on my own platform (they do a custom export of bone meshes from 3ds max biped for hit detection, etc).
Post Reply