Jump to content

  • Log In with Google      Sign In   
  • Create Account


Scene Graphs


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 jellyfishchris   Members   -  Reputation: 300

Like
0Likes
Like

Posted 19 April 2012 - 10:46 AM

I am having a small problem, well theorotical problem. I have a scenegraph that represents the whole world. However at the moment if there is multiple copies of the same scenegraph(aka the same model) it will just create a new scenegraph linking. I mean this works all well and good however the loading time is insane. Which is to be expected. I have tried to load the models scene graphs and simply just have the world link to these however... When i need to travel up the scenegraph the model doesnt know anything about the worlds unless you count the last one that was using it. Making it impossible to render the models in the right place as everytime you travel up the scenegraph you get into the problem of not knowing where to go from the models node to get to the world node.

I was hoping for maybe some design advice with what to do! Thanks

Sponsor:

#2 Krohm   Crossbones+   -  Reputation: 3017

Like
0Likes
Like

Posted 20 April 2012 - 12:54 AM

at the moment if there is multiple copies of the same scenegraph(aka the same model) it will just create a new scenegraph linking. I mean this works all well and good however the loading time is insane.

I'm afraid I don't understand the rationale of this. Would you elaborate? As long as the rationale is not understood, I'm not sure the solutions would match your needs.
Perhaps I am being pedantic but if the loading times are insane... I guess it's not "well and good"?

Which is to be expected. I have tried to load the models scene graphs and simply just have the world link to these however... When i need to travel up the scenegraph the model doesnt know anything about the worlds unless you count the last one that was using it. Making it impossible to render the models in the right place as everytime you travel up the scenegraph you get into the problem of not knowing where to go from the models node to get to the world node.

Then don't do that. Do it the other way around if you need this but in my opinion, If you're doing a scenegraph in the appropriate sense (to save on state propagation) then you're doing everything wrong. There has been multiple threads in the past about scenegraphs (for state propagation) to be bad in general: don't use them.
I recall this (please pay attention to Hodgman), but similar questions arise regularly, some google-fu is strongly encouraged.

#3 Hodgman   Moderators   -  Reputation: 28614

Like
1Likes
Like

Posted 20 April 2012 - 04:49 AM

Sorry if this isn't useful, but you could reconsider if the hassle of using a scene graph is really paying off...

Scene Graphs - Just say no.

One of the goals you see of some scene graphs -- particularly those that emerge from academia or overly complex frameworks -- is that the perfect rendering order arises naturally as a consequence of how the scene graph is arranged for traversal. So during a single traversal, you're able to transform, cull, and render efficiently during the traversal. That single structure is supposed to minimize the amount of maintenance necessary, and provide a very elegant arrangement for getting your scene rendered.

This is absurd.

This design mixes three unrelated structural ideas into one. First is the hierarchical culling structure. Second is the transformation hierarchy. Third is the optimal rendering order (for batching etc). These are three different trees, which are going to have different arrangements and different structures. Most scene graph related research proceeds with the goal of merging these three contradicting trees into one. Things like switch nodes and DAGs emerge as a result, trying to provide more sophisticated control of this single traversal.

Personally I think you're better off running it in discrete steps with discrete (and highly compressed) structures. So first, you do transformations across the board. Then you cull and collect a list of visible objects for the frame. Lastly, you do a fast sort across those objects to get a final list with optimal batching.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS