Lightmap Baking for Graphics

Our video game development company runs independent projects, jointly creates games with the client and provides additional operational services. Expertise of our team allows us to cover all gaming platforms and develop an amazing product that matches the customer’s vision and players preferences.
Showing 1 of 1 servicesAll 242 services
Lightmap Baking for Graphics
Medium
from 4 hours to 3 business days
FAQ
Our competencies
What are the stages of Game Development?
Latest works
  • image_games_mortal_motors_495_0.webp
    Game development for Mortal Motors
    663
  • image_games_a_turnbased_strategy_game_set_in_a_fantasy_setting_with_fire_and_sword_603_0.webp
    A turn-based strategy game set in a fantasy setting, With Fire and Sword
    859
  • image_games_second_team_604_0.webp
    Game development for the company Second term
    490
  • image_games_phoenix_ii_606_0.webp
    3D animation - teaser for the game Phoenix 2.
    533

Lightmap Baking for Graphics

Lightmap baking is a technology commonly considered "outdated" in light of Lumen and real-time GI. In practice, it remains the main way to get quality, performant lighting on mobile platforms and budget PC. Even in Unreal Engine 5 projects, many studios use baked lighting for static interiors because Lumen, for all its advantages, doesn't provide the same shadow clarity and same performance on weak hardware.

The quality of baked lighting depends on a dozen parameters, and most problems with "bad" lightmaps stem from incorrectly set precisely these parameters.

The Main Cause of Artifacts: UV2 and Texel Density

A lightmap in Unity or Unreal is baked into a separate UV channel — UV2 (or Lightmap UV in Unreal). This is not the same unwrap used for albedo. Lightmap UV has strict requirements:

  • No overlapping: each triangle of the mesh is on its own unique place in UV2
  • Minimum padding between islands: at least 2 texels at target lightmap resolution. If lightmap is 512px and padding 2px — this is ~0.4% of the texture at each seam. At 2048px — 0.1%. Insufficient padding = bright zones bleeding into dark ones through adjacent UV islands
  • All islands must be unwrapped without mirror reflections: mirroring gives correct albedo, but in lightmap causes double lighting on symmetric parts

Unity automatically generates Lightmap UV on import (Generate Lightmap UVs in Import Settings). For simple geometry this works. For complex meshes with sharp angles or thin details — auto-generation creates incorrect islands that give visible seams on lightmap during baking. In such cases UV2 is made manually in a DCC tool (Blender, Maya, 3ds Max) and imported ready-made.

Texel density in Lightmap UV is how many lightmap pixels apply to one unit of surface area. For large flat surfaces (floor, walls) — need larger UV2 area. For small details (baseboard, door handle) — smaller. Unity and Unreal allow controlling this via Scale in Lightmap (Unity) and Lightmap Resolution Scale (Unreal) on each object separately. Same Scale for all scene objects is a typical mistake: small objects get excessive resolution, large ones get insufficient.

Progressive Lightmapper: Parameters That Really Matter

In Unity the main tool for baking is Progressive Lightmapper (since version 2018.3, GPU-accelerated since 2020.1). This is a path to understanding most quality problems.

Indirect Bounces. Number of light rebounds. At Bounces=0 — only direct lighting, no GI. At Bounces=2 — light reflects from surfaces twice, filling shadows with soft ambient. For dark rooms Bounces=2–3 is minimum for convincing appearance. For bright outdoor often 1–2 is enough.

Indirect Intensity and Albedo Boost. Indirect Intensity scales global GI brightness. Albedo Boost amplifies how surface colors influence reverberated light — at 1.0 a bright-red albedo surface creates reddish ambient on neighboring surfaces (colour bleeding). At Albedo Boost > 1 the effect strengthens, at < 1 surface colors influence GI less. For realistic render Albedo Boost = 1, for less "muddy" ambient — 0.5–0.8.

Prioritize View and Progressive Updates. During baking Progressive Lightmapper starts with pixels visible in Scene View — convenient for iterative work, but for final baking better to turn off for uniform quality across entire scene.

A typical problem on large scenes is light leaking: light penetrates through thin walls. Reason — shadow rays in path-tracer pass through geometry thinner than a certain threshold. Solution: make walls and floors at least 0.2–0.3 units thick (depends on scene scale) and ensure there are no holes in geometry. Alternative — Shadow Bias in light settings, but it only partially solves the problem.

Unreal Engine: Lightmass and Its Specifics

In Unreal the Lightmass Global Illumination system is used for baking with its own parameters in World Settings → Lightmass.

Static Lighting Level Scale. Global scale for baking quality — smaller value means higher lightmap detail, but longer baking. Default 1.0 — for production quality lower to 0.5–0.75.

Num Indirect Lighting Bounces. Analog to Bounces in Unity. For dark interiors — 4–6, for outdoor — 3–4.

Indirect Lighting Quality. Multiplier of indirect lighting sample count. Default = 1.0, for clean production — 2.0–4.0. High values greatly increase baking time.

In Unreal Lightmass baking happens via Swarm — a distributed system that can use multiple computers on a network simultaneously. For large levels with high lightmap resolution (4096+) without Swarm, baking can take 8–24 hours; with several machines in Swarm — 4–8 times faster.

Volumetric Lightmap in Unreal is the analog of Light Probes in Unity. Automatically built during baking and provides ambient for dynamic objects. Parameter Volumetric Lightmap Detail Cell Size in World Settings controls grid density. Smaller value means more accurate ambient for dynamic objects, larger means more data.

Common Baking Problems

Seams on lightmap. Visible boundaries between UV islands on a lit surface. Cause: insufficient padding in UV2. Solution — increase padding or reconsider UV island division.

Dark spots in corners. Not always artistically correct AO — sometimes insufficient Indirect Samples. Check: double Indirect Samples and see if dark zones change. If noise decreased — samples were undersized.

Yellow or red tint on gray surfaces. Colour bleeding from neighboring colored surfaces with high Albedo Boost. Lower Albedo Boost or check there are no nearby bright-colored objects without Cast Shadows = Off.

Lightmap too blurry. Too low Scale in Lightmap for object — not enough texels. Increase Scale or reconsider texel density distribution priorities across scene.

Task Scale Estimated Timeline
Baking one small room (up to 20 objects) 1–2 days
Mid-size interior level 3–6 days
Outdoor level with forest, terrain and props 5–12 days
Fixing artifacts in ready project 2–4 days
UV2 setup + baking from scratch (entire level) 2–6 weeks

First audit UV2 unwraps and Import Settings, then design texel density distribution, iterative baking with increasing quality, final artifact checking and submission.

Cost is calculated individually after project analysis: scene size, number of sources, target platform and current UV2 state.