Table Of Contents
Introduction
Instances are lightweight copies of an object that do not contain any geometry data, but rather maintain a link to the original object. Because each instance only stores a limited amount of data – such as a transform matrix and sometimes material assignment information – they have several advantages over regular copies:
- Instances use much less disk space for scene files.
- Edits to the original are automatically applied to all of its instances, making editing many identical objects much simpler.
- Instances use very little memory when rendering using Redshift and can significantly improve performance.
A scene with 1300 instances of a high resolution Buddha model (approximately 880,000 triangles per instance). Over a billion instanced triangles.
Working with instances varies by DCC and the following sections highlight some of these differences. For a more complete guide to using instances in Maya, 3ds Max or Softimage, please refer to the respective user documentation.
Limitations
Redshift does not currently support instancing of lights or volume containers. If such objects are instanced in your scene, only the first instance will contribute to the rendering with Redshift.
How To Use
The Redshift for Katana plugin supports instancing using Redshift Instance objects or Redshift point clouds. From the workflow point of view there are two kinds of instancing: using the “instance.ID” string attribute, or using instance source locations.
“instance.ID” attribute instancing
The simplest kind of instancing is supported adding an "instance.ID” string attribute to any shape. If the string value is the same, the object will be created as a Redshift instance object. The first location extracted with an Instance.ID value will be the master object, and all the other shapes sharing the same ID will be instances of the first one. The visibility and matte options of each instance can be overridden.
Instances arbitrary user data
The plugin supports the “instance.arbitrary.xxxxx” attributes to add user data at instance level to the Redshift instances or point clouds. In the point clouds case, the arbitrary attributes available in all the source locations must match. Redshift supports float (from one to four components) and integer arbitrary attributes.
Instancing from instance source locations
The plugin supports the instancing of “instance source” locations. You can have any hierarchy and as many shapes beneath these locations as you’d like. To define the master object, use an AttributeSet node to change the type of the Scene Graph location to be used as the object master to "instance source".
To instance the master object, use the LocationCreate node in the Node Graph to create locations for your instances. Change the type of these locations to “instance” and add a “geometry.instanceSource” string attribute, that will contain the path pointing to the instance source location to be used.