Skip to main content
gamedev.net
🔒 Locked

Optimizing Scene Management

Started by skremon Jul 14, 2003 at 3:38 AM 4 replies 1.2k views
Original Post
skremon
skremon
I am using a scene graph to manage objets of my 3D world. A typical example is as follows: world---|- Skybox |- Terrain -----|-Building1-------------|-Box |-FarmHouse1 |-Table |-Tree |- ..... |-Car |-Vehicle |-Enemy------|_... I''ll use the scenegraph for managing all the objects and also for collision. Each object in the graph will use its own Draw and Collision function. Now how can i optimize the renderer by incorporating space partitioning? I''ve read some posts of Yann L. I can use QuadTree for the terrain. But for other static geometric structures like the Builing1 (Can be a huge building), can i use BSP/OCTree for both rendering and collision?
(Remon) M. Sazzad Karim
outRider
outRider
For simple types, the table and tree, just check against the bbox of the object in your collision function. For the more complicated types, the building (which can be very large and stored as an oct/bsp tree) your collision function can internally check against its various nodes.

Just like your render function would (probably) draw the tree as a simple mesh and your terrain as a traversal of a quadtree, your collision function can be simple in some cases, more complicated in others.

------------
- outRider -
skremon
skremon
In my case i can render most of the objects individually without a space partining system, except for the buildings. Can the buildings have space partioning only so that when it comes to Draw(Builing1) i can go through the tree determing which polygons to render?

One more thing, is BSP only good with zoning/clustering (with portals)? Because when i am staniding far away from a builiding but looking at it, a normal BSP/OCtree will draw the whole building anyway(which i obviously dont want).
(Remon) M. Sazzad Karim
sBibi
sBibi
skremon> "One more thing, is BSP only good with zoning/clustering (with portals)? Because when i am staniding far away from a builiding but looking at it, a normal BSP/OCtree will draw the whole building anyway(which i obviously dont want)."

that's only if you use a simple BSP, without any PVS... that's only useful to throw away leaves/nodes outside your frustrum, not to render what you might see from where you are...
using PVS, if it's a simple building, you might not get very mush advantage, but if it's a large building with lots of rooms/corridors inside, you're likely to get a huge advantage...

there isn't only BSPs and Octrees out there you might want to have a look at KD trees or AB trees (there are a few threads out there talking about it), and occlusion culling...



[edited by - sBibi on July 14, 2003 6:57:42 AM]
skremon
skremon
To do PVS/zoning i need a custom level editor; can''t do that now. If i store each huge building in a BSP(or whatever tree), without zoning is their any technique i use that will not draw occluded polygons?
(Remon) M. Sazzad Karim
Impossible
Impossible
You can use some kind of occlusion culling technique. Google for occlusion culling. There are image space and geometric techniques. Geometric occlusion usually involves finding a volume and finding out what intersects that volume, kind of like frustum culling. Image space occlusion culling usually involves rendering an occluder into the z-buffer, or rendering it''s silouhette and then rendering low detail versions (like a bounding box) of objects that can potentially be occluded and testing them against the occluder''s pixels. There are ways to speed this up using hierarchical techniques and ways to do this in hardware with newer (GF3+) graphics cards. Occlussion culling works well with arbitrary geometry and if you use techniques like those you don''t need any special portalization. Yann L is using a software version of HOM (Hierarchical occlussion maps) in his engine, maybe he can give you some more information.

Topic Locked

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

Sign in to reply to this topic.