Choosing the right collision shape to get me started

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

Choosing the right collision shape to get me started

Post by rawtass »

Hi,

I want to add collision detection for me rigged and animated character. For eample this could be the "bob" animation: http://ogldev.atspace.co.uk/www/tutorial38/rigging.jpg
I do GPU vertex skinning (bone weights are used here) where I use skinningmatrices which are calculated for each joint/bone from the CPU side.

With this in mind I want to ask a quite general question.

Which collision shape should I start out with and how should I go about transforming my collision shapes according to the bone animations?

Any advice is appreciated. Thanks.
c6burns
Posts: 149
Joined: Fri May 24, 2013 6:08 am

Re: Choosing the right collision shape to get me started

Post by c6burns »

Rather than blending individual vertices of a complex collision shape (which is work that you already avoided on the CPU using hardware skinning), I use primitives and align them with the bones each frame.
rawtass
Posts: 8
Joined: Sun Dec 30, 2012 8:56 pm

Re: Choosing the right collision shape to get me started

Post by rawtass »

c6burns wrote:Rather than blending individual vertices of a complex collision shape (which is work that you already avoided on the CPU using hardware skinning), I use primitives and align them with the bones each frame.
You're saying that you create a bounding box for each bone and just transform them according to their animations?
If so, how do you make sure it is big enough to cover the vertices of the model?
c6burns
Posts: 149
Joined: Fri May 24, 2013 6:08 am

Re: Choosing the right collision shape to get me started

Post by c6burns »

I make the collision shapes by hand for each model. Since I'm just using skeletal animations, this works for me. If, for example, you were using morph animations for a blowfish to expand to 4-5 times its size, I suppose it wouldn't work very well.

My method is not very efficient in terms of setup time, but it's very efficient at runtime. On a larger project (hundreds of animated characters) I was thinking of having artists create physical bodies using the dynamica plugin for Maya, but I haven't tried that yet.
Post Reply