Ember is discontinued. It still works, but it gets no more updates or support. Back to uayi.org
Home · Terrified Gorillas · Glimmerwood · Starfall Hollow · ‹ Prev Next ›
Ember
Download

Making games

Lighting

Light types

Type Defaults when created
Directional (sun) parallel light from one direction; casts the sharp shadows intensity 3
Point shines in every direction from a spot, fading over its range intensity 40, range 12 m, warm white
Spot a cone; cone angle sets its width intensity 80, range 20 m, 35°

Create them from Create > Light or the right-click menu. A light created by right-clicking the ground is hung 2.5 m (point) or 4 m (spot) above the spot you clicked; one created from the menu is kept clear of the ground below it. A light sitting on a surface lights almost nothing, because the light skims along it.

How bright?

Light falls off with the square of distance, like real light. Next to a midday sun (intensity 3), a point light needs an intensity in the tens to show clearly: 40 lights a room, 100+ floods a yard. The Inspector suggests more when a point or spot light is below 15.

Lights matter most when the sun is weak, so for torches, street lamps and neon, set the Time of day to Night or Indoor (Render panel). The templates do this: their lamps look bright because their worlds are dim.

Up to 16 point and spot lights light each frame. When a scene has more, the ones whose reach comes closest to the camera win, and lights entirely behind the camera are skipped.

Time of day

Render panel > Time of day sets the sun, sky, fog and exposure in one click: Day, Golden hour, Overcast, Night or Indoor / dark. It's one undo step, and scripts can do the same with env.sun(pitch), env.sun_brightness(v), env.sky(path) and env.exposure(v).

Light modes

Every light has a Mode in the Inspector:

Mode
Realtime (default) lit every frame; the sun casts sharp shadows; the light can move and change
Mixed realtime direct light, plus baked bounce light off walls, floors and terrain
Baked all of its light is baked: no runtime cost, soft light, no sharp shadows; it can't move

Baking

Render panel > Baked lighting > Bake lighting traces the scene on every CPU core and stores the result in a grid of light probes (assets/lighting/<scene>.probes). It captures:

Static objects (no moving physics body) and terrains block and bounce light. Everything, moving objects included, is lit by the probes. The bake runs in the background, so you can keep working; re-bake after moving static things or lights. Until you bake, Baked lights render as Realtime.

Quality: Fast (64 rays per probe), Good (128) or Best (256, more probes). Probe spacing is automatic, or set it yourself; a very fine spacing on a big scene is widened until the file fits (about 1.4 million probes).

This is a probe volume, not lightmaps: baked light is smooth over the probe spacing (about 0.5–4 m), so baked lights don't give crisp shadows, and very thin walls can leak light. Use Realtime or Mixed lights where you need sharp shadows.

Ember 1.1 documentation. Found a mistake? The source of this page is site/docs/lighting.md in the Ember source.