Aller au contenu

Directional Light Node

By Kriss Norde

The Directional Light emits parallel rays from a given direction, with no specific position in space. It simulates the sun or any large distant source perfectly. It produces sharp shadows and is cheap to render.

Overview

Directional Light is the default choice to simulate an infinitely distant source: the sun, the moon, or a studio key light you treat as "infinite" to keep the render simple.

Unlike the Point Light, it has no position - only a direction. All the rays are parallel, like sunlight on the surface of the Earth.

Where to find this node

  • Effects Library: Tools > 3D > Light > Directional Light
  • Quick add: right-click in the Node Editor → Add Tool > 3D > Light > Directional Light

Inputs

  • SceneInput (orange) - optional. When connected, the node's transforms apply to the whole scene.

Setup

Shape 3D ──┐
Directional Light ─┼→ Merge 3D ← Camera 3D → Renderer 3D (Lighting + Shadows enabled)

Controls tab

Enabled (default: on)
Mirrors the red switch. Turns the effect off without deleting the node.
Color (default: white)
Color of the light. Orange-yellow for a sunset sun, slightly bluish white for noon, deep blue for the moon.
Intensity (default: 1.0)
Strength of the light. 1.0 = standard intensity. Raise it if the scene looks dark, lower it for a subtle fill light. No falloff with distance (an infinitely distant source).

Transform tab: the angle of the sun

Unlike the Ambient Light, the Directional has a critical direction. It is driven by the node's rotation (not by its position, which has no effect).

  • Rotation Y = horizontal - swings the sun east/west.
  • Rotation X = vertical - elevation angle. X = 0° = sun on the horizon; X = -45° = sun at an angle (golden hour); X = -90° = sun straight overhead.

Composition rule: X between -30° and -45° gives the most flattering look in CG (long shadows, but not too long). A sun straight overhead (90°) looks flat.

Shadows

Directional Lights produce hard, parallel shadows - just like the real sun. The shadow parameters live in the node and in the Renderer 3D:

  • Enable Shadows on the node to turn on shadow casting.
  • Shadow Map Size - shadow map resolution. 1024 minimum for a decent scene, 2048-4096 for a clean render.
  • Shadow Softness - available in the Software Renderer only.
  • In the Renderer 3D, turn on the global Enable Shadows.

Use cases

  • Outdoor sun - Intensity 1.0, slightly warm Color (R=1, G=0.95, B=0.85), Rotation X=-45° for a golden hour feel. Shadows on.
  • Blue moon - Intensity 0.3, blue-white Color, low angle to stretch the shadows.
  • Studio key light - Intensity 1.0, neutral, 45° horizontal + -30° vertical = classic portrait lighting.
  • Back light (rim) - a second Directional Light behind the subject with a moderate Intensity to create a rim light that separates the subject from the background.
  • Broad top lighting - for a scene where you just want light that "comes from above" without worrying about the source, a Directional with X=-90° = zenith light.

Tips

  • Position = useless - moving the node on X/Y/Z changes nothing. Only the rotation matters.
  • Directional + Ambient combo = the minimum decent lighting. The Directional creates the shadows, the Ambient lifts them.
  • Several Directionals = each light creates its own lighting and its own shadows. Watch the combined intensity: two lights at 1.0 give an overexposed scene.
  • A high Shadow Map Size = a better render but slower - 4096 is enough in most cases. Beyond that, the difference becomes imperceptible.
  • For soft shadows, switch to the Software Renderer (OpenGL does not do soft shadows).
  • Animate the Y rotation to simulate the sun's path over a day (time-lapse). Much more believable than a simple fade.