Lightmap Resolution


Not sure if this should be in “Content Creation” or “Rendering”. Please move if I’ve got it wrong. :slight_smile:

I’m trying to work out a rough idea of lightmap resolution sizes. I know there’s no one size fits all solution but right now I’m having to build my lighting multiple times and eyeball the resolution(s) until I get it right.

Here’s an example. This is a 20mx20mx50cm mesh, which, to my mind is a fairly small area. I have one directional light( static ) with area shadows enabled. The resolution for the lightmap on the mesh is set to 256.

[click for larger]

I know I can fix this by raising the resolution of the lightmap. But, even if I raise it to 1024 it’s still not very good and besides 1024 seems fairly large to me.

[click for larger]

I come from a background of using an old DX9 graphics library that only supported dynamic lighting. So I’m a little confused by the light maps and building. Is the solution to this to literally just keep raising the lightmap resolution or is there something else going on that I’m missing or doing wrong( Perhaps if I increase the triangles of the floor mesh. Not sure if that would make a difference as I assume tri-count is an irrelevance but as I say I’m not knowledgeable on lightmapping. ) ?


You can use Cascaded Shadows, which you can configureeif you set your light source to stationary. When done right it can seamlessly transition between static shadows to dynamic shadows. You can set the distance from the camera for when this effect starts to happen etc.

Remember once you add textures and variation to surfaces, it really helps hide lightmap resolution. You are basically looking at a zoomed in 1024x1024 image in that scene, so of course there’s going to be jaggies on a 1920x1080 display.

Yeah. I was actually about to post saying that after adding more geometry and a couple stationary point lights the end result of the build has much smoother edges. I also had a problem with the normal map in the floor material in the OP( for some reason the material instance wasn’t setting it ) – not sure if that has an effect on the light build. Anyway, now the shadow edges look a lot better.

[click for larger]

I’m still curious though as to whether or not there’s some rule of thumb for lightmap resolution sizes. Do people just eye-ball the result and modify accordingly or is there some rough way of figuring the resolution before building?

Thanks. :slight_smile:

Some people try to use an even texture resolution on everything, and there’s a display mode in UE4 that assists with that. But the softer the lighting, the less detailed the shadows, the lower resolution you can get away with. It’s generally best to keep it pretty even and just increase the resolution where you really need it.

Okay, I’ll take that on board. Thanks for the advice, Zac. :slight_smile: