Finally got the lighting right!!

oh the feeling when you finally understand something that’s been bothering you for a while! I’ve been struggling with ugly shadows, light bleeds and splotches for two weeks now. searching for answers around the web gave me only bits and peaces of needed answers. finally a simple sentence that I stumbled upon made everything click into place: “too high indirect lighting values can introduce artifacts in shadows”. so simple, yet it took me ages to find solution to my problems, as that was nowhere said explicitly. I’ve gone back and forth with lightmaps, lightmap UVs, UV pixel snapping, padding, this’ and thats, yet this simple bit of information solved it all. now I leave indirect lighting at 1, and raise camera sensitivity in postproces volume.

here are some screenshots from a test scene. don’t mind the weird materials, these are just placeholders. I know, I know, you’re all probably going like “listen to this guy, haha” but I’m so relieved that I can move on in learning process. :-))))))


Those look nice. I have a couple of questions for you. Which one of “indirect lighting at 1” are you talking? under the World Setting? or CameraActor? or BP_LightStage? Also, which one of parameters did you adjust for “camera sensitivity”? under CameraActor? PostProcessVolume1?

I’m also struggling, learning new things in UE4 and working on my archviz scene. My current issues are shadow quality as I marked in red. How can I fix jagged shadow to nice clean shadow? The shadow of the wall between windows doesn’t start from the bottom, that of the chairs either. test01.jpgtest01.jpg

When you render your scene, do you use Matinee to output an image so that you can manipulate further in Photoshop? I just print screen this attachment, not sure the best way to output an image from UE4.

hi. I’ll try to summarize what I know.

  • for indirect lighting intensiti just leave it as it is. 1 is default value for I believe everything.
  • for clean shadows you have several things to watch out for:
    • nice and clean UV lightmaps. this means no overlapping between UV islands and enough space between them
    • if you already took care of that, try raising lightmap resolution. in my scene everything is 128, 256 and 512 for floor and ceiling (big geometry, those two)
    • I prefer softer shadows, but to get more defined shadows try lowering the size of samples for static lighting (smaller samples - finer image, just like with classic render engines), and lowering the smoothness for shadows, meaning they’ll become sharper and more visible. for lowering the sample size go to world settings - lightmass settings - static lighting level scale, and set it to something lower than 1. for sharper shadows set indirect lighting smoothness also to something lower than 1. usually a value of 0.6 or 0.7 works the best. be aware that all this will increase light build time a lot. also raise indirect lighting quality to 3 or 4, bounces to 100. when you lower the shadow smoothness and static lighting level scale you’ll introduce shadow artifacts again, but those you can counter with higher lightmap resolutions, again increasing the light build time. there’s no golden rule here, you’ll have to make some test to find out what works best for you. in my scene I have static lighting level 1, bounces 100, quality 3 and smoothness 1.
    • for “camera sensitivity” add a postprocess volume to the scene. scroll down to “auto exposure” in postprocess settings. set both min and max to 1 (this will lock exposure to one value. by default it mimics eye adaptability when you switch from bright to dark in your scene and vice versa. then you control the brightness with “auto exposure bias”. in my scene it is set to 3. be aware that you’ll have to adjust your lights strength values as well. what you achieve with these settings is nice and clean shadows without indirect lighting artifacts which occur when you set indirect lighting too high.
    • for that lightbleed you have there at the ceiling, try making the ceiling thicker, like 0.5 meter (roughly 2 feet). it works for me. my interior walls are thin so I get some bleeding inside, but the thicker outer walls are doing the job just fine.

for screenshots I just hit F9 when in play mode, full screen. read this for more info: you might get black images when you try to open them in your viewer program. ACDSee shows me black or really heavy interlaced images. if that’s the case just open them in Paint, and resave them.

I hope this helps, mate. :wink:

Thank you, heraSK. That’s very helpful for UE4 noobs. I will try them out.

did it work for you, mate?

I did a lot of readings including your older posts and am making some progress. Your and Tim’s advice helped me a lot. Here’s better results, this is different scene,



image #1:
I’m trying to get sharper shadow from the vertical blind curtain now. To do so, do I need to even crank up those settings in the Lightmass? Those models, wall, floor, ceiling, the blind curtain, have all 256 lightmap res.

image #2:
I still have dirty corners which is a bit further away from the light sources. Are those still from lightmap or luck of lighting source?

Those images are the lighting build with production quality.

I’m comparing my scene to Koola’s and his scene has much clear/sharper quality. I guess that’s from lighting and PostProcessVolume settings. Do you have any suggestions, what to tweak, add more lights, etc? Is your Light Source(sun) static or stationary?

the material of your curtain this two sides?

oops. sorry for not answering this long. I can’t really tell what’s wrong by looking at those screenshots, other than the ceiling looks like it’s floating 1/2 inch above the inner walls. if that’s the case usually you can’t go wrong if you let the ceiling and the floor intersect with walls an inch or two.

in order to get the floor to receive shadow from blinds you should have the light outside the window point inside (not at the plane outside to simulate soft light). also, maybe you’ll have to raise the floor’s lightmap res a bit.

hope this helps. :wink:

Do not fear from increasing lightmap resolution. I used 2048 for some of my walls to increase quality. You need to increase lightmap atlas size to 2048 for that. For my project, i have several 2048 lots of 1024 and 512 lightmaps. Architectural scenes are mostly small scenes compared to games. If you need more quality you have always memory room in pc gpus to increase lightmap resolution. Even for a mobile architectural project, i use 512 for every piece of wall. You can always check your lightmap density to find if it is resolution or another problem. I’m attaching my ““mobile”” interior project’s lightmap density visualization here for reference. I wish i could share both my pc interior and exterior architecture project, and mobile project’s screenshot, but i’m making them for a client and being under nda doesn’t let me to do it. Sorry for that.


that’s how I check the lightmap resolution. it helps making them all roughly the same size… but mine are all red! :-))