# Collision geometry

This topic is 4033 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

This thread http://www.gamedev.net/community/forums/topic.asp?topic_id=469752 raised question in my head. Someone maybe knows how dense is collision geometry in games like Halo, Price of Persia, Rayman, Kao the Kangoroo or something similar? Is player volume colliding with 2-3 triangles at once or more like 10? I'm asking this because I found out that colliding with more that 2-3 triangles/edges at once is very tricky even with swept spheres - and without some smart pruning it's often unplayable(player sticking to walls due to wrong resolution of 10 contacts pointing 360 degree around). Maybe I'm not that good at this stuff, but I'm curious if AAA games handles this in smart way using 10k likes of code, or they have just perf collision geometry and player is relatively small comparing to collision geometry triangles, colliding at once only with few of them?

##### Share on other sites
I think a lot of games are designed in such a way that it is unlikely or impossible for the player volume to collide with more than, say, 3 planes at once. Because it is a hard problem. But, 3 planes isn't the same as 3 triangles. Some collision systems have the ability to take a complex collision manifold (e.g., colliding with 10 triangles) and reason about it...simplifying the collision manifold down to just a very few important contact points. Pierre Terdiman and Adam Moravanszky wrote an article about this in one of the Game Programming Gems books (#4 I think). You might find that article useful. It certainly can be a challenge, maybe not possible, to completely eliminate the possibility of the player getting stuck.

##### Share on other sites
You should limit your collision testing as much as posible.
If you have a 10K creature mesh, just wrap it in a sphere/tube and collide that.
If you have a 10K world mesh, subdivide, simplify, approximate the world mesh so that you have a much smaller collision mesh.
The collision and visuals do not have to match up triangle by triangle. The collision mesh is usually really rough in comparison to the visuals.

##### Share on other sites
Quote:
 Original post by grhodes_at_workBut, 3 planes isn't the same as 3 triangles.

Yes, I realize. I'm operating on triangles and edges but now I see it would be good to converts coplanar triangles to convex polygons and forget about internal edges.

Quote:
 Original post by grhodes_at_workSome collision systems have the ability to take a complex collision manifold (e.g., colliding with 10 triangles) and reason about it...simplifying the collision manifold down to just a very few important contact points. Pierre Terdiman and Adam Moravanszky wrote an article about this in one of the Game Programming Gems books (#4 I think). You might find that article useful. It certainly can be a challenge, maybe not possible, to completely eliminate the possibility of the player getting stuck.

I'm actually looking for a solution for simple 3d platform game using swept ellipsoid collisions, so should perfectly possible to reduce collision geometry to not exceed 2-3 planes at once for most situations.
But of course knowing how to reduce 10 contacts in a proper way is something I'm also interested in, so thank you for pointing me to that article!

Quote:
 Original post by KulSeranYou should limit your collision testing as much as posible.If you have a 10K creature mesh, just wrap it in a sphere/tube and collide that.

That's what I'm doing now - swept ellipsoids.

Quote:
 Original post by KulSeranIf you have a 10K world mesh, subdivide, simplify, approximate the world mesh so that you have a much smaller collision mesh.The collision and visuals do not have to match up triangle by triangle. The collision mesh is usually really rough in comparison to the visuals.

I realize that, I wasn't sure if our code is so poor that it can't properly handle 5 random contacts, or it's not that easy to do and better to simplify collision geometry as much as possible. Thank you for confirmation!

1. 1
Rutin
32
2. 2
3. 3
4. 4
5. 5

• 13
• 9
• 9
• 9
• 14
• ### Forum Statistics

• Total Topics
633319
• Total Posts
3011344
• ### Who's Online (See full list)

There are no registered users currently online

×

## Important Information

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!