Announcement

Collapse
No announcement yet.

Luoshuang's GPULightmass

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

    That dude just increased Light Map resolution to 1024 for his walls to have less blured shadow ( more pixels take shadow casting information so the shadow edge will be more defined)
    If you want to have very defined shadows using HDRI you could try also tweak HDRI texture parameters such as Brightness Curve (for contrast) + Brigthness (for lightness).
    https://www.artstation.com/tomaszmuszynski

    Comment


      Originally posted by Muchasty View Post
      That dude just increased Light Map resolution to 1024 for his walls to have less blured shadow ( more pixels take shadow casting information so the shadow edge will be more defined)
      If you want to have very defined shadows using HDRI you could try also tweak HDRI texture parameters such as Brightness Curve (for contrast) + Brigthness (for lightness).
      Light Map res at 1024 = already did that.

      HDRI
      i. brightness curve set to 0.5
      ii. brightness contrast set to 0.5

      I also set the above to 2, still no luck
      Attached Files

      Comment


        I've uploaded the above project if anyone wants to have a closer look at it:
        https://www.dropbox.com/s/q2mnvhjtpj...huang.zip?dl=0

        Comment


          The SkyLIght HDRI is something different that Sphere that you are using for background.
          Skylight is the real emitter but that Shpere is only a background texture put on the huge sphere object to mimic the world.

          Remember that you have to rotate Skylight HDRI via its special rotation parameter called Source Cubemap Angle ( and rotation direction is opposite to the rotation of all objects in scene - surprise ?!!! ).
          If you want to have Sun "visible" via your room hole you need to rotate SkyLight HDRI by using that parameter.

          So if you for example see the Sun on background Sphere map via your hole then try to rewrite Z rotation value form that Sphere to the Source Cubemap Angle with MINUS.
          Then you should see the shadow after bake.

          Unreal is not so easy and full of nasty surprises created in dark developers minds
          Good luck!
          https://www.artstation.com/tomaszmuszynski

          Comment


            Originally posted by Muchasty View Post
            The SkyLIght HDRI is something different that Sphere that you are using for background.
            Skylight is the real emitter but that Shpere is only a background texture put on the huge sphere object to mimic the world.

            Remember that you have to rotate Skylight HDRI via its special rotation parameter called Source Cubemap Angle ( and rotation direction is opposite to the rotation of all objects in scene - surprise ?!!! ).
            If you want to have Sun "visible" via your room hole you need to rotate SkyLight HDRI by using that parameter.

            So if you for example see the Sun on background Sphere map via your hole then try to rewrite Z rotation value form that Sphere to the Source Cubemap Angle with MINUS.
            Then you should see the shadow after bake.

            Unreal is not so easy and full of nasty surprises created in dark developers minds
            Good luck!
            Thank you man, but I've literry done all the above (they are saved on the project file if you wanna have a look).
            I did set the rotation of the "SkyLight HDRI" same with the HDRI rotation.
            Still, no "sun" light from the HDRI.

            How did that guy do it? How do we get HDRI light in? He's using Luoshuangs' scene and his GPU lightmass!

            Comment


              Originally posted by kouropalatisk View Post

              Thank you man, but I've literry done all the above (they are saved on the project file if you wanna have a look).
              I did set the rotation of the "SkyLight HDRI" same with the HDRI rotation.
              Still, no "sun" light from the HDRI.

              How did that guy do it? How do we get HDRI light in? He's using Luoshuangs' scene and his GPU lightmass!
              Here you go dude. The secret is to go into your texture settings (just double click on it in the content browser) and then change the mip gen settings to 'NoMipmaps'. That will prevent Unreal from compressing the texture and it use the full light range in the image (which will give you the sun accuracy you're looking for).

              I did this quick render using GPU lightmass - but remember that GPULM will convert skylights to 'static' if you try and use them as 'stationary', but I don't think you need to worry about that if you're doing a single lighting condition.

              Click image for larger version

Name:	Capture.JPG
Views:	2
Size:	16.2 KB
ID:	1638050

              Click image for larger version

Name:	HighresScreenshot00001.jpg
Views:	1
Size:	35.7 KB
ID:	1638049

              Attached Files

              Comment


                Originally posted by PrizmIzm View Post

                Here you go dude. The secret is to go into your texture settings (just double click on it in the content browser) and then change the mip gen settings to 'NoMipmaps'. That will prevent Unreal from compressing the texture and it use the full light range in the image (which will give you the sun accuracy you're looking for).

                I did this quick render using GPU lightmass - but remember that GPULM will convert skylights to 'static' if you try and use them as 'stationary', but I don't think you need to worry about that if you're doing a single lighting condition.
                What kind of sorcery is this?! Look (the attached image is after production render - I've set the thingy to NoMipmaps

                Is it because of Unreals' version? I'm also using Luos' GPU Lightmass
                Attached Files
                Last edited by kouropalatisk; 07-03-2019, 06:10 PM.

                Comment


                  Originally posted by kouropalatisk View Post

                  What kind of sorcery is this?! Look (the attached image is after production render - I've set the thingy to NoMipmaps

                  Is it because of Unreals' version? I'm also using Luos' GPU Lightmass
                  I suspect you didn't hit save in the top left of you texture editor window before baking.

                  I'm using UE 4.22.3 , but I doubt the version should make a difference here. I've been baking sunlight from HDRIs for a while on older versions than 4.20.x

                  I baked that image using Luos' GPULM too, no difference there.

                  The only other thing I may have done is set the 'EditorSkySphere' you made to 'Movable' so it's not included in the light bake. It should have no contribution to static lighting and should only serve as a realtime background.

                  Comment


                    Originally posted by PrizmIzm View Post

                    I suspect you didn't hit save in the top left of you texture editor window before baking.

                    I'm using UE 4.22.3 , but I doubt the version should make a difference here. I've been baking sunlight from HDRIs for a while on older versions than 4.20.x

                    I baked that image using Luos' GPULM too, no difference there.

                    The only other thing I may have done is set the 'EditorSkySphere' you made to 'Movable' so it's not included in the light bake. It should have no contribution to static lighting and should only serve as a realtime background.
                    Yeah I did save it after I put it on NoMipmaps.
                    Just tried setting the EditorSkySphere to Movable, no change...!

                    Comment


                      Originally posted by kouropalatisk View Post

                      Yeah I did save it after I put it on NoMipmaps.
                      Just tried setting the EditorSkySphere to Movable, no change...!
                      Ha, actually, I was wrong. I just redownloaded your project file and ran a light bake without making any changes and it worked - including the sun light.

                      You should update to the latest version of UE, there may be a bug with the version you have.

                      You should definitely use the 'NoMipmaps' trick in the future though - you probably noticed that your backdrop got A LOT sharper. UE just won't render 4k textures at full rez otherwise.

                      Another tip would be to use this cubemap projection method (below) on your 'EditorSkySphere'. It will mimic your skylight projection accurately (infinitely distant). The one in the original video you referenced fails because it remains fixed to the inside of the sphere it's on, so it falls out of alignment with the light bake.

                      let me know if you're still stuck.
                      Attached Files
                      Last edited by PrizmIzm; 07-03-2019, 06:53 PM.

                      Comment


                        Originally posted by PrizmIzm View Post

                        Ha, actually, I was wrong. I just redownloaded your project file and ran a light bake without making any changes and it worked - including the sun light.

                        You should update to the latest version of UE, there may be a bug with the version you have.

                        You should definitely use the 'NoMipmaps' trick in the future though - you probably noticed that your backdrop got A LOT sharper. UE just won't render 4k textures at full rez otherwise.

                        Another tip would be to use this cubemap projection method (below) on your 'EditorSkySphere'. It will mimic your skylight projection accurately (infinitely distant). The one in the original video you referenced fails because it remains fixed to the inside of the sphere it's on, so it falls out of alignment with the light bake.

                        let me know if you're still stuck.
                        Good morning man.
                        I just tried it with the latest version of UE4 and Luoshs' GPULM but still no luck.
                        Can you please upload your modified to have a close look?!

                        Comment


                          Not sure is this GPU ligthmass affected but I noticed that original lightmass encodes light color info with wrong exponent.(2.2 instead of 2.0)
                          This affect brightness and color saturation quite much. https://github.com/EpicGames/UnrealEngine/pull/6009

                          Comment


                            Originally posted by kouropalatisk View Post

                            Good morning man.
                            I just tried it with the latest version of UE4 and Luoshs' GPULM but still no luck.
                            Can you please upload your modified to have a close look?!
                            Hi kouropalatisk ,

                            I think it's working for you too. Try putting some boxes and columns inside your room and you will see some shadows.
                            In the video and in the scene shown by Prizmlzm, probably they are viewing that "edge shadow" because of a less quality configuration of GPULM. If you set a high preset for it, you won't see that "hard" shadow.

                            Originally posted by PrizmIzm View Post

                            Ha, actually, I was wrong. I just redownloaded your project file and ran a light bake without making any changes and it worked - including the sun light.

                            You should update to the latest version of UE, there may be a bug with the version you have.

                            You should definitely use the 'NoMipmaps' trick in the future though - you probably noticed that your backdrop got A LOT sharper. UE just won't render 4k textures at full rez otherwise.

                            Another tip would be to use this cubemap projection method (below) on your 'EditorSkySphere'. It will mimic your skylight projection accurately (infinitely distant). The one in the original video you referenced fails because it remains fixed to the inside of the sphere it's on, so it falls out of alignment with the light bake.

                            let me know if you're still stuck.
                            Hi PrizmIzm ,

                            Do you mean that, with that material, your SkySphere is auto-updated with the rotation of the cubemap set inside the Sky? But how?

                            Regards!
                            Last edited by Miguel1900; 07-04-2019, 02:44 PM.

                            Comment


                              Originally posted by Miguel1900 View Post

                              Hi kouropalatisk ,

                              I think it's working for you too. Try putting some boxes and columns inside your room and you will see some shadows.
                              In the video and in the scene shown by Prizmlzm, probably they are viewing that "edge shadow" because of a less quality configuration of GPULM. If you set a high preset for it, you won't see that "hard" shadow.



                              Hi PrizmIzm ,

                              Do you mean that, with that material, your SkySphere is auto-updated with the rotation of the cubemap set inside the Sky? But how?

                              Regards!
                              Hey Miguel1900
                              Rendered at MediumQuality, still no shadows from the HDRI amigo. I've also tried it with fastpreview.

                              PrizmIzm could you please upload the modified one as you managed to pull this through?! You'd shed some light in the HDRI matter! (literally)
                              Attached Files

                              Comment


                                Originally posted by kouropalatisk View Post

                                Hey Miguel1900
                                Rendered at MediumQuality, still no shadows from the HDRI amigo. I've also tried it with fastpreview.

                                PrizmIzm could you please upload the modified one as you managed to pull this through?! You'd shed some light in the HDRI matter! (literally)
                                No problem, here's the link to the project that my first screenshot came from

                                https://www.dropbox.com/s/8diyip80cd...ang01.zip?dl=0

                                I have no idea where you're going wrong - as I said, I downloaded your project and just ran a lighting build and it worked just fine for me.
                                Could be you've changed something in UE or GPULM configs that has permanently effected your light builds. Maybe consider uninstalling and reinstalling both of them.

                                Originally posted by Miguel1900 View Post

                                Do you mean that, with that material, your SkySphere is auto-updated with the rotation of the cubemap set inside the Sky? But how?

                                Regards!
                                No dude, sorry I worded that badly. It doesn't follow your SkyLight rotation settings - you'd still have to add some extra code to build in the rotation (not sure how you'd code it to follow your SkyLight though). The code I showed there is just the basic formula to get the Cubemap image to project more accurately and not look like it's wrapped around the inside of a smaller sphere (even though it is). I could explain it it more, but it's best just to try it to see what I mean.

                                Comment

                                Working...
                                X