Exact Inertia for non-convex and compound shapes.

DevO
Posts: 95
Joined: Fri Mar 31, 2006 7:13 pm

Exact Inertia for non-convex and compound shapes.

Post by DevO »

Well Bullet uses now simple diagonal(vector) bounding box inertia for meshes and compound shape.
Unfortunately simulation with this approximation looks not alway plausible.
There is known way to calculate exact inertia for closed polygonal meshes and compound shapes, so I wanted to use it.

But the results are not diagonal matrices, so the question is how to pass it to Bullet ?
Internally Bullet seems to use inverted Inertia in Matrix form, can I direct set it?

One way could to diagonalize all this matrices but this would make body creation significantly slower.
User avatar
projectileman
Posts: 109
Joined: Thu Dec 14, 2006 4:27 pm
Location: Colombia

Post by projectileman »

Hi.
I'm currently solving this problem too. At this moment I've implemented an algorithm that calculates the exact Inertia for trimeshes. But I don't know how to diagonalize the resulting matrices.
So I pass the diagonal component to Bullet directly: since I get aceptable results with this I don't care about.

Please wait for the new release of GIMPACT, it will contain these useful tricks for collision between concave meshes.
DevO
Posts: 95
Joined: Fri Mar 31, 2006 7:13 pm

Post by DevO »

Hi,

so you are using something like this on melax site?
http://www.melax.com/volint.html

There is also 3x3 Matrix Diagonalization may be something like this could be used?
http://www.melax.com/diag.html
I have done some test with it and got on alway good results, may be I used it in wrong way, not sure.