I’m having a big deal with static lights. I created an outdoor scene where there is a skylight set to static and a directional light set to stationary; the first screenshot shows the situation before building lights
. After baking the lights (with very bad results - all the objects in scene became very dark - and after hours of baking) I decided to make the directional light movable, so I wanted to reset all the static light information of my level.
I founded that to do this you have to chek “Force no precomputed lighting” and then re-bake the lights. The problem is that althought there are no more lightmaps my scene still has some light artifacts, like shown in this second screenshot, that are similar to the effect given by very strong ambient occlusion
. Also foliages are very dark, althought all lighmaps should be resetted!!
Any ideas of what is the problem about and how to effectively reset light information?
Thanks!
IMPORTANT UPDATE: I found that the problem is due to the skylight. In fact, after light building I found that also the skylight was very dark, so I deleted the skylight and added a new one, but for some reason that skylight DOESN’T EFFECT THE SCENE IF SET TO STATIC
the strange shadows are due to distance field ambient occlusion, wich tries to emulate bounce lighting, producing those weird effects.
I want the skylight to be static, because I want soft and diffuse light, without those artifacts…but why now my skylight if static doesn’t affect at all the enviroment, no matter his intensity? (Before light bulding it was ok)
Try unchecking “Compress Lightmaps” (even though it’s for light baking, it still affects things I’m pretty sure). Then try decreasing “Indirect Illumination Occlusion Fraction” by at least 0.3 or 0.4 so down to .7 or lower. The first 2 or 3 indirect bounces have a more drastic effect on the scene’s shadowing and lighting than subsequent bounces. It may also be applicable to change Occlusion Exponent, yet not sure if increasing or decreasing is required.
One last item, changing the skylight’s angle and/or directional light’s angle could help, but probably not changing it a huge amount (e.g., from .5nnnn to 1-2, not to 3-5). It affects shadow penumbras (the extent of shadows as determined by light angle and position).
Hi, thank you for your reply!
Unfortunately those things you suggested didn’t help.
But now I noticed another strange thing: when I move an object into the scene, light is slower in updating the position; I mean, if I move an object, the shadows of the object move only after a while, like “in slow motion”. Is that normal?
But the most important thing is that I didn’t understand how light works. I mean, with static lights ALL the lighting informations should be rendered into lightmaps, right? So when I delete all lightmaps the light should return to the light previous of the bake (see my first screenshot). So what are those strange shadows
Also I am very confused about the preview mode of static/stationary lights of UE: what is his utility if after baking lights look COMPLETELY different from the preview?
Not normal. What are the World Settings (screenshot would help)? Is there a post process volume? are you using global illumination and/or ambient occlusion?
What you’re saying sounds correct from how I understand the basics of lightmaps too. However, there’s a few other things to consider. One, some of the settings for lightmaps also control the shadowing and lighting information for movable lights and objects, but it works at least a bit differently as far as I know in most cases. Two, it’s probable the references for those lightmaps are still there, so dynamic lighting is still using pieces of that lightmap data for the post-lightmap scene. Three, terrain has specific settings to it which could be modifying the lighting / shadowing to appear how it does without lightmaps, somehow being similar to the light bake that caused those problems. Do the trees have two-sided set for the materials they’re using? If not, they’ll primarily be lit from one side (probably the top and side areas of the tree foliage), so shadows could be darker from it.
One other thing, in the skylight details panel, there’s a setting called “Lower Hemisphere is Solid Color”. By default, at least 4.23.1, it is black and enabled in a 3rd person or 1st person template. If it’s enabled, disable it or change the color to a lighter grey or white. It actually causes darkening of the scene if it’s enabled and is set to black. It can also cause shadow artifacts on geometry surfaces.
The only thing I changed from default settings is enabling AO
There is also a post process volume, but I didn’t set anything strange (only just some color color corrections, the lens flare effect and vignette) except AO, which I reduced from the default value:
all the foliage materials are using the two-sided shading model. I tried disabling “Lower Hemisphere is Solid Color” and the scene became brighter, but still threre are those strange shadows that were absent before light build
What I was saying was, similar to deleting 3D actors such as trees, buildings, boxes, etc…references may be still present to those objects in the level. I’ve seen a post or two about it, where those leftover object references cause their respective volumes, shadows, or other ‘data’ to visually not disappear. It’s like a part of the data is still being processed and visually rendered in the world or level. I don’t know for sure if it happens with lightmap data, but I would hypothesize it can. I don’t know how to access that information / data either. Sorry, I’m a newb too lol.
After having a second look at your scene in the screenshots, I’m certain that the dark shadows are self-shadowing, and not merely ambient occlusion. The skylight is difficult to setup in my experience so far, even for a template level like the 1st and 3rd person templates. It’s disconnected from a ton of other light settings, yet influences those settings and is influenced by those settings in the scene (settings like ambient occlusion, global illumination, cascade shadow maps, distance field shadowing, post process, auto exposure, etc). So it really does require tweaking those various settings to different values while trying to hone in on the main problem(s). Are you able to change self-shadowing settings for the skylight, or directional light, and see a difference in the darkness level of those shadows inside the foliage and on sloped hillsides? I think it would be better than brightening the scene more, as that would probably become an issue by making other shadows not dark enough and adding too much light bouncing and scattering.
Changing the number of indirect bounces to between 4 and 6 might help though. And perhaps one more bounce in the skylight, if it can swing it without a slower run-time render.
Hi! Thank you for your reply, but I’m not sure if you read my update of the main question…
the problem is caused by “distance field ambient occlusion” of the skylight, which turns on when the skylight is set to movable. Of course it can be turned off, but in this way my scene doesn’t have any soft, diffuse ambient light. to achieve this, I have to put the skylight to static (as I set before building the light), but if I do so now, is like the skylight doesn’t affect the world at all: no matter which setting I edit (intensity, light bounces, color, etc), the light is still completely invisible!
so now my problem is: why before light building my static skylight was ok, and now (only on static) it doesn’t affects the world at all?
It sounds like a problem with the previous lightmap data or the dynamic lighting data interfering with the skylight working now. It might not be that, though. Have you read through some doc pages about skylight, DFAO, and baked versus dynamic lighting? May be able to spot something that wasn’t obvious or tested yet.
It appears you’re using low-poly meshes. Is the terrain at a low resolution or have settings that correspond with the low-poly graphics of the scene? It doesn’t appear to be super low poly, but it’s not highly detailed polys either, it just looks like less sub-division per object than say Tomb Raider or God of War. That may be affecting the ambient occlusion and self-shadowing, as it is something I read is a problem in low-poly (ala Fortnite) games. I’ve seen it in another post in the AnswerHub too, where certain foliage meshes were getting really high levels of occlusion inside certain areas of the mesh, causing dark shadows in incorrect or inconsistent places. I’ll try to track that post down in my history and see if it was resolved, then post a link to it, if interested.