Sign in to follow this  
fawrh

Culling algorithm

Recommended Posts

fawrh    122
Currently I am using an octree in my game engine, however I have large amounts of dynamic geometry. I suppose what I am asking is does anyone know a better implemtation then an octree that could render both my static and dynamic geometry? If it helps, the game that the engine is being developed for is a space style game, with planet side combat as well, using the octree works fine for the actual space areas, due to the lack of geometry, however when going from space to a planet is causing a large drop in frames (around 45 FPS) due to the recalculation of the large amounts of dynamic geometry that are switching leaf nodes. Any help or points in the right direction would be much appreciated.

Share this post


Link to post
Share on other sites
fitfool    113
Hmm, i think it would be better to just implement Octtree's on your large, static geometry, and just perform frustrum culling on your Dynamic geometry.

Share this post


Link to post
Share on other sites
Adam_42    3629
To speed up your frustum checks when lots of objects are outside it you could also try wrapping a bounding sphere round the frustum.

It might also be useful to tie some of the dynamic objects to a parent static object, for example a list of land based entities could be stored with the planet. That lets you reject them all quickly based on the state of their parent object.

Share this post


Link to post
Share on other sites
fawrh    122
I had that idea as well, although pulling my dynamic objects into a list and having them store the general "leaf" of the octree in which they currently reside. The issue that I have with this is the n*2 number of if checks that I have to call to find out if they are in the current or nearby "leaf" nodes. The use of this does in fact speed up rendering, but only by a small amount, (about 10 fps faster the the octree that I am using. The bounding sphere does give me a good idea though, perhaps I will try to place the nearby, (as in X distance away) dynamic geometry inside a seperate BSP tree, and use a seperate thread to generate the tree "leafs" so that the update function for each object can do a simple distance check (n cycles). This still is not the prefered solution, as if the number of dynamic objects becomes high (10k+) this could bring the engine to its knees, A tree or structre of some sort I feel would still be the better bet, just which to use is the question...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this