Game Engine: Basic Scene Graph Rendering : Part 01

HI Folks,

Here am giving you a step of start to learn how to implement a node based scene graph for real time rendering,  In the Final part of this series you can review the code that I implemented for basic scene graph rendering, This is the solution to the course work assignment : Advanced Graphic & Application in Umea University, Sweden Autumn/2013, so I guess if you’re using this series for upcoming solutions please remark the author 😉 or IF you’re a beginner for Advanced graphic/ Real time rendering (Like me :P) I highly recommend you to follow basic Image processing & Virtual Reality courses to get a good idea about what I’m talking about 😀

What is a Scene  Graph?

Low level graphic libraries like OpenGL are immediate mode based where the graphic card is linked directly to the program’s flow.  Let’s take an example where the program is using glBegin & glEnd with glVertex in between them. The driver cannot tell the GPU to start rendering before glEnd, because it does not know when you will be finished submitting data, and it needs to transfer that data too (which it can only do after glEnd). In contrast to that, if you use a vertex buffer object, you fill a buffer with data and hand it to OpenGL. Your process does no longer own this data and can therefore no longer modify it. The driver can rely on this fact and can (even speculatively) upload the data whenever the bus is free. The model of the communication is like “Take this polygon and this and this and please render them”.

So the communications model we want, is more like “This is my data and now please render an image and another and another”. Scene graph is a heterogeneous mathematical graph where we can have leaf & interior nodes. Leaf nodes carry the displayable geometry, interior nodes structure the graph into logical groups. Scene graphs are retained mode based. The data is passed to them once and only updated if needed.

There’re already implemented version in scene graph like OpenSG etc, IF you’re eager to learn the scratch, Join your hands to touch the base, Cheers!

Motivation

Leave a comment