Dependencies
Scenome's directed acyclic graph is the scene structure you can see.
The directed acyclic graph describes relationships
between nodes in terms of parent, child, and sibling. Dependencies
created in the directed acyclic graph are called structural dependencies.
There is an underlying structure, called the dependency graph that describes additional
relationships between nodes. The dependency graph describes relationships in terms of
references and dependencies. You can derive a unique dependency graph for each node in
the scene graph.
Virtual, Pointer-Based Dependencies
In Scenome a dependency is created when a node points at another node and in doing so creates
a relationship between the two nodes. This relationship is not usually expressed
in the directed acyclic graph. A material node might point at a texture node but have
no structural relationship. This means the material node is
dependent upon the texture node. The texture node is
referenced by the material node. These dependencies
are virtual dependencies because, for example, the structure of the directed
acyclic graph has no effect on the relationship between a material node and a texture node.
The relationship between the texture node and material exists regardless of the location
of either node in the scene graph.
Dependencies, Example 1
Figure 1.1.
A directed acyclic graph. You can see the parent, child, and sibling relationships
between the nodes. You cannot see the entire underlying dependency graph for each node.
- Root Node
- Materials Group
- TextureNode1
- LinkNode1
- MaterialNode1
- Scene Group
- MeshNode1
- RectangleGeometryModifier
- GeographicProjectionModifier
- DisplaceModifier
- MaterialModifier
- CalculateNormalsModifier
Dependency Graph For Root Node
Figure 1.2.
Let's examine dependencies and references for the Root node. Notice
the dependency graph is similar to the directed acyclic graph, and indeed shares
one important property: the dependency graph is acyclic.
- Root Node References
- Referenced By: Materials Group
- Referenced By: TextureNode1
- Referenced By: LinkNode1
- Referenced By: MaterialNode1
- Referenced By: Scene Group
- Referenced By: MeshNode1
- Referenced By: RectangleGeometryModifier
- Referenced By: GeographicProjectionModifier
- Referenced By: DisplaceModifier
- Referenced By: MaterialModifier
- Referenced By: CalculateNormalsModifier
- Root Node Dependencies
Dependency Graph For Materials Group Node
Figure 1.3.
Let's examine dependencies and references for Materials Group node.
- Materials Group Node References
- Referenced By: MeshNode1 [MeshNode1 Stores A Pointer To Materials Group Node]
- Referenced By: TextureNode1 [Child]
- Referenced By: LinkNode1 [Child]
- Referenced By: MaterialNode1 [Child]
- Materials Group Node Dependencies
- Depends On: Root [Parent]
Dependency Graph For TextureNode1
Figure 1.4.
Let's examine dependencies and references for TextureNode1.
- TextureNode1 References
- Referenced By: LinkNode1 [LinkNode1 Stores A Pointer To TextureNode1]
- TextureNode1 Dependencies
- Depends On: Root [Parent]
- Depends On: Materials Group Node [Parent]
Dependency Graph For LinkNode1
Figure 1.5.
Let's examine dependencies and references for LinkNode1.
- LinkNode1 References
- Referenced By: MaterialNode1 [MaterialNode1 Stores A Pointer To LinkNode1]
- LinkNode1 Dependencies
- Depends On: Root [Parent]
- Depends On: Materials Group Node [Parent]
- Depends On: TextureNode1 [LinkNode1 Stores A Pointer To TextureNode1]
Dependency Graph For MaterialNode
Figure 1.6.
Let's examine dependencies and references for MaterialNode1.
- MaterialNode1 References
- Referenced By: RectangleGeometryModifier [RectangleGeometryModifier Stores A Pointer To MaterialNode1]
- Referenced By: MaterialModifier [MaterialModifier Stores A Pointer To MaterialNode1]
- MaterialNode1 Dependencies
- Depends On: Root [Parent]
- Depends On: Materials Group Node [Parent]
- Depends On: LinkNode1 [MaterialNode1 Stores A Pointer To LinkNode1]
Dependency Graph For Scene Group Node
Figure 1.7.
Let's examine dependencies and references for Scene Group Node.
- Scene Group Node References
- Referenced By: MeshNode1 [Parent]
- Referenced By: RectangleGeometryModifier [Parent]
- Referenced By: GeographicProjectionModifier [Parent]
- Referenced By: DisplaceModifier [Parent]
- Referenced By: MaterialModifier [Parent]
- Referenced By: CalculateNormalsModifier [Parent]
- Scene Group Node Dependencies
- Depends On: Root [Parent]
Dependency Graph For MeshNode1
Figure 1.8.
Let's examine dependencies and references for MeshNode1.
- MeshNode1 References
- Referenced By: RectangleGeometryModifier [Parent]
- Referenced By: GeographicProjectionModifier [Parent]
- Referenced By: DisplaceModifier [Parent]
- Referenced By: MaterialModifier [Parent]
- Referenced By: CalculateNormalsModifier [Parent]
- MeshNode1 Dependencies
- Depends On: Materials Group Node [MeshNode1 Stores A Pointer To Materials Group Node]
- Depends On: Root [Parent]
- Depends On: Scene Group Node [Parent]
Dependency Graph For RectangleGeometryModifier
Figure 1.9.
Let's examine dependencies and references for RectangleGeometryModifier.
- RectangleGeometryModifier References
- RectangleGeometryModifier Dependencies
- Depends On: MaterialNode1 [RectangleGeometryModifier Stores A Pointer To MaterialNode1]
- Depends On: Root [Parent]
- Depends On: Scene Group Node [Parent]
- Depends On: MeshNode1 [Parent]
Dependency Graph For GeographicProjectionModifier
Figure 1.10.
Let's examine dependencies and references for GeographicProjectionModifier.
- GeographicProjectionModifier References
- GeographicProjectionModifier Dependencies
- Depends On: Root [Parent]
- Depends On: Scene Group Node [Parent]
- Depends On: MeshNode1 [Parent]
Dependency Graph For DisplaceModifier
Figure 1.11.
Let's examine dependencies and references for DisplaceModifier.
- DisplaceModifier References
- DisplaceModifier Dependencies
- Depends On: Root [Parent]
- Depends On: Scene Group Node [Parent]
- Depends On: MeshNode1 [Parent]
- Depends On: External File [A Digital Elevation Model .DEM in this case.]
Dependency Graph For MaterialModifier
Figure 1.12.
Let's examine dependencies and references for MaterialModifier.
- MaterialModifier References
- MaterialModifier Dependencies
- Depends On: Root [Parent]
- Depends On: Scene Group Node [Parent]
- Depends On: MeshNode1 [Parent]
- Depends On: MaterialNode1 [MaterialModifier stores a pointer to MaterialNode1.]
Dependency Graph For CalculateNormalsModifier
Figure 1.13.
Let's examine dependencies and references for CalculateNormalsModifier.
- CalculateNormalsModifier References
- CalculateNormalsModifier Dependencies
- Depends On: Root [Parent]
- Depends On: Scene Group Node [Parent]
- Depends On: MeshNode1 [Parent]
Circular References
As discussed in the link node documentation, circular references while not illegal,
are not best practice. Circular references can cause infinite traversal loops inside Scenome and runtime products.
For The Scene Builder
Dependencies are an important method of creating relationships between nodes in
the scene graph. During scene building you won't query the dependency graph very often
but there might be times when this is important. Scenome provides several tools for
evaluating the dependency graph on a node-by-node basis. These are discussed in the
command documentation and modeling exercises.