Skip to main content

Lights

Lights make your scene visible and give it shape. Here are the five light types, a simple setup to start with, and the settings that change smoothly in transitions.

Light types​

Every light has a colour and an intensity. Directional, point and spot lights also have a Cast Shadow switch. Ambient and hemisphere lights cast no shadows, so they have none.

TypeWhat it doesExtra settings
ambientlights everything evenly; no direction, no shadows—
directionalparallel rays, like the sunCast Shadow
pointshines in all directions from one spot, like a bulb or a candledistance, decay, Cast Shadow
spotshines in a cone, like a lamp or a stage lightdistance, decay, angle, penumbra, Cast Shadow
hemispheresky colour from above, ground colour from below; no shadowsground colour
Rotate a light to aim it

Directional and spot lights shine along the object's own forward direction. There is no target field. To make a light follow something, add a Look At component.

A simple setup​

If you are not sure where to start, use one hemisphere or ambient light and one directional light:

  • The directional light gives shape and shadows.
  • The ambient light stops the shadow side from going completely black.

Balance the two, and most scenes look right. Then add point and spot lights where you want more drama.

Shadows cost the most. Turn them on only for the one or two lights that matter.

Shadow settings​

A directional, point or spot light with Cast Shadow on has more settings:

SettingWhat it does
Shadow Map Sizehow sharp the shadow is, from 128 to 4096. Larger is sharper and uses more memory. A point light stops at 1024.
Shadow Bias, Shadow Normal Biasremove the stripes and dots that can appear on lit surfaces
Shadow Softnessblurs the shadow's edge; 0 is a hard edge
Shadow Intensityhow dark the shadow is, from 0 to 1
Shadow Areadirectional light only: the side of the square the shadow covers, in metres, around the light

If a directional light's shadow is cut off, make Shadow Area larger. If it looks blocky, make the area smaller or the map size larger.

What animates smoothly​

Some changes happen over time: a Set state or Override properties step with a duration, or a change a script makes inside ctx.startTransition. During such a transition, these settings change gradually instead of jumping:

WhereSettings that change smoothly
Transformposition, rotation, scale
Materialopacity, colour, emissive colour and intensity, metalness, roughness, and the physical settings
Lightcolour, intensity, distance, decay, cone angle, penumbra, ground colour
Textfont size
Mediavideo and audio volume

Everything else jumps to its new value at the end of the transition. Chroma key settings jump too. They do not change smoothly.

Lambert and Phong materials​

Older projects may use Lambert or Phong materials. These no longer exist.

Your project still opens. These materials are converted to standard, and their shininess becomes the matching roughness. Their specular colour is not kept, so check very shiny old materials after you open the project.


Next: Resources — models, images, sounds and how objects use them.