Download

Localized-IBL implementation

Awesome awesome work.

That’s one of the best lighting features UE4 has ever seen.

Cant stop watching this blending GIF… My eyes are soo happy :slight_smile:

Oh man that’s sexy. Okay so if you can’t sell it, can you start a poll or something where we can vote to have this included in the engine? I want to do something to support this!

thanks for the comments, it’s really encouraging :slight_smile:

I’m off this week but when I’m back I’ll work on changing the Brightness at runtime, so gameplay can alter the IBL to become darker (for example for turning off a light). And then I’ll probably make a somewhat better showcase using either the Sponza atrium or maybe the Elemental demo

@TorQueMoD I don’t want to sell it, I’d just like it to be integrated into the engine (that’s what the Pull Request is for). If you want to support it at this point the right way would be to thumbs-up the pull request and maybe add a comment there. I guess I also could add a poll to the main post here

Looking really good =D

OMG!!! This week will be one of the longest one for me I think.

Link gives a 404 error

GitHub requires you to log in otherwise it shows a 404 error. it’s just how GitHub works :smiley:

realmente increíble el resultado, muy buen trabajo :slight_smile:

Oh man I need this in my life. Please epic!

I’ve updated the code to allow modifying the Brightness at runtime. If used well this could be used to dim the IBL in an area while dimming all lights that are affecting that same area. Tricky to use but could prove a neat trick. I’ll try to make a testcase with the feature and show it a some point.

In the meantime however, I’ve been trying the system in a more production-like environment and I chose UT4’s fantastic Outpost23 map for it.
I have to say placing the probes is tricky because of leaking so even if the ReflectionCapture baking takes a small amount of time (~20 seconds for 97 ReflectionCaptures) it requires quite some trial and error and placing fill lights to get the desired effect (I’m kinda cheating since I’m using the UT4’s Baked Lighting as reference). Then again I’m not a lighting artist :stuck_out_tongue:

This is how it looks at the moment:

Comparison screenshots here: Imgur: The magic of the Internet

From this test I’ve noticed 3 issues that I’d really need to solve:

  • Particles are unaffected by IBL (so they look blue from the Skylight)
  • Decals get really washed out
  • Metals kinda stop behaving like metals

This means I’ll have to make some adjustments in the shaders before calling it done. At least I’m glad I caught these issues before Epic even gave the PR a look :rolleyes:

This is awesome!!
Thanks for what u are doing :- )
Can this work with lpv? Lpv has serious light leaks for interiors but holds some weight for exteriors.

From those outpost comparisons, it looks like AO from textures are being ignored or even inverted? Or is that metalness issue you mentioned.

Maybe the metal issue has to do with DFAO? What do things look like with r.AOSpecularOcclusionMode 0 vs 1?

:slight_smile:
eventually I’ll test it with LPV. I don’t see why it shouldn’t work - they wont interact with eachother but they could be complementary

I found out Outpost23 doesn’t even use material AO
the issue is now fixed though. turned out to be the same metalness issue and it wasn’t even a metalness issue after all :rolleyes: - I just missed multiplying the resulting indirect light with the
GBuffer.DiffuseColor. it was easy to miss because the entire level geometry is bright-gray. this fixed both the metals becoming dark again and decals looking washed out.

here is the updated result:

next step is fixing the particles… and I just realized it’s not just a particles issue but an entire translucency-lighting issue
apparently the translucency lighting’s skylight contribution is applied on the base pass which complicates things a bit :confused:

btw I did a quick performance comparison. ReflectionEnvironmentAndSky costs around 0.5ms more using Local IBL compared to without (GTX 970). not too bad I would say

uhmm interesting. r.AOSpecularOcclusionMode 0 makes metals even darker. I guess that’s up to the user now though, since metals now behave consistently whether Local-IBL is used or not

Just to clarify, r.AOSpecularOcclusionMode 0 enables Specular Occlusion from DFAO and r.AOSpecularOcclusionMode 1 will disable it. It should’ve been the other way around, but that’s how Epic does it.

Some new progress

Been struggling with Translucency in general. Since I found out that for translucency the skylight is applied in the Base Pass I’ve been looking for a way to do it differently.
Sadly it seems that translucent rendering is way too much decoupled from opaque, so the only way to achieve Localized IBL for translucent shaders is to do just as Epic did: process it in the Base Pass.
This means I have to re-read the reflection probes for translucent objects (I don’t expect this to be very cheap), and also means I end up with copy-pasted code in different shader classes.

Struggles apart, it works :smiley:
getting close to actually finishing this thing

Hot hot hot. Maybe a bool on the capture actor that sets whether to bother with the translucency? I feel like it’s gonna matter about as often as not.