Localized-IBL implementation

Please support the IBL project! This is a useful tool and I don’t understand why Epic doesn’t add this to the main branch. We work with IBL in our project “Novum”.

@ Please continue to support this (pretty please :-)). Have you considered selling the code/engine modifications on Gumroad or something to make it worthwhile for you? I would be more than happy to pay for this, if it means that you continue supporting it :wink: Thank you

@JINTECH very nice :slight_smile:

@Darthlatte I’ll probably try to port it to 4.24 when the time comes, and we’ll see after that.
I don’t think I can sell changes to the core engine, but even then I have no interest in a few bucks (but then have customers entitled to get support). I have other priorities and that’s why I give it away as is, but I’m still up to update it to new versions if it’s useful for enough people

@ I’m interested in answers to a couple of questions…

  1. Are you still trying to add IBL to the engine or is Epic ignoring this?

  2. I tried to upgrade to 4.23.1 and the engine starts, IBL does not work. I took the Epic release branch and replaced all the files in it that were in your 4.23 repository with the commit “Localized IBL for UE4 4.23”. Maybe I’m just not attentive and missed something, although I checked, and Epic didn’t seem to touch these files for a long time. Have you tested 4.23.1?

  1. not anymore, Epic declined the feature entirely

  2. you’re likely missing the console variable r.LocalIBLFromCaptures to enable it (read the instructions again), since updating the engine resets the ConsoleVariables ini file

Since I looked through all the files you changed (shaders, code, etc.) of the repository and noticed the config file(ConsoleVariables.ini). The console command(r.LocalIBLFromCaptures) does not work, apparently the matter is different.

Was there any reasoning from them on this?

hmmm strange

has anyone else gotten it to work on 4.23.1? it’d be nice if someone can confirm if it works or not, and save me the trouble of downloading the entire engine :slight_smile:

yeah,

you can read their replies on the pull request: https://github.com/EpicGames/UnrealEngine/pull/4856

Its disappointing how they say that there is some solution currently, but its not a complete solution.

Hey. Great job, thanks for sharing. In version 4.22, IBL works just fine. I have a problem with fully metallic materials. They simply do not reflect the light from Skylight.Was that what you intended? I can’t apply it, just because of the wrong reflection. Could you explain what the problem is?

what exactly is failing there?
I see a chrome sphere inside a box-room, reflecting the gray walls of that room on the sides and ceiling on the top, the green floor, and then the opening where it reflects the rest of the environment (including the sky)
the non-chrome objects (the other sphere and the walls) are doing exactly the same - but since the high roughness causes the reflection to get blurred, the reflected sky environment gets blurred which leads to the sky colors appearing to affect a wider area of those surfaces (but at the same time much more dim)

I met the same problem. metallic material’s reflection is wrong, even in a out door environment

Hi, you are saying everything right. But on metal materials there is absolutely no reflection from Skylight. By the way, I checked the build on version 4.23. With the exception of this bug, everything works.

have a look at this:
iblreflection.png

  1. that’s your reflected skylight. that’s correct behavior
  2. things are dark here because the reflection shows the interior, but the interior is no longer affected by the skylight (because the probe is blocking the skylight inside)
  3. things are not dark here because the interior is affected by the IBL lighting

in UE4’s PBR a full-white metal with 0 roughness is a perfect mirror, so the reflection matches 100% what the reflection probe has captured.
in PBR a metal is an object that -only- reflects its environment (and is not affected by direct or indirect lighting, except to reflect the actual light), while a non-metal is affected by its lighting -and- can reflect on top of that.
in vanilla UE4 without IBL it works the same way, that’s just how PBR works. here’s a sphere with full-white color, metallic set to 1 and roughness set to 0:

I guess the confusing part for you is why the reflected interior is so dark, when the actual interior has some ambient lighting applied (from the IBL).
you should understand that the reflection probes are captured -without- the IBL lighting applied (otherwise re-capturing them would stack up the lighting, so every time you would recapture you would get a brighter result). therefore the -applied- IBL lighting does not appear on reflections. since IBL is made specifically to block the exterior skylight on interiors covered by reflection probes, the interiors’ ambient light will always be black.
for interiors the correct workflow would be to add actual lights, or alternatively to reduce the reflection probe’s IBL contribution to allow some of the skylight to affect the interiors.

hope that clears it up

[edit]
on second thought, I suppose for metals I could add the blurred reflection on top of the regular reflections which would fake them reflecting the IBL-affected interiors. as long as I modulate it as to not break the energy conservation law it would still be physically correct and the end result would be reflecting the interior IBL lighting.
I’ll give it a try eventually, but I don’t have time atm. I guess I can do it when 4.24 is out and I work on porting it over

about the 2nd picture, you have your viewport EV exposure set to -10. what’s the bug there?

Thanks for the detailed answer. I understood how it works.
The second picture shows that there is no reflection from Skylight.

It would be amazing. Thank you for sharing such a powerful tool.

As promised posting here.
Running 4.23.1 of release branch integrated with your IBL implementation
Movable skylight + box reflection capture, contribution factor is 1, no matter what brightness I set it changes nothing. In editor everything is just fine, once I go into PIE/standalone game - no skylight override is happening. Re-enabling the feature via console doesn’t affect image in any way.
It happens either with Captured Scene or Specified Cubemap mode

alright @BiggestSmile, I’ll give it a try on 4.23.1 - yeah that means a fresh checkout/implementation on my side :rolleyes:
since no one else reported it to work specifically on 4.23.1 this will also clear up if @JINTECH’s problems are an issue or not
I’ll keep you posted

I have resolved my issue. Not completely sure if I was doing something wrong or it’s just some weird behavior, however, as I’ve seen result in editor I assumed that’s just working okay, however I didn’t do Build -> Build reflection captures. I believe older versions did that automatically? Sorry in case it was only my mistake and nothing else. So, I can confirm it works just fine on 4.23.1

great, you’ve just saved me hours of [my already scarce] free time! :smiley: