Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Documented "instanceSkipIndex" and how to set up user attributes on instance arrays.

...

Just like in hierarchical instancing, this approach uses direct assignment of locations as an instance sources.  Locations marked as instance sources can be referenced by the instance array location.  This approach has some advantages and disadvantages over hierarchical instancing.  The main advantage is that you only need to create one Scene Graph location to represent all your instances.  This can save on Katana Scene Graph processing time.  Additionally, you can reference multiple instance sources in a single instance array.  The main disadvantage is that instance arrays do not provide ways to override materials all attributes per-instance - only user attribute overrides are supported.  It is important to determine your requirements before deciding on an instancing method.

...

These are the attributes required on the instance array location:

string geometry.instanceSourceThe array of instance source locations referenced in this instance array.
int geometry.instanceIndexFor each instance in the instance array there is an element in the instanceIndex attribute.  Each element maps to an index in the geometry.instanceSource attribute.  This mapping determines which instance source is used for the instance represented by this element.
double or float geometry.instanceMatrixFor each instance in the instance array there are 16 values in the instanceMatrix representing the transformation matrix of this instance.  Note that this transform is relative to transform of the instance array itself.

Additionally, there are some optional attributes available:

int geometry.instanceSkipIndexA list of indices in to omit from the instance array.
group geometry.arbitrary

While formatted as PrimVars, these attributes become user attributes in the renderer.  There should be an element in the value and indexValue attributes for each instance in the instance array.

See this instanceArray.katana file for an a simple example of how to set up an instance array from a point cloud.

...