Light arrays are very similar to instance arrays. The major difference is that you don't need an instance source location. Light arrays can be created with an OpScript. See the lightArray.katana file for an example of how to create light arrays from a point cloud.
If you create a light array from a light in GafferThree, you need to make sure that the location type isn't changed until after the ImplicitResolvers run. For example, if you change the location type via an OpScript, set the executionMode to "deferred". This will allow the light array to respect the mute state of the GafferThree light.
Here are the steps to create a light array:
- Create a light location in GafferThree. Any light filters and light linking done on this light will be respected when the light is turned into a light array.
- Set the type of the light to "light array".
These are the attributes that can be set on a light array location. Only geometry.instanceMatrix is required:
|For 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.
|The light's attributes can be overridden with this attribute. You will need one element per instance for each attribute that is overridden. For example, to override the intensity you would set the geometry.instanceMaterialOverride.prmanLightParams.intensity attribute. Note that when you set this attribute, you are no longer instancing the light because RenderMan light parameters cannot vary per instance.