Correct me if I'm wrong about this dynamic lighting approach/understanding:

In this project, I’m taking a fully dynamic lighting approach; with no baked lighting at all. I’m using CSM+DFS and DFAO+SSAO. The directional light, with the csm and dfs, is set to stationary. Does it make a huge difference if it’s set to movable? Also, the skylight is set to movable and has a non-zero occlusion max distance set(300 in my case).

The CSM and DFS are handling the actual “shadow” shadows of the scene. My CSM is set with a distance of 2k and the DFS is set for 10k. So that means between 0-2k, I use the CSM and between 2k and 10k, I use the DFS(which uses the DFAO mesh data). Beyond 10k, the DFSs disappear.

Now for the DFAO/SSAO, I’m using the DFAO to give all of the detail shadowing, from a distance, and the SSAO for all of closeup AO detail. On the skylight, I have the occlusion max distance set to 300 because I don’t want a whole ton of performance eaten up by unnecessarily long tracing. The SSAO is set to have a fairly tight radius (20-30), for “filling in the cracks.” The SSAO fade out distance is set to 1500 and the fade out radius is set to 400(smooths the fading); so that it doesn’t try to compete/overlap with DFAO.

So please correct me if I’m wrong in using this workflow. It seems to produce some pretty amazing results. The DFAO can even be turned off, to save performance, and the scene still looks pretty decent with just CSM+DFS+SSAO.

Any chance you’d mind showing us some screenshots? This sounds like a successful version of what I’ve been trying to do, and I’m really curious to see how it works out; my major stumbling block with dynamic lighting has always been getting the indoor scenes to balance out; without the bounce lighting you get from baking static sources, interiors all tend to be incredibly dim for me.

Keep in mind that I haven’t really tweaked anything and some of it is overly dark on purpose right now, but it’s just to dramatically emphasize things and make it easier to see what’s going where:

With everything on:



Here is a second angle with the same order of options:

On the bush material, I made some changes. Like I added in a cheap/lazy sub surface color filter for the green channel, biased and clamped it a little and put it into the sub surface channel. Kind of pushes the green more into the leaves. Oh and I changed it to be two sided and use the two sided foliage shading model. In the mesh settings, I also changed it to use two sided distance field mesh generation. Again, this isn’t mean to look “pretty” or anything, it’s just a test bed for playing around with settings and see what all does what.

EDIT: Oh and I will try to get an indoor scene set up real quick and post it soon.

If you take View / Visualize / Mesh Distance Fields. How does it look?
If you turn off “Affect distance field lighting” on smaller objects they won’t generate distance fields. And since you already use SSAO that might be a ok trade off.

Here is an example I made: Affect Distance Field Lighting - Imgsli
On the left only the trees generate distance fields. On the right bushes does it too.

Oh it all looks fine. I carefully corrected the DFMs on objects. And yeah, I don’t plan on allowing DF for things like grass or “very” small objects. But for even medium sized bushes, I’d leave it on. Distance field shadowing is super cheap compared to CSM because DF uses the simplified mesh representation of the model and CSM is per vertex shadowing.

As for HInoue, indoor lighting with pure dynamic lighting just isn’t going to happen. You’d need VXGI or LPVs to pull it off at all because you won’t have any bounce lighting at all. I spent some time yesterday trying to make a post process method to cheat some GI into the scene and it never really panned out into anything reliable. I was taking the AO buffer and using it as a mask, then performed a lot of “crushing” on the light channel to make the colors really blow out and then took an average color(take a bunch of samples from the crushed lighting channel, divide by sample count). From there I tried to add some fake color into the scene; with some more playing around.

The best bet is still to use prebaked lighting for indoors, but you can set the lights to stationary so that you still get dynamic shadows and such. You wouldn’t need DFAO, but depending on the size of large clearing inside the level, you could still use CSM or ray traced DFS. Also, you’d just bump the SSAO distance up for indoors stuff too. Thankfully, all of the shadow settings can be changed on the fly. So what you’d do is have your outdoor world use all the pure dynamic lighting stuff, then you’d find some way to artistically transition into a streamed sub level that has baked lighting. Only problem would be things like the skylight bleeding color into the streamed level. You’d have to work on some timings of things like turning it on and off, etc etc. Or you could just do a hard load from the fully dynamic outdoors and into the lightmapped indoor level.

Thank you for getting back to me, that’s about what I’ve discovered on my own and I was hoping that someone else had stumbled into a magical solution that I had missed. :slight_smile: