How are the collision bodies created?

Oozie

20-03-2007 21:35:25

Hi,
I'm trying to use my own model, but I have trouble with the collision bodies (displayed with green wireframe).

Currently I'm using my own skeleton, which I tried to make close to the original zombie_small.skeleton (same bone hierarchy, but with some location and scale variations), so I could use zombie.ogreode. I'm exporting my files from Maya.

So currently I'm using a custom skeleton and zombie.ogreode, and I figure that these two together define the collision bodies somehow.

Does anyone know how it's done? How should I write my ogreode file?
This is how my collision bodies currently look like:

I need to fix it.
Thanks in advance!

rewb0rn

21-03-2007 07:38:00

It has been said that the ogreode files are easy to understand, so you should be able to write your own without any tutorial or something. But be told that the ragdolls do not work properly at the moment. Someone needs to fix it. Maybe you?^^

Oozie

22-03-2007 23:21:48

Yeah there was atleast something wrong with the collision boxes, but I don't remember the specifics on that... I have the fixed 'OgreOdeEntityInformer.cpp' from joemarshall, and it made the zombie collision boxes appear in the right place.

But I still can't get my model to work! The model is same size as the zombie, and I built a similar (bone positions vary) skeleton for it. Using the zombie.ogreode, I get completely wrong results.

I've tried both with my own skeleton and the zombie_small.skeleton, but the collision bodies are messed up as you see from the image I attached. For some reason there are even less collision bodies than with zombie, even if I use the zombies' .skeleton and .ogreode files.

I don't understand what is wrong... Is the mesh data used to calculate the collision bodies or what?

Oozie

24-03-2007 01:26:52

Ok, mystery solved. It was as I thought. All the vertices which are assigned to a certain bone, regardless of their weight (even 0), will affect the collision body creation.

My experience is, that this creates some pretty crazy collision bodies, especially with smooth skinning. The zombie skin is completely rigid, because every vertex is assigned to only one bone with weigh 1.

Now I have to decide how I'll skin my character. Rigid or smooth? How do I ensure that I will have acceptable collision bodies?

Any ideas? :-)