Instance

../_images/pgYeti_instance.png

The Instance node is a way of creating controlled duplicates of geometry, whether mesh or fibres, connected to Input 1 at every point or element in Input 0.

Inputs

Input Description
0 Data Flow Fibres, Particles and Meshes
1 Data Flow Fibres, Particles and Meshes

Instance

Parameter Description
Instance To in most cases you want to have an instance per input point, but if you’re input is fibres you may want to limit the instance to one per fibre - Elements tells the node to instance on a per element ( fibre ) basis where as Points will instance to all the incoming points.
Alignment Either a variable or static expression used to align the instance.
Alignment Variation Means of introducing random variation into the resulting alignment.
Offset Per instance offset, a possible value may be “$N * 0.1” to shift all of the instances 0.1 units away from the surface.
Scale Per instance scale, this could be an expression, eg. “noise($id * 10)”
Scale Variation Used to randomize the resulting scale.
Twist Twists the new instance around the resulting axis.
Twist Variation Varies each instances twist value.
Up Vector either a variable or static expression used as an up vector in determining the instances orientation.
Axis Of Alignment defines what axis in the input object will be aligned to the Alignment vector.

Objects

Parameter Description
Source Objects in the case where Input1 has multiple input objects you may limit it to just the first, or all of them.
Object Expression if Input1 contains multiple objects this is an expression used to determine which object to use for the current instance. For multiple objects a cycle expression can be used to cycle through the multiple inputs, eg. “cycle($id, 0, 5 )”
Inherit Attributes defines a list of attributes, each separated by a space, that will be inherited from the geometry the instances are assigned too.
Deform if toggled on instances will deform to the shape of the fibres being instanced too. This requires input fibres, and the mode set to Elements.
Generate As As Input will reuse as much data to create a completely new geometric representation of the object ( original method ), As Instance will try and use the rendering engines instancing implementation.

Selection

Parameter Description
Point Selection Allows the user to write a boolean based selection to define which points are instanced too in an element.
Element Point Index Used to define which point in an element is used for an instance.

Local Variables

Variable Description
instanceNum The instance index for the current fibre.
instanceCount The number of instances for the current fibre.
vertexNum The vertex index for the current instance in the fibre.
vertexCount Number of vertices in the fibre.

Example

Maya File: examples/yeti_instanceElementIndexExample.ma