UNDERSTANDING SCENE GRAPHS

 

 

What is a Scene Graph?

A hierarchical arrangement of nodes which are used to create a scene. The following example shows a very simple Scene Graph that contains only four nodes. The Root Node (ROOT) , a Light Node (LIGHT), a Transform Node (XFORM) , and a Geometry Node (GEO).

figure1

 

Some nodes like transform nodes and lights are used to affect the state of the scene you are creating. This state stays in effect until modified by another similar node.

 

Advantages of Scene Graphs

Definitions of Scene Graph Terminology

figure3

 

Scene Graph Traversal

Node Letter Node Type Explanation
A ROOT NODE start of the scene graph
B TRANSFORM NODE sets position and orientation state. This state will affect all the nodes in the scene graph.
C GROUP NODE Groups other nodes beneath it.
D GEOMETRY NODE This node would contain the geometry used to represent the motorcycle chassis. Its position and orientation are affected by node B
E SEPARATOR NODE Used to separate information from propagating through the scene graph. In this case it will separate transform information
F TRANSFORM NODE Used to set position and orientation information. This node will affect all the nodes beneath the separator but not node J since it is after the separator in the scene graph traversal order.
G GEOMETRY NODE This node contains the geometry used to represent the front wheel of the cycle it is affected by both transform nodes (B and F).
H TRANSFORM NODE Used to set position and orientation information. This node will affect all the nodes beneath the separator but not node J since it is after the separator in the scene graph traversal order
I GEOMETRY NODE This nodes contains the geometry that represents the rear wheel of the motorcycle. It is affected by transforms B, F, and H since they are not predecessors of I.
J GEOMETRY NODE This node contains the geometry that represent the motorcycles headlight. It IS NOT affected by transforms F and H, since they are beneath a separator node. However it IS affects by transform node B.

chart 1

Options for creating Scene Graph

 

WorldToolKit Node Types

Node Definitions

Node Definition Can it have children? Does it effect state?
Geometry Displays a set of polygons, together with a material NO NO
Fog Simulates fog, smoke, or mist NO YES
Light Specifies a light (point, directed, or spot) NO YES
Transform Sets position and/or orientation information NO YES
Anchor Contains a string property. Used of URL’s for non-geometric information YES NO
Group Has children by no other properties YES NO
Inline Children are read in from a file YES NO
Level of Detail (LOD) Swaps in objects as a function of the viewpoint distance YES NO
Root Acts as the topmost node in a scene graph. Each scene graph can have only one root node. This node CANNOT be shared with any other graph. As the top node in its hierarchy, this node can have no parent node YES NO
Separator Prevents state information from propagating from its descendant nodes to its sibling nodes YES NO
Switch Controls which of its children will be traversed YES NO
Transform Separator Prevents just the transform state from propagating from its descendant node to its sibling node YES NO

chart 2

 

How the Scene Graph is Rendered

Scene Graph State

 

Figure 4

figure 5

 

 

 

Managing the state of the Scene Graph

Separator Nodes Vs Transform Separators

 

figure 6

 

figure 7

 

 

figure 8