Announcement

Collapse
No announcement yet.

Luoshuang's GPULightmass

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

    #46
    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


      #47
      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


        #48
        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


          #49
          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


            #50
            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


              #51
              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


                #52
                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


                  #53
                  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


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

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

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

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

                    Comment


                      #55
                      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


                        #56
                        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:	90
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


                          #57
                          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


                            #58
                            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:	89
Size:	166.9 KB
ID:	1462004Click image for larger version

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

Name:	Lightmass_GPU_03.JPG
Views:	92
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


                              #59
                              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


                                #60
                                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
                                blender.org - 3D suite

                                Comment

                                Working...
                                X