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.
Choosing the right collision shape to get me started
Re: Choosing the right collision shape to get me started
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.
Re: Choosing the right collision shape to get me started
You're saying that you create a bounding box for each bone and just transform them according to their animations?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.
If so, how do you make sure it is big enough to cover the vertices of the model?
Re: Choosing the right collision shape to get me started
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.
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.