Announcement

Collapse
No announcement yet.

HELP - Baked Lighting Troubles w/ Luoshuang's GPU Lightmass

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

    HELP - Baked Lighting Troubles w/ Luoshuang's GPU Lightmass


    Hi Everyone,


    I've been struggling to fix some lighting issues with my scene. I'm using Luoshuang's GPU Lightmass


    I've got light leaking in the corners of my walls and noise everywhere.

    I've been following mostly the advice from the Unreal Dev Day Montreal Video

    https://www.youtube.com/watch?v=ihg4uirMcec

    and the instructions from videos in the Unreal Online Learning Series

    You can find images of my results and all of my settings below.

    Here's a link to the PDF of the notes I made from the Montreal video here:

    https://www.dropbox.com/s/e59e293smxwt09l/01%20EPIC%20LIGHTING%20%20MASTER%20CLASS.pdf?dl=0


    At this point I'm just so frustrated after following so many different tutorials and advice from online. Every time I attempt some new settings it just seems to make things worse. I must be doing something wrong


    Thanks

    Waqas
    Last edited by artbywaqas; 01-21-2020, 02:24 PM.

    #2
    It appears that ambient occlusion and/or static lighting level scale is creating super soft shadows. I see the light leaks in the corners, and the blotches on the walls, and floor between kitchen and living area furniture. What quality is it all built at? If it's getting that bad of artifacts at High or Production quality, there's certainly problems with the setup somehow, even if it's bug(s).

    I suggest a few things:

    Decrease Indirect Lighting Intensity for Global Illumination by 1-2. Then increase the brightness of the direct lighting in any / all lights.

    Where is the spot light? It has a HUGE attenuation radius mixed with a GIANT source radius for the scene. I recreated it in a template level and it was covering more than the large platform and four walls in the level, which are each obviously larger than your one-room scene there. When the source radius extends to the other sides of polygons' faces (such as the walls, ceiling, floor, etc) it lights those other sides too, so the leaking could be partly from the spot light's radius settings (attenuation could be reduced to 1000 or even 500, while source radius should be within the confines of the walls/ceiling/floor at least).

    Not that it's disallowed or bad by default, but using two different cubemaps for the lighting / occlusion could be messing something up. The skylight has a cubemap, and the ambient cubemap is a different one from that. Try disabling one or the other and see what happens when rebuilding. Then it's a matter of narrowing down why if it resolves anything, so tweaking settings could help. In particular, the ambient occlusion Radius is rather small, while Power is kinda high.

    One more: try setting Skylight num bounces to 2 or 3 instead of 8. The cubemap it's using looks rather bright, so it could be oversaturating the lighting and contributing to the artifacts on walls and elsewhere...possibly also softening the shadows more than is realistic for the scene...unless that's an objective for it.

    Before rebuilding lighting after changes, go to the Build dropdown and select Build Reflection Captures. In addition, go to the Skylight's details and click Recapture under Sky Light just underneath Ray Tracing. Then rebuild. I think it is important to do for mixed lighting (static / stationary) because with stationary lights the direct light is not baked (or rebuilt upon hitting Build). That probably means it is mixing with previous direct lighting / shadowing and could be producing artifacts or results different from what is intended.

    Comment


      #3
      ...he is using GPU lightmass so Lightmass parameters and quality settings specified in the editor are ignored except for Num Indirect Lighting Bounces !!!

      Comment


        #4
        are you sure they're all ignored? I've never used the GPU lightmass.

        Comment


          #5
          Hey thanks for your input guys. Here's what I tried and how it went:

          1- Decrease Indirect Lighting Intensity for Global Illumination by 1-2. Then increase the brightness of the direct lighting in any / all lights.

          It actually didn't seem to make any difference.


          2- Where is the spot light? It has a HUGE attenuation radius mixed with a GIANT source radius for the scene
          the leaking could be partly from the spot light's radius settings (attenuation could be reduced to 1000 or even 500,
          while source radius should be within the confines of the walls/ceiling/floor at least).


          The spot lights are placed outside the windows. I decreased the attenuation. It'd didn't fix the light leaking.. no changes at all!

          3 - The skylight has a cubemap, and the ambient cubemap is a different one from that. Try disabling one or the other and see what happens when rebuilding. Then it's a matter of narrowing down why if it resolves anything, so tweaking settings could help. In particular, the ambient occlusion Radius is rather small, while Power is kinda high.


          I went back and made sure I used the same cubemap in each. I changed the settings too. I'm still getting noise.



          Makigirl - I think that could be the problem and why I'm not seeing much change when adjusting the settings in the editor to try and fix things.


          hmm.. now what?
          Attached Files

          Comment


            #6
            I don't understand why you set up your scene like this... you don't need ant of the spotlights faking lighting!!
            You could light the whole scene up with a single HDRI if you wanted to...

            What I would do is reset all your lighting's settings (you set way too many extra to find the exact cause imo)... delete all the needless spots and extra lights keep the skylight + directional if you wish...
            Set a higher intensity to your sky (and sun), like 3 and build your scene!

            ...regarding the blotches and light leaks:
            Are you using walls with thickness or just planes? Any 2sided materials in the scene? Any light that might intersect with a mesh?

            Comment


              #7
              Originally posted by artbywaqas View Post
              Hi Everyone,


              I've been struggling to fix some lighting issues with my scene. I'm using Luoshuang's GPU Lightmass


              I've got light leaking in the corners of my walls and noise everywhere.

              I've been following mostly the advice from the Unreal Dev Day Montreal Video

              https://www.youtube.com/watch?v=ihg4uirMcec

              and the instructions from videos in the Unreal Online Learning Series

              You can find images of my results and all of my settings below.

              Here's a link to the PDF of the notes I made from the Montreal video here:

              https://www.dropbox.com/s/e59e293smxwt09l/01%20EPIC%20LIGHTING%20%20MASTER%20CLASS.pdf?dl=0


              At this point I'm just so frustrated after following so many different tutorials and advice from online. Every time I attempt some new settings it just seems to make things worse. I must be doing something wrong


              Thanks

              Waqas
              Hey there are several Lightning Methods in Unreal nowadays. I try to sum them up for you:



              BAKED LIGHTING

              1. The standard CPU Lightmass, which builds light into so called Lightmaps. On game runtime the graphics card will just load these prebaked lightmaps into memory. Bcause of this its the most performance efficient method, when you have enouth graphics card memory. In the World settings you find the Lightmass settings. In my cases it works pretty well, if you decrease the Static Lighting Level Scale and Indirect Lighing Smoothness andincrease Num Indirect Light Bounces and Indirect Lighing Quality. If you want even more controls, that are kind of familiar of other Renderers such as Sample values and Bounces you should create a BaseLightmass.ini file in your Project Config Folder and overrite values as you pleased. The other important factor to keep in mind is the lightmap resolution on which the renderer bakes the Lighing Information.The lightmap resolution can be overwritten in the details section of a Mesh. There is also a lightmap density viewmode, to better calculate, if a mesh needs more or less lightmap resolution.

              2.Luoshuang`s GPU Lightmass, which can be nowadays directly installed by this snippet: https://forums.unrealengine.com/deve...11#post1519111
              This rendering solution almost completely ignores the Lightmass Settings in the World section. As i now it takes just 2 values in account, which you can also specify in your DefaultLightmass.ini file. For example:

              [DevOptions.GPULightmass]
              NumPrimaryGISamples=64
              NumSecondaryGISamples=16



              DYNAMIC / RUNTIME LIGHTING

              1. Standard Method of Dynamic Light and Distance Field Shadows
              , are that kind of type that was mostly explained in the masterclass you mentioned. This Type of lighting can be configured in the PostProcessVolume as you did and in the details panel, but is far more inaccurat.

              2. Raytracing, Can be also configured mainly with the PostProcessVolume Settings under the Rendering Tab. It can me further tuned by console Commands such as r.RaytracingReflections ...
              This method delivers decent results and far more acurat than the Standard Dynamic Light Method, but is much more expensive for performance.



              I hope i could clarify some of the main lighing setups and point out where you can find the the important settings for each method.
              Last edited by Lesuge; 01-22-2020, 06:45 AM.

              Comment


                #8
                I suggest not using GPU Lightmass for now, especially after reading @Lesuge's post saying it only takes into account two things (num of GI samples). It's probably best to use the engine's Lightmass until getting a better understanding of how to use GPU Lightmass. There's far more documentation for the normal Lightmass system, and more users are experienced with it to be able to help problem solve. Don't use dynamic lighting for an Archviz scene unless you have the hardware for it, and you know the limitations it involves, such as inaccuracies that may need to be corrected for. I've used it for basic scenes, and it doesn't appear to be highly inaccurate to me unless one or more aspects of the setup is off / wrong. Read the docs on the lights you're using, and make a list of the different limitations and caveats referenced. Then cross-reference the list with your scene, and see what needs changing. It'll be easier to troubleshoot, quicker and more comprehensible to get settings correct, and less vulnerable to not having a clue what to do to get rid of artifacts / issues. I'm going to do the same because there's simply too much information involved to remember it all like an expert, which I'm not yet.

                Why do the light leaks occur primarily in the wall corners? Why is the noise on the walls and floor, yet not on other surfaces? unless I'm not seeing the noise on the other surfaces, it is evident that something is wrong with the light hitting the walls and floor...and light leaks appear to be moreso in the living room area than a few smaller areas that do not have leaking. A couple things I would check are the Lightmass Importance Volume size / location, and Post Process Volume settings for Light Propagation Volume if it's in use (plus size / location, making sure it's around all the geometry and not overlapping at all, and not too close to the exterior surfaces too).

                Comment


                  #9
                  Makigirl - Ok I went back to the 4.23 version of the same project. The settings are pretty much the same but no light leaks?! I double checked and made sure the walls did not have 2 sided materials.


                  Lesuge - I started out following the Montreal Presentation and then went and installed GPU Lightmass. After that I started searching all over trying to fix the problems I was encountering.

                  This project is set up with two separate light scenarios that can be alternately switched on and off.

                  1- Baked Lighting

                  or

                  2- RealTime Ray Traced Lighting

                  Could this be causing problems?

                  preston42382 - Yeah, I'm thinking that's best too to stick to regular baked lighting without using
                  GPU Lightmass. That will be my next step. I went back through the forum posts for GPU Lightmass again and whatever youtube videos I could find but I couldn't find a clear idea of how best to set it up.

                  From what I understand it looks like all you need is the Directional Light for the Sun and the Sky light for ambient lighting? That's all I have now in the scene. All the exterior spotlights are gone.

                  Anyhow not wanting to give up on GPU Lightmass just yet these images show what I got from the same set up with 4.23. I did replace the cube map I had and added a white cube map but only to the sky light this time.

                  Now I've just got noise on everything and the models set to moveable are showing brighter for some reason.

                  I did rebuild the reflection captures. I'm not sure why it keeps displaying that they need to be rebuilt.
                  Attached Files
                  Last edited by artbywaqas; 01-22-2020, 09:39 PM.

                  Comment


                    #10
                    Get rid of GPU Lightmass. Stay in 4.23. Don't use light scenarios at all. Only use one cubemap, specifically the Captured Scene option for skylight. Do not use directional light as the sun. Instead, use it for baked lighting via Lightmass, and change settings for Lightmass in the World Settings. Get rid of ambient cubemap, and use ambient occlusion and non-ray-traced global illumination. Change all models to static until building lighting and not getting half as much noise. Keep skylight for outdoor ambient, and use ambient occlusion for indoor by placing a Post Process Volume within the room and setting its blend radius to go a bit beyond the walls / ceiling / floor...even overlapping the exterior where it would do so. The skylight needs to get filtered with an unbound Post Process Volume surrounding the exterior of the building / interior scene, and changing ambient occlusion to reduce the skylight's intensity with ambient occlusion. I surmise that the noise is from skylight and directional light mixing in such a way that it's not interpolating the samples correctly...hence why it is happening in some areas and not others. Utilize the 2 post process volumes I suggested to tweak volumetric lightmap settings (increase number of samples, decrease memory brick size slightly, and increase spherical harmonic). I did a number of those steps in a basic template scene with no reflection captures and it got rid of noise, artifacts, and shadow problems. It could even be done with stationary instead of static lighting, I bet.

                    Comment


                      #11
                      May I ask why you say 4.24.1 shouldn't be used or is this just for this particular users issues ? No indoors here atm just outdoor terrain maps
                      Solo but Seismic - feel free to apply
                      https://neighborlee1.wixsite.com/theheartseed

                      Comment


                        #12
                        I was thinking to remain in the context of 4.23's mechanisms. There's a number of changes to 4.24 that may not be feasible to contend with in order to get the noise and problems removed from the scene. It's merely a suggestion, not a slam against 4.24. Besides, I was thinking the docs and tutorials online are more plentiful with information that applies to 4.23 than 4.24 thus far since 4.24's release. The new terrain features in 4.24 sound great though. And the sun/sky actor, though I read one user was having a bad experience with the new sun/sky system where they're not able to paint layers because the cursor isn't changing to the paint cursor. However, after asking some questions about it I think it could be due to the absence of setting up target layers, not due to a 4.24 bug.

                        Comment


                          #13
                          ok, I'm back with an update! I got so busy with work and family plus I needed to take a break for a bit


                          So to start off I took out all the Lighting Scenarios and just stuck to one. This time around I found a great tutorial series on lighting interiors by Ryan Manning.


                          https://www.youtube.com/watch?v=371YAnQF73I&t=3s


                          Right now the only light source is the Directional Light for the sun and Sky Light for ambient lighting.

                          Main problems I'm trying to tackle now are the murky areas back in the kitchen, the glowing electrical outlets and the furniture in the bedroom coming out solid black?

                          presto423 I haven't implemented all of your suggestions yet. I want to try to take this step by step and not introduce too many variables if possible.


                          Most of the set up and settings I used are almost the same as Ryan suggests in his videos.


                          So for now this is regular CPU baked lighting in Unreal 4.23
                          Attached Files
                          Last edited by artbywaqas; 02-05-2020, 03:34 PM.

                          Comment


                            #14
                            Overall, the scene looks great so far. I noticed something on the floor under the far back door, looking kinda like a reflection, or possibly noise, but not sure. That's fine regarding my suggestions. I wasn't trying to advise an all at once approach, but I didn't list the suggestions too well. The electrical outlets / light switches are brighter on one side in the first photo. It appears to be light leaking, but what does that really mean anyway?

                            Comment


                              #15
                              Ok, here's where I'm at now. I managed to fix most of the problems I was having before. The materials showing solid black in shadow was a material set up error. The noise on the wall is pretty much gone. I bumped up the Light Map Resolution to 2048 for the floor and ceiling and 1024 for all the walls.

                              Since I got things looking pretty decent I switched back to GPU Lightmass. It was just taking too long to even do preview bakes while trying to fix stuff.

                              Anyhow only problem I have left to fix now is the 'glowing' electrical outlets & switches. As you can see by the image with the numbering even with the same material applied it looks different depending on it's location in the room. I created some walls outside to simulate another room outside to try and fix the light leaking issues which I believe is the cause. There's an image of that too.

                              It seems mostly a problem coming from the left side wall ( if you are standing in the kitchen facing the living room) . I even tried increasing the light maps resolution for these parts ( a recommendation I found on the forums) but it didn't help.

                              The light switches are moveable objects since they are set up to move on/off via BP but even if I go back and place a static mesh with the same or even completely different material it does the same thing. It shows very bright or dark depending on it's location in the scene.
                              Attached Files

                              Comment

                              Working...
                              X