Scene graphs

This is a discussion on Scene graphs within the Game Programming forums, part of the General Programming Boards category; I'm having problems finding a good scene graph structure that has both spatial information and composition information. For instance if ...

  1. #1
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,596

    Scene graphs

    I'm having problems finding a good scene graph structure that has both spatial information and composition information.

    For instance if you have a light source you could make it a node in the graph and then every object that was a child of the node would the have light applied to it.
    However this type of graph gives no spatial information about the world positions of the objects. It is optimal and expandable for shaders and effects but not always optimal for rendering. Just because an object has a certain light applied to it does not mean said object is actually visible. So then you traverse the entire node just to see which objects are visible.

    The visibility can be solved with a quad-tree (for terrains and such) or a binary tree (for indoor scenes) and is optimal for rendering. However the binary tree is not optimal for grouping state changes, shader changes, light properties, etc.

    I'm interested to know how some of you are dealing with the shortcomings of both of these approaches. Do you just accept that a hierarchichal scene graph will not be able to render optimally or that a spatial tree such as a quad tree or BSP will not be optimal for changes in the pipeline?

    Mixing these two types of graphs is extremely problematic b/c while they both solve certain issues they don't work well together to solve them cooperatively.

  2. #2
    Registered User
    Join Date
    Aug 2003
    Posts
    1,203
    Ok here is an idea ive been thinking about (very briefly so its not exactly thought out in any way):

    Wouldnt it then be possible to keep the visibility part (BSP or quad tree or whatever is used) but each object also holds 1 or several pointers to parent lights/shaders/render states. That way you could look up first what is possibly visible through the viewport, and because each object knows what lights shaders and so on that should affect it, you are able to check what lights and shaders and such that should be taken into account when rendering.

    My first very brief idea.
    Last edited by Shakti; 08-09-2009 at 12:47 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. scene graph rendering techniques
    By ichijoji in forum Game Programming
    Replies: 7
    Last Post: 03-18-2006, 11:17 PM
  2. Scene Graph - Compiling
    By Shamino in forum Game Programming
    Replies: 17
    Last Post: 03-05-2006, 10:57 AM
  3. graphs and algorithms
    By Micko in forum C++ Programming
    Replies: 1
    Last Post: 04-26-2004, 01:13 PM
  4. Generate Graphs
    By beet in forum C Programming
    Replies: 6
    Last Post: 08-19-2003, 07:14 PM
  5. graphs
    By cmpcnic1@livjm. in forum C++ Programming
    Replies: 3
    Last Post: 03-19-2003, 06:06 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21