Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I need a scene graph/management method for a 3D editor (brute force rendering is not really a possibility), where lots of data (geometry) are constantly being modified, it also would need to work great for picking (casting rays from the camera to select objects). Octrees seem to be a great solution, but i'm not quite sure.

share|improve this question
add comment

2 Answers 2

up vote 1 down vote accepted

Think only just one part of the data will be edited at the time, so that makes it easier. Do all just as normal and pick out the one that is editted to use a differend rendering method such as wireframe, coloured or whatever you need.

Brute force is actually never a good possibility unless you have only one checkersboard or such.

Two optimazations can be a vertex and texture cache. Collect objects that share the same vertex data and texture data. Then render all of those in one time. This saves a lot of gpu time as you only set the texture data once and then render 10 objects for instance. This is in addition too octree and frustum culling. Firstly check the distance from the camera, if further then the farplane, do not bother doing anything. Use bounding spheres, that's the cheapest way to determine if something is in view or not, then check the axis aligned bounding box (aabb). For higher precision you could do a boundingbox check.

EDIT: For ray picking I would create a new class. As I go through all objects on the next render I only pass in that ray instance so it can be filled. This means I have in the object class a method for a ray picking check where the ray class is being passed to. It will cost almost nothing.

Regards,

share|improve this answer
    
Right now i'm doing backface + frustum culling with AABBs, although I hate how inconstant the framerate is. –  Meow Jul 31 '12 at 23:34
add comment

OcTree (or portals) + Batching + LODs + Culling.

You might want to have several rendering modes, one at top quality and some with reduced quality but improved performance (simplified lighting and shading, lower resolution textures, no particles, etc).

share|improve this answer
    
I think LOD would be overkill because the data is being changed continuously. Batching is a really great option. –  Meow Jul 31 '12 at 23:38
    
Without detail description of your application bottlenecks it's hard to be more specific than that. –  Krom Stern Aug 1 '12 at 6:03
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.