Scenegraph Hierarchy Rules

The Shockwave 3D* scenegraph comprises nodes that transform and group hierarchies of objects within a scene. There are four basic nodes:

Eliminating Redundancy

One of the features of the Shockwave 3D exporter is that it eliminates redundancy wherever possible. When objects can safely be treated as duplicates, only one copy of the object is stored in Shockwave 3D. 3ds max 4* textures and materials are tested for equivalence by name only (Shockwave 3D requires that all textures and materials have unique names), so make sure that you are careful when applying shading to your scene. Likewise, if you have different objects with the same name, only one of them will be exported and, because motion names are derived from object names, only one motion will be exported for all the objects.

Collapsing the Hierarchy

Another goal of the export process is to reduce the number of Shockwave 3D scene nodes that must be tested for rendering, collision detection, picking, etc. This is necessary to maintain real-time rendering performance.

Scenegraph complexity is reduced by collapsing multiple meshes down to a single Shockwave 3D object, subject to the following rules:

  1. All root-level children nodes remain children of the root node.

(The only exception is with group or model nodes with model geometry as children. See rule 4.)

>

Example 1: The mesh1, mesh2, and the light node, all children of the root node, remain the same in the Shockwave 3D scenegraph.

  1. A group node at whatever level with no immediate children remains a group node.

>

Example 2: A group node with no children remains a group node.

  1. A group node at whatever level that has children that are not geometry remains a group node with these children.

>

Example 3: A group node with light node children remains a group node with light node children.

  1. A group node that has children that are geometry is collapsed into a single Shockwave 3D model scene node containing all associated resources and data from the children geometry. The parent of the collapsed group node becomes the parent node of the single aggregated model node.

  or or >

Example 4: A single mesh child of a group node, mesh siblings of a group node, or two mesh siblings and the child mesh of one of the siblings all collapse into a single mesh node in the Shockwave 3D scenegraph. The parent of the group node, the root node, becomes the parent of the single mesh node.

  1. The aggregation of a group node's model geometry nodes stops when a non-geometry child node is detected. That non-geometry node becomes a child node of the aggregate model node.

>

Example 5: The light node, originally a child of the model mesh node under the group node, becomes a child of aggregate model node.

  1. If a non-geometry node child is a sibling of a geometry node of a group node, it becomes a child node of the aggregate parent.

>

Example 6: Sibling model nodes and their parent group node collapse into a single model node. The light node sibling becomes a child sibling along with the aggregate model nodes of the aggregate parent.

  1. Light and camera nodes with children act as group nodes in the Shockwave 3D scenegraph. Any geometry that is children of these nodes will collapse into a single model node, just as they do under a group node.

>

Example 7: The model nodes collapse into a single model node. The light 'group' node, however remains a 'group' node and is not aggregated with the model nodes to its parent as a true group node does.

  1. Each asset that acts as a scenegraph node (model mesh, group, light, camera) must have a unique name.

*See asterisked (*) statement at Legal Information © 2001 Intel Corporation.