DAZ Studio Geometry Pipeline

Geometry Classes

Within the DAZ Studio API, there are three central classes that encapsulate the geometry pipeline, while this may seem overly complex, each of these classes has specific duties that must be kept separate. These three classes are:

DzObject is at the highest level of abstraction in the geometry pipeline. It is responsible for implementing the heart of the pipeline - modifier application. DzObject is responsible for maintaining the list of modifiers for the geometry, the world-space geometry cache, and the list of shapes that are available. This list of shapes is how 'Geometry Switching' is implemented in DAZ Studio.

DzShape is at the next level in the geometry pipeline. It is responsible for implementing the end result of the geometry pipeline - rendering. DzShape is also responsible for maintaining the list of DzMaterial objects which determine the surface properties of the rendered geometry, and DzMap objects (vertex maps) for uvs, etc. The 'Geometry Switching' ability of DAZ Studio allows different geometries to have different materials, as well as use different uv sets.

DzGeometry is at the lowest level of the geometry pipeline. This class maintains the representation of the geometry itself - i.e. vertices, triangles, polygons, etc. DzGeometry is a reference-counted shared class - this means that shapes with different materials and/or uvs, owned by different nodes in the scene can use the same geometry.

Following is a class ownership diagram which illustrates two DzObject instances. The first object has three shapes that it can 'switch' between, and the second object has only one shape. Each shape has a geometry, with a shape on the first object sharing the same geometry as the shape on the second object.

inline_dotgraph_1.dot

Below is a diagram depicting ownership in a more complex form. This is done to give a broader view of the classes that may be involved. Ownership is shown with solid lines, potential ownership is shown using dashed lines. The mixing of colors shows potential commonalities. It is important to point out that all DzStorable derived objects can be shared between the objects that are able to own them (though they are not required to be).

These bulleted items are provided to aide in deciphering the diagram:

inline_dotgraph_2.dot

The Pipeline

The geometry pipeline is the process of going from the static base geometry read in from the file to the final rendered representation of the geometry in the interactive viewport, or software render. In DAZ Studio this process is separated into two major pathways: Geometry Evaluation and Rendering.

Geometry Evaluation is the pathway that is implemented in DzObject which transforms the base geometry into the world-space cached geometry that is used by the rendering pathway. The Geometry Evaluation pathway consists of 4 steps, carried out by DzObject::evaluate() whenever the geometry cache needs to be updated before a rendering operation as outlined in the following flow chart.

inline_dotgraph_3.dot

Todo:
Describe:

Generated on Thu Sep 24 12:21:08 2009

Copyright © 2002 - 2009 DAZ 3D, Inc.