Skip to content

Tutorials · Light and Shadow · Chapter 4

Soft shadows, many lights

20 minutes Uses: Light

By the end

  • Softness 6 on the first lantern, and what a soft light costs
  • The second and third lanterns lit, orange and green
  • Where their light overlaps, an olive-gold, and why Sort Layer changes nothing here
On this page

A wider lamp

A real flame has a width. Light from its two sides reaches a little way round an edge, so a shadow’s edge blurs instead of cutting. A light’s Softness is that width.

  1. Select lantern_1, and set the Softness of its Light to 6.
  2. Press Ctrl+S.
lantern_1 selected, its Light open: Kind Point, Radius 260.00, Intensity 2.2, Softness 6.00, the other fields as in chapter 2; the Viewport shows the first lantern’s Radius circle crossing the others’, and the second and third lanterns already lit
lantern_1 with Softness 6. The other two lanterns, which you light next, are already lit in this picture.
Softness
How wide the light’s source is, in world units. 0 is a point, and a hard shadow edge. Above 0 the light is drawn from three points in a row, side to side across the lantern, spread over that width, and their three shadows overlap into a soft edge, softer the further the shadow runs from the pillar. 4 to 8 suits a lantern here; 24 is a window, not a flame.
The left pillar and its shadow across the floor with Softness 0: the shadow’s edges hard and straight, and the lantern’s light bright on the floor caps beside the pillar
For comparison, Softness 0: a hard edge.
The same view with Softness 6: the shadow’s edges a little softer, and the light on the bricks and the floor caps as bright as at Softness 0
Softness 6, the value you set.
The same view with Softness 24: the shadow’s edges blurred away into the floor, the light on the bricks and the floor caps as bright as at 0 and 6
For comparison, Softness 24: the edge blurs away.

The pictures show one more thing, by what does not change. The bricks and the floor caps are as bright at 24 as at 0: a soft lantern is as bright as a hard one of the same Intensity, and only the edge of its shadow is different. Compare the first lantern’s pool here with the one in chapter 3: it is the same pool.

Two more lanterns

  1. Select lantern_2, press Add component, and choose LightComponent. Keep Kind on Point. Set Radius to 250, Intensity to 2.0, Color to 1.0, 0.66, 0.38, alpha 1, and Softness to 6.
  2. Select lantern_3 and add a LightComponent the same way: Kind Point, Radius 190, Intensity 1.4, Color 0.6, 1.0, 0.65, alpha 1, and Softness 0.
  3. Leave Sort Layer at 0 on all three.
  4. Press Ctrl+S.
lantern_2 selected, its Light open: Kind Point, Radius 250.00, Intensity 2.0, a pale orange Color swatch, Softness 6.00; the Viewport shows its Radius circle, and its bricks lit warm
lantern_3 selected, its Light open: Kind Point, Radius 190.00, Intensity 1.4, a pale green Color swatch, Softness 0.00; the Viewport shows its Radius circle round the bay, and the stone beside it lit green

How lights add

Lights on one channel add up before they reach the sprites. Two lights on one brick make it brighter than either. A shadow cast by one light is lit by any other light that reaches it. And colours add: green and orange add toward yellow, and on these brown bricks the mix reads olive-gold.

The third lantern and the second side by side with the second lantern off: the third’s green light on the stone and the vines round it, and the second lantern’s bricks dark at the right
For comparison, the second lantern off: the third’s green alone.
The same view with both on: the second lantern’s bricks lit warm, and where the third lantern’s green meets the second’s orange, at the left of the brick patch, the bricks read olive, shading to gold toward the lamp
Both on: where the green and the orange overlap, the bricks read olive-gold.
Sort Layer
The order lights are drawn in, lowest first. Lights on one channel add up, and adding has no order, so on this channel it changes nothing in the hall. The one place it shows is a Replace channel, in chapter 9: there colours still add, but where two lights overlap, the last one drawn decides how much of the scene is replaced. Leave it at 0 here.

Part 1 ends here

That is the hall at night: a cold ambient, three lanterns and the pillars’ shadows. You can stop here. Part 2 shapes the light: a cone from a sconce, moonlight through the window, stained glass on the floor, a shaft through a doorway, and sprites that glow or show only in the light.

The three lanterns

LanternRadiusIntensityColorSoftness
lantern_12602.21.0, 0.72, 0.426
lantern_22502.01.0, 0.66, 0.386
lantern_31901.40.6, 1.0, 0.650

The soft shadow

FieldValue
Softness6, a source six world units wide, drawn three times

Check it works