[ODE] TriMesh/Box Problem
Alex Hetu
alexhetu at videotron.ca
Sun Feb 8 18:26:12 MST 2004
Trimesh/box collision are indeed much more accurate now than they previously
were, but there are still problems that need to be resolved. I've made a lot
of tests using custom 3dsmax scenes and I can still find some cases where a
box will start sliding where it shouldn't, get "hooked" into geometry or
will simply explode.
Here's an example, make a box as a trimesh and let a smaller box fall on it,
near the edges of the trimesh box (enough on the inside so that it doesn't
fall over the trimesh box); you'd think that the geom box should stop moving
and remain there (just like in a box-box collision), but instead it is
stopped and THEN pushed toward the edges (the ones it is touching) of the
trimesh box. Basically, the geom box is pushed in the direction of the
trimesh box's sides because it is touching one or more of the sides'
triangles. The same happens when you collide a box with a thin trimesh box
used as a plane; the geom box often goes through the trimesh box and
collides with the two opposite sides of the trimesh box... then, because of
the depth of the collisions on each side of the trimesh box, the geom box is
moved right in the middle trimesh and remains stuck.
I decided to look into the code and added some tests to prevent surfaces
which are not facing the center of the box from generating contacts. It
worked in some cases, but not all the time... it's a bit hard to explain,
but if the geom box's bottom face is touching only the edges (not the
vectors) of the trimesh, it's working fine and doesn't slide off the trimesh
box anymore (because of the backface test, the side faces of the box trimesh
aren't generating any contacts). But if the geom box's bottom face is
touching the corner of a trimesh triangle, it doesn't seem to generate a
contact there and the geom box sinks in the trimesh until it either gets
stuck or explode... Basically, the geom box's corner vectors seem to collide
very well with triangle surfaces, but not the opposite.
ascii art:
____________________________
|___________________________| <- box1 as a geom
_____
| |
| |
| | <- box2 as a trimesh
| |
| |
|___|
box1 falling on box2 is SURE to generate incorrect results.
I didn't study enough the code in place so i don't know exactly how contacts
are generated at the moment, and i'm no collision expert anyway. But I think
that either there is a bug in there that prevents the collider from
generating all the contact points properly, or that the current technique
used to find those contact points doesn't consider all the possibilities
that a triangle mesh can create...
If anybody is interrested in fixing this, I can provide more details on my
tests and even some screenshots. MSN = xmaspoo at hotmail.com.
Alex
-----Original Message-----
From: ode-bounces at q12.org [mailto:ode-bounces at q12.org]On Behalf Of Adam
D. Moss
Sent: Sunday, February 08, 2004 6:42 AM
To: ode
Subject: Re: [ODE] TriMesh/Box Problem
Anyone having problems with trimesh<->box collisions, please
not that trimesh<->box was rewritten by Erwin shortly after the
0.039 release. Try a CVS version or one of my snapshots to see
if your problem is fixed.
--Adam
--
Adam D. Moss . ,,^^ adam at gimp.org http://www.foxbox.org/ co:3
"At this point the rocket becomes engorged with astronauts."
_______________________________________________
ODE mailing list
ODE at q12.org
http://q12.org/mailman/listinfo/ode
More information about the ODE
mailing list