Announcement

Collapse
No announcement yet.

Luoshuang's GPULightmass

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

    #31
    Originally posted by thejturner View Post
    Looks amazing! The quality of the shadows is much higher and I notice that you don't seem to get the variations induced by multi-threading. Look forward to trying it out and hope Epic adopts this method officially.
    That would be awesome if they adopted it officially

    Comment


      #32
      Looks amazing, any chance for a source version availability? i would love to give it a try with my gtx1080 but i'm using a custom 4.19.1 built from source.

      Or maybe i can link you the UE4 build on github if you'd rather not share source. Anyway, would love to use your solution.

      Thanks Luoshuang !
      Last edited by MaximeDupart; 04-14-2018, 09:06 PM.
      LinkedIn | Link custom Shaders | Atmosphere Modelisation & Procedural Planets | Distance Matching Locomotion | Nvidia GameWorks builds - 4.19.2 : VXGI2.0, Blast, HairWorks, Flow - Plugins: VictoryBP

      Comment


        #33
        Originally posted by Maxime.Dupart View Post
        Looks amazing, any chance for a source version availability? i would love to give it a try with my gtx1080 but i'm using a custom 4.19.1 built from source.

        Or maybe i can link you the UE4 build on github if you'd rather not share source. Anyway, would love to use your solution.

        Thanks Luoshuang !
        Hi,

        You can just use the binary distribution. Assuming you're not modifying UnrealLightmass, then the only thing you need to add is to modify Engine\Source\Editor\UnrealEd\Private\Lightmass\Lightmass.cpp to include the dependencies required by GPULightmass, build, then copy the files inside the zip except UE4Editor-UnrealEd.dll and the installation is finished:

        search for
        Code:
        const TCHAR* RequiredDependencyPaths64[]
        add
        Code:
        TEXT("../Win64/GPULightmassKernel.dll")
        to the end of the list (don't forget the comma after tbbmalloc.dll!)

        search for
        Code:
        const TCHAR* OptionalDependencyPaths64[]
        add
        Code:
        TEXT("../DotNET/ProgressReporter.exe")
        Last edited by Luoshuang; 06-18-2018, 01:44 PM.

        Comment


          #34
          Originally posted by Luoshuang View Post

          Hi,

          You can just use the binary distribution. Assuming you're not modifying UnrealLightmass, then the only thing you need to add is to modify Engine\Source\Editor\UnrealEd\Private\Lightmass\Lightmass.cpp to include the dependencies required by GPULightmass, and copy the files inside the zip except UE4Editor-UnrealEd.dll and the installation is finished:

          search for
          Code:
          const TCHAR* RequiredDependencyPaths64[]
          add
          Code:
          TEXT("../Win64/GPULightmassKernel.dll")
          to the end of the list (don't forget the comma after tbbmalloc.dll!)

          search for
          Code:
          const TCHAR* OptionalDependencyPaths64[]
          add
          Code:
          TEXT("../DotNET/ProgressReporter.exe")
          Worked Perfectly, thank you Luoshuang !
          LinkedIn | Link custom Shaders | Atmosphere Modelisation & Procedural Planets | Distance Matching Locomotion | Nvidia GameWorks builds - 4.19.2 : VXGI2.0, Blast, HairWorks, Flow - Plugins: VictoryBP

          Comment


            #35
            Originally posted by Maxime.Dupart View Post

            Worked Perfectly, thank you Luoshuang !
            Waiting for your screenshots! =)

            Comment


              #36
              Great results. Can't wait see where this is going. Keep up the good work!
              ArtStation - Portfolio

              Comment


                #37
                Man these shots look already amazing! This is gonna be killer for everyone since usually, people building game environments never got the same lighting fidelity as...lets say archviz people. One big part is of course lightmap resolution, but you cant even bake a game map with static level lighting scale 0.1 and indirect lighting quality 10 in a efficient time frame XD Its okay to wait for 3h for an apartment, but just scale that up with landscape and multiple buildings...its gonna take years to bake XD This will help tremendously with keeping the times in check while boosting the look dramatically! Hype hype!

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

                Comment


                  #38
                  Originally posted by Daedalus51 View Post
                  Man these shots look already amazing! This is gonna be killer for everyone since usually, people building game environments never got the same lighting fidelity as...lets say archviz people. One big part is of course lightmap resolution, but you cant even bake a game map with static level lighting scale 0.1 and indirect lighting quality 10 in a efficient time frame XD Its okay to wait for 3h for an apartment, but just scale that up with landscape and multiple buildings...its gonna take years to bake XD This will help tremendously with keeping the times in check while boosting the look dramatically! Hype hype!

                  /Daedalus
                  Would you like to run some tests with GPULightmass in your scenes to help me catch bugs?

                  Comment


                    #39
                    Originally posted by Luoshuang View Post

                    Would you like to run some tests with GPULightmass in your scenes to help me catch bugs?
                    Man absolutely! I will probably give it a shot with the Dark Souls Environment Iam working on for the Lighting Academy! Nice ruins exterior with quite a bit of vegetation using volumetric lightmaps for static objects

                    Stay tuned! <3

                    /Daedalus

                    EDIT: Regarding quality scaling options...I cant get into much detail here, but what we have exposed is the ray count and a filtering value. If I want to do a preview bake, I set the value to 1024 rays and fitering 1 so it doesnt look splotchy. Once I am happy, I set the ray count to 500 000 or 1mio depending on the map and filter to 0 and thats then final quality. Preview usually finishes in 3mins...the fully quality bakes can take between 2 and 8h depending on map size and complexity.

                    The cool thing here is everyone can decide for themselves whats their final quality visually speaking. Also emissive generates more noise...so if you have a lot of emissive lighting you might need to bake with more rays. Exposing it like this would give you unlimited freedom for quality vs. baking times

                    Last edited by Daedalus51; 04-15-2018, 10:01 AM.
                    Check out UNREAL 4 Lighting Academy
                    https://forums.unrealengine.com/show...ng-like-that-)

                    Comment


                      #40
                      I am not into static lighting at all, but just dropping by say that this work is truly awesome Luoshuang

                      Comment


                        #41
                        Hi!

                        This is INCREDIBLE!! I'm amazed by the speed!! It's like 10 times faster than the CPU version!! You are amazing!! ...first the multi bounce Skylight and now this?! I hope this will be the future!! Thank you Luoshuang!!!

                        I did some testing yesterday (discovered your post too late! )...
                        Click image for larger version  Name:	01.jpg Views:	1 Size:	414.9 KB ID:	1461072
                        Click image for larger version  Name:	02.jpg Views:	1 Size:	362.4 KB ID:	1461073
                        This scene had almost 5000 meshes, HDRI Skylight, Directional light, Point lights and emissive too!
                        Took 22 minutes (!!!) on a GTX1070 /lightmaps from 64 to 2048/

                        I had other tests too and run into some errors...
                        In this scene I run into a "out of memory" error just before the tracing... I had to lower lightmap resolutions... What is the memory limit?
                        I had a scene lit by a HDRI. The result was VERY nice (detailed shadows) but I had white spots close to corners (will post screenshots in a few hours...) ...maybe too few samples?
                        ...and there was another one which turned out completely black... but I will check that again!
                        Oh I did another test this morning with an older lighting test scene from the forum and I got some strange results (will post later, didn't have time this morning)... I had some lighting appearing which I couldn't "trace back"... was not looking real...

                        BUT overall: IT IS AMAZING!!! And SOOOO FAAAAST!!!

                        THANK YOU!!!

                        ps.: What kind of scene/lighting tests would help you Luoshuang?

                        /edit/ I forgot to mention the progress bar! It's so much better than the original (non existing? ) one!! ...and even has an ETA!! So cool!! )
                        Last edited by Makigirl; 04-15-2018, 10:49 AM.

                        Comment


                          #42
                          Originally posted by jojo8026 View Post

                          That would be awesome if they adopted it officially
                          It should support OpenCL by then and then it could be good for integration officially. I just now discovered this thread and wanted to try it but found out it is CUDA only.
                          tox.chat - Skype alternative
                          blender.org - 3D suite

                          Comment


                            #43
                            Thank you! This is looking amazing! Looking forward to see more stuff!

                            Comment


                              #44
                              I have another question, would supporting normal maps for GPU Lightmass make sense? would it use too much GPU memory?

                              Comment


                                #45
                                Originally posted by Daedalus51 View Post

                                EDIT: Regarding quality scaling options...I cant get into much detail here, but what we have exposed is the ray count and a filtering value. If I want to do a preview bake, I set the value to 1024 rays and fitering 1 so it doesnt look splotchy. Once I am happy, I set the ray count to 500 000 or 1mio depending on the map and filter to 0 and thats then final quality. Preview usually finishes in 3mins...the fully quality bakes can take between 2 and 8h depending on map size and complexity.

                                The cool thing here is everyone can decide for themselves whats their final quality visually speaking. Also emissive generates more noise...so if you have a lot of emissive lighting you might need to bake with more rays. Exposing it like this would give you unlimited freedom for quality vs. baking times
                                Currently the reason why the number of rays is fixed is also tied to some algorithm details - but i'll definitely make it changeable in the future!

                                Originally posted by Makigirl View Post

                                In this scene I run into a "out of memory" error just before the tracing... I had to lower lightmap resolutions... What is the memory limit?
                                I had a scene lit by a HDRI. The result was VERY nice (detailed shadows) but I had white spots close to corners (will post screenshots in a few hours...) ...maybe too few samples?
                                ...and there was another one which turned out completely black... but I will check that again!
                                Oh I did another test this morning with an older lighting test scene from the forum and I got some strange results (will post later, didn't have time this morning)... I had some lighting appearing which I couldn't "trace back"... was not looking real...
                                The amount of video memory used is dependent on total number of tris and total number of lightmap texels (i.e. the square sum of lightmap resolution), so it is hard to estimate without seeing those data. However we may still have some hope - did you use the command line baking technique I've mentioned in the tips? It can usually save 1.5G~2G vmem since the editor is not rendering.

                                For the splotches problem, it is very similar to the situation in vray where you have a low subdiv in Light Cache settings and have Retrace set to off. This problem will be fixed next time I change the algorithm.

                                For the light leaking problem, Norman3D have already noticed it in some tests done with me. If you can also provide some simple scene reproducing the bug the it would be very helpful!

                                Originally posted by Norman3D View Post
                                I have another question, would supporting normal maps for GPU Lightmass make sense? would it use too much GPU memory?
                                GPULightmass bakes directional lightmaps which should support normal maps by natural. But if you want the bounce calculation to take them into account or let the result be baked directly into lightmaps then it is not supported, and I probably won't support that since it has been proved to cause many problems unless you are targeting low-end platforms like mobile where directional lightmaps are not supported by the UE runtime.
                                Last edited by Luoshuang; 04-15-2018, 06:22 PM.

                                Comment

                                Working...
                                X