[ODE] BSP and ODE's collision system

Aras Pranckevicius nearaz at interamotion.com
Mon Apr 21 07:54:02 2003


> Ok naturally I never meant to say that ode has anything to do the way Im
rendering..but..since I load a .bsp file into the
> memory, I have the geometry only binary space partitioned...but this is
what Im gonna do and I want you to correct me
> since I am not too sure if this is the right way:

But you do have your "conventional" geometry somehow - eg. triangle meshes
for final rendering! Either built from your BSP or just supplied "from
elsewhere".

> Im gonna create geometries for all the convex areas of the BSP geometry
(in the same like while rendering you get to
> the current convex area and find all the convex areas visible from that
point) and add them to a single geometry and
> then add that geometry to ode's collision space. Now if I add any other
geometry (say, an entity) into this space, the
> collision will be done perfectly well.

Something like this... This way you'll have one big triangle mesh for the
whole geometry. Probably it's better so split it into several meshes, see
below.

> I hope that this would do enough hierarchical geometry addition and would
save ode from calculating collisions of one
> entity to the whole geometry (bsp world). Please comment.

If you have one big collidable, then you lose the advantages of the ODE's
hashspace (and similarly you would lose the advantages of orctrees,
quadtrees, regular grids, etc.) - the collidable is always occupying "the
whole space"... It's better to split it into several smaller ones (eg. for
each "room" of you level geometry create one ODE collidable).


Aras Pranckevicius aka NeARAZ
http://www.gim.ktu.lt/nesnausk/nearaz/