Triangle Edge Collision

Blitz3D Forums/Blitz3D Programming/Triangle Edge Collision

KuRiX(Posted 2005) [#1]
Hello again Friends. I am desperated. I have a problem with the ODE collision library. Perhaps i should have post this in the userlib forum, but i think that here you will help me better :)

The problem is that the collision with a trimesh detects the edge of the polygons (think in a box made by two triangles). So when my sphere or my ccylinder touch the line between the triangles it jumps like crazy. In the ODE forums the called it the "fear the wireframe" problem.

I don't know how to solve it. I have tried to hack the normals, etc... and playing with contact parameters, but no solution...

Thanks all.


KuRiX(Posted 2005) [#2]
Ok, Solved when changed to sphere collision. Not 100% solved, the problem is here, only 1% noticeable.

I Wonder how is this solved in other collision libraries...


DJWoodgate(Posted 2005) [#3]
I don't know and I do not use ODE but its sounds like a major problem. Presumably it would need to determine how coplanar the other triangle is that shares this edge at point of contact and adjust the response accordingly. Sounds easy but it probably isn't, not if you want to do it quickly anyway.

I am suprised ODE has this problem though, after all Blitz seems to manage its sphere to mesh collisions without any issues of this sort, that I have noticed anyway.

Maybe this quote from the ODE docs suggests some awareness of this limitation

In real life, contact between two bodies is a complex thing. Representing contacts by contact points is only an approximation. Contact "patches" or "surfaces" might be more physically accurate, but representing these things in high speed simulation software is a challenge.



Probably also worth looking at 10.7.6. in the ODE docs which makes further suggestions for improving trimesh collisions, such as reducing the stepsize. Not sure if that would be applicable to your sphere/cylinder case or not.


KuRiX(Posted 2005) [#4]
Thanks for your answer. The problem is that ODE (using OPCODE) to detect collisions, moves the object through the trimesh, then detect the contact position, normals, etc, and then repositions the object correctly using contact joints.

So, if you get this situation:


Cylinder\ ....../
--------------.-------- <- Triangle 2
Triangle1\__/

Where the point is the edge between triangles, then the normals are not right, and is considering the triangle 2 to be alone.

Now and forever, use spheres. I have spent a week looking and testing, and everybody in the ode community says the same. Not CCylinders for fast moving objects against trimeshes.