Skip to main content

Lightmaps

Lightmaps are used to provide lighting information for levels in the game by “baking” static lighting into the world.

Lightmap Generation Settings​


Quality Preset​

  • The resolution of the lightmap.
  • For user maps, the low-quality preset is typically used for quick, few-minute bakes on cloud machines.
  • During production, a quality preset of 1-1024-50 is used for higher quality bakes that can be reviewed during map evaluations and allows for multiple iterations compiled daily.
  • For the final lightmap bake, a quality preset of 1-4096-50 or higher is used. This quality is reserved for final bakes as it typically takes an entire day to complete a single bake (for campaign maps).

:::info Quality Preset Numerical Breakdown (e.g. 1-1024-50)

  • The first number (1) represents super sampling (e.g. 1=16x16, 2=64x64).
  • The second number (1024) represents hemisphere samples. (A higher number results in less noise.)
  • The third number (50) represents error rate, which is used to blur the final image to minimize noise. :::

Light Area Scale (Shadows)​

  • Scales the per-light areas for softer or sharper shadows (this is set to 1.0000 by default).

Use Radiosity​

  • Enables radiosity.
  • Radiosity is a global illumination system used in computer graphics which simulates how light reflects/bounces off of surfaces in a 3D scene. In simpler terms, it’s a GI solution that we can enable when baking lightmaps to give us more natural fills.

Radiosity Sky Cubemap​

  • Specifies a cubemap that is referenced for radiosity lookup instead of referencing the actual skyDome surface textures. Physical geometry is still referenced as usual.

Multiple Bounce Radiosity​

  • Enables the use of multiple bounce radiosity.
  • Calculates multiple light bounces per light source.

Lightmap Debugging​


  • The lightmap channel should appear pure white or heavily desaturated.
    • Dark or pitch black areas indicate lack of lightmap coverage.
    • Splotchy lightmaps suggest need for custom lightmap unwrap or texlod.
  • Broken lightmaps can result from geometry updates, requiring rebaking or reverting asset changes.
    • UV changes on static models can also break lightmaps.
  • UV seams in the lightmap channel may require custom lightmap unwrap or dynamic lights for blending illumination values.
  • Debug lightmap issues in-game using ambient lighting debug view (CVar: debuglighting 12).
    • This isolates the lightmap channel in the engine view.
    • The same method works in the editor with the view set to slowcombomap for accuracy.
  • To view the lightmap channel in the editor, enable slowcombomap view and select lighting from the dropdown menu.

Texlod (Texture Level of Detail)​


Texlod, or "texture level of detail," is a technique used to allocate more texture resolution to important areas in the baked lightmap, enhancing lightmap fidelity in close-up play-spaces. Less important or distant geometry can have lower resolution, as any artifacts are less noticeable. There are two types of user-placed texlod entities: texlod nodes and texlod geo.

Texlod Nodes​

Texlod nodes are singular entities placed close to geometry to enhance lightmap coverage in specific areas of a map.

Common uses include:

  • Improving lightmap coverage for vista geometry.
  • Ensuring even lightmap coverage across walls and floors.
info

Texlod nodes can be created by right-clicking in World Editor or World Camera and navigating to Create new entity → info → texlod.

Texlod Geo​

Using a model is the most efficient method for defining high-quality lightmap areas as it utilizes the automatically generated Nav process mesh. Texlod geo, borrowing from the Nav geo, informs the autobuilder about areas needing higher lightmap resolution and coverage. This method covers a larger range in the map and saves artists from placing texlod nodes tediously around the entire map.

Texlod geo is created by simply opening a low poly version of a map's nav geo in your external modeling tool, and saving a copy of that asset with the postfix _texlod.lwo into a map-specific directory. To get this into the map, create a texlod node (at the origin of the map) and define the render model info as the directory that the texlod geo is saved in.