Directional light

Also known as: sun light

On this page 7

A directional light is a light source in a 3D scene that emits parallel rays from a single direction with no distance falloff, so every surface receives the same intensity regardless of where it sits. In lighting & rendering it is the standard way to simulate sunlight or moonlight, which is why many applications call it a sun light.

Because a directional light is defined only by its orientation, color and strength, its position in the scene has no effect on the result. This simple model makes it one of the cheapest and most predictable lights in 3D graphics & animation, and it forms the key light of nearly every exterior scene, from architectural visualization to open-world games.

How a directional light models distant sources

A directional light approximates a source that is effectively infinitely far away. The sun is about 150 million kilometers from Earth, so the angle between its rays across a building or a landscape is negligible. The renderer therefore treats every ray as parallel to one direction vector, and the lighting calculation at a surface needs only the angle between that vector and the surface normal.

Since the rays do not spread, the inverse-square law does not apply. A wall one meter from the light origin and a wall one kilometer away receive identical irradiance. Intensity is consequently expressed as irradiance in watts per square meter or lux, not as a power in watts like a point light.

The following table lists the parameters that control a directional light in most render engines.

ParameterWhat it controlsTypical values
RotationDirection of the parallel raysElevation 5° to 90° for sun
Strength or illuminanceBrightness on perpendicular surfaces1 to 10 W/m² in Blender, up to 100,000 lux physically
Color or temperatureTint of the lightAbout 5,500 K at midday, 2,500 to 3,500 K at sunset
Angle or angular diameterSoftness of shadow edgesAbout 0.5° for the real sun
Shadow settingsResolution, bias and cascadesEngine dependent
Main parameters of a directional light

Shadows cast by a directional light

A directional light produces parallel shadows whose size does not change with the distance between the object and the light. With an angular diameter of zero, shadow edges are perfectly sharp. Setting the angle to about 0.5 degrees reproduces the soft penumbra of real sunlight, which widens as the distance between the shadow caster and the receiving surface grows.

In path tracers such as Cycles, Arnold or V-Ray, shadows are computed by tracing rays toward the light direction, so quality depends mainly on samples per pixel. In rasterized and real-time engines such as EEVEE or game engines, shadows rely on shadow maps rendered from the light’s point of view. Because a single map cannot cover a large outdoor area at high resolution, engines use cascaded shadow maps, which split the view frustum into several zones with progressively coarser resolution.

The table below summarizes common shadow artifacts and their remedies.

ArtifactCauseTypical fix
Shadow acneSurface shadows itself due to depth precisionIncrease shadow bias slightly
Peter-panningBias too high, shadow detaches from objectReduce bias, thicken thin geometry
Blocky shadow edgesShadow map resolution too lowRaise resolution or add cascades
Visible cascade seamsSharp transition between cascade zonesEnable cascade blending
Unnaturally hard shadowsAngular diameter set to zeroSet angle near 0.5° or higher
Shadow problems with directional lights

Directional light compared with other light types

The directional light differs from neighboring light types mainly in how rays spread and whether intensity falls off. Choosing the wrong type is a frequent cause of scenes that look either flat or artificially staged, as the comparison shows.

Light typeRay geometryDistance falloffTypical use
Directional lightParallelNoneSun, moon, distant sources
Point lightRadial from one pointInverse-squareBulbs, candles, small lamps
SpotlightCone from one pointInverse-squareStage lights, flashlights
Area lightFrom a surfaceInverse-square at distanceWindows, softboxes, panels
HDRI or image-based lightingFrom the whole environmentNoneSky fill and reflections
Comparison of common light types

In exterior work, a directional light and an HDRI environment are frequently combined. The HDRI supplies sky color and soft fill, while the directional light supplies crisp, controllable sun shadows that an HDRI alone often reproduces poorly because the sun in the image is clipped.

Setting up a directional light in practice

A convincing sun setup starts with the elevation angle, because it determines shadow length, color temperature and mood. Low angles produce long shadows and warm light that reveal surface texture, while a high midday sun flattens forms. Practical guidelines include:

  • Match the HDRI sun direction so that the directional light shadows agree with the reflections.
  • Use physical units consistently when the scene uses physical camera exposure.
  • Limit shadow distance in real-time engines to concentrate shadow map resolution where the camera looks.
  • Avoid several directional lights in one exterior, which produces multiple conflicting shadows.

In global illumination renderers, the directional light also drives bounced indirect light. A sun hitting a pale floor fills the surrounding room, so interior daylight scenes often need less artificial fill than artists expect.

Limitations of the directional light model

The model is an approximation and fails when the source is not truly distant. A directional light cannot represent a nearby window, a streetlamp or a fire, because those sources show visible falloff and diverging shadows. It also lights the entire scene uniformly, so interiors require light linking, portals or blockers to prevent sunlight from appearing where walls should stop it. Finally, a directional light has no visible shape; to show a sun disc in the sky, artists rely on a sky texture or a separate emissive object.

Stripped to the essentials

A directional light is a digital version of the sun. It shines from one direction across the whole scene. All of its rays run side by side, like rain falling straight down.

Because the sun is so far away, it does not matter how close an object is to it. Everything gets the same amount of light. Only the angle of each surface changes how bright it looks.

Artists turn this light to set the time of day. A low sun gives long, warm shadows. A high sun gives short shadows and cooler, harsher light.

Where it is applied

An architectural visualization studio prepares exterior renders of a three-story residential building for a planning application. The client wants to show how the terrace receives sunlight on a summer afternoon, so the artist places a directional light at an elevation of 35 degrees from the southwest, with a color temperature of about 4,800 K.

The first test renders show razor-sharp shadows that look artificial. The artist sets the light’s angular diameter to 0.6 degrees, which softens the shadow edges of the balcony railings into a realistic penumbra. A matching HDRI sky provides blue fill light in the shaded areas, and the HDRI rotation is aligned so that reflections and shadows agree.

A second set of images uses an elevation of 12 degrees to show the evening situation. Because only the rotation and color changed, the entire lighting study took under an hour, and the planners received consistent, comparable images of both times of day.