Announcement

Collapse
No announcement yet.

Lets make Lightmass EPIC (and understandable)

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

    Is there a workaround for point C) at the moment?
    If possible kindly provide us the solution to the - "Light leaks due to spot/point/direct lights in static mode" as I can safely assume that you have already figured it out.
    The light leaks that occur with a stationary spot light come from application of the .1 StaticLightingLevelScale to photon settings. In particular, a ton more photons are emitted at StaticLightingLevelScale .1 and the search distance is decreased. This is supposed to increase the quality of the photon representation, but for some reason (I have not been able to determine) it results in a huge amount of variance / noise / splotchiness. This causes the phantom lights 'light leaks' in your images.

    I simply disabled application of StaticLightingLevelScale to the photon settings in code. You can probably achieve the same workaround by increasing IndirectPhotonSearchDistance by 10x if you use StaticLightingLevelScale .1, effectively canceling out the scale. I have not tested this myself though.

    @ DanielW - As now I am trying to learn Lightmass and Photon mapping deeply, It's kind of a mystery to me, what these settings change (in BaseLightmass.ini or may be in some other config files) when we manipulate them in editor -

    Static Lighting Level scale from 1 to .1

    Indirect Lighting quality from 1 to 10

    Indirect Lighting Smoothness from 1 to .25
    StaticLightingLevelScale - this scales the density of every computation lightmass makes. It has two big noticeable impacts - for final gathering (which computes first bounce GI from lights + sky light direct) it increases the density of light gathers. It won't actually increase the _quality_ of light gathers, just how far apart they are on a surface. This improves contact shadows but explodes your build time. It also increases the density of photons emitted, this is what I disabled in my latest change to work around the phantom lights.

    IndirectLightingQuality - this mostly increases the number of rays traced at each final gather, also known as NumHemisphereSamples in the ini. A value of 10 means 10x more rays and therefore 10x longer build time. You can think of more rays as a higher resolution image being resolved, so it improves the quality of light gathers.

    IndirectLightingSmoothness - we filter between light gathers a bit to hide the last little bit of noise. The default amount of smoothing is quite high, so it can be useful to lower this to get more detailed shadows. Note that smaller values for StaticLightingLevelScale also decrease smoothness, so with a StaticLightingLevelScale of .1 you probably don't need to reduce smoothing anymore. IndirectLightingSmoothness doesn't affect build time.
    Last edited by DanielW; 11-04-2015, 04:29 PM.

    Comment


      i did some tests. there is no skylight in this test. used 2 spot lights front of the windows with projection planes. results:

      Click image for larger version

Name:	1.jpg
Views:	1
Size:	164.6 KB
ID:	1092639

      Click image for larger version

Name:	2.jpg
Views:	1
Size:	133.3 KB
ID:	1092640

      2 hours render time.

      win64 app download: http://we.tl/URPTjvhIWq
      Last edited by unvermelih; 11-05-2015, 03:36 PM.

      Comment


        Thanks for the explanation on those basic lightmass settings Daniel! Appreciate it a lot
        Swarm Agent and Lightmass Troubleshooting

        Comment


          I've made a test scene and played a little bit with skylight. I am really happy with the result.
          Lightmass settings I used:
          static lighting level scale 0.6
          bounces 100
          indirect lighting quality 10
          smothness 0.8

          you can watch the animation in this thread: https://forums.unrealengine.com/show...terior-Archviz

          Click image for larger version

Name:	332d8830949689.563a446def9c7.jpg
Views:	2
Size:	466.2 KB
ID:	1092645

          Click image for larger version

Name:	ef90a930949689.563a446df2c15.jpg
Views:	2
Size:	318.2 KB
ID:	1092646

          Click image for larger version

Name:	6fcad630949689.563a446e0078a.jpg
Views:	2
Size:	262.8 KB
ID:	1092647

          Click image for larger version

Name:	583c9330949689.563a446df0939.jpg
Views:	2
Size:	350.1 KB
ID:	1092648

          Click image for larger version

Name:	223c8a30949689.563b3a33686b6.jpg
Views:	2
Size:	198.9 KB
ID:	1092649

          Click image for larger version

Name:	e5f0fa30949689.563a446de9bfa.jpg
Views:	2
Size:	412.8 KB
ID:	1092650

          Click image for larger version

Name:	61ace930949689.563a446deac72.jpg
Views:	2
Size:	166.0 KB
ID:	1092651

          Click image for larger version

Name:	59affb30949689.563a446decd39.jpg
Views:	2
Size:	183.6 KB
ID:	1092652

          Click image for larger version

Name:	14652e30949689.563a446dedc55.jpg
Views:	2
Size:	212.5 KB
ID:	1092653

          Click image for larger version

Name:	45e9b630949689.563a446deeb53.jpg
Views:	2
Size:	121.9 KB
ID:	1092654

          Click image for larger version

Name:	2d03f130949689.563a446df3b6d.jpg
Views:	2
Size:	188.2 KB
ID:	1092655

          Click image for larger version

Name:	e70fdb30949689.563b3a336722f.jpg
Views:	2
Size:	511.5 KB
ID:	1092656

          Comment


            wow its better than vray,cant wait for your article

            Comment


              and i cant find photon search radius too,any one knows where is that,or does it has another name in ini?

              Comment


                A new test with Raghu scene :






                10 min on a I7-3770K.
                I took into account the explanations of DanielW.

                Editor :

                Lighting Quality : Production
                Static Lighting Level=0.2
                Num Indirect Lighting=100
                Indirect Lighting Quality=1
                Indirect Lighting Smoothness=1


                BaseLightmass.ini :

                [DevOptions.PhotonMapping]
                NumIrradianceCalculationPhotons=2000
                IndirectPhotonSearchDistance=1000

                [DevOptions.StaticLightingProductionQuality]
                NumHemisphereSamplesScale=100
                NumDirectPhotonsScale=1
                NumIndirectPhotonsScale=1
                NumIndirectIrradiancePhotonsScale=1
                AdaptiveBrightnessThresholdScale=.01


                This is a lot faster than anything I tested so far.
                (Depending of the scene and without the futur "skylight portal", the NumHemisphereSamplesScale may need to be increase even more)

                PS : Please, can someone at Epic do something for the really ugly temporalAA implemeted in 4.9 (I try 4.10 preview and it's the same thing).
                Last edited by koola; 11-05-2015, 09:33 AM.
                ____________________________________________________________
                https://twitter.com/Koola_UE4

                Comment


                  Originally posted by koola View Post
                  A new test with Raghu scene :






                  10 min on a I7-3770K.
                  I took into account the explanations of DanielW.

                  Editor :

                  Lighting Quality : Production
                  Static Lighting Level=0.2
                  Num Indirect Lighting=100
                  Indirect Lighting Quality=1
                  Indirect Lighting Smoothness=1


                  BaseLightmass.ini :

                  [DevOptions.PhotonMapping]
                  NumIrradianceCalculationPhotons=2000
                  IndirectPhotonSearchDistance=1000

                  [DevOptions.StaticLightingProductionQuality]
                  NumHemisphereSamplesScale=100
                  NumDirectPhotonsScale=1
                  NumIndirectPhotonsScale=1
                  NumIndirectIrradiancePhotonsScale=1
                  AdaptiveBrightnessThresholdScale=.01



                  This is a lot faster than anything I tested so far.
                  Koola stamp of approval!

                  Did you try to build lighting using high/medium quality?
                  I'm really curious to compare render time vs lighting quality, Rafareis got me curious since he bake everything usually using Medium lighting quality.
                  ENTER REALITY

                  VR Solutions

                  Contact us for more informations

                  Comment


                    where is my post? why not publishing ??

                    Comment


                      My 2c to DanielW or any developer working on this.
                      I was overwhelmed by the amount of settings that exist for lighting up a scene when I started digging into UE4. Rendering engines have moved on from the old hackish methods of lighting, to an easier and more modern approach, unbiased and physically based lighting. I dream one day that we have something similar in unreal. I know lighting in a game engine is wildly different from a ray tracer, but at least moving to that direction is what I'm proposing.

                      I've read through most posts in this thread and they always seem to be "Hey I tweaked this and I changed that and I don't know what it is or what it's supposed to do, but I got this awesome result." We are all looking for the magic numbers that give us the best results, but I think I'm speaking for everyone when I say we desperately need to know why the numbers work and if we can do without changing parameters we don't understand or are too technical.

                      Quite frankly, i wonder how have many good-looking games nailed the lighting with such huge number of settings and sparse documentation. UE4 is a great engine, the pricing model is a dream come true for an indie like me, but I feel this area needs some love and attention.

                      Comment


                        There are many settings because this engine can be used to make almost everything, from AAA games to small mobile games. It's a jack of all trade engine. It's nothing like an offline renderer specialized in architectural viz like Corona, for example.

                        The real thing is to learn how photon mapping works. I'm sure that more than half of us never ever read anything about photon mapping! That would be a great place to start (Rafareis123 posted a .pdf document about it in this thread).

                        I highly doubt Epic is going to change lightmass at all and afaik pretty much all engines use the same principles (photon mapping, lightmaps). I even think unreal is more user-friendly than it's competitors!!!

                        A 1-click solution, easy to master, would be to use something like Lumion. But Unreal can do so much more than that, hence the complexity and the limitations of it's ''renderer'' and the multitude of settings.

                        Comment


                          Hi Guys,

                          I think we're getting a little off track.

                          Raghu started this thread so we could sort out problems that currently exist with GI - specifically with SpotLights and Skylights. In doing so, he has helped Daniel successfully (I think?) indentify 'bugs' and the issues we're facing transitioning from our ArchViz workflow.

                          I dont think it's really a thread for 'workarounds' or discussions on how to make it more user friendly for us. Perhaps it's best to highlight those specific issues in a seperate thread and leaving this for resolving the issues highlighted by Raghu initially.
                          Last edited by Mr.Snrub; 11-06-2015, 01:11 AM.

                          Comment


                            Understanding "Scale" suffix.

                            @DanielW - Again thank you very much for explaining the working of those values (Post # 166).

                            I think we are nearly there to understand the internal workings of Lightmass (of course also waiting for Rafaeis123's guide). As usual I have few more questions .

                            I have created few visual notes of my general understanding about the working of values in BaseLightmass.ini, need your feedback about the same.





                            Also I tried the Solution of light leaks as provided in post # 166, It's not working as intended.



                            There is no difference at all after increasing the IndirectPhotonSearchDistance Value alone.


                            But Recently when Rafareis123 and Koola Posted their results, they both were using "NumIrradianceCalculationPhotons" in collaboration with "IndirectPhotonSearchDistance". Increasing "NumIrradianceCalculationPhotons" is certainly helping with light leaks a lot. Here are the results -



                            After increasing "IndirectPhotonSearchDistance" to a certain value say 1000, if we also increase the value of "NumIrradianceCalculationPhotons" by say 500 each time (I increased it from 1000 to 2000 in the tests), You sure can get rid of all the light leaks from the scene.

                            @Daneil - Kindly let us know if this is the perfect solution to remove light leaks (combination of "NumIrradianceCalculationPhotons" + "IndirectPhotonSearchDistance")?

                            @rafareis123 and @koola - Thanks for posting your results, I was finally able to remove the light leaks with help of "NumIrradianceCalculationPhotons" and "IndirectPhotonSearchDistance".
                            Attached Files
                            Raghu
                            http://rag3dviz.com
                            HDRI Lighting Tutorial
                            Basic UVW Workflow Tutorial

                            Comment


                              Thanks for sharing you guys, I'll try and post the results

                              Comment


                                Awesome findings and tests- one step closer to demystifying the .ini tweaks!
                                ARTSTATION: https://www.artstation.com/artist/noisestorm

                                Comment

                                Working...
                                X