Skip to main content
GameDev.net gamedev.net
🔒 Locked

Trees for culling/physics

Started by Axiverse Apr 6, 2005 at 1:16 PM 0 replies 400+ views
Original Post
Axiverse
Axiverse
How do you handle the differences between culling trees and trees for collision, etc(namely that for physics a single object and be in two leaves)? Can you use one tree to handle both? Sorry if there is an older thread on this, but until search if fixed...
jamessharpe
jamessharpe
Well you have two main options really - either create two seperate specialised trees or create a unified tree that handles both.

Culling and collision are two similar, yet different operations, both involve creating a set of entities within a certain bounding volume. The main difference is that with modern hardware you want large batches of polys for rendering, yet with collision detection you want smaller batches of polys to minimise the number of checks you need to do. Obviously the way to reduce the number of polys to check individually is to treat the geometry in chunks and use the bounding volumes until you get to a certain level of amounts of polys in each node - seems to me like a chance to generalise the tree traversal - traverse until the bounding volume contains N polys and then add that to the queue. Of course the value of N for rendering and collision will be different, and also dependant upon the individual scene, so it's a matter of trial and error to find a suitable value.

I would suggest that the underlying structure for your tree is and ABT - see the culling section of http://triplebuffer.devmaster.net/misc/yannl.php for a selection of threads discussing the topic further.

James

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.