Ollin

Lighting

This group covers the light kinds, curated rigs, and cast shadows.

SketchWhat it shows
LightingThe three light kinds placed by hand to shade solids: a fixed directional key, an orbiting point bulb, and a sweeping spot. A row of spheres shows rising specularSharpness.
LightSetsOne frame, several lighting rigs. Three rooms side by side, each lit by withLights from its own fixture: a swinging warm bulb, a cold overhead strip, a green glow out of the floor. Every back wall carries the same plate drawn withoutLights, so the three walls come out warm, cold and green while the three plates come out identical.
LightingPresetsOne call relights the whole scene. The curated LightingPresets (.standard/.threePoint/.goldenHour/.noir/.studio/.moonlight) cycle over one still life, plus a custom rig built in the sketch. Click or press a key to step.
ShadowsDirectional cast shadows. Solids drop shadows onto a floor and onto one another through castShadows().
SpotShadowA spot light as the shadow caster. A perspective shadow map is fit to its cone, so the solids inside the beam drop crisp shadows.
PointShadowA point light as an omnidirectional caster. A bulb at the center throws shadows in every direction, ray-traced on an RT GPU and through a depth cube elsewhere.
ManyCastersSeveral casters at once. A warm key is joined by a swinging spot or by two circling point lamps, and each throws its own shadow.
AreaLightsRect, disk, and tube sources shading a small studio set. The softbox grows and shrinks, and the softness of its shadows follows its size.
LightShapingPhotometric profiles and a projected cookie, the two ways a real fixture shapes its beam.
ManyLightsA courtyard at night with sixty-four drifting lamps in it. Each one is given a reach, so it lights its own corner and nothing past it, and the renderer shades a pixel against the lamps standing over it.
VolumetricLightBeams, gobos, and shafts you can see in the air.
CausticsThe light a glass or a polished metal focuses onto what is around it.
GlobalIlluminationLight that bounces, so a red wall reddens what stands beside it.

Run one with swift run Example-3D-Lighting-<Name>, for example swift run Example-3D-Lighting-Lighting.

↑↓ move ↩ open