Notch Notch Manual 0.9.23
 Light | Dark
Array Sources

Array Sources

Method #

These nodes act as sources for Array data. Arrays are used to instance multiple other nodes on the basis of an array of ‘points’. A ‘point’ holds the following data:

  • Position, Scale, Rotation
  • Colour
  • A persistent ID
  • Age since creation (turned on)
  • Age since deletion (turned off)

Arrays differ from clones in one significant respect - Clones simply render a piece of geometry multiple times as identical instances, all processed on the GPU; Arrays cause the node sub-tree to be traversed and evaluated multiple times, once for each point. This means arrays are able to be used for cases where clones can not - such as within particle systems or fields; but clones are still far more efficient for rendering multiple instances of a piece of geometry.

What can you do with Array sources? #

You can instance various node types from an Array by making them a child of the Array:

  • Objects (Shape 3D, 3D Object)
  • Particle Affectors
  • Particle Emitters
  • Field Affectors
  • Field Emitters
  • Clone Effectors

These nodes can often make use of the ‘age’ values of points to Ease On and Off (via Scale and Opacity etc.) making thing appear and disappear more smoothly.

To use an Array Source, you would place it within the parent-child hierarchy (like a Null). Children of the Array Source node will be instanced for every point in the Array.

It’s often useful to use an Array Copy node (with an input from the Array Source), so that you can use the Array Source data in multiple places in your nodegraph.

In the below example, a LiDAR sensor is generating an Array of points and we’re using the Array Copy to use those points in two places: Instancing the Shape 3D node (attaching back to the root node) and Instancing multiple Primitive Emitters (parenting back to the Particle Root Node).

arraysourcesexample

Scripting #

You can also programmatically address the Exposable Array using JavaScript with the following functions: SetTransformArrayPRS(), GetTransformArrayPRS(), SetTransformArrayColour(), GetTransformArrayColour(), SetTransformArrayUVScaleOffset() and GetTransformArrayUVScaleOffset(). The functions to set elements are only usable on the Exposable Array, as the other array nodes grab data from their source constantly.

Blacktrax Array Generate an array using mutliple Blacktrax Trackables as a source.
CSV/Table Array Generate an Array using a CSV file as a source.
Exposable Array Generates an Array passed through from a media server.
Hokuyo UST Lidar Array Generates an Array from a Hokuyo 2D LiDAR.
Mouse Point Array Generate an Array using the mouse cursor as a source.
Transform Array Generate an Array using internal Notch sources.
TUIO Array Generate an Array from TUIO data.
Windows Touch Array Generate an Array from Windows touch data.