Fully Dynamic Lighting (+GI) w/ Dark Interiors.. I MIGHT have just done it!

After a good two months of testing, tweaking, forum searching, swearing, and more testing I believe I may have finally gotten a fully dynamic lighting setup that actually looks reasonably acceptable for both indoor and outdoor use with minor fudging required (no fiddling with skylight intensity or min/max auto exposure with post process volumes). I’ve settled upon a combination of SSAO, DFAO, HBAO, and VXAO to darken interiors of buildings and heavily forested areas and whatever else may need it. Below are screenshots comparing how the scene looks with and without my AO concoction enabled. All screenshots have LPV enabled for some bounce lighting with surprisingly not all that noticeable light leaking going on. Also keep in mind that I have auto exposure going on so the dark interiors may not seem too dark because of it. I’ll take some screenshots of things again with auto exposure locked once I’m back on my computer tomorrow for comparison.

With AO:

Without AO:

With AO:

Without AO:

With AO:

Without AO:

With AO:

Without AO:

**Things to note: **

This setup is fairly heavy performance wise but at the same time (possibly) mildly acceptable. I only have a GTX1060 and i7 2600 so my PC is hardly top of the line and I’m interested to see how the fps would look on a top end machine because as it stands right now I’m settings up essentially a ultra graphics settings. I had tested other methods such as baking a stationary skylight and nothing else but in the end scrapped the idea as it mean needing to deal with lightmaps and then the issues of dynamic objects and just other headaches. I’m pretty happy overall with how my setup has turned out (though I’m sure I’ll continue to tweak things) apart from a few bugs(?). First I can’t seem to get emissive materials to emit any light into LPV as it’s supposed to, second there is some cheating and shenanigans I’m going to have to do to get cave lighting darker but I’ve got some ideas how to do it fairly well, and third as you can see some objects (namely the trees) look a bit off (could be down to the models or something else, I have to do further testing with it to find out).

As a side note, I haven’t thought to try it but does anyone happen to know if DFGI is still broken in 4.17.2? Might be interesting to see how it compares to LPV in this case.

Anyway let me know what you guys think, if you have any comments, criticisms, or questions let me know! I’d love it if this could start a discussion on real time lighting and the need for a good AO solution as I think it is a valid solution for getting good looking interior and exterior dynamic lighting together without being as intensive as a full dynamic GI setup.

1 Like

DFAO was programmed for exactly that usage.

Using 4 types of AO is ridiculous, for the performance reasons, for the concerns of too much AO, and artifacts and cons of each one can stack on top of each other.

I know it was but DFAO can’t give these results on it’s own without too many artifacts and to get the interior dark enough things like trees become nearly black. DFAO on it’s own isn’t good enough in it’s current state I’m afraid. Maybe if there was more ways to tweak it’s settings.

I can understand that but VXAO is the only one in this case that really causes any performance drop. For concerns of artifacts and too much AO believe me I know. Each AO has been tweaked quite a bit with those things in mind. SSAO is the most subtle (it’s actually still on in the pictures I labeled as AO off, that’s how subtle it is). HBAO again is still quite subtle. DFAO is a bit more noticeable (and the only one that really gives any noticeable artifacting) and then VXAO would probably be the most noticeable. Later today when I’m off work I’ll take screenshots to show what each AO solution is doing.

Finally got around to taking screenshots of what each AO is doing on it’s own. Sorry about the post process volume and reflection captures being visible, I didn’t realize until after that they showed up in the pictures. All pictures have bloom disabled and are locked to the same exposure to give the best idea of what the AO is doing in each.

No AO:





Combined AO:

So why do you use all dynamic lighting? Performance wise static lighting with good lightmaps let you run such projects on virtually every gfx card. 1060 GTX actually IS pretty much top of the line - sure there’s always the 1080ti - but honestly - barely anyone has it. Of my testers loads of people “just” have a 970 and that is with VR headsets which eat up much more gpu.

I mean - your project, so you’re the boss and in the end it just counts that you’re happy with it, but i don’t think this is a lighting setup that I’d like to work with. I know building lightmaps is a long and boring process, but i always want the game to perform on as many (even low end) cards as possible. I’m always happy when someone is like “hey wow i get a constant 90 fps in VR mode”.

It’s a good effort.

But If you don’t mind me saying, I understand the usefulness of AO and dynamic lighting, however the end result is what matters IMHO, and unfortunately AO in general especially if used to this extent causes muddy images and overshadowing light contributions and colors in the scene, breaking proper workflow and causing unaesthetic imagery.

If the end result is to be somewhat presentable to a competitive degree then baking lights is the way to go and to this day there is no proper way around it not even the best realtime GI alone can save the image.

We even disable SSAO entirely and just use material AO in subtle way while baking much of everything else. With the current volume lightmaps update in UE, things are looking better for dynamic objects in baked environments.

The reason for needing dynamic lighting pretty much comes down to having a day/night cycle and not knowing any other way to get decent results other than fully dynamic lighting. I tried fiddling with a stationary skylight for shadowing but couldn’t get results I was happy with.

I suppose I may have been slightly understating my graphics card lol, but I figure by the time I get anywhere near finished it will no longer be near the top. But granted thats not exactly the best thought process so we’ll see how things go as time passes.

I’d love to have something that runs well on lower end cards too but to get the fidelity I’m looking for that suites my needs I’m afraid this is the only solution I’ve found so far.

First off, thanks. :stuck_out_tongue:

I know this setup isn’t ideal by any means but for now its what is working best for me. I’ve been very aware of making sure not to screw up the lighting and materials too much using this method and so far it seems to be working out ok without breaking things. But we’ll see what ends up happening because what you’ve said is a very real possibility.

I supposed I should have said at the start my lighting setup is for an open world game with a day/night cycle, I am in no way trying for archviz quality but rather something semi-realistic that looks and feels decent enough, I suppose. This is all just in the early stages so things will for sure change many more times.

Hey @DuncanT.
What are your plans for this?

Are you refering to the lighting setup or project itself?

I am curious if you plan on open sourcing it, Selling it, etc.

Ah. Well seeing as HBAO and VXAO are both from nvidia and SSAO and DFAO are both in engine from epic I don’t think I’d even be able to sell it if I wanted to. :stuck_out_tongue:

That said I’ll post my settings if you or anyone are interested. I don’t mind sharing them though it’s very likely I’ll be tweaking them quite a bit more and they aren’t perfect but for sure a decent starting point for others

Hi Duncan,
great stuff as I’m trying to do the same thing basically to no avail- I get horrible artifacting depending where the direct lighting is coming from.
Doesn’t your scene/setup suffer from any artifacts etc…? Things like black lines where the shadows transition to the lighter areas?

I have a question, from reading your posts it seems like your biggest need for this AO set up is for indoor lighting and heavily occluded areas like trees. Have you considered having all of your lights be dynamic BUT for a static Skylight and / or baked AO?

If the Skylight casts white generic light and your AO is baked, you would get visually better results than what realtime AO can provide, and this should also work fine with a day / night cycle. Baked AO and Skylight also allows for relatively lowres lightmaps since it will cast such soft light, so it shouldn’t be too much of a pain to render and set up.

I ask that not knowing anything about your project though. Obviously if you plan to have destructable environments or a lot of moving large props like furniture, it won’t work. Otherwise, I think it would be a great compromise. Your thoughts?

Edit: Oh I see this was bumped from a month a go, well I’m still interested in hearing your answer, and do you have any updates to show?
Edit 2: I see you already tried baking a Skylight, whoops! Although still, I can’t help feel that the effort required to set this up to work well with your dynamic objects and lightmaps would outweigh the performance cost and (relatively) poor visuals of AO. But that’s just IMO

If by black lines you mean where the AO stops at distance then no. VXAO has a soft fade out and the distance was far enough that it wasn’t too noticeable, but one thing I never got passed was some trees I was using for testing would be significantly lighter at a distance because of AO no longer affecting them. I had plans to try fiddling with distance darkening in the leaf materials to help hide it but never got around to it. Because of the subtlety of the AOs apart from VXAO there were no real artifacts from them and VXAO is very good with regards to not producing artifacts.

I have tried it though admittedly not enough to really thoroughly test it. There were some artifacts and errors I was given from using foliage (something to do with LODs not supporting correct lighting bakes if I remember correctly). Aside from that I remember finding interiors to be TOO dark with baked lighting even with importance volumes and portals. Also upon 4.18s release I tried multibounce from the skylight and it didn’t even seem to work for me oddly.

There would be user placed buildings and furniture so yes how that would integrate would be interesting to figure out too.

I suppose I should give an update though. As of right now I’ve stopped using VXAO and made DFAO more intense because you can have DFAO affect a far greater range with very little performance loss. That said the quality has suffered somewhat and there is some DFAO flickering artifacts but the quality is acceptable for now as the project isn’t really all that far along and I can deal with it for testing purposes. My plans for now are just to use DFAO and deal with the drawbacks as I continue work and see what Epic or whoever else comes out with for possible solutions in the future. As things stand this project will take a good couple years to get anywhere near an early access release candidate anyway so there should be time for something (maybe) to come along. Ideally I would be able to afford an Enlighten license at some point in the future and work with that as in it’s current state it seems like the best candidate for me needs.

But really only time will tell.