Announcement

Collapse
No announcement yet.

4.19 Physical Lights

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

    [*]If I knew the HDR sky texture was captured at EV100 10 before, I certainly wouldn't know what it would be after normalization
    ]
    It would be a a luminance matching the defined horizontal illuminance, so direct correlation with physical units is actually brought to the surface.

    Besides, I don’t understand what a HDR image captured at EV10 means for you. Can you describe what this means in terms of hdr pixel intensity? What luminance a pixel set to 21.56,21.56,21.56 means in this case?

    AFAIK the whole point of HDR imagery is to capture the full range of luminance, thus eliminating the notion of exposure entirely ( a pixel value becomes fully linear making abstraction of non linear aspects introduced by cameras). then what is left is a notion of scale, like zdepth or height maps.
    Pierre-Felix Breton

    Sr Technical Product Manager AEC, Unreal Engine Enterprise
    Epic Games - LinkedIn


    Unreal Studio Documentation
    Unreal Studio Technical Support
    Report Unreal Studio Bugs

    Comment


      Originally posted by pf_breton View Post
      solution: internally normalize the input image to force a range from 0 to 1.0, evaluate the Illuminance at an imaginary horizontal plane and scale by a user defined factor, resulting in lux .
      I didn't fully catch that earlier, sorry.

      Originally posted by pf_breton View Post
      It would be a a luminance matching the defined horizontal illuminance, so direct correlation with physical units is actually brought to the surface.
      I think I see what you're saying. I could go outside on a cloudy day with an incident light meter and measure maybe 1,000 lux facing straight up, then capture an HDR panorama of the sky. Back in Unreal the HDR panorama will be normalized and I could plug in my measured 1,000 lux. Right? It's not a bad idea as long as there's still a way to get a sunny and non-sunny texture to use the same scale if I wanted (they would output/measure different results in lux obviously).


      Originally posted by pf_breton View Post
      AFAIK the whole point of HDR imagery is to capture the full range of luminance, thus eliminating the notion of exposure entirely ( a pixel value becomes fully linear making abstraction of non linear aspects introduced by cameras). then what is left is a notion of scale, like zdepth or height maps.
      Correct, any HDR texture used as a light source should have the full range (unclipped, linear), but we still need to know how those pixels relate to real world cd/m2. Most stitching/processing software (such as PTGUI) don't output in absolute luminance as cd/m2, but scale output based on the middle EV or some other scale, so the HDR is already "semi-normalized".

      Originally posted by pf_breton View Post
      Besides, I don’t understand what a HDR image captured at EV10 means for you. Can you describe what this means in terms of hdr pixel intensity? What luminance a pixel set to 21.56,21.56,21.56 means in this case?
      If I shoot an exposure bracket and merge to an HDR, and the middle exposure was at EV100 13 (let's say ISO 100, f/8, 1/160s), I know that there is some relationship between those EV100 13 pixels and luminance. PTGUI says that 1.0 in the middle EV should correspond to white in the output HDR. So presumably I could take 21.56,21.56,21.56 measured in my HDR and scale by 13 EV (*8192, or some number/formula) and get 176,619 cd/m2 for that pixel. (looks like a pixel near the sun)! Another pixel from that HDR might be from the blue sunset sky and measure 0.04 (0.0301,0.0503,0.0860), but when we scale that knowing it was captured at EV 13 we get 327.68 in luminance (246.57,412.05,704.51).

      I'm sure I could be making some wrong assumptions about the math, but when I go through the process on HDRs I've captured with corresponding incident light readings I'm within a stop or two of where I should be. I can also compare to Unreal's procedural atmosphere and check luminance with the pixel inspector, it's close. I'll leave the exact math to the researchers . What I do know is that labeling sky intensity as cd/m2 as it currently is will confuse people. I am glad you folks at Epic are at least trying to figure out ways to make physical lighting units less confusing
      Last edited by william.sch; 10-25-2018, 02:16 AM. Reason: Additional quote added for clarity

      Comment


        I also think we're still talking about two problems. One is to remove the cd/m2 label from the UI (easy). The other is how to make photometric units more artist friendly and scaling these semi-normalized HDRs back to meaningful real world units (difficult).

        Using either method could work:
        • Evaluate the Illuminance at an imaginary horizontal plane and scale by a user defined factor, resulting in lux.
        • Scale the HDR intensity using the photographic settings from when it was captured (only works if you know exactly how it was authored)
        Either way, that scale would need to happen on the texture/skybox material side of things instead of the skylight (as @Daedalus51 mentioned). The best way to make that more intuitive would be if the skylight was visible as a light source instead of requiring a separate Static Mesh skybox.

        Comment



          I think I see what you're saying. I could go outside on a cloudy day with an incident light meter and measure maybe 1,000 lux facing straight up, then capture an HDR panorama of the sky. Back in Unreal the HDR panorama will be normalized and I could plug in my measured 1,000 lux. Right? It's not a bad idea as long as there's still a way to get a sunny and non-sunny texture to use the same scale if I wanted (they would output/measure different results in lux obviously).

          This exactly the way this solution could work.
          Pierre-Felix Breton

          Sr Technical Product Manager AEC, Unreal Engine Enterprise
          Epic Games - LinkedIn


          Unreal Studio Documentation
          Unreal Studio Technical Support
          Report Unreal Studio Bugs

          Comment


            Originally posted by pf_breton View Post

            This exactly the way this solution could work.
            I kinda like it! There is one big BUT from my point of view though....and that is that most people dont have a lightmeter at hand to read the lux when they might capture a sky. Or what happens if you just buy skies from CGSkies.com? You dont know any lux readings as the image data is all you have. So the system needs to work without the need to buy fancy and expensive hardware.

            I think its a great option, but it should be just that...an option. There needs to be a working system that doesnt need you to specify that.

            In Frostbite, its actually that way that the skylight intensity also adjusts the brightness of the HDR image visible on the skydome (hard in Unreal since they are decoupled from each others...both approaches have ups and downs), so they are linked and thats already nice! However, we still only rely on the candela readings from the skydome as the actual candela values mean nothing cause different images could be captured differently. So we often have that situation that one sky is quite bright and another one quite dark and both are set to...like 5000 cd/m2 in the editor. So again, just measure the stuff on the dome directly and be fine

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

            Comment


              People shouldn't be forced to acquire extra hardware and have to capture own hdr sky textures. Because probably 99.95% of them just wouldn't.

              Prior to this new lighting stuff there were still over complicated ways of doing physically accurate lighting in UE4 but still, people just didn't do it, due to it being a complicated process + extra effort.

              If you develop new features for the engine make it usable for everyone in artistic friendly way.
              Last edited by Maximum-Dev; 10-26-2018, 07:42 AM.
              Artstation
              Join the support channel
              Gumroad Store

              Comment


                Originally posted by Maximum-Dev View Post
                People shouldn't be forced to acquire extra hardware and have to capture own hdr sky textures.
                Nobody is required to buy extra hardware, you would be able to use any HDR you want and give it any intensity just like you currently can. You can find reference lux values online and could plug in an appropriate scale factor using that.

                Actually you can already do that by creating a perfect white diffuse sphere and using it as a light meter with the pixel inspector. Measure the skydome's influence on the sphere using pixel inspector, then doing some math and you can derive your skylight's lux (in the direction of the surface normal you sampled from the sphere). Still would be nice if pixel inspector showed luminance in cd/m2 instead of skylights. Example: I sample the top of a diffuse white sphere under skylight only and pixel inspector reads: 318.3 (cd/m2) surface luminace, because the sphere is perfect white diffuse, I can just multiply by pi to determine the skylight's illuminace is 1000 lux, (and if that is too dark or bright from the reference values I'm expecting, I'd have to scale my skybox materials instead of touching the directional light)

                I totally agree some features could still make the process more artist friendly.

                Comment


                  Or what happens if you just buy skies from CGSkies.com? You dont know any lux readings as the image data is all you have
                  no difference as today really... you’ll give an arbitrary lux value just like you’re giving an arbitrary intensity today. The only difference is that with a method like the proposed one, you will be able to have a physical reference if you happen to need one.
                  Pierre-Felix Breton

                  Sr Technical Product Manager AEC, Unreal Engine Enterprise
                  Epic Games - LinkedIn


                  Unreal Studio Documentation
                  Unreal Studio Technical Support
                  Report Unreal Studio Bugs

                  Comment


                    I have question from different perspective.

                    Will we get an Physically accurate procedural atmospheric sky ? Something like current Atmospheric fog, but something that actually outputs real Lux values which can be captured by skylight and which does not require HDRI texture.

                    That would solve at least some of the problems
                    https://github.com/iniside/ActionRPGGame - Action RPG Starter kit. Work in Progress. You can use it in whatever way you wish.

                    Comment


                      Originally posted by iniside View Post
                      Will we get an Physically accurate procedural atmospheric sky ? Something like current Atmospheric fog, but something that actually outputs real Lux values which can be captured by skylight and which does not require HDRI texture.
                      That's exactly what I'm thinking about.After all, how do we create an accurate day-night cycle?You can't find 24h skylight data online.

                      Comment


                        The current Atmospheric model works pretty well, but you just need to adjust your sun intensity based on angle, and probably the atmosphere's Sun Multiplier and other settings too. Finding sky information does seem difficult, but there's some decent reference for sun intensities. Here's one:
                        http://stjarnhimlen.se/comp/radfaq.html#10

                        You can then build angle-based sun intensity in to a blueprint. BP_LightStudio already adjusts color based on angle, so it's pretty easy to apply that to intensity as well.

                        Here's an example using atmosphere to match a photographed HDR, but I had to use a Sun Multiplier of 25.0 to get the correct luminance/illuminace readings.
                        Click image for larger version

Name:	unreal_sky_atmo.jpg
Views:	21
Size:	41.3 KB
ID:	1545001Click image for larger version

Name:	unreal_sky_image.jpg
Views:	33
Size:	67.9 KB
ID:	1545002
                        Last edited by william.sch; 10-29-2018, 01:49 AM.

                        Comment


                          A visual example of using a photographed HDR with photometric numbers in Unreal

                          Click image for larger version  Name:	unreal_lighting_sun.jpg Views:	1 Size:	113.4 KB ID:	1545013Click image for larger version  Name:	unreal_lighting_sky.jpg Views:	1 Size:	109.6 KB ID:	1545012Click image for larger version  Name:	unreal_lighting_both.jpg Views:	1 Size:	105.1 KB ID:	1545014
                          Pixel Inspector luminance readings on white sphere:
                          • sun light only: 4500 (cd/m2) = 14,137 lux
                          • sky light only: 1770 (cd/m2) = 5,560 lux
                          • combined: 6150 (cd/m2) = 19,320 lux
                          These match (close enough to) the illuminace readings I took on location
                          • 18,900 lux in sunlight, facing sun
                          • 5,000 lux in shade, facing same direction
                          • sun+sky - sky = 13,900 sun intensity
                          My actual Sun Intensity is 18,000 lux because its color is very saturated, something else to take in to account.
                          Skylight intensity is at 1.0 "cd/m2", although I still hope they remove the misleading unit label.
                          Pixel inspector show the deepest blue sky at about 720.0 luminance (cd/m2)
                          The skydome material emissive had a multiplier of 23,170 or 14.5 EV.
                          The HDR middle exposure (mentioned earlier) was at EV100 13.32, so I guess you can't just take the EV number and plug it in to your skydome emissive intensity, but it's close-ish. Again the difference is probably due to color saturation. It's always good to have illuminace measurements to be sure, but with most HDRs you'll never know the camera settings or illuminace at time of shooting.

                          The results came out okay. I can use manual exposure or EV100 numbers and it looks pretty close to what I'd expect. Something else to be aware of is I'm not using pre-exposure, so numbers around 65,000+ will start clipping, (at least on my hardware they do).

                          Click image for larger version  Name:	unreal_game1.jpg Views:	1 Size:	114.9 KB ID:	1545015Click image for larger version  Name:	unreal_game2.jpg Views:	1 Size:	101.5 KB ID:	1545016
                          Last edited by william.sch; 10-29-2018, 03:36 PM. Reason: typo fixed on sunlight intensity

                          Comment


                            Originally posted by iniside View Post
                            I have question from different perspective.

                            Will we get an Physically accurate procedural atmospheric sky ? Something like current Atmospheric fog, but something that actually outputs real Lux values which can be captured by skylight and which does not require HDRI texture.

                            That would solve at least some of the problems
                            Yes, sort of. The proposed approach is not incompatible with this at all. And for arch viz, we have a requirement of creating a parametric sky that delivers that. It’s all aligned in the same direction. A procedural Sky is similar to a photographed sky dome from a pixel intensity stand point.
                            Pierre-Felix Breton

                            Sr Technical Product Manager AEC, Unreal Engine Enterprise
                            Epic Games - LinkedIn


                            Unreal Studio Documentation
                            Unreal Studio Technical Support
                            Report Unreal Studio Bugs

                            Comment


                              Being long time Archviz artist, I've found that Atmospheric Fog in UE4 can work pretty well as a replacement for Physical Sky model often found in offline render engines. It unfortunately suffers from two severe flaws:

                              1, Screen space reflections do not work correctly with it, as they need some background geometry to establish depth. This can be partially worked around by introducing giant skybox sphere around your scene, but it often interferes with the Atmospheric Fog look.

                              2, Sun disc drawn on the Atmospheric Fog has completely wrong intensity. I've reported the bug here: https://issues.unrealengine.com/issue/UE-58668 and answer is "Won't Fix"... go figure. So at this time, despite Atmospheric Fog being a better Sky model for Archviz than Preetham or Hosek/Wilkie, it's bugginess and refusal of Epic to address these issues makes it unusable and UE4 will likely require yet another Physical Sky model on top of the existing one instead.

                              By the way, if the intent of the efforts is to make life easier for archviz people, then I would suggest implementing some 1-click algorithm, which would find HDR spots on the HDRI map (above defined intensity threshold), compute their radiance in proportion to the given scale, and automatically create Directional Light(s) with appropriate direction, intensity, color and source angle. That would save so much time.
                              Last edited by Rawalanche; 10-31-2018, 05:26 AM.
                              https://www.artstation.com/artist/rawalanche

                              Comment


                                Is the new "lighting academy" video of physical lighting coming?I need some explanation and you're the best on this

                                Originally posted by Daedalus51 View Post

                                I kinda like it! There is one big BUT from my point of view though....and that is that most people dont have a lightmeter at hand to read the lux when they might capture a sky. Or what happens if you just buy skies from CGSkies.com? You dont know any lux readings as the image data is all you have. So the system needs to work without the need to buy fancy and expensive hardware.

                                I think its a great option, but it should be just that...an option. There needs to be a working system that doesnt need you to specify that.

                                In Frostbite, its actually that way that the skylight intensity also adjusts the brightness of the HDR image visible on the skydome (hard in Unreal since they are decoupled from each others...both approaches have ups and downs), so they are linked and thats already nice! However, we still only rely on the candela readings from the skydome as the actual candela values mean nothing cause different images could be captured differently. So we often have that situation that one sky is quite bright and another one quite dark and both are set to...like 5000 cd/m2 in the editor. So again, just measure the stuff on the dome directly and be fine

                                Cheers!

                                Comment

                                Working...
                                X