Announcement

Collapse
No announcement yet.

Modeling a physically correct street lamp

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

    Modeling a physically correct street lamp

    I am modeling a street lamp blueprint based on an asset I got from the Marketplace

    Since physical light units are now available I decided to give it a shot... First I googled for the actual brightness of a typical street lamp and found a link which gave me a value around 5000 lumens:
    https://www.razorlux.com/how-many-lu...eet-light.html
    So I made it the default brightness value for my blueprint

    This is the blueprint placed on a level. Don't mind the sky/skylight brightness - they are not currently physically correct:

    Click image for larger version

Name:	HighresScreenshot00000.jpg
Views:	608
Size:	411.3 KB
ID:	1692246

    The screenshot was made with EV fixed at -1.2

    Two problems here. First is that the light coming from the lamp appears darker than I can imagine from my experience with street lights. Should I increase the brightness of the lamp or should I lower the EV value instead? I am no expert in neither photography or street lights so it's currently a bit difficult for me to figure out...

    The second problem is figuring out the correct brightness for the emissive material I am using for the lamp itself. I am using both an emissive material because I want the lamp to appear glowing and a spot light since I want it to be able to turn on/off, flicker etc. The question is: for a given intensity of the spotlight how do I calculate the correct brightness of the emissive material?

    PS. I am just a programmer and I have no professional art or lighting experience so I am open to any kind of advice!
    Realistic Atmosphere 2.0 | YouTube | Forum | Marketplace

    #2
    There's a few issues with working in a physical workflow that make it a little more challenging.

    1 - While the bulb may be outputting 5000 lumens, it does not tell you anything about the beam angle(which will increase/decrease the intensity if it's a spot/rect light) or the actual radiation pattern from the bulb and fixture(this is better measured through candelas, but then you would also need the correct IES profile to match the pattern). The inverse square law can also negatively impact the intensity with something like this street light, is your light large enough to hit the ground fully? You also have to take into account that the real world lights are chosen based on the height of the street lamp.
    2 - Physically based lights are real world values, but we're not viewing them with the same dynamic range or white balance that our eyes can do, so immediately things can look different than what you remember. When viewing these, it's better to imagine that you're looking through a high-end camera with 10+ stops of dynamic range.

    Exposure is very important, even more so with physical units, but -1 EV is about right for the situation. I would also take a look at the ground material, it could just be too dark.

    Emissives are a whole separate beast because of the radiation pattern above. Technically they're not going to be one solid intensity, but there's very few measurements for luminance of emitting surfaces and if you use any of the real-world values, you'll probably find them to be super bright(going back to #2). I would say eye ball it with default bloom intensities(or no bloom at all) and find something that feels right for your overall exposure/lighting. It shouldn't be as visually bright during the day, so if your day time exposure and lighting is correct, the emissive should just fall into place. Generally the emissive source is visible long before the emitted light on a surface, so you should see the emissive during most times of the day if it was left on.
    Lighting Artist @ Rockstar Games
    ArtStation
    Twitter

    Comment


      #3
      rosegoldslugs

      Very interesting, thanks for the info!

      The lamp is rather tall - around 9.5 m
      And the material is indeed very dark, here's the original material in both unlit and lit modes:

      Click image for larger version

Name:	HighresScreenshot00001.jpg
Views:	502
Size:	141.1 KB
ID:	1692328
      Click image for larger version

Name:	HighresScreenshot00002.jpg
Views:	413
Size:	116.3 KB
ID:	1692329
      And here's a lighter material:
      Click image for larger version

Name:	HighresScreenshot00003.jpg
Views:	408
Size:	152.8 KB
ID:	1692330
      Looks much better to me already! Don't mind a rather aggressive post-processing

      Emissiveness is where it gets interesting... From what I learned about the physical units in UE4 and how they relate to each other in the real world Emissivity is essentially the total energy divided by the surface area... Please correct me if I am being wrong here!

      This led me to thinking that it's possible to estimate the correct intensity by taking the total energy in lumens and divide it by the estimated surface area of the light source.

      I built a quick setup to test this guess:

      - The first screenshot shows the standard Sphere used as a light source. The emissive intensity of the material is 1000 and the actor has the "Use emissive for static lighting" enabled.
      - The second shows the same Sphere but with static lighting from the material disabled. Instead it has a PointLight component with the energy 3141.59 lumens and the Source Radius is 50. Mobility is set to Static.
      - The third shows the same Point Light setup but Mobility is set to Stationary.

      EV is fixed at 5 for all three

      Click image for larger version

Name:	ScreenShot00000.jpg
Views:	404
Size:	82.8 KB
ID:	1692331
      Click image for larger version

Name:	ScreenShot00001.jpg
Views:	410
Size:	79.2 KB
ID:	1692332
      Click image for larger version

Name:	ScreenShot00002.jpg
Views:	403
Size:	83.1 KB
ID:	1692333
      As you can see there are tiny differences (possibly introduced by the Lightmass) but the overall brightness is very close!

      However when I tried the same approach with the street lamp BP the emissive intensity of the material ended up being waaaaaaaaay to big! It was so bright actually that it led to the annoying flickering... So I reverted back to using eyeballed values...

      From your explanation I get it that the reason might be the fact that UE4 models the behavior of a camera rather than a human eye. It also appears to me that the eye has a wider range of luminance that it can see simultaneously on the same image (though I am not really sure about it so please correct me if I am wrong!) which led me to the question: is it possible to configure the tone mapper so that it accepts a wider range of luminance values without making them too bright? Or I am even thinking in the right direction?

      Thanks in advance!
      Realistic Atmosphere 2.0 | YouTube | Forum | Marketplace

      Comment


        #4
        For the emissive mat I would suggest using the inverse of a fresnel node to make the edges less bright then the center when the camera is looking at it.
        Or even the opposite (a straight up fresnel node). It depends on what effect you are trying to achieve (eye sight vs camera lense).

        re the tone mapper, you should be able to map whatever with a lot table. Generally though, the epic docs (and workers) focus on physically accurate stuff. So maybe you don't necessarily need to mess around with that at all.

        Personally, I would get a couple reference photos of the exact location I intend to mimic at an exposure I choose with an ISO I choose (the more variables you control them more you can emulate in game via camera settings).
        if going for 100% accuracy, this should also be done with the color mapper table, a chrome sphere and a gray sphere to balance the in engine values properly.
        (In fact, to get the light angle of the light and brightness, this would probably be the best way to get accurate results that you can then simulate in engine)


        all of that would have to be done prior to eyeballing the light. And just to explain the proper procedure would take up to an hour or so... (there should be content to this regard within the academy though).
        Last edited by MostHost LA; 11-28-2019, 09:48 PM.

        Comment


          #5
          The eye sees in a much higher dynamic range than what is physically possible to display, plus we're displaying in a much smaller color gamut than the total human vision. And we're limited to exposure across an entire frame compared to our eyes adjusting per-pixel(...if pixels were in the real world )

          The ACES tonemapper has a few controls you can adjust so the final output has a different tone curve, if you'd like. By default it's close to the reference ODT/RRT * 1.5, so it's a little brighter than reference. You can adjust the shoulder if you'd like to get whites to clip more, the toe to give more range to blacks, or the slope for the contrast between the two, or you can fine individual areas with the post-process color correction which happens before tonemapping.

          As for the emissive intensity, what you're saying sounds correct, although as you've found it's kind of hard to work with. I've had decent luck when doing individual bulbs with an equation provided by Peter Hiscocks, but it assumes the emitted source is a perfect sphere that emits light equally in all directions, which is almost never the case. It's given me decent starting points that expose well in numerous situations. There should be an equation in this paper, but the rest of it is good to read as well! https://www.ee.ryerson.ca/~phiscock/...ce-notes-2.pdf
          Lighting Artist @ Rockstar Games
          ArtStation
          Twitter

          Comment


            #6
            rosegoldslugs

            Thanks for the paper!

            Found some interesting info in it... It contains a chart with typical luminance values for different light sources. So a typical low pressure sodium lamp (a yellow street lamp) has a luminance of 75000 cd/m2 which is even higher than my estimate value of 35000 cd/m2 that I tried to use on the lamp I am making and even that was too much

            This page states that the pixel luminance unit in the engine is cd/m2
            https://docs.unrealengine.com/en-US/...its/index.html
            Originally posted by rosegoldslugs View Post
            The eye sees in a much higher dynamic range than what is physically possible to display, plus we're displaying in a much smaller color gamut than the total human vision. And we're limited to exposure across an entire frame compared to our eyes adjusting per-pixel(...if pixels were in the real world )
            Aha! That! So the eye adjusts per-pixel as opposed to the camera adjusting to the overall luminance? Isn't that exactly the issue that HDR photography attempts to overcome? I wonder if something similar is possible in the UE... Ideally I would like to have a brightness distribution on a night-time scene similar to what is called Natural tone mapping in the Examples section of the Wikipedia page on HDR imaging: https://en.wikipedia.org/wiki/High-d...aging#Examples
            Realistic Atmosphere 2.0 | YouTube | Forum | Marketplace

            Comment


              #7
              God of War did localized tonemapping/exposure, but it also has it's issues like halo-ing artifacts from the bilateral filter. I haven't seen anything similar since then though, most studios just switch to ACES for it's benefits with HDR. Brian Karis talks a bit about it on his awesome stream

              And yeah luminance is measured in cd/m², illuminance is in Lux
              Lighting Artist @ Rockstar Games
              ArtStation
              Twitter

              Comment

              Working...
              X