Sign in to follow this  
gooo

scene graph for large number of objects

Recommended Posts

hello everyone, i know the thread title is not the best but I couln't think of a better one right now... I have a few question about how to implement an effictive scene graph for scenes with a large number of lowpoly objects visible at the same time. but let me try to explain it a little clearer: I need to display a scene showing a set of about either >10.000 single lines or a few huge linessets (a ground layout), and additionally approx. 40.000 objetcs with about 20 to 100 polygons each. since those objects are instances of about 10 different models I'm going to draw them using hardware instancing. eventhough I'm not sure how I can use HI when different objects use the same geometry but different colors/textures, or how to do picking. The scene will mostly be viewed from above so that (almost) all objects are visible. the objects are not animated at all and do only change position every 5 to 10 seconds (still no animation needed). the only kind of "animation" I need is camera movement. oh and I decided to use XNA for this task. what I need help with is finding a suitable scenegraph design. 1. I think my best bet would be using a quadtree for determining which objects are inside the view frustrum. What do u think? 2. Since all objects probably derive from the same class it might be a good idea to use some kind of objectpool for storing "dead" objects for reuse. 3. every change to the scene is initiated through a server, not the user. so should I use some kind of scene manager listening to events and updating the scene when neccessary? Could/Should this be done in a seperate thread? 4. as far as I have read one should try to avoid combining structes for culling (like the quadtree) and general scene representation, but in my case I think it would be nice if I could just use the quad- or maybe octtree as a scenegraph 5. how difficoult would it be to integrate some kind of LOD-behaviour... I still have to show every object as long as it's size on the screen >1px ... but I don't need to render the complete object... a texture (maybe a bump mapped one) should be good enough 6. HOW DO I DO ALL THAT? ;) no just kidding I know how to implement each single component... but I'm sure about how to structure things so maybe some of you can give me a hint where to start. I know that these are quite a few question and I dont want you to solve all the problems for me but maybe someone has got some advice for me :) thanks Edit: sorry for any typos and grammar mistakes

Share this post


Link to post
Share on other sites
If the scene is very static, then you could probably use impostors for level of detail of the objects without losing much quality (depending how far the objects are from the camera and how much the camera moves). Here's an article on impostors: http://www.gamasutra.com/view/feature/2501/dynamic_2d_imposters_a_simple_.php

When rendering impostors, you render all of the objects (or a subset of them) to a texture whenever they change and then render that texture as a quad. Until you get close to the quad, you wont notice the difference (the key behind impostors).

If impostors wont work, then consider creating a single VBO will all objects in it which is updated when needed. You can keep extra vertex attributes as needed to make the objects appear different. Then, when rendering the scene, you only have to make one call, and since it's all in one object on the graphics card memory, this is very fast (even if there are a lot of tris). This is difficult to update, but gets better speedup than even instancing (which has quite a lot of per object overhead).

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