- Geometry
- Render
Light
Purpose
Section titled “Purpose”Light is a native TouchDesigner Light COMP with a Voro page. The Light COMP’s own controls still set where the light is, its colour and its strength. A short program on the Voro page decides how that light falls on the scene, so a light can be a beam, a patterned spot or a pulsing orb instead of a plain point.
Plain TD Light COMPs render too. Use Light when you want one of its presets or your own program.
Place Light from the Geometry view of the Voro menu, under Render. Position and aim it with Translate and Rotate like any Light COMP.
Pick a Light Preset:
- Point spreads light in all directions and fades with distance.
- Spot uses the Light COMP’s Cone Angle, with a feathered edge.
- Beam is a thin shaft that sweeps from side to side over time.
- Spot Pattern is a spot with animated rings.
- Pulse Orb is a shell of light that grows and shrinks over time.
- Custom is your own program.
To light a scene, add the Light’s name to Lights on Scene’s Collection page. Lights takes a name or a wildcard pattern. A renderer’s own Lights parameter, on its Scene page, works the same way when its Scene Mode is Local or Scene + Local.
Editing the program
Section titled “Editing the program”The program is text in a DAT that the Source parameter points to. Choosing a preset writes that preset’s program into the DAT and loads it for you.
To change the program, edit the DAT’s text, then pulse Reload. Editing the text on its own does not change the render. Reload is also the step after you point Source at a different DAT.
Each //@param line in the program becomes a parameter on the Light page after Reload. The presets use these for values such as Range, Feather or Pulse. Change those values while the render runs; they do not need Reload. Add or remove a //@param line and you need Reload again.
How to write a light program is in the Lab’s renderer guide, lab/AUTHORING_GUIDE/MATERIALS_AND_RENDERERS.md in the Voro package, under “Authored Light projection maps”.
Inputs and outputs
Section titled “Inputs and outputs”In TouchDesigner you wire nothing into Light. It reads its own Light COMP: position and direction, Light Type, Color, Dimmer, Attenuated and Attenuation End, Cone Angle, Cone Delta and Cone Roll. Light Type must be Point, Cone or Distant. A Light with Render off adds no light.
The Light COMP’s Projection Map TOP reaches the program as an image the program can sample, so a light can project a picture. With no Projection Map set, that image reads as white and the light stays plain.
The scene output carries the light to a Scene. The Scene’s Lights selection makes that connection for you.
Controls
Section titled “Controls”- Light Preset loads one of the programs above into the Source DAT.
- Source points at the DAT that holds the program.
- Reload loads the DAT’s current text.
- Radius turns a point into a sphere of that size, for softer shadows and highlights. Realtime Trace uses it. At 0 the light is a point.
Colour and strength come from the Light COMP’s own Color and Dimmer.
Dimmer is the light’s intensity in Voro’s light unit, the same unit every renderer uses. The shipped presets fade as 1 / (1 + d² / Range²), so a surface at Range distance gets half the light. A Point preset with Range 30 needs a Dimmer of about 2 to light the ground as brightly as a sun of 1. A plain TD cone light 30 units up needs about 900.
Realtime Trace and Path Trace run light programs. Surface Renderer draws plain point, spot and distant lights but skips a light program and warns. Every preset is a program, Point included. For Surface Renderer, clear the Source DAT and pulse Reload, or use a plain TD Light COMP. The light then comes from the Light COMP alone, and the preset’s own falloff no longer applies.
Emissive materials light the scene too, with no Light at all. The sky’s sun counts as a light, so a distant Light pointed the same way doubles it.
Inputs
-
uniformsrow -
staterow -
slide_imageimage
Outputs
-
scenescene required
Parameters
Section titled “Parameters”Light
op('light').par.Source - Default:
"" (Empty String)
op('light').par.Reload - Default:
None
op('light').par.Lightradius - Default:
0- Range:
- 0 to 10