Bake Lighting

Also known as: Light Map, Lightmap Generator, Lightmap Maker

Updated in the Dragontail Peak release: soft (penumbra) shadows, VDM support.

Bakes the sunlight, sky illumination, and raytraced shadows falling on your terrain or vector displacement map into a realistic lighting map.

When to Use

  • Lit textures: Overlay the lightmap on your textures, or use it as a lighting reference. RGB lightmaps can be multiplied with surface textures in image editors for textured lighting.
  • Shadow masks: Shadow-mask output is useful for separate shadow compositing in external tools. Turn off Create penumbra when you want a crisp, hard-edged shadow mask.
  • Varied light color: Wire color images into the Sun Color and Sky Color ports to warm the light in some places and cool it in others.

How to Use

Connect a terrain heightfield or VDM to the Primary Input. By default you get a full-color lightmap with sun, sky, and raytraced shadows, lit from the direction of the viewport lighting at the time you added the device.

  1. Connect a terrain heightfield or VDM to the input.
  2. Click Take from viewport to match your preview lighting.
  3. Enable Use Viewport Light Direction to maintain sync during work.
  4. Adjust Sun Amount and Sky Amount to balance direct and ambient lighting.
  5. Keep the Raytracing model for realistic shadows and Full Lighting for the complete illumination result, or pick another Components setting for shadow masks.

Inputs

Port NameTypeRequiredDescription
Primary InputHeightfield or VDMRequiredThe terrain to light

Outputs

Port NameTypeDescription
Lightmap OutputHeightfield or RGBThe computed lighting map (format depends on Produce RGB Lightmap setting)

Parameters

Sun Location Group

When you add the device to a project, the sun direction is set from the current viewport lighting.

Sun Heading (Default: 0, Range: 0-360) The compass direction to the sun in degrees, seen from overhead and sweeping counter-clockwise from West (0° = West, 90° = South, 180° = East, 270° = North).

Sun Altitude (Default: 25, Range: 0-90) The elevation angle of the sun above the horizon in degrees (0° = horizon, 90° = directly overhead).

Take from viewport (Button) Matches the sun direction to the current viewport lighting.

Use Viewport Light Direction (Default: unchecked) When enabled, automatically updates the sun direction whenever the viewport lighting changes. Sun Heading, Sun Altitude, and Take from viewport are disabled while it is on.

Lighting Group

These settings are disabled when Components is set to Shadow-mask.

Sky Amount (Default: 0.2, Range: 0.0-1.0) The intensity of ambient skylight illumination. This provides soft, omnidirectional lighting from the sky hemisphere.

Sun Amount (Default: 0.8, Range: 0.0-2.0) The intensity of direct sunlight. Can exceed 1.0 for bright, high-contrast lighting.

Sun Color (Default: Warm white) The color of direct sunlight. Only visible when Produce RGB Lightmap is enabled.

Sky Color (Default: Cool blue-white) The color of ambient skylight. Only visible when Produce RGB Lightmap is enabled.

Both colors can also come from an image: wire a color image into the Sun Color or Sky Color port, and each spot on the terrain is lit with the color at that spot in the image. For example, you can warm the light in some valleys and cool it on the peaks. This needs the latest version of the device.

Soft Clipping (Default: checked) When enabled, brightness rolls off smoothly as it approaches full white, so bright areas never clip abruptly. When disabled, values are hard-clamped at 1.0, which may create harsh bright areas.

Options Group

Illumination Model (Default: Raytracing, Options: Local (No Shadows), Raytracing)

  • Local (No Shadows): Fast; each point is lit only by the direction its slope faces, so the terrain casts no shadows
  • Raytracing: The terrain casts full shadows onto itself

Components (Default: Full Lighting, Options: Shadow-mask, Skylight in shadows, Full Lighting) Controls which lighting components to include:

  • Shadow-mask: Shadow map only (white = lit, black = shadow, with soft edges when Create penumbra is on)
  • Skylight in shadows: Sunlit areas are full white; shadowed areas show only the skylight that reaches them
  • Full Lighting: Complete lighting with sun, sky, and shadows

Produce RGB Lightmap (Default: checked) When enabled, creates a color bitmap using Sun Color and Sky Color. When disabled, creates a grayscale heightfield.

Create penumbra (Default: checked) Calculates the soft edge of the sun’s shadow, where the sun is only partly hidden behind the terrain. Shadows get a gradual transition that widens with distance from the object casting them. Turn it off for hard-edged shadows. Only matters with the Raytracing model.

Tips and Tricks

  • Sun Altitude between 15-45 degrees creates the most dramatic terrain shadows.
  • Lower Sun Altitude angles cast longer shadows that pick out more of the terrain’s shape.
  • Sky Amount of 0.15-0.3 provides natural fill light without washing out shadows.
  • Enable Soft Clipping for more realistic bright areas, especially with Sun Amount greater than 1.0.
  • Disable Use Viewport Light Direction before final export to lock your lighting.
Updated on December 3, 2026
Was this article helpful?

Related Articles

Need Support?
Can't find the answer you're looking for?
Contact Support