Game Development Community

Polygon collision detection

by Nathan · in General Discussion · 08/30/2005 (7:19 am) · 9 replies

Is there any way to have collision detection not just be a square bounding box? Like in 3D Game Studio you use PH_poly, is there any way to do this in torque? Example: your sniping some one and shoot in between their legs, if they just had a square bounding box it would count as a hit even though the bullet went in between their legs, right?

#1
08/30/2005 (7:28 am)
You can implement other solutions yourself. our project uses the OPCODE collision library which works really well.
#2
08/30/2005 (8:00 am)
What's the OPCODE collision library? could you provide a link?
Thanks,
Nathan
#3
08/30/2005 (8:54 am)
Http://www.codercorner.com/Opcode.htm

It's a collision library that lets you use low poly arbitrary (polysoup) meshes for your collisions, from a single triangle up. YOu can't just throw in your visuals and colide with them though, you do still have to make invisible proxy collision meshes. They use OPCODE for the collisions in Tocomak and ODE physics libraries that are becoming pretty popular with game game devs on a budget.

We have it implemented for PC and it works great, only problem is getting it to run on the mac, it's possible since the lib is cross platform, but we don't have much mac experience and the mac game dev community being small means that it's hard to get information on how to go about it.
#4
08/30/2005 (11:45 am)
Bounding boxes are not the authoritative collisions for anything. Bounding boxes are the "high speed sanity check" step in the multi-level collision process that determines if more accurate (and slower) collisions against collision meshes within your shape are required.

Torque collision for dts shapes runs at three levels:

1) Binning system. If two objects are not in the same bin, there is no need to do any collision checks at all. An extremely optimized system.
2) Bounding box check: If two objects have are in the same bin but do not have their bounding box overlapping, no further collision processing is required. Also very optimized system.
3) Collision mesh check. The slowest form of collision processing (which is why we do the first two checks to make sure we aren't checking every single combination of objects in the entire sim each tick), but the most accurate.
#5
08/30/2005 (3:55 pm)
Oh... So does torque automatically support what I'm asking about?
#6
08/30/2005 (4:26 pm)
As long as you create proper collision meshes, and confirm that the projectile code does do collision mesh level checking (pretty sure it does). I had an artist do an entire cathedral under construction as dts, with separate collision meshes for the beams, piles of marble and such, and you could walk under beams, climb up on the piles of marble, etc.
#7
08/30/2005 (4:27 pm)
We also tried what our programmer calls a voxel bins collision system, that proved fairly fast too, although slower than OPCODE with FPS dropping from 150FPS to 120FPS. I just have to upgrade my Graphics card to something better than a georce 3 now :)
#8
08/30/2005 (4:39 pm)
Ok, thanks for all the info! One more question though; how do I create collision meshes, and can it be done in milkshape 3d?
#9
08/31/2005 (10:29 am)
You could try looking here. Google is your friend.

--Mark