Skip to main content
gamedev.net
🔒 Locked

Efficient culling implementation?

Started by Basiror Nov 22, 2004 at 4:30 AM 0 replies 350+ views
Original Post
Basiror
Basiror
Hi I am just wondering about a new layout for my culling system I use trees (quad, octree and a modified version of a octree with deformed node- boundaries and counts I got a base node class CNode from this class i derive the nodes of the indivdual trees CQuadtreeNode COctreeNode CCustomNode //for the customized octree now i thought about how to implement frustrum and occlusion well in a precalculation process i setup the geometry i get from a map file and at this point i decide which type of octree to use once this is done i save the mesh structure back to the final map file now to the culling my maps can be up to 16384*16384 units a player is 72 units high now my node size is 512 units so i get a maximum of 32*32*32 nodes for the entire scene though you can adjust the mapsize for every map and use only vecMin and vecMax as boundary i will use quadtrees mainly so the get around 1000 nodes maximum Back to culling Frustrum: i want to implement it in a recusive way, i get 5 recursions of the frustrum culling call node->cull()->cull().... i pass a reference of CFrustrum down the tree each node culls its children against it and if its inside or intersects the frustrum it adds the node to a list each node contains a list of different materials and index buffer indices start end now before rendering i want to implement another culling algorithm called occlusion culling via nvocclussionquery i render it from front to back 1. render the nearest visible node then render its childrens boundary with depthwrite disabled if more than x pixels are visible i enable depth write and render the real scene geometry into the depth buffer *no color rendering yet* and go on until everythings rendered now i got a perfectly culled scene *in theory* and a depthmap of the scenery which i read back into a texture or multiple rendertarget if possible since i gonna need it later to render shadow maps and for early zfall occlusion for complex shader rendering this has not yet been implemented, but maybe some of you who have already written similar renderers could give me some tipps about what to take care of and so on? thx
http://www.8ung.at/basiror/theironcross.html

Topic Locked

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

Sign in to reply to this topic.