[ODE] visibility detemination?

Clint Brewer clint at haptek.com
Mon Feb 17 10:10:02 2003


Hi All,

Thanks for the feedback.  some replies below after your names :)
-----------------------
Mark: "make an effort not to get physics code tangled up too much with 
the rendering code"

I understand what you are saying, but I think all the 
collision/intersection detection code would be nice to be able to share, 
and since any collision engine will have those types of things 
efficiently done the visibility system could just reuse those,  mainly 
Axis Aligned Bounding Boxes, and a frustum class.

"I'm not sure how this collision approach compares to regular FOV 
culling in terms of efficiency"

in my code, they woudl be about the same,  most of my geometry has an 
AABB that is then checked against a view frustum farily quickly to rule 
out things that are completely outside.

"Again, I'm just thinking out loud. Please feel free to stop me if it 
gets annoying"
not at all, thanks for the thoughts!

"Maybe I'm missing something, but why would drawing primitives ever lay 
outside collision primitives?"

Say I have a big creature, and that creature has a bunch of hair on it 
that's just there to make it look good, but not to be collided with 
because the hair squishes down.  The hair might not be inside the 
collision geometry, but would still need to be rendered if it were 
visible.  So the visibility bounding geometry would need to possibly be 
different than the physics geometry.

"benefits of octree-usage completely free. Surely this must be 
exploitable in a way that makes sense?"

exactly why I'm interested in this possibility.  I was in the process of 
writing my own octree code for doing efficient spacial queries on 
objects in my world, and thought that I could possibly just reuse the 
already efficient stuff in ode.

----------------------
gl:
"Note that I tend to type 'frustrum' rather than 'frustum' - it's burned 
into my brain like that ..."

heh, me too, It was a couple years before I even realized I was spelling 
it wrong, now frustrum is pretty burned in here too :)
---------------------------
Adam: "cull drawing primitives based on the geometries that represent 
them then those primitives should lay wholly within their geometries"

good point, I hadn't thought about that since so far most of my 
primitives are shaped like their bounding volumes.  I think that what I 
would really need would be an AABB that represented the geometry along 
with the bounding volumes that represent the physical geometry,  then 
only use the AABB that covers the entire primitive when doing the 
visibility determination.  I'm not sure if I could work that in nicely 
with ode.
-------------------------
Kevin:
Thanks for the code for the frustum,  exactly the sort of thing I was 
thinking about. have you used this with lots of objects in your world? 
how's it working?
---------------------------
and as for reply to list, since that seems to be a hot topic right now.  
I prefer reply to list.  but  really,  I'm just happy to have this list 
:) so whichever you prefer is fine by me.

best,
clint