Archived

This topic is now archived and is closed to further replies.

supagu

scene graph?

Recommended Posts

how many people here use scene graphs in thier engine? personally i dont, and i''ve been doing some research, and looking into implementing them, all i can come up with scenenodes are transform nodes, material nodes, and mesh nodes. Then the problem is inserting the nodes? i guess a material would be close to the root, as its the most expensive state change wise, followed by transforms, then meshes... so if a material requires a number of passes, it can set the pass and call the children to be rendered/set. what i have done is the past is just have a list of models, sorted so those models that use the same material/texture are located next to each other... another issue is how to create the nodes from the scene graph, should i ask the scen graph to make them eg: SceneGraph.CreateMaterial( "myMaterial.fx" ); Transform* SceneGraph.CreateTransform(); ideas suggetions link to some tutorials would be exellent ;p

Share this post


Link to post
Share on other sites
Hi!

You should rather think of a scene graph as of convenient and optimized structure for storing your geometry. Scene graphs are mostly used to optimize frustum culing, collision detection and similar. Its recursive nature allows for lots of geometry optimizations.

However, to optimize state changes (textures, shaders etc.) you should have an extra structure capable of buffering visible geometry, then allowing for rendering it with somehow optimized state changes order.

I can''t really think of scene graph alone being optimized for display in respect to state changes.

Cheers!

Share this post


Link to post
Share on other sites