Jump to content
  • Advertisement
Sign in to follow this  
Thorris

optimizing state changes in a scene graph

This topic is 4495 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, I know of quite a lot resources on state sorting in the renderer, but I need to optimize state changes directly in the scene graph, so not at rendering time. I thought of collecting the material, textures, etc. for each renderable entity and rebuilding the scene graph with that information. I don't know if that is possible, since especially transformations included in the scene graph would be hard to handle. I would appreciate any resources, ideas, hints, fallbacks on that topic. Thanks. Ciao, Thorris.

Share this post


Link to post
Share on other sites
Advertisement
It seems that "SceneGraph" refers to structure that may be very different from engines to engines. It can go from a very high level definition (nodes define universe part and behaviors) to very low level (nodes define state change, VBO, rendering process, passes, and such).

The "usual" aim of the scenegraph is to ease modifying your universe (the classics are transform group, switchs, alternatives,...). Therefore, if you stick to this aim, it is rather difficult to perform state sorting directly in the scenegraph.

You may as well define the main aim of your scenegraph to be state sorting. You will end up with a scenegraph which is in fact a state tree. It will work. The problem of handling transformations is not a big deal ; you will just have to handle the transformation separately (with a transform tree,...).

Anyway, I would not recommend this design ; your are removing the high abstraction level in favor of the low one where you could keep both. I use the following design : the high level scenegraph compiles into an optimized render frame (sort of state tree) which is then rendered. This could be understood as having a high level scenegraph + a low level one (the one you seems to require). This allows you to keep your main application abstracted enough from the rendering process and to update easily the rendering process when new rendering method / hardware arise.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!