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.
| Type | What it does | Extra settings |
|---|---|---|
ambient | lights everything evenly; no direction, no shadows | — |
directional | parallel rays, like the sun | Cast Shadow |
point | shines in all directions from one spot, like a bulb or a candle | distance, decay, Cast Shadow |
spot | shines in a cone, like a lamp or a stage light | distance, decay, angle, penumbra, Cast Shadow |
hemisphere | sky colour from above, ground colour from below; no shadows | ground colour |
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:
| Setting | What it does |
|---|---|
| Shadow Map Size | how 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 Bias | remove the stripes and dots that can appear on lit surfaces |
| Shadow Softness | blurs the shadow's edge; 0 is a hard edge |
| Shadow Intensity | how dark the shadow is, from 0 to 1 |
| Shadow Area | directional 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:
| Where | Settings that change smoothly |
|---|---|
| Transform | position, rotation, scale |
| Material | opacity, colour, emissive colour and intensity, metalness, roughness, and the physical settings |
| Light | colour, intensity, distance, decay, cone angle, penumbra, ground colour |
| Text | font size |
| Media | video 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.