Scenegraph basics




from The Java 3D Tutorial (Sun)

tree graph describing the geometric configuration and viewing position

VirtualUniverse: base of the tree, only one.

Locale: defines an orign for coordinate system. Typically only one.

attached to Locale are 2 branches: content branch graph and view branch graph

content branch graph: describes the geometrical objects in the scene

view branch graph: descibes position orientation and other details about the viewer.

BranchGroup node: a hook for attaching other nodes. BranchGroups have a compile method that optimizes the scene underneath for fast rendering. This also freezes capabilities for changing transform groups, appearances, etc unless the relevant capability bits have been set. (It is actually possible to use Java 3d in direct rendering mode, as a wrapper for the openGL library)

TranformGroup node: a affine transformation (Linear transformation + translation), all TransformGroup transformations going up tree are applied to an object in the graph.

Shape3D: Geometry describes the shape (position of polygons), Appearance describes how they are rendered: eg, colour, texture, repsone to lights, etc.

Not shown: Behaviors, Light, Morph, etc. Everything is attached to the scenegraph, even when it is not obvious why. The reason is that there are bounds associated to each node. An object only becomes active when the current field of view intersects with the bound. This is how it is possible to render scencegraphs with thousands of nodes.



previous  start  toc  next