Omnidirectional inward lighting (skylight)?

Because I WANT areas without direct light to be pitch black…? I thought I explained all of this pretty well in the original post! It’s a cel shaded game and I WANT occluded areas to be pitch black. That’s the idea. The skylight is there so that exterior portions of the level DON’T have pitch black shadows; if the sky can see an object, the shadow gets lightened from black to dark grey. Covered areas (surfaces or spaces which cannot see the sky) should be pitch black except for any placed secondary lighting. The idea behind the skylight here is to provide unifom illumination to all surfaces with a direct line of sight to the skydome, and NO illumination to other surfaces. However, I can’t seem to make this work due to how the skylight is shadowing dynamic objects, so I’ve disabled shadow casting from it so that all surfaces are just getting an even bump in lightness for the time being.

I did just forgot to mention it. It makes almost no difference as expected. I am not sure how that would have any effect on the black lighting behavior you are seeing.

Skylight bounce light is usually very subtle and normally will only be obvious on an underside (like a ceiling) where otherwise no skylight would reach. 0 bounce should not cause black walls.

Here are a new set of comparison images showing what I mean. The directional light has indirect lighting scale 0 for all, and I changed indirect lighting scale on the stationary skylight only. Once again the “medium” cubes to the left of each cluster is movable.

Indirect lighting scale = 0

Indirect lighting scale = 1
992ccbcb3ea2d0d0059470c687cd84428b8363bb.jpeg

Indirect lighting scale = 20
41563d96a4590b73bcc38bae455e15f913b4e779.jpeg

Notice that it isn’t until indirect lighting scale is REALLY high before it starts to make a big difference.

It should be lighting the movable objects using the indirect lighting samples which can be visualized by Show->Visualize->Volume Lighting Samples.

Notice how the samples are fairly even and get slightly darker in the heavily occluded area with an overhang and walls surrounding it:

Maybe you should try that visualizer and see what your indirect lighting samples show. Even a mesh floating in space away from any samples should still be somewhat close though:
00a53145f0eed0075b8a672beca557b4fab4fcb8.jpeg

So if I understand you correctly you want this:

961eab02eaacf0acd17472dbb72584daa2b46f11.jpeg

Note that there are four dynamic spheres in the scene, but you can’t see the fourth as it is in the back of the occluded area and thus black.

To achieve this I did the following:

  • Set indirect light bounces to 1 (Needed for light cache sampling)
  • Set indirect lighting intensity for both the skylight and directional light to zero to prevent any bounce lighting

Edit: I seem to have posted at the same time as Ryan. Ryan: Are you sure you are getting correct volume light samples with the bounces set to zero? Other then that we seem to get the same result.

Sorry I should have also dissabled Screen Space Ambient Occlusion for those shots. It is responsible for 100% of the dark crease lines. Here a shot with indirectlighting scale = 0 with the directional light off completely. The dynamic objects are fairly close to static ones. SSAO should help them match a bit better.

I will try visualizing my lighting cache… But Arnage, that’s actually very clever! I can set the bounces higher and then disable all lights’ contribution to the indirect lighting, for the same visual result as 0 bounces but with the engine properly generating an indirect cache.

I’ll give it a shot tonight.

BTW Arnage what you’ve got is fairly close but I’d ideally like to really tighten up that long gradient leading into the occluded space. My cel shader speckles and behaves weirdly across such soft gradients because at their transition neighboring pixels are bumped either up or down to the next color in the cel map somewhat unpredictably. Still, it’s far closer than what I’ve managed so far

Setting the number of bounces higher than 1 won’t change anything if your indirect lighting scale is 0.

I mixed up the settings names above :slight_smile: Yes setting 0 bounces in world properties will indeed prevent the indirect lighting samples from being generated. I thought you were simply setting indirect lighting scale to 0.

Nah, I set bounces to 0 on the advice of someone or other from Epic as a way of recreating the solid color shadows you get with preview lighting. I didn’t realize that 0 bounces disabled the indirect cache entirely, it seems sort of obvious that that would wreak havoc with the way dynamic objects are lit. I’ll try it the other way (enabling 1 bounce but telling all active lights not to contribute to it) to get the cache built and see if that fixes it

Okay, so setting indirect lighting bounces back up to 1 and disabling the contribution of all lights did INDEED fix the issue with incorrect shadowing on movable objects, which is excellent news!

The only problem is I’m sort of back to where I started on smudgy light gradients. Not ENTIRELY, mind; if I disable the skylight, I still get the correct stark black shading from the directional light, so I know that there aren’t ACTUALLY any bounces happening. but the problem is that the skylight creates much the same effect when it casts into dark places. Note: I’m aware that this probably doesn’t look bad to most people, but for my art style (which is cel shading) I just can’t have it:

The black occlusion is rendered correctly for this underground space, and I do get a nice sharp line where the directional light clips into this area. However, for the rest of the upward shaft, which is lit only by the skylight and not the directional light, I get this smudgy gradient of light, instead of nice banded color. Unfortunately, skylights don’t seem to have any options for tightening the shadows they cast, the way other lights do…?

EDIT: I can actually get this closer to correct by cranking the intensity of the skylight up to some huge number (like 50 or 100) and setting the color of the light to be very near to black. The ideal functionality here is for the skylight to be BINARY: if even a single direct ray touches a pixel, that pixel is “lit”, otherwise it’s “unlit”, with no smoothing of the light’s intensity over surfaces where fewer and fewer rays touch. I’m not sure how to get something like this going though, as skylights don’t have any parameters that affect shadow sharpness or anything.