3D Collision Detection In Commercial Games

Advanced game related topics
User avatar
Fou-Lu
Enthusiast
Enthusiast
Posts: 201
Joined: Tue Jul 12, 2005 8:30 am
Location: I'm pretty sure this is all a nightmare
Contact:

3D Collision Detection In Commercial Games

Post by Fou-Lu »

Hi everybody :)

I am not really interested in any code here, I was just wondering which techniques the games use do detect collision in 3D games nowadays, since even when there seems to be a million things spinning and moving across the screen they still manage do get 60fps.

I was specially curious about the level scenaries, in some games they seem to be kinda predictable (the walls are all axis oriented) which could make collision detection easy, but what if they are just a 3D irregular model? Does the game verify every triangle one by one? I'm sure there must be a smarter way to do that! :P

Before you tell me to google it, I've already done that and found lots of solutions but usually accompanied by a "it depends on the behavior of your application". What I wanted to know is how does the commercial games do that, maybe with some examples (of games, not code!) if possible. Thanks!

~Fou-Lu (aka Lørd Cinneris (actually Elias Sant'Ana))

Image Image
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Re: 3D Collision Detection In Commercial Games

Post by Mistrel »

I think the fastest type of collision is BSP (binary space partitioning) where collision with the world is pre-calculated. There are a lot of articles about this type of collision online.
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: 3D Collision Detection In Commercial Games

Post by Fred »

most of the new generation 3D games let the most of collision handling fully to the physics engine (bullet, physicX, Havoc), while handling player collision manually to avoid little bouncing and such.
User avatar
Fou-Lu
Enthusiast
Enthusiast
Posts: 201
Joined: Tue Jul 12, 2005 8:30 am
Location: I'm pretty sure this is all a nightmare
Contact:

Re: 3D Collision Detection In Commercial Games

Post by Fou-Lu »

@Mistrel: Thanks! I'm gonna read more about that then!

@Fred: I didn't know about that, seems pretty useful! I just went to read the PB 3DEngine documentation and found out PureBasic can also handle the collisions :P does it use any of these phisics engines or the OGRE engine handles that too?

~Fou-Lu (aka Lørd Cinneris (actually Elias Sant'Ana))

Image Image
DarkDragon
Addict
Addict
Posts: 2344
Joined: Mon Jun 02, 2003 9:16 am
Location: Germany
Contact:

Re: 3D Collision Detection In Commercial Games

Post by DarkDragon »

Fou-Lu wrote:@Mistrel: Thanks! I'm gonna read more about that then!

@Fred: I didn't know about that, seems pretty useful! I just went to read the PB 3DEngine documentation and found out PureBasic can also handle the collisions :P does it use any of these phisics engines or the OGRE engine handles that too?
OGRE is just graphical. PureBasic uses OGRE in combination with ODE (physics engine).
BSP is just a tree (and a map format with a tree inside) for partitioning 3D data. Another tree would be an octree. You can use any kind of such partitioning things for collision. You could even use some kind of hashtables for it.
bye,
Daniel
Post Reply