Announcement

Collapse
No announcement yet.

4.19 Physical Lights

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    Hi,

    Some more details on the new exposure settings in 4.19 :

    - The exposure value from the viewport EV100 slider is defined as Exposure​ ​=​ ​1​ ​/​ ​(1.2​ ​*​ ​2^EV100)
    - The relationship with the PPV camera setting is EV100​ ​=​ ​log2(​ ​N^2/t​ ​*​ ​100/S​ ​) where N is the aperture, 1/t is the shutter speed and S is the ISO.
    - The scene color is defined in cd/m², before the exposure is applied. It can be inspected by using the PixelInspector tool.
    - To isolate the effect of exposure on the final color, disable the "tonemapper" post process in the show flags.
    - Directional lights are in lux (lm/m²) and sky lights are cd/m² (as emissive materials).
    - When using the "manual" metering mode, the scene can go dark because the default values define an EV100 of 9.91 (where as most scene are made for an EV100 of -1.2).
    - When using auto exposure with realistic lighting values, increase "Max Brightness" to 10K and "Histogram Log Max" to something like 16. Otherwise, it will go white.
    - Prior to 4.19, the point lights units suggested to be in lumens but it was not in practice.
    - IES profiles work in the unit type of the lights.

    Uriel
    Last edited by Uriel.Doyon; 07-17-2018, 02:51 PM.

    Comment


      #17
      @Uriel.Doyon, Thanks for the explanation.


      If I'm correct, with 100,000 as directional light value and these camera settings the scene should look as bright as a bright sunny day without having to touch compensate exposure. But it looks a lot darker than expected? Having to touch Exposure Compensation means having to eyeball scene/lighting again which defeats the point of having Lux or any other physical values. I'm probably missing something here.

      Last edited by Maximum-Dev; 04-04-2018, 10:03 PM.
      Artstation
      Join the support channel
      Gumroad Store

      Comment


        #18
        Originally posted by Maximum-Dev View Post
        @Uriel.Doyon, Thanks for the explanation.


        If I'm correct, with 100,000 as directional light value and these camera settings the scene should look as bright as a bright sunny day without having to touch compensate exposure. But it looks a lot darker than expected? Having to touch Exposure Compensation means having to eyeball scene/lighting again which defeats the point of having Lux or any other physical values. I'm probably missing something here.
        I have yet to understand the decision of having a needlessly over complicated real world lighting measuring methods in a realtime game engine where the notion of anything related to how real light works in the world is absent in the first place, from true reflections to realtime or even accurate baked GI to bounce lights to true area lights, to shadows and self shadows you name it.

        Even in offline renderers these methods of measurement are rarely used and most of it is eyeballing with approximate exposure values.

        Why take this route? Just keep it simple exposure stops and temperature values (similar to Arnold) only a handful of occasions in the CG world will someone resort to measurements in Candelas and lumens Not even majority of VFX in Hollywood movies or animated films at Pixar use this!

        Everyone is trying now to match realworld settings in a game engine and expecting super accurate results like a camera, well good luck.

        From time and time again as much as i like this engine I am constantly disappointed at the priorities and some of the decisions taken when there are so many basic things that require immediate attention that would actually make a difference.

        Comment


          #19
          I like the direction with the physical units, but like maximum-dev I seem to be be getting unpredictable results even with a simple camera and directional light setup.

          Comment


            #20
            Originally posted by Uriel.Doyon View Post
            Hi,

            Some more details on the new exposure settings in 4.19 :

            - The exposure value from the viewport EV100 slider is defined as Exposure = 1 / (1.2 * 2^EV100)
            - The relationship with the PPV camera setting is EV100 = log2( N^2/t * 100/S ) where N is the aperture, 1/t is the shutter speed and S is the ISO.
            - The scene color is defined in cd/m², before the exposure is applied. It can be inspected by using the PixelInspector tool.
            - To isolate the effect of exposure on the final color, disable the "tonemapper" post process in the show flags.
            - Directional lights and sky lights units are in lux.
            - When using the "manual" metering mode, the scene can go dark because the default values define an EV100 of 9.91 (where as most scene are made for an EV100 of -1.2).
            - When using auto exposure with realistic lighting values, increase "Max Brightness" to 10K and "Histogram Log Max" to something like 16. Otherwise, it will go white.
            - Prior to 4.19, the point lights units suggested to be in lumens but it was not in practice.
            - IES profiles work in the unit type of the lights.

            Uriel
            Hey Uriel,

            thank you so much for elaborating on those implementation details! I have one big chunk of feedback in regards to this

            First of all, clarifying the implementation approach for this clearly helps to understand it, but it doesnt make the whole system more approachable or usable at all!
            Also, I dont really care if this is super accurate math wise or if this is the scientifically correct way of doing it (something you can hear quite often from Epic) because in the end, it all matters NOTHING if the usability is bad and the system makes no sense in comparison to similar and proven systems.


            PLS just make the whole system EV based, for manual camera AND auto exposure! Just give us EV1 - 22 with ISO 100 and 1/125s on the manual camera and make min and max brightness respond EXACTLY the same way for auto exposure. You can set min EV. to lets say 8 and max EV to 12. That should get the job done!

            Also, in relation to why realworld values are great...let me give you the following example:

            I did some lighting on Theed City, Naboo for Battlefront 2. So lets look at a shot here

            Click image for larger version  Name:	BF2_1.jpg Views:	1 Size:	488.6 KB ID:	1455738

            So...this is a sunny setting with pretty strong lighting and a bright sky....so what do I know?

            I know that I need a sunlight intensity of around 125 000 lux
            I need a MAX EV value of around 16 based on the sunny 16 rule
            We also measured sky luminance for different settings so I know that the sky like I want it should be around 5000 cd/m2

            With all this data, setting up the lighting for Naboo becomes a **** cakewalk!

            First, I tweak exposure to be EV 16 and I crank up the sunlight to 125 000 lux. Then, I add an HDRI skydome and turn on the exposure viewmode that has a square in the center of the screen....inside that square, it measures luminance and shows me the value. I look at an average spot on the sky with the square and bump up the sky brightness until the number in the square reads 5000 cd per square meter.

            DONE!

            Now my local lights will AUTOMATICALLY ALWAYS be correct since they use lumens and all these values work in relationship. Now I can focus and the actual ART of lighting instead of getting the **** basics done. This whole thing took me less than 10mins to setup and it looks almost perfect right out of the box!

            So why exactly can't we have something like this? Can anyone give me a really good reason to NOT do this?

            Cheers!
            Last edited by Daedalus51; 04-05-2018, 05:54 PM.
            Check out UNREAL 4 Lighting Academy
            https://forums.unrealengine.com/show...ng-like-that-)

            Comment


              #21
              Wow, i will check out this

              Comment


                #22
                From the HDR visualization chart, it can be seen that the pixel brightness at a distance of 1 meter form a point light source of about 50 lumens , similar to the directional light with an intensity of 3.141593.
                So if the illuminance of the sunlight is 125 000 lux, then the lumen of the point light source is 125,000/50 = 2500 times smaller than it actually is?Or does the HDR visualization now not work at all?
                Last edited by IOchair; 04-05-2018, 07:06 AM.

                Comment


                  #23
                  Originally posted by Uriel.Doyon View Post
                  Hi,

                  Some more details on the new exposure settings in 4.19 :

                  - The exposure value from the viewport EV100 slider is defined as Exposure = 1 / (1.2 * 2^EV100)
                  - The relationship with the PPV camera setting is EV100 = log2( N^2/t * 100/S ) where N is the aperture, 1/t is the shutter speed and S is the ISO.
                  - The scene color is defined in cd/m², before the exposure is applied. It can be inspected by using the PixelInspector tool.
                  - To isolate the effect of exposure on the final color, disable the "tonemapper" post process in the show flags.
                  - Directional lights and sky lights units are in lux.
                  - When using the "manual" metering mode, the scene can go dark because the default values define an EV100 of 9.91 (where as most scene are made for an EV100 of -1.2).
                  - When using auto exposure with realistic lighting values, increase "Max Brightness" to 10K and "Histogram Log Max" to something like 16. Otherwise, it will go white.
                  - Prior to 4.19, the point lights units suggested to be in lumens but it was not in practice.
                  - IES profiles work in the unit type of the lights.

                  Uriel
                  Hey Uriel.Doyon

                  Does that mean that if I have ISO 100 and 1/125s as well as EV 16, I need to set exposure compensation to 11,11 to get the result I expect?

                  Why not build the system in a way that the values above WITHOUT exposure compensation put out what everyone expects?
                  What do you mean most scenes are made for an EV100 of -1.2? Do you mean other tools work that way? Because no one has been building stuff for Unreals new exposure so far...at least to my awareness. Also, if all other people assume -1.2 is the default and everyone is used to these values, why then change it and confuse everyone?

                  And last but not least...why do auto exposure and manual mode work differently, to begin with? That's just basically asking for beef between level lighters and cutscene lighters cause their values don't work together.

                  I am not trying to be bitchy here and I really am sorry if it comes across that way. But I just can't make any sense out of this. I have worked with almost all available engines and some in-house tech as well and I have worked with Unreal 4 since 2011 and I have NEVER come across a system as cumbersome as this cause nothing really relates to each other or to some known good values. Everything is just random eyeballing etc T_T

                  And in regards to physical values in general...here is another example:

                  When I lit the Deathstar for Battlefront 2, a lot of the lighting magic comes from the emissive shapes on the walls. These emissive shapes have a visual emissive value and also actually contribute to the lighting....like lightmass emissive.

                  At first, the level looked super flat and there was not a lot of material interaction with nice roughness and spec on surfaces and characters looked dull as well. The level lighting itself looked kick *** though! So I was like: what the hell is wrong here?!?!?

                  In the end, it turned out to be the emissive values. The thing is, depending on your bloom and exposure settings, emissive value of 5 and 500 can look the same visually....but since we render in HDR, the values are still there even though they might not be visible per so.

                  So what happened was that the emissive visually kinda looked correct, but in relation to physical exposure, it was too weak and this didn't render as strong enough value into the reflection capture. Once I increased the emissive values to be in line with local light lumen values in the level, it visually looked the same, but the HDR values that got captured for the reflection were way higher, thus really pushing the look and making everything come together nicely. Suddenly, I had sexy materials and a lot of interaction

                  That's why I personally believe, physical values "can" be VERY important
                  Last edited by Daedalus51; 04-05-2018, 12:05 PM.
                  Check out UNREAL 4 Lighting Academy
                  https://forums.unrealengine.com/show...ng-like-that-)

                  Comment


                    #24
                    Another small update

                    I just made a new scene, added a directional light with the intensity of 125 000 (thats more or less what I used on Naboo so I know how things have to look)

                    I use manual exposure with these settings:
                    Click image for larger version

Name:	07.JPG
Views:	1
Size:	207.5 KB
ID:	1455897

                    Sooo....if we look at this, can anyone explain how this makes any sense in relation to what Uriel.Doyon has written?

                    Also, the skylight has a brightness of 5 in this shot. How does this make sense if the sun is 125000 lux and the sky 5? Should the skylight not sample the lighting intensity from the skydome and brightness should just be a multiplier of that sampled value?

                    Ouestions over questions here

                    Another thought I am having, cause this smells a lot like the issues the community had when the tonemapper changed...would it not make sense to maybe get feedback from certain experts from the community on some of these topics before implementing them and then everyone is unhappy with the way its done?

                    We have so many professionals in this community that have real world experience with these things and their feedback could prove invaluable before releasing a big change like that.
                    Just some food for thought, cause I for myself would be more than willing to participate in testing things like this before they get an official release

                    Cheers!
                    Check out UNREAL 4 Lighting Academy
                    https://forums.unrealengine.com/show...ng-like-that-)

                    Comment


                      #25
                      I can't upvote Daedalus51 enough! Thanks for pushing the devs, we need to make some sense out of this sooner or later!

                      Comment


                        #26
                        Alright... the last one for today, I promise

                        So I used my little test scene that I showed earlier and reset everything. Then I set my exposure to manual and used the values you see in the image above, but with EV 12 instead, cause the sky is rather cloudy. Then, I set my directional light to be 65 000 lux, cause I know that the sun usually is between 35 000 and 125 000 lux.

                        So far, so good, I can see direct lighting, but the sky is still black. Now it gets interesting! I have an HDRi image as EXR mapped to a skysphere that I capture with the skylight. I bumped up the multiplier in the material until the sky became visible, but how would I know what brightness is correct?

                        So from our measurements, I know that a cloudy sky like this has an average brightness in normal areas (like not where the sun is) of around 2000 candela per square meter. I used the pixel inspector and bumped up the multiplier until I had a lot of spots on the sky that made sense to have this value and it also instantly looked correct. I ended up using 6500 as a multiplier for the EXR which actually does sound quite familiar to me...depending on how the image was exposed

                        Now I recaptured the skylight and did a bake. Everything turned out exactly as expected and that's ****ing great! I am actually really happy that it kinda worked out like that!

                        However, and now we come to the issues I have experienced I had to use an exposure compensation of 2 to get it to look like what feels right to me with those values. So I basically would expect it to kinda look like this but without exposure compensation.

                        Next issue is that a spotlight with 1000 lumens is basically invisible that way! I used 100 000 and it looked correct ¯\_(ツ)_/¯

                        Also, I started experiencing render glitches like extremely noisy and broken looking SSR even on max quality settings, also convolution bloom seems to be badly affected and that's just what I found for now.

                        Additionally, I tried matching auto exposure settings visually to the manual exposure and it turned out to be super weird and unintuitive values like 5200 and stuff like that. The autoexposure also had troubles adjusting to some of the brightness levels on screen.

                        All in all, I am really excited that the exterior stuff seems to "kinda" work with manual exposure, but I am also quite frustrated on how everything else is implemented and how this seems to work
                        It all just seems so weird, unintuitive and overly complicated.

                        Well, lets see if someone will be able to shed some more light on this!

                        Cheers!

                        EDIT: okay, interesting find! The 1000 lumens light was suuuuper dark, so I had to use 100 000 lumens instead. I thought, what happens if I use candela instead? So with a converter, I found out that my 1000 lumens light would translate to 75 000 candela. After I put 75 000 candela into the lights value in Unreal, it actually looked correct! Like what the heck is happening here? XD
                        Last edited by Daedalus51; 04-05-2018, 05:47 PM.
                        Check out UNREAL 4 Lighting Academy
                        https://forums.unrealengine.com/show...ng-like-that-)

                        Comment


                          #27
                          Still toying around with this as well.

                          Using the default atmospheric fog with a directional light at 125,000 and a Skylight capture at 1 gives me something reasonable with 1/125s and f/16 although it's fairly muted and those settings still don't really line up with what has been said already. Measuring the Scene Color(or is it HDR Luminance?) of a pure white plane without the tonemapper doesn't give me the cd/m² results I'd expect. I'm looking at 1.1 with the above settings. I'm guessing that's 1.1 cd/m², or is there is a multiplier and it's really 1,100 or 11,000 cd/m² - the latter seems to be closer to some averages I've found. That's for the Scene Color though, I have a bug now where the Luminance isn't updating at all. Adjusting the skylight anywhere above 1 with these settings results in a poor image, eventually turning pure white with artifacts everywhere. And pre-exposure is enabled.

                          Trying the same thing with a noon HDRI only and the intensity needs to be cranked up to 100,000+ to feel natural, but that blows out the material viewport. Switching the values around and using a default intensity of 1 in the HDRI and cranking up the Skylight works, but then you don't see the sky with the exposure settings.

                          Also with these settings, bloom doesn't work until you crank up the intensity into the thousands or remove the -1 threshold. Planar reflections are pure white planes. And switching between Game Settings and EV16 gives me a white screen until I move in the viewport, despite my sunny 16 settings visually being similar to the EV16 defaults.
                          Lighting Artist II @ Crystal Dynamics
                          Former Lighting Artist @ Obsidian Entertainment
                          ArtStation

                          Comment


                            #28
                            Originally posted by Uriel.Doyon View Post
                            Hi,

                            Some more details on the new exposure settings in 4.19
                            Thanks for those details. Can you tell me the dynamic range that the camera and viewport are using, I know the post processing and tonemapping are done in ACEScg space but what is the bit depth?

                            Comment


                              #29
                              Originally posted by rosegoldslugs View Post
                              Still toying around with this as well.

                              Using the default atmospheric fog with a directional light at 125,000 and a Skylight capture at 1 gives me something reasonable with 1/125s and f/16 although it's fairly muted and those settings still don't really line up with what has been said already. Measuring the Scene Color(or is it HDR Luminance?) of a pure white plane without the tonemapper doesn't give me the cd/m² results I'd expect. I'm looking at 1.1 with the above settings. I'm guessing that's 1.1 cd/m², or is there is a multiplier and it's really 1,100 or 11,000 cd/m² - the latter seems to be closer to some averages I've found. That's for the Scene Color though, I have a bug now where the Luminance isn't updating at all. Adjusting the skylight anywhere above 1 with these settings results in a poor image, eventually turning pure white with artifacts everywhere. And pre-exposure is enabled.

                              Trying the same thing with a noon HDRI only and the intensity needs to be cranked up to 100,000+ to feel natural, but that blows out the material viewport. Switching the values around and using a default intensity of 1 in the HDRI and cranking up the Skylight works, but then you don't see the sky with the exposure settings.

                              Also with these settings, bloom doesn't work until you crank up the intensity into the thousands or remove the -1 threshold. Planar reflections are pure white planes. And switching between Game Settings and EV16 gives me a white screen until I move in the viewport, despite my sunny 16 settings visually being similar to the EV16 defaults.
                              I know this is not accurate, but try adding an exposure compensation of around 1.75 to 2 to your setup! At least thats puts it visually where it needs to be^^ Local lights are still off though if you DONT use my lumens to candela hack I mentioned in the edit of my post above

                              I just finished recording a new Lighting Academy session where I work with my testscene and explain my thoughts and what I like or dislike about how it seems to be implemented right now Its gonna be available tomorrow I guess.

                              Cheers!
                              Check out UNREAL 4 Lighting Academy
                              https://forums.unrealengine.com/show...ng-like-that-)

                              Comment


                                #30
                                @Daedalus51

                                Was trying to find out why scenes look so dark in UE4 with 125,000 Lux, far from looking like a bright sunny day.

                                I wanted to check out how 125,000 Lux would look like in Cryengine (since everything always look fine in cryengine) and find out how much I'd need to touch Exposure Compensation in UE4 for my cube to look like the one in Cryengine, to have correct results.
                                So I setup a 50% Grey (186,186,186) cube in both Cryengine and UE4, with sun intensity of 125,000 and lighting directly from above. Surprisingly both cubes are around 225,225,225 when sampled.

                                So I was wondering why scenes look a lot darker in UE4 while sun has same value in both engines.

                                I bring in a rite color chart in both engines and it turns out to be UE4's tonemapper making values below 50% a lot darker. That's making everything below 50% Grey look extremely dark and making you think there's something wrong with camera/exposure settings and thus, making us think we should use exposure compensation slider but doing that is extremely wrong since that affects values above 50% Grey as well @Uriel.Doyon.

                                Here's the color checker in both engines with no bloom and UE4 vignette turned off and both engine tonemappers at default settings.

                                UE4 (you can see the frame around colors already looks like black but it's actual value is 52,52,52)






                                Cryengine





                                Square 19 actual value is 245, in cryengine it's 243 in UE4 it's 219.
                                Square 24 actual value is 48, in cryengine it's 67, in UE4 it's 27.


                                Now I know how it should look like based on how it looks like in cryengine, if I use PPV and try to compensate for it manually without using that Exposure Compensation slider I end up with way more accurate results.





                                This time:

                                Square 19 actual value is 245, in cryengine it's 243 in UE4 it's 232.
                                Square 24 actual value is 48, in cryengine it's 67, in UE4 it's 70.

                                It was some quick and crazy changes to highlights, midtones and shadows in PPV and didn't touch tonemapper settings. Now it does look like a nice sunny day but still far from how it should've been. You can see text on square 16 is hard to read.
                                ACES is a "Film" tonemapper and I never understood why Epic put it in a game engine instead of something like Hable tonemapper.
                                Last edited by Maximum-Dev; 04-10-2018, 10:59 PM.
                                Artstation
                                Join the support channel
                                Gumroad Store

                                Comment

                                Working...
                                X