Skip to main content
Documentation

Build an Effect in the Node Editor

Wire nodes into the Output node to build a color wave that flows across your fixtures and shifts over time.

In this guide you build a lighting effect from scratch: a rainbow that flows across your fixtures and cycles over time. You place nodes on a canvas and wire them together, left to right, until color reaches the Output node. A node is a single small operation (read a position, add two numbers, build a color). An effect is the graph of nodes that you connect. Spectralite renders that graph live.

In See Your First Effect you ran a ready-made effect on a layer. Here you build one yourself. First you need a fixture that is patched and added to a layout, so the Preview has something to light. That quick-start page covers both steps.

How the canvas works

You build the effect in the Node Editor panel. Scroll to pan the canvas. To zoom, use a pinch gesture or Cmd+scroll. Nodes have input ports down their left edge and output ports down their right. Data flows left to right and arrives at the Output node on the right.

A port accepts a wire only when the two data types match exactly. Each port has the color of its type: Number ports are gray, Vector ports purple, and Color ports blue. Spectralite never converts between types, so you cannot drop a Vector into a Number input or a Number into a Color input. When two types differ, route the wire through a conversion node, as the build below does several times. Connecting Nodes and Data Types cover it in full.

Every effect has exactly one Output node, and it is the only required node. Nothing renders until color reaches it, so plan the graph backward from the Output node.

Create a new effect

Open the Node Editor panel. In its toolbar, open the effect selector (the dropdown at the top, or press Cmd+P). Then choose New effect. The canvas resets to a single Output node.

Give the effect a name so you can find it later. Click Rename in the toolbar and type a name such as Color Wave.

Put it on a layer so you can watch

An effect only shows in the Preview when it runs on a layer. If you add a layer and raise its opacity now, the Preview updates as you wire each connection.

  1. Open the Timeline panel.
  2. Click Add new layer.
  3. In the picker, choose your Color Wave effect.
  4. A new layer starts at opacity 0, so it renders nothing. Set its Opacity to 1 in the timeline row to bring it up.

The Preview still shows black, because a new effect's Output node holds its default color of black. The rest of this guide fills in the color. For how layers stack and blend, see Effects and Layers.

Add the position source

The Pixel Position node tells the wave where each fixture sits.

  1. With the Node Editor focused, press Shift+A (or right-click the canvas) to open the node browser.
  2. Type pixel position and click Pixel Position to place it.

Pixel Position has one output, Vector, which carries each fixture's X, Y, Z location. A wave that varies across the rig needs a single coordinate as a Number. A Vector output cannot plug into a Number input. Convert it:

  1. Open the node browser again and add a Split Vector node (in the Vector category).
  2. Drag from Pixel Position's Vector output to Split Vector's Vector input. Both ports are Vectors, so the wire connects.

Split Vector breaks the position into X, Y, and Z number outputs. Use X so that the wave sweeps along that axis of your rig.

Add time and combine

Position alone gives a still gradient. For motion, use the Time node. It advances on its own at the project's tempo (a new project runs at 120 BPM). The node has no inputs to connect.

  1. Add a Time node from the Input category. Of its timing outputs, use Cumulative Progress, which counts up and never resets.
  2. Add an Add node from the Arithmetic category.
  3. Wire Split Vector's X output to Add's A input.
  4. Wire Time's Cumulative Progress output to Add's B input.

Add's output is a single number that differs per fixture (from X) and climbs over time (from Cumulative Progress). Together they make the finished wave travel.

Shape it into a wave

Feed that climbing number into an oscillator so it rises and falls smoothly inside a bounded range.

  1. Add an Oscillate node from the Wave category.
  2. Wire Add's Number output to Oscillate's Phase input.

Oscillate measures phase in turns. Every whole number is one full cycle, so one beat of Cumulative Progress is one rise and fall. As the input climbs, the output swings between -1 and 1, and that swing is your wave. (The Sine node under Trigonometry does the same in radians, so you would multiply by 6.283 first.)

Turn the wave into color

To turn the wave into a rainbow, drive the hue with it.

  1. Add a Unipolar node from the Utility category.
  2. Wire Oscillate's Number output into the Unipolar node. Hue reads 0 to 1 and the wave swings from -1 to 1, so Unipolar rescales the wave to fit the hue range.
  3. Add an HSL to RGB node from the Color category.
  4. Wire Unipolar's Number output to the Hue input.
  5. Select the HSL to RGB node. In the Parameters panel, set Saturation to 1 for vivid color and Lightness to 0.5 for full brightness. These two ports stay unconnected, so their values come from these fields.

HSL to RGB has three separate number outputs: Red, Green, and Blue. The Output node takes a single Color, so assemble one:

  1. Add a Combine Color node from the Color category.
  2. Wire HSL to RGB's Red, Green, and Blue outputs to Combine Color's Red, Green, and Blue inputs.

Combine Color packs those channels into one Color value on its Color output.

Connect to Output

Drag from Combine Color's Color output to the Color input on the Output node. Both ports are Colors, so the wire connects.

The Preview lights up. Each fixture shows a hue set by its position, and the whole rainbow shifts as time advances. To tidy the graph, click Clean Up in the toolbar.

Change the speed

The layer sets how fast the wave animates. Open the Layer Settings panel and find the Time section. Then adjust Speed. It starts at 1. Raise it to run the animation faster, or lower it toward 0 to slow or freeze it. Speed scales the timing that the Time node reads, so the whole effect changes at once.

Experiment

Try these changes:

  • To widen or tighten the spatial spread, add a Multiply node between Split Vector and Add. It scales X before X enters the wave.
  • Swap Split Vector's X output for Y or Z to sweep the rainbow along a different axis of your rig.
  • To lock the motion to the beat, replace Cumulative Progress with Beat Progress on the Time node.

Next steps