Jump to content
  • Advertisement
Sign in to follow this  
Red Ghost

OpenGL Bump mapped model scene node

This topic is 3718 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

Hi, I have a small engine under OpenGL I want to extend with dot3 bump mapping. I am using a simple scenegraph where scene nodes are sorted by operation type (lit/unlit, blended/solid, particles) and by texture (I do not use shaders). I am wondering how is taken care in scenegraphs bump mapped meshes: - is the model separated into different subset scenenodes ? (one subset scenenode for each simple operation) - is the model stored within a single scene node ? (the scene node being responsible for fully rendering the bump mapped model) Thanks in advance. Red.

Share this post


Link to post
Share on other sites
Advertisement
A scenegraph is usually used to represent the scene in some intuitive manner, not for sorting by render states - It's generally advisable to keep render state sorting out of the scenegraph.

At render-time you traverse the scenegraph and build a new list: a renderqueue or shade-tree. This is sorted by render states (lights, transparency, textures, shaders, what have you).

With this design you can store a model as a single node on the scenegraph. That model can contain a list of sub-models, one for each material (like bumpmapped, or simple textured). When you're building the render state sorting structure, you add the sub-models individually like any other renderable and they're sorted individually too, so they might not even get rendered immeadiately one after the other despite belonging to the same model on the scenegraph.

This has the benefits of separating your scenegraph from the state sorting and allowing a more optimal sorting of renderable items.

Share this post


Link to post
Share on other sites
@dmatter:

Oops,

I badly explained myself: I already distinguish scenegraph nodes from render nodes sorted by drawing states.

If I understand correctly your answer, better is to have a single rendering node with the bump mapping information(cube map, normal texture and decal texture).

Am I correct ?

Red Ghost.

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!