Problems with Lightmass - splotchy shadows in a very specific locations. I'm lost

Hey all!

I have some issues with Lightmass that I’m trying to solve. Prior to posting this thread, I went over all of Tim Hobson’s awesome documents, and followed his suggestions.
I’ve changed my Lightmass settings to an extreme high quality level, just to try and isolate what the problem is… but I can’t figure it out.
Settings are:
Static Lighting Level Scale: 0.1
Num Indirect Lighting Bounces: 100
Indirect Lighting Quality: 20
Indirect Lighting Smoothness: 0.6

I’ve also changed the Lightmass.ini file under Production Quality to:
NumDirectPhotonsScale=100 (default was set to 4) - this is something I think I’ve read Koola recommended

And lastly, I manually did the Lightmap UVs in Maya, with pixel snap precision to fit a 128x128 texture res, with 4 pixels padding between each UV island.

In some parts of the environment the lighting is beautiful:
661e1015d7ddbdb5baa4221682bc9d89b5ba6922.jpeg

But in others, I get these weird results, that don’t make any sense to me, since the walls, floors and ceiling are the same mesh all over the house.
b57a24d0602396ac9e58d8f775d2aec27b870511.jpeg
2e8ee59eba71dd21a9d57c49230a6dbda1723e21.jpeg

Any help would be most appreciated… I’ve spent too long trying to fix this on my own. Wasting precious production time :

Heya Tzur,

The problem I think you’re having here is that you’re lightmap resolution is too low. I would adjust it for the meshes that are receiving the shadows like the walls and floors you’ve shown.

I don’t remember recommending that Static Lighting level scale be that low unless needed. Typically for ArchVis rendering though, where it’s not as important for game dev though. I’d actually keep the Static Lighting Level Scale at the default 1.0.

The settings you have here for lightmass won’t immediately resolve the issues you have. It’s just low lightmap resolutions that is causing the issue. All that you’ll really see with the settings you’ve adjusted is some longer build times and improvement, but with the low resolution, not as much. I would set these all back to the default and then adjust the lightmap resolution to a better value that gives you decent shadow resolution. Then if needed go back and adjust these settings for better results if you need.

Hi Tim! Thanks for replying :]

In the first image I posted, the one I’m getting fairly good results, if you look at the wall with shadows from the bookshelf and books, that’s the same mesh I’m using throughout the level for walls / floors / ceiling.
If you look at the image with the drawer and the vase on top, getting these splotchy shadows just doesn’t make any sense to me when compared to good image, since it’s the same mesh. That’s what I don’t understand. How can I get X result on 1 wall but Y result on a different one?

I’ll give your solution a go, and will post back with the new findings.

Thanks again :]

*** EDIT: Baking just finished, you were totally right! I doubled the res on these walls and it fixed the issue. But, I would love to know why the difference of shadow quality on the same mesh in different location in the environment. If you could explain that, so I’ll have a better understand that would be great :]

Also, now I’m getting this issue: where the walls are rendering differently


Which I think I’ve read that is an issue becasue the rendering is being done on a different thread? I’m not a technical guy so don’t really understand what’s going on… what should I change to mitigate this?

On top of using higher resolution lightmaps, using softer lights and less harsh shadows will allow you to get away with not as high resolution lightmaps.

@ZacD by softer lights you mean reduce the intensity? I use a combination of spots with IES profiles and some point lights that don’t cast shadow to fill some unlit areas. so you suggest I lower intensity and gain the brightness back with post processing?

Not exactly. You can use a combination of these things, area point lights, IES profiles that have softer details, and reducing areas that have a sharp shadow from almost black to well list.

I’m not 100% sure the technical reason behind why you get those lighting seams on flat surfaces that connect together but usually when I get them I set the static lighting level scale to 0.1 and it fixes the problem 99% of the time. You can also move the indirect lighting smoothness down a little bit to about 0.6 or 0.7 and change the environment color to a value of 0.01 (Really close to black but not quite black), if changing the static lighting level scale doesn’t quite do the trick. I see you initially did have your static lighting level scale to 0.1 in your initial post, but you may have changed it for the latest renders?

I’m not 100% sure the technical reason behind why you get those lighting seams on flat surfaces that connect together but usually when I get them I set the static lighting level scale to 0.1 and it fixes the problem 99% of the time. You can also move the indirect lighting smoothness down a little bit to about 0.6 or 0.7 and change the environment color to a value of 0.01 (Really close to black but not quite black), if changing the static lighting level scale doesn’t quite do the trick. I see you initially did have your static lighting level scale to 0.1 in your initial post, but you may have changed it for the latest renders?

EDIT: Regarding lightmap quality: You want to make sure your lightmap density is high and uniform as possible throughout the scene. If you look at your lightmap density view (Upper left viewport, hit the lit button, change it to optimizations > lightmap density. Everything should be a uniform density, with the color depending on what type of quality you are looking for. If you have a huge 5 or 10 meter wall its going to need larger lightmap resolution to make up for that, or its going to need to be broken up into pieces. Hope that helps!

Alright, I’ll give these tips a go. Thank you!

Yes, I have reset the settings to default based on Tim’s suggestion, when I had the settings initially at 0.1 for level scale and 0.7 for smoothness this issue was gone - but the build time hurts so bad. Well, at least I know what to do for the final build. Thank you for the help!

The ones with pixellated shadows are static lights, and the ones in the top pic are stationary, correct? Stationary lights use distance field shadows which allows them to look much better compared to normal lightmaps, even at low resolutions.

Yes you are correct, good to know! Thank you :]

Learning so much already… thank you all!

Yeah you are correct on the shading differences. With something like this is it recommended not to over-modularize the level otherwise these areas that have indirect bounce will show this artifact.

Raising the indirect lighting quality a little and lowering the indirect lighting smoothness can help in some situations but it won’t get rid of the issue completely.

For rooms like this I would recommend just using a single mesh for each wall or a single mesh for the walls/ceiling/floor that has a good UV layout if the room is not very large. That way you can mitigate this problem. You also reduce the number of drawcalls that are now needed for these. I wouldn’t necessarily recommend that for ALL situations, but when it’s simple geometry, like a flat surfaced area, it’s not as big a deal if parts of it are still rendered while not fully in view.

I started yesterday working up a few new things I’m adding to the Wiki Lighting Troubleshooting Guide and this is one of them.