In HDRP, the unit of light intensity for a directional light is “lux”. According to Wikipedia, lux is defined as “one lumen per square metre”. Examples measurements of lux in different circumstances:
When creating a new scene in Unity in HDRP, the directional light intensity is set to PI (3.141593), which according to this table equals something like civil twilight.
The sample scene in HDRP has a directional light with an intensity of 10, which is something between civil twilight and “public areas with dark surroundings”.
The FPS sample project has a directional light source of 1,000 lux, which equals an overcast day/TV studio lighting. The entire scene is actually completely white unless a strong auto exposure is used.
None of these are even close to the true lux of sunlight. When trying to use a realistic value, the scene becomes so bright that even with maxed out auto exposure settings, it’s essentially just white.
My questions is this:
Why these intensity values?
All these values (3.14, 10, 1000) are not physically accurate and seem rather arbitrary. If just taken out of thin air, why 1000 and auto exposure settings for that value rather than 10 and auto exposure settings for it? Is there any guide or best practices regarding lighting in HDRP? It all seems so confusing and arbitrary from the examples I’ve seen.
Wait for the upcoming HD Postprocessing which will implement physical camera properties. You will be able to use proper lux values with proper exposure settings.
Regarding learning about physical light unit I recommend this talk form lighting in mirror edge 2 (based on frostbite and first game to really use our physical light unit). It explain why using correct value for sun is hard.
The main issue we have currently in Unity is that we miss pre-exposure and a correct auto-exposure that can span the range of real dynamic range. This is what is coming with Postprocess stack V3 and the result is that currently we must use wrong value that make no sense so users don’t open a scene that is fully white…
So the default of PI is due to this. Ideally we would like to default to 100 000 lux but we can’t, and in practice we rather use 20 000 (see mirror edge talk).
Why PI ? Because we use explicit Lambert formula (albedo / PI) instead of implicit (albedo) of builtin unity.
And PI is of course not a right value but as we are sit on top of Unity, and as Unity was defaulting to 1, we are a bit in a trap and need to follow that path. The template of HDRP is at 10 for the reasons explain above, currently we can’t use correct value or we will be fully white.
I’ve faced this issue by default in 2019.2.2f1 and HDRP 6.9.1. Completely blown out white scene by default. What is the proper way to make sure everything is balanced as it should be, setting the light intensity far lower than lux values?
Lights will have to be adjusted accordingly
Everything should render as you are used to in the Builtin Render Pipeline or LWRP. Note using it this way you are in charge of calculating your own light intensities instead of using physical values.
Open the Render Pipeline Wizzard and let it set up the defaults for you. Window → Analysis → Render Pipeline Wizzard in 2019.3 and HDRP 7.x.x This is in Window → HD Render Pipeline WizzardSelect Fix All
Create a new scene and you should get a default scene with a lighting setup (The Lighting there isn’t physically accurate but it gets you setup)
Change the values to whatever needed depending on the scene.
For the HDRI Sky or Physical Sky Exposure value - Wikipedia (Scroll down to the Chart Labeled Lighting Condition)
For the Exposure/Scene Exposure
If you set it to Fixed then use the same value as the Sky EV/Exposure Value
If it’s set to Automatic then set the Limit Max to the Sky EV and the Limit min to the brightest you want the darkest area in your scene to be. (If you aren’t sure yet leave it at default)
With all that done you have fairly physically accurate lighting.
I am new to unity. I am an architect and I am using unity to conduct a research experiment. I need to evaluate the lighting level on a surface now that I have set up my scene. Does anyone have any idea how I can do that?
I am not using HDRP but I realize it works with physical light values, should I switch to that?
I need lux values or values that I can rely on to translate them into lux.
I will be grateful if anyone could help me
I also recommend URP if you want to target general mobile devices such as working in the field with an ipad or something.
Both pipelines are PBR and backed up with shadergraph. HDRP is very high end presentation with raytracing support (new nvidia cards only) and URP will run on anything…
Both happily support PBR and baked lighting though.
Not exactly, there is 2 debug mode in the Render Pipeline debug that is: Lux meter and luminance meter.
You can enable one or the other, then with the color picker mode you will be able to read the value on the screen for both of this mode. So it is per pixels and not per area.