Announcement

Collapse
No announcement yet.

Luoshuang's GPULightmass

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

    Better ask for 4.21 we'll need that one quite soon!

    Comment


      Originally posted by Luoshuang View Post
      I've uploaded a new version of unified settings to fix the quality problem.

      Also, for source integration:

      [ATTACH]n1529967[/ATTACH]

      Two files in the zip: Engine\Source\Programs\UnrealLightmass\Public\SceneExport.h and Engine\Source\Editor\UnrealEd\Private\Lightmass\Lightmass.cpp.
      You need to either replace the two files, or use a diff tool to apply the patch to your source build. The change is about copy dependencies and reading ini files.
      Would this work for 4.20.3 (installed with Epic Games Launcher, non-source build)?

      Comment


        Originally posted by Rbn_3D View Post

        Would this work for 4.20.3 (installed with Epic Games Launcher, non-source build)?
        2 posts up.
        It works just fine for 4.20.3

        Comment


          thx Loushuang. using unified settings(128/32) and seems not issue with emissive materials.

          Click image for larger version  Name:	gpulightmass.jpg Views:	2 Size:	89.5 KB ID:	1545484
          Attached Files
          Amberify Asset Pack | UE4.18 / 4.24
          Neonfiy Asset Pack | UE4.18 / 4.24
          Kinetica Asset Pack | UE4.23 / 4.24

          Comment


            I'm getting a crash when GPU Lightmass is about to start. Any ideas?

            System is Windows 7 64 bit, GTX 1070, latest NVidia drivers (CUDA 10.0.132), and I did set the TdrDelay (and restarted the computer). UE4.20.3. Already cleared Lightmass cache. Started the editor in Admin mode.

            Code:
            [2018.10.31-01.24.08:784][702]=== Lightmass crashed: ===Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0xe78f0000
            Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0xe78f0000
            
            0x000007fea24dadb0 nvcuda.dll!UnknownFunction []
            0x000007fea24daf8b nvcuda.dll!UnknownFunction []
            0x000007fea25c449f nvcuda.dll!UnknownFunction []
            0x000007fea26bc6b8 nvcuda.dll!UnknownFunction []
            0x000007fea25c4e6c nvcuda.dll!UnknownFunction []
            0x000007fea249d6c4 nvcuda.dll!UnknownFunction []
            0x000007fea24a22e6 nvcuda.dll!UnknownFunction []
            0x000007fea249ab1a nvcuda.dll!UnknownFunction []
            0x000007fea2624172 nvcuda.dll!UnknownFunction []
            0x000007fea469dbd5 GPULightmassKernel.dll!UnknownFunction []
            0x000007fea469f093 GPULightmassKernel.dll!UnknownFunction []
            0x000007fea469db6a GPULightmassKernel.dll!UnknownFunction []
            0x000007fea4693c5c GPULightmassKernel.dll!UnknownFunction []
            0x000007fea4693cd9 GPULightmassKernel.dll!UnknownFunction []
            0x000007fea4692882 GPULightmassKernel.dll!UnknownFunction []
            0x000007fea46aabff GPULightmassKernel.dll!UnknownFunction []
            0x000000013f5ff6bb UnrealLightmass.exe!UnknownFunction []
            0x000000013f5b6bf9 UnrealLightmass.exe!UnknownFunction []
            0x000000013f57e141 UnrealLightmass.exe!UnknownFunction []
            0x000000013f52e45c UnrealLightmass.exe!UnknownFunction []
            0x000000013f551632 UnrealLightmass.exe!UnknownFunction []
            0x000000013f572dd7 UnrealLightmass.exe!UnknownFunction []
            0x000000013f60a0e8 UnrealLightmass.exe!UnknownFunction []
            0x00000000778059cd kernel32.dll!UnknownFunction []
            0x000000007796383d ntdll.dll!UnknownFunction []
            
            [2018.10.31-01.24.08:784][702]*** CRITICAL ERROR! Machine: USER-PC
            [2018.10.31-01.24.08:784][702]*** CRITICAL ERROR! Logfile: UnrealLight_USER-PC_D71F88A0417396A03C9153AF8320F57D.log
            [2018.10.31-01.24.08:784][702]*** CRITICAL ERROR! Crash report: 
            [2018.10.31-01.24.08:788][702]LightingResults: Error: <None> === Lightmass crashed: ===Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0xe78f0000
            Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0xe78f0000
            
            0x000007fea24dadb0 nvcuda.dll!UnknownFunction []
            0x000007fea24daf8b nvcuda.dll!UnknownFunction []
            0x000007fea25c449f nvcuda.dll!UnknownFunction []
            0x000007fea26bc6b8 nvcuda.dll!UnknownFunction []
            0x000007fea25c4e6c nvcuda.dll!UnknownFunction []
            0x000007fea249d6c4 nvcuda.dll!UnknownFunction []
            0x000007fea24a22e6 nvcuda.dll!UnknownFunction []
            0x000007fea249ab1a nvcuda.dll!UnknownFunction []
            0x000007fea2624172 nvcuda.dll!UnknownFunction []
            0x000007fea469dbd5 GPULightmassKernel.dll!UnknownFunction []
            0x000007fea469f093 GPULightmassKernel.dll!UnknownFunction []
            0x000007fea469db6a GPULightmassKernel.dll!UnknownFunction []
            0x000007fea4693c5c GPULightmassKernel.dll!UnknownFunction []
            0x000007fea4693cd9 GPULightmassKernel.dll!UnknownFunction []
            0x000007fea4692882 GPULightmassKernel.dll!UnknownFunction []
            0x000007fea46aabff GPULightmassKernel.dll!UnknownFunction []
            0x000000013f5ff6bb UnrealLightmass.exe!UnknownFunction []
            0x000000013f5b6bf9 UnrealLightmass.exe!UnknownFunction []
            0x000000013f57e141 UnrealLightmass.exe!UnknownFunction []
            0x000000013f52e45c UnrealLightmass.exe!UnknownFunction []
            0x000000013f551632 UnrealLightmass.exe!UnknownFunction []
            0x000000013f572dd7 UnrealLightmass.exe!UnknownFunction []
            0x000000013f60a0e8 UnrealLightmass.exe!UnknownFunction []
            0x00000000778059cd kernel32.dll!UnknownFunction []
            0x000000007796383d ntdll.dll!UnknownFunction []
            Jefferson Pinheiro

            Comment


              Nevermind, turns out the map was corrupted somehow (even though it opens in UEd). I solved it by recreating the map (easy, since almost everything was in streaming levels).
              Jefferson Pinheiro

              Comment


                Originally posted by Ixiguis View Post
                Nevermind, turns out the map was corrupted somehow (even though it opens in UEd). I solved it by recreating the map (easy, since almost everything was in streaming levels).
                Thanks for pointing that out might come in handy some day!

                Cheers.

                Comment


                  I didn't read the whole thread so please forgive me if I say something that goes against your stated intentions.

                  If your goal is simply to get UE4 up-to-date with a GPU scene baker then have you considered going with a CUDA/OpenCL based renderer that's already feature complete and also free and open source.
                  Blender Cycles originally offered a choice between CPU and CUDA rendering for many years and then some engineers from AMD did a partial rebuild that allowed it to work with OpenCL as well.

                  It can take advantage of multiple GPU's and recently gained the ability to split the rendering load between the GPU and CPU for scenes that require extraordinarily large amounts of RAM.

                  So far as I understand it, integrating Cycles into UE4 would be mostly just a matter of building the interface between UE4 and the Cycles stand-alone application. Once that's completed, users would simply have to download the Cycles engine and drop it into the appropriate folder.

                  The official Cycles development team could always use help to improve the engine if that's what you like doing, no pressure

                  Here are some link to show what people have done with Cycles and the last link has some information on how to get started with the Cycles stand-alone application.

                  https://www.cycles-renderer.org/

                  https://www.blenderguru.com/articles...tworks-of-2017

                  https://wiki.blender.org/wiki/Source...les/Standalone

                  Comment


                    Originally posted by marcClintDion View Post
                    I didn't read the whole thread so please forgive me if I say something that goes against your stated intentions.

                    If your goal is simply to get UE4 up-to-date with a GPU scene baker then have you considered going with a CUDA/OpenCL based renderer that's already feature complete and also free and open source.
                    Blender Cycles originally offered a choice between CPU and CUDA rendering for many years and then some engineers from AMD did a partial rebuild that allowed it to work with OpenCL as well.

                    It can take advantage of multiple GPU's and recently gained the ability to split the rendering load between the GPU and CPU for scenes that require extraordinarily large amounts of RAM.

                    So far as I understand it, integrating Cycles into UE4 would be mostly just a matter of building the interface between UE4 and the Cycles stand-alone application. Once that's completed, users would simply have to download the Cycles engine and drop it into the appropriate folder.

                    The official Cycles development team could always use help to improve the engine if that's what you like doing, no pressure

                    Here are some link to show what people have done with Cycles and the last link has some information on how to get started with the Cycles stand-alone application.

                    https://www.cycles-renderer.org/

                    https://www.blenderguru.com/articles...tworks-of-2017

                    https://wiki.blender.org/wiki/Source...les/Standalone
                    Quick question: how is its speed compared to GPULightmass?
                    An example is Unity's recent GPU Lightmapper - while also being GPU-based, it is much slower than GPULightmass
                    EDIT: Unity's videos about their GPU Lightmapper make people hyped, but from my point of view they show a lot of heavy textured scenes and the scene is generally dark which makes it easy to hide GI quality problems. I tested both the Unity's official one and Arthur "Mr. F" Rakhteenko's Bakery- which is a third-party GPU Lightmapper for Unity - in the SunTemple scene, and Bakery performs much better. Also I had a nice talk with Arthur and I've decided to integrate Arthur's ideas about lightmap-space sampling to eliminate lightmap space artifacts.
                    Last edited by Luoshuang; 11-05-2018, 01:28 PM.

                    Comment


                      Thanks mate, I managed to finish a Archviz VR project with your gpulightmass and my clients loved it! Here is a sneak peak. Look at the shadows!! this is amazing and very fast

                      Comment


                        Originally posted by Luoshuang View Post

                        Quick question: how is its speed compared to GPULightmass?
                        I can't answer that yet since I've never used GPULightmass.

                        I'm working on preparing a test scene based on the UE4 example scene named "Advanced Lighting" as a standard that can be used to test different platforms but it's taking some effort. I exported the whole scene to .fbx in one chunk and the UV's ended up a mess so I deleted them and now I'm only a few hours into a substantial rebuild of the scene. Anyways, I did a test render to get an idea of how fast the scene is running so your question isn't left entirely hanging for a long time.

                        The following AO render; with incomplete UV's, 512 samples, no bounces, 190,000 triangles, and a single 8k texture takes 10 mins using an EVGA SC17 1070.

                        If anyone knows of a decent test scene that handles being imported and exported from multiple apps without issues please let me know, I'd rather something pre-made but for now I'll continue working on the one I've been working on. Cheers.

                        p.s. The image uploading tool on this site is giving me substantial grief, it thinks the images I'm trying to upload are much bigger than they really are so I'll just post a link to PasteAll and now I don't have to shrink it down so aggressively. (It's only going to sit there a few months before being automatically deleted)

                        http://pasteall.org/pic/6f2200cf359dc11248640148a4e6122b

                        Comment


                          What's the latest on RTX support? Anyone got it working, or does it still crash?

                          Comment


                            @marcClintDion
                            IMHO Blender Cylces for UE4 is a bad idea - a very bad idea.
                            Blender Cycles is unbiased renderer and has NO GLOBAL ILLUMINATION ( only AO ).

                            GPULightmass (and its predecessor CPULightmass) is better for interior as a biased renderer like VRAY with implemented GI.

                            That is why Cycles gives so many noise on diffuse channel ( only diffuse channel can be compared ) and needs more samples/time to make all clear ( even with current de-nosie alg.).
                            I used many renderers for interiors like Thea, Octane, Cycles. And I quite them for UE4 cuz of GI ( and one bake -> many shots/video = time saving that UE4 gives ).

                            BIASED renderer is best for tasks such as interiors.
                            GPU Lightmass needs only some small fixer like: fixing shadow splotches and maybe a bit improved GI ( or adjustable ) in the matter of brighter bounced rays ( more energy ) to give much brighter interiors if artist needs that. ( I know it is fake but people like it to see that kind of results and it is more like human brain perception (biased gives) that photography (unbiased gives) ).

                            That is my humble opinion in that case.
                            https://www.artstation.com/tomaszmuszynski

                            Comment


                              @marcClintDion
                              Cylces has not at all of global illumination solver.
                              This is just a preset that maximizes the amount of light bounces for every ray type

                              If you enable that preset then your render time should increase drastically.
                              As I said CYCLES is UBIASED and computes every single ray path.
                              And that is why it more faithful to reality. It gives no bias to the scene light ( no bias for bounced light).

                              Typical GI solver works like a mimic of real light bouncing (computation of the surroundings - like light probe in the Blender 2.8 EEVEE ) than computation of every single ray bounce.
                              That is why GI biased renderer is faster and less noisy than unbiased pathtracer.
                              But more fake. But most of us like that fake GI

                              But more professional answer how GI solver works in GPU Lightmass can give Luoshuang

                              EDIT: Some nice video about rendering methods ( btw: GPU Lightmass uses Radiosity GI ): https://www.youtube.com/watch?v=DtfEVO9Oc3U
                              Last edited by Muchasty; 11-06-2018, 10:09 AM.
                              https://www.artstation.com/tomaszmuszynski

                              Comment


                                Originally posted by Luoshuang View Post

                                Quick question: how is its speed compared to GPULightmass?
                                I still haven't tried GPULightMass since my experience with UE4 consists almost entirely on logic/gameplay and such, I barely know anything about standard LightMass.

                                Anyways, here are some screen captures of bakes done with UE4 and Cycles just for your reference.

                                (i) The first image is stock LightMass, I don't know how to use GPULightMass yet .

                                (ii) The second image is the raw Cycles bake.

                                (iii) The final image is Cycles combined with GIMP's Filter->Enhance->Noise Reduction. GIMP is free and open source so using that denoiser code may be an option for you depending on license compatibility.

                                That Cycles+GIMP image is to me the cleanest but a UE4 expert could quickly clean up the mess I made with LightMass.

                                The Cycles render takes 2.7 minutes using a 1070.

                                I'm certain I'll be going for your solution once I figure out how to use it. It looks great, it's fast, and it's integrated into the final destination.

                                (i) http://pasteall.org/pic/3ff8906b8a30...e279e670e87f89

                                (ii) http://pasteall.org/pic/8954a25d9a36...79dfbba7921766

                                (iii) http://pasteall.org/pic/5cf741dd834e...3c9ed21ad87d09

                                Comment

                                Working...
                                X