Mesh Collision?

How can I determine whether there is a collision between 2 meshes? I'd just like to see if one mesh is inside another.
Last edited on
You want to google around "mesh intersection".

Have fun!
All I see is "Triangle intersection". Should I just loop through every possibility?
Last edited on
FWIW, if this is for collision detection, this is probably not necessary. Mesh/Mesh collision is not normally performed because it's impractical: When meshes consist of 100 polygons... that's 100x100 = 10000 polygon collisions you need to detect for just one collision. It's even worse when you have larger meshes.

There are shortcuts you can use to speed up the process... like the Separating Axis Theorum (wikipedia it)... but it only works with convex polygons so it's unsuitable for most meshes.


For most collision detection you don't need it to be "perfect", you just need to to be "good enough". One very easy technique is to form one or more spheres by having a central point and a radius for the meshes. Then to see if they "collide" you just check the distance between their center points and see if they are closer than the sum of their radii.
I'm not foolish enough to check if the actual mesh itself is intersecting, I want to check if a lower-res mesh, a collision mesh intersects.
closed account (o1vk4iN6)
Both are equally as foolish imo, you are better off representing your model as convex shapes and testing collision like that.
Low-res mesh collision is a common method, so I don't know that I would call it "foolish".

However, the two really aren't all that different in terms of accuracy. The mesh has the advantage that it can be rigged and articulated along with the higher-resolution mesh.
@Disch
http://en.wikipedia.org/wiki/Separating_Axis_Theorum

Nothing.

Again, all I see is triangle intersection.
closed account (o1vk4iN6)

Lumpkin wrote:
Separating Axis Theorum


...

http://en.wikipedia.org/wiki/Separating_Axis_Theorem
Never knew an 'e' could change everything. Can you dumb it down for me? I'm no college student, especially when it comes to math.
Last edited on
Topic archived. No new replies allowed.