What is a scene graph?

So far, it makes sense to me why you would put objects in a hierarchy in relation to other, where objects “down the hierarchy” inherit the transformations of the object above it. So like a sword, in addition to its own transformations, inherits the transformations of the person holding it, which in turn inherits the transformation of the horse it’s on.

This technique is explained in depth here:
http://www.arcsynthesis.org/gltut/Positioning/Tut06%20Fun%20with%20Matrices.html

Where does the idea of a “scene graph” come into play? I tried reading the wikipedia article: http://en.wikipedia.org/wiki/Scene_graph
But it does not really make sense to me why they use a graph or tree to model an entire scene. What I would do is just keep all the objects in a list and render them in order (maybe after some frustum culling), using the “hierarchy” technique as needed. Why do we need a tree or graph model?

You seem to be saying:

I can put all my drawing into a simple scene graph and render that.

Why would I need a scene graph then?

Good question.

Bruce

This technique is explained in depth here:
http://www.arcsynthesis.org/gltut/Positioning/Tut06%20Fun%20with%20Matrices.html

Where does the idea of a “scene graph” come into play?

That is a scene graph. Just because that tutorial didn’t call it a “scene graph” doesn’t mean that it isn’t.

The parent-child relationship of nodes in the scene is a data structure called a tree. Trees are a restricted form of graph. So you have a scene of nodes in a graph. Scene graph.

Indeed, the “Further Study” section of that tutorial has this:

This is could more easily called “Implement a generalized scene graph.”

A quite informative survey about scene graphs, although a bit dated, can be found here:

http://www.realityprime.com/articles/scenegraphs-past-present-and-future

Please note, the über-scene-graph approach, as proposed in literature on 3D engines etc. is considered outdated even by their authors.

Über-scene-graph meaning that you want to centralize all tasks, all responsibilitites and all rendering, state management, animation a.s.o. in a single data structure.

Edit: I just remember the crucial observation made by Gregory in Game Engine Architecture, that the choice of data structure to represent the scene is highly dependent on the type of application. You need to find out what your app needs and then select the appropriate data structure. Not just code a huge system and find out it doesn’t exactly fit your purpose.