Announcement

Collapse
No announcement yet.

Luoshuang's GPULightmass

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

    #46
    Originally posted by Luoshuang View Post
    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.
    Currently all platforms support directional lightsmaps. Haven't seen any case where using normal maps for light bake calculating would result anything but problems.

    Comment


      #47
      Originally posted by Kalle_H View Post
      Currently all platforms support directional lightsmaps. Haven't seen any case where using normal maps for light bake calculating would result anything but problems.
      Still, I don't quite understand what is the use case for using normal maps in baking

      Comment


        #48
        I always assumed Use normal map for static lighting for intended for mobile. But there's a shockingly low amount of results when googling "Use normal map for static lighting", but did find this on Answerhub.



        "This option in the editor is not for just any normal maps in the game. It's for specifically built types where lightmass would need to know how to address.

        As a test case, if you have a cube with all faces using a single smoothing group, but then render out a normal map to achieve sharp faces. Lightmass will need to be told about the normal map to reconstruct that as a cube with sharp faces. This is where this option comes into play."

        -Tim Hobson
        https://answers.unrealengine.com/que...#answer-458430



        So it seems like the feature is there for cases where the smoothing on the model does not look correct unless it has a normal map. With some workflows, that might actually be a common and large issue. But you can also avoid some of those problems by face weighting normals.

        This is something I will be doing some testing with. Boxes with no normal map, baked normal map, weighted normal maps, weighted and baked, with "Use normal map for static lighting" turned off and on.

        Comment


          #49
          I couldn't get Use normal map for static to effect my lightmass bake at all using 4.19.1, stock baker, production settings, 1024 production quality light maps. Maybe I should have tried bigger bevels on the boxes.

          Comment


            #50
            Originally posted by ZacD View Post
            I couldn't get Use normal map for static to effect my lightmass bake at all using 4.19.1, stock baker, production settings, 1024 production quality light maps. Maybe I should have tried bigger bevels on the boxes.
            I believe it is time to summon DanielW for this problem

            Comment


              #51
              Originally posted by Luoshuang View Post

              Still, I don't quite understand what is the use case for using normal maps in baking
              Me neither. When I have tested it I just get horrible shadow splotches.

              Comment


                #52
                Originally posted by Luoshuang View Post

                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!
                That would be great!!


                Originally posted by Luoshuang View Post
                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.
                Thank you! I've seen the command line option, I will try it with the higher resolution lightmaps! ...I'll have to keep in mind this limitation... :S

                Originally posted by Luoshuang View Post
                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.
                Thank you! ...to be honest I get a LOT better bakes with HIGH SPEED already and rarely run into errors! /testing as much as I can in my free time!

                Originally posted by Luoshuang View Post
                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!
                It wasn't a leak it more looked like a surface was getting lighting information when it shouldn't have (or the shape of the light/shadow)... I'm still not sure about that case but will make some changes and will let you know if...

                I have re-baked an old, only HDRI test scene of mine to see the differences... WOW!!! So much more color and direction from HDRI! And ALL those "shadow bleeds" at contacting/touching surfaces are gone!!
                Click image for larger version  Name:	02_1024_gpu.jpg Views:	1 Size:	129.2 KB ID:	1461797Click image for larger version  Name:	02_1024.jpg Views:	1 Size:	114.7 KB ID:	1461798
                Click image for larger version  Name:	03_1024_gpu.jpg Views:	1 Size:	321.6 KB ID:	1461799Click image for larger version  Name:	03_1024.jpg Views:	2 Size:	99.1 KB ID:	1461800
                Last edited by Makigirl; 04-16-2018, 01:06 PM. Reason: grammar! :S

                Comment


                  #53
                  ...and another test:
                  Click image for larger version

Name:	01.jpg
Views:	1548
Size:	314.6 KB
ID:	1461802Click image for larger version

Name:	02.jpg
Views:	1498
Size:	289.7 KB
ID:	1461803Click image for larger version

Name:	03.jpg
Views:	1465
Size:	508.2 KB
ID:	1461804
                  Thank you for giving us the tool to achieve quality!!!

                  Comment


                    #54
                    Just for the record, the light leak problems I have encountered I believe are linked with the spotlight. Light leaks seem to happen where the outer cone of the spotlight intersects the geometry.

                    In regards to the normal map question, I believe it's only useful when using normal maps that add something of value to the surface. Like someone mentioned, when a normal map is trying to "add" more to the shape of a surface. I'm thinking about a tiled floor which normals are used to fake that each tile is rotated, or a more extreme example when a organic shape is decimated and normal maps are used to give it the high resolution look. I think it's much less relevant if the normal map is used for micro details.

                    I do have more questions: Are the light portals taken into consideration? I guess not since it's path traced?

                    Comment


                      #55
                      Hey guys,

                      so I gave it a shot with the high-quality setting and I have to say its pretty awesome already!! There are several things that are super cool with the new progress display, but for bigger projects, the first phase i.e. can get quite long and its not considered in the time remaining...so fairly intransparent. But nevertheless a huge step forward!

                      Sadly, I forgot to turn off "use normal maps for static lighting" so I got a couple of artifacts. I will do a clean rebake tomorrow, but for now here is a first tease!

                      Click image for larger version

Name:	FarronKeepGPU.JPG
Views:	1383
Size:	260.1 KB
ID:	1461985 I will upload some more images and stats when I have a rebake and a bit more time If I remember correctly, this bake took around 1h...maybe a bit less

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

                      Comment


                        #56
                        Originally posted by Daedalus51 View Post
                        Hey guys,

                        so I gave it a shot with the high-quality setting and I have to say its pretty awesome already!! There are several things that are super cool with the new progress display, but for bigger projects, the first phase i.e. can get quite long and its not considered in the time remaining...so fairly intransparent. But nevertheless a huge step forward!

                        Sadly, I forgot to turn off "use normal maps for static lighting" so I got a couple of artifacts. I will do a clean rebake tomorrow, but for now here is a first tease!

                        I will upload some more images and stats when I have a rebake and a bit more time If I remember correctly, this bake took around 1h...maybe a bit less

                        Cheers!
                        Currently the use normal map option is already ignored by GPULightmass so if you see artifacts they are high likely bugs in my program :S

                        Comment


                          #57
                          Originally posted by Luoshuang View Post

                          Currently the use normal map option is already ignored by GPULightmass so if you see artifacts they are high likely bugs in my program :S
                          Ah I see...but dude...HOLY ****! This is ****ing insane! Bake time like...I dunno...3mins? The scene is not mine, I only relit it The details from the windows is just like...I dunno man, I can sleep veeeery well tonight XD

                          Click image for larger version

Name:	Lightmass_GPU_01.JPG
Views:	1322
Size:	166.9 KB
ID:	1462004Click image for larger version

Name:	Lightmass_GPU_02.JPG
Views:	1334
Size:	164.2 KB
ID:	1462005Click image for larger version

Name:	Lightmass_GPU_03.JPG
Views:	1334
Size:	174.6 KB
ID:	1462006Cheers!

                          PS: Lightmap rez is all green...like pretty normal green, so not too dense
                          Check out UNREAL 4 Lighting Academy
                          https://forums.unrealengine.com/show...ng-like-that-)

                          Comment


                            #58
                            Originally posted by Makigirl View Post
                            Click image for larger version Name:	02_1024_gpu.jpg Views:	1 Size:	129.2 KB ID:	1461797Click image for larger version Name:	02_1024.jpg Views:	1 Size:	114.7 KB ID:	1461798
                            Click image for larger version Name:	03_1024_gpu.jpg Views:	1 Size:	321.6 KB ID:	1461799Click image for larger version Name:	03_1024.jpg Views:	2 Size:	99.1 KB ID:	1461800
                            I believe the HDR improvements are from the Lightmass 4.18 updates.

                            GPULightmass shouldn't have any differences beyond the quality, speeds, and feature set.

                            Comment


                              #59
                              Someone please help Luoshuang to add OpenCL support and let EPIC integrate this out of box. GPU speed boost is really amazing. Would be really good if someday baking can use both CPU+GPU at once and CPU as fallback if GPU fails.
                              tox.chat - Skype alternative, fast C/C++, no bloat.

                              Comment


                                #60
                                Originally posted by ZacD View Post

                                I believe the HDR improvements are from the Lightmass 4.18 updates.

                                GPULightmass shouldn't have any differences beyond the quality, speeds, and feature set.
                                I remember I had the same jaw dropping!!

                                Comment

                                Working...
                                X