Trimesh-trimesh collider (was Re[2]: [ODE] Triangle-box collider
contribution)
Jeffrey Smith
jeffreys at Softimage.com
Wed Apr 7 10:42:34 MST 2004
> I used the test_moving_trimesh.cpp in CVS.
> It drops a bunny over two bunnies.
> The WordStep with 0.03 stepsize behaved completely unbelievable.
> The StepFast did better but still let many penetrations.
Right. Like I've mentioned in my previous mails to the list, you have
to use smaller steps, and more contacts, that test_moving_trimesh.cpp
currently uses. When I have some free time, I'd like to change the
test suite to better handle trimesh/trimesh collision. (Or maybe you
can...)
> Then, how did you test it? StepSize, number of contacts and what
> mesh did you use?
I have used hundreds of different meshes, with sizes from tens of
faces to tens of thousands. The step sizes I used vary, depending on
the complexity of the scene, from 8 msec to 0.05 msec (plus, I use an
adaptive substepping method which can change the stepsize as needed).
I allow up to 128 contacts per collision, but usually get far fewer
(10-40 roughly), which I then combine before feeding them to
dJointCreateContact. These may sound like extravagant demands but
remember: interactive games generally do not need exact
trimesh/trimesh collisions, and when they do they can almost always
get by with very low-res meshes. In the application in which I'm
using ODE, computation time is not really an issue but good, exact
collisions are.
JS> With some big
JS> changes to the way trimeshes are represented, I think we could do a
JS> convex decimation/GJK approach, which is what Havok, Maya and others
JS> use.
>
> I cannot agree with you more. Convex geometry is really needed
> now.
One of the primary problems with a GJK-based method (besides being
hard to implement) is that it requires you to carve up your trimeshes
into a collection of convex solids. This can only be done
analytically for closed meshes; for open meshes (or general
non-manifold meshes), you'd have to use some heuristic for the
"carving" process. All of this is expensive and can result in large
numbers of convex solids. Consider the pathological (but common) case
of a thin-walled bowl.
-Jeff
More information about the ODE
mailing list