How Are Lightmaps Applied to Objects?

Hello,
My question is for one/or several savvy in the art of lighting and baked light maps:
How are baked light maps computed and applied to objects in the scene? Every object has its base materials such at wood, metal, stone, etc… How are the light maps applied on top of those base materials? Is it simply a case of multiplying, or adding the color values in the light map on top of the base color in the object’s materials? I’m guessing the the object’s UV channel, and the lightmap channel are displaying at the same time, and ‘somehow’ blending together? Can anyone explain in more detail what this ‘somehow’ method/mechanism is? Perhaps I am missing some fundamental piece of knowledge pertaining to UE lighting?

Thanks in advance,

yes… they do some normal map math for directional shadowing but are basicly multiplied with the diffuse term. and yes… lightmaps have a different second uv set.

You’ve more or less got it. The light map is blended with the base material during the rendering process. This blending is typically done by multiplying the light map’s color with the base material’s color. Each static mesh has a dedicated UV channel for light maps (typically UV channel 1). This channel dictates how the light map texture is applied to the surface of the mesh, just like how the UV0 channel maps the diffuse texture. It’s typically a separate, non-overlapping UV layout that ensures there are no artifacts (like shadow bleeding) during the light baking process.

1 Like

Thank you for the confirmation,

If I wanted to go in and mess with the way the light interacts with my base materials, then I guess I would have to go and make a light function material and apply it to my light.
Thanks for the quick reply!

Yeah thats one way to do it but be mindful that Light Function Materials only work with real-time lights, so they won’t affect baked light maps directly and they affect all objects illuminated by the light source, not just specific materials.

You could also modify the material shaders directly for a per material solution or use post-processing techniques for an area. For the material shader you could look at the base colour, specular, roughness, AO, emissive and tweak them.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.