Bump mapped model scene node

Started by
1 comment, last by Red Ghost 15 years, 9 months ago
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.
Ghostly yours,Red.
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.
@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.
Ghostly yours,Red.

This topic is closed to new replies.

Advertisement