Archived

This topic is now archived and is closed to further replies.

Arch

Collision in commercial games

Recommended Posts

Arch    122
Anybody knows how the collision are done/handled in the commercial 3d games like Quake ? It''s true that there are a polygon''s map that contains polygons only for the collision ? Thanks a lot !!

Share this post


Link to post
Share on other sites
Garrland    122
Collision detection in quake is done with a BSP tree. The same tree is also used for rendering. As for games in general the exact process varies with the requirement of the game. Some games use simple bounding spheres or axis-aligned bounding boxes. A terrain based game might use a quadtree to select what polygons to do collision tests. Its really depends on your requirements.

Journal

[edited by - Garrland on March 17, 2003 3:49:41 PM]

Share this post


Link to post
Share on other sites
S1CA    1418
1) Most games use very simple bounding volumes and planes, at least for high level collision, many for all their collision!.

2) Graphics != Physics - if you want good performance you should NEVER be performing collisions using render geometry, always keep them separate. Convex hulls are usually enough to get a very accurate feel to the collision.


Even if your physics is polygon->polygon, treat both sets of data as entirely separate:

- you''ll usually want the graphics data near to the graphics chip (i.e. in VRAM or AGP and slow to read with the CPU).

- graphics data has loads of things which have no meaning to the collision - texture coordinates, vertex colours etc. Extraneous data means cache inefficiency etc.

- Since physics (including collision) is always done with the CPU it can benefit from SIMD optimisations (SSE, 3DNow! etc) which performs better when data is reorganised (i.e. SoA vs AoS) - those reorganisations aren''t often so good for graphics hardware.



--
Simon O''Connor
Creative Asylum Ltd
www.creative-asylum.com

Share this post


Link to post
Share on other sites
Lithic    345
I''m interested in using collision detection that does not require a BSP tree. In theory i plan to use vectors to check all the solid polygons in a node. I would traverse the octree using frustrum culling similar to that used to cull vision except that this version ONLY has a far plane which is dependent upon the speed of an object. That way an object moving further per frame wouldn''t travel through an object. Well, thats just my personal thought. Feel free to shoot it down!


--===LITHIC===--
--===WWW.HaVoKsite.TK===--

Share this post


Link to post
Share on other sites