Lighting ratio using physically based light with SkyAtmosphere

Maybe the title looks a bit too broad, but the real question here is: does UE SunLight+SkyAtmosphere+SkyLight reflect the real-world environment lighting ratio, if following PBL concept?

What I mean by real-world lighting ratio is the illuminance ratio between lit and shaded area(with same normal), captured in real-world under different weather condition.

Let’s assume a bright-no-cloud noon day to make case simple. There is quite some literature if I google related words and mostly of them tells you sunny daylight illuminance(lux) will be 100000-130000. A tricky part is about shaded area, there are 20000(https://en.wikipedia.org/wiki/Daylight), 10000-25000(https://en.wikipedia.org/wiki/Lux) and 6000(https://physicallybased.info/ -Sky(clear)). Real value varies a lot depends on weather, sun angle and other factors, but it should be somewhat relative close range on a sunny-no-cloud-noon(sun near zenith) daylight. Reading more articles and seems like 20000-ish is somewhat mentioned the most.

Another strong reference is your website documentation on skyatmosphere(https://dev.epicgames.com/documentation/en-us/unreal-engine/sky-atmosphere-component-in-unreal-engine). “The total Lux on a white diffuse surface with a perpendicular sun at its zenith should be around 150000 Lux. Sky contribution would be 20% of that total.” This suggest sky contribution to be around 20000-25000 lux, and sun direction contribution could be 100000-120000 lux. This will be 1:5 to 1:6 ligting ratio.

Then when we start the engine and do a quick test: set up a scene with sun(128000 lux at zenith)+skylight(real-time capture)+skyatmosphere, and using HDR visualizer to read the illuminance value on a normal-up surface, the number doesn’t really match.(need to mention that the lux meter seems has a bug that force AO to be 0 and gives GI/sky no contribution to its number. I locally fix that and the following number will be under AO=1. DebugProbes.usf: const float IndirectIrradianceAndAO = 0.0f;) 121000 under lit area and 11000 under shadow area. Here I put a small object far from the surface to just hide the sunlight and not affect GI calculation when measure shadow lux. Lux meter is mostly unlated to other post-process effect such as bloom\vignette\exposure but I keep them off/fixed to isolate result better. This will be 1:10 lighting ratio.

So what’s the mismatch here? One further step I do is using path-tracing to cross-validate the lumen GI result, though no lux meter under path-tracing but the result is very similar(using PIX to capture pre-tonemap). Also I checked the renderer sky cube-map. Use HDR value from it and simplified weighted-cos model to calculate the GI, the number also matches. This verified that GI calculation itself is correct. So the issue lands on sky atmosphere/cubemap rendering. Could the default sun+sky parameter doesn’t match a sunny day condition, like some sort of scatter parameter need to be adjusted?

Last comment: here I meat not to talk about final pixel color. For example I can adjust grading or tonemap to bright-up shadow area. I want to know better about how well environment lights works in unreal in terms of physically based lighting.

I haven’t dig deeper into sky rendering code yet but plan to. Also post here to check if any insight and correction on my understanding above could be provided. These information could be crucial to correctly understand PBL in unreal engine.

[Image Removed][Image Removed]

Hello,

Yes, so as you have noticed indeed it is complicated.

First, when lux are measured, it is not clear how energy for different wavelenght are combined? Mean? Max? Because wavelength around the perceptual blue color will have the higher level of energy as compared to R and G and the white sun.

If I disable bloom, AO, have only the skyatmosphere (with multiple scattering factor=2 is also recommend to match better since the MS evaluation is an approximation, not sure if I mention that somewhere), skylight and sun light at 120000lux, I get the following:

  • FIRST IMAGE - 115000 lux on ground sun + sky
  • SECOND IMAGE - 12900lux in shadow. Which is more a 1/10 ratio (similar to what you have found). But if you look at the blue component, it is 25000. Which is more than 20%. And I believe this is kind of expected because the atmosphere mostly scatters the blue.

On top of all that, measurements can be done in places where the is more scattering (dust or pollution or even clouds!). The default model is just a default model, not a reference also. So the best is to get to an ideal but also tweak it to measurement you have done. The skyamotsphere componenent (Mie, Rayleigh) can be changed. And they should to match visual target.

I hope this helps?

Well, I do not know why but I cannot add screenshots… Sorry, but you wil lhave to trust me when it comes to the reported lux above…