What is a lightmap and how is it different from a texture map?

I’m familiar with UV’s and I’m using Blender and Substance Painter and Designer, but I’m super new at this and keep seeing people talking about using different UV’s for a lightmap. Could someone explain what this is and how to make one? Thanks!

A light map stores lighting formation for an object via a texture. Light map UVs have to be unique, and not overlap, but UE4 will generate one for you based off your existing UVs. But you can provide your own lightmap UVs if you wish, normally it’s mostly useful for meshes like a floor where most of the lighting information is on one side of the mesh. If you are using completely dynamic lighting, you don’t need lightmaps or UVs for it. But baked lighting is typically better looking and has minimal performance impact, as long as you can deal with render times and it being more static.

Thanks! So it’s primarily used for environments and optimization?

It is used to store information about the lighting level.
In simple terms, think of a grayscale “texture” that is multiplied with your diffuse image texture.
Thats also a reason why lightmap UVs may not overlap.

Yup, it’s used on anything static. It’s definitely gives the best performance out of any modern lighting technique, and just look at some of the architectural visualization projects people have made with UE4 to see the quality that can be achieved. A lot of artists and developers are hoping we’ll move past it eventually, but it’s here to stay for a while longer.

Well, the only reason why the UE engine still uses lightmap is because of the ‘consoles’ limitations…:wink:

And for mid end PCs.

Yes what everybody else said. And they really make a scene look much better.
These are my observations from working with lightmaps for the last few years:

Lightmaps for static meshes are often really small. I MEAN REALLY SMALL like 32x32 or 64x64

if you have a modular mesh that shows up in a level 500 times each light map is going to be a separate texture file
so if you set your light map to 512x512 resolution. It will be like adding 500 new 512 textures to the game.
Bloody Expensive!!!
You will want to keep that light map really tiny or it will take up a huge amount of resources.

I am sure you are aware that It is hard to make anything look good on a 32x32 map.
Now think about the pixelation that will occur with a complex asset unwrapped on a 32x32 map.
If you use an automatic unwrapping tool like the one in Max to make the UV’s unique you are going to have a Disastrous light map.
The one in UE4 is slightly better. but only slightly.

If you want it done the right way you are going to have to do it yourself.
Ideally you want as few UV Islands as possible.
I like Unwrapping tools that use Pelting techniques to keep one big surface together.

Another consideration for light maps is very large detailed meshes.
if there isn’t much detail it might be OK.
But if there is a lot of detail like a building with architectural details
and it is one mesh, with tiling textures
This will be a lighting disaster!!! The light map will just kill it.
unless it has an impossible texture resolution of like 32000 x 32000

the ideal way to plan for light maps is keeping your mesh sizes limited to no more than about 500 units
and modular. And keeping your light map UV channels with as few islands as possible
A level built this way will get the optimal benefit from light mapping

At that point it might become resonable to use mesh LODs which can have then lower resolutions again for distant instances…