Mesh Collision?

Oct 19, 2013 at 5:23pm
closed account (N36fSL3A)
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 Oct 19, 2013 at 5:26pm
Oct 19, 2013 at 7:37pm
You want to google around "mesh intersection".

Have fun!
Oct 19, 2013 at 8:42pm
closed account (N36fSL3A)
All I see is "Triangle intersection". Should I just loop through every possibility?
Last edited on Oct 19, 2013 at 8:43pm
Oct 19, 2013 at 10:29pm
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.
Oct 19, 2013 at 10:45pm
closed account (N36fSL3A)
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.
Oct 19, 2013 at 11:22pm
closed account (o1vk4iN6)
Both are equally as foolish imo, you are better off representing your model as convex shapes and testing collision like that.
Oct 19, 2013 at 11:59pm
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.
Oct 20, 2013 at 2:06am
closed account (N36fSL3A)
@Disch
http://en.wikipedia.org/wiki/Separating_Axis_Theorum

Nothing.

Again, all I see is triangle intersection.
Oct 20, 2013 at 3:09am
closed account (o1vk4iN6)

Lumpkin wrote:
Separating Axis Theorum


...

http://en.wikipedia.org/wiki/Separating_Axis_Theorem
Oct 21, 2013 at 3:14am
closed account (N36fSL3A)
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 Oct 21, 2013 at 3:23am
Oct 21, 2013 at 6:22am
Topic archived. No new replies allowed.