Lights and environment¶
Light comes from four places: PT LIGHT components, TouchDesigner's own Light COMPs, surfaces whose material glows, and the environment around the scene. Mix them freely. Without any of them the image shows No light.
PT LIGHT¶
Pick the kind of light with Type, its colour with Color and its brightness with Strength. A new PT LIGHT sits at 5, 5, 0, facing the origin. Place and aim it with its Xform page like any object: like TouchDesigner's own lights, it shines along its −Z axis, so a light rotated −90° around X shines down.
| Type | What it is | Its size |
|---|---|---|
| Point | Light from one spot in all directions. The camera does not see it. | Radius |
| Spot | A point light limited to a cone, which can project an image. | Radius |
| Rectangle | A glowing rectangle, like a softbox or a window. | Size |
| Disk | A glowing disc. | Radius |
| Sphere | A glowing ball, like a bulb. | Radius |
| Sun | Parallel light from infinitely far away. Only its direction matters, not its position. | Angle |
| Mesh | Any POP, glowing all over its surface. | the POP's own |
The larger a light, the softer its shadows and highlights. Very small lights give hard shadows and more noise.
- Spot: Cone Angle is how wide the cone opens from edge to edge, Cone Delta the band inside that edge over which the light fades out, and Cone Rolloff the shape of that fade: higher values let it fall off sooner, gathering the light towards the centre. Up to that band the spot is evenly bright, and with Cone Delta 0 its edge is hard and Cone Rolloff does nothing. Projector Map projects an image, like a gobo or a slide projector.
- Sun: Angle is how large the sun appears; the real sun is about 0.5°. Its Strength lights the scene about as brightly as a Rectangle of the same Strength 4 units away.
- Mesh: name the POP in Mesh. Its whole surface gives off light, from the front of its faces (the side its normals point to). The POP moves with the PT LIGHT, and Strength works as for a Rectangle.
- Two-Sided lets a Rectangle, Disk or Mesh light shine from both sides instead of only its front.
- Visible to Camera off hides the light itself; it still lights the scene.
- Affects Haze decides whether the light shows in the haze.
Glowing materials¶
Any object lights the scene when its PT MAT has an emission Strength above 0: a neon tube, a TV, a glowing sign. Maps and attributes can make only parts of a surface glow (see Materials).
TouchDesigner's lights¶
Light COMPs next to the Pathtracer light the scene too, so a scene lit for a Render TOP renders with the same lights. Lights on the Pathtracer's Scene page chooses which ones, as it does for PT LIGHTs.
- A Light COMP keeps its colour, Dimmer, type and cone. It is as bright as a Render TOP shows it on a PBR MAT at its Attenuation Start; farther away its light falls off as real light does. A distant light is equally bright everywhere.
- With soft shadows, Light Size sets how soft they are.
- Its Projector Map is not used. A PT LIGHT of Type Spot projects an image.
- An Environment Light COMP with an Environment Map lights the scene from all around, with its map, colour, Dimmer and Y rotation, while the Pathtracer's World page has no environment of its own. The World page's Strength and Rotate apply on top.
The environment¶
The World page of the Pathtracer sets the light that surrounds the scene.
- Environment takes an equirectangular (latitude-longitude) image, ideally a high dynamic range file such as an
.exror.hdrin a Movie File In TOP. It lights the scene from all directions, which gives natural reflections and soft light. Rotate turns it around the vertical axis. - Without an image, Environment Color lights the scene evenly from all around: a soft, overcast light. Black, the default, gives none.
- Strength sets the brightness of either.
- Visible to Camera shows the environment behind the scene. Turn it off to keep its light but show a black background.
HDRIs with a small, very bright sun or lamp work well: the Pathtracer aims its light paths at the bright parts of the image by itself.
Noise and fireflies¶
Small, bright lights make more noise than large ones, and very bright spots reflected in rough surfaces can leave single bright pixels, called fireflies. Remedies, from gentle to strong:
- Make the light larger. For a small glowing object that only needs to be seen, turn off Light the Scene on its material.
- Raise Samples per Frame, or let the Accumulate method run longer.
- Lower Firefly Clamp. It limits how bright indirect light may be; lower values remove more fireflies but also dim small highlights.