Announcement

Collapse
No announcement yet.

Luoshuang's GPULightmass

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

  • started a topic Luoshuang's GPULightmass

    Luoshuang's GPULightmass

    Click image for larger version  Name:	image_138398.jpg Views:	1 Size:	82.0 KB ID:	1478783

    Disclaimer:

    This is a very simple and early version of my GPU lightmap baker. Don't expect much from it! =)

    Binary Installation:

    4.19.1: https://www.dropbox.com/sh/3issyqm20...f6eEbmKRa?dl=0 [Updated 04/16/2018 18:13]
    4.19.2: https://www.dropbox.com/sh/nkte4fotk...m6dBe-i_a?dl=0
    4.20.1: https://dl.orangedox.com/gjD37r7TcxMV4jqx9U (starting from here it requires NVIDIA driver version >= 398.26)
    4.20.2: https://dl.orangedox.com/P02pizph3hSVF1OtSJ
    4.20.2 Unified Settings: https://dl.orangedox.com/lUSb6PnfVOoyAFcDz3 (see #478 for instructions on how to use)
    4.21.0 Unified Settings: https://dl.orangedox.com/YtozAlX0QCNN57KXT2 (Turing cards support, requring driver >= 411.31, not using RTX)
    4.22.0 Unified Settings: https://dl.orangedox.com/93ekBf83FHfyK0zZbp (FireflyClampingThreshold has been loosened to allow more contrast from skylight and correct brightness for emissives - if you start to see fireflies from sky or emissive you may want to set it to lower values like 10.0 (in BaseLightmass.ini))

    Merge the zip's content with your UE_4.19/Engine folder.
    This installation overwrites your BaseLightmass.ini so you want to back it up if you have modified its parameters.
    • If you want to keep your BaseLightmass.ini, set bUsePhotonMapping and bUseRadiositySolverForSkylightMultibounce to false to avoid CPU computation.
    Sorry for no 4.18 support, since some logic dealing with volumetric lightmaps changes a little bit too much in 4.19.

    Automatic Script Installer:

    Situx has done a nice installer for GPULightmass that checks multiple things to help prevent problems:
    https://forums.unrealengine.com/deve...11#post1519111

    Source (Hybrid) Installation:

    For versions prior to 4.20.2 unified settings, see https://forums.unrealengine.com/deve...65#post1460865
    For 4.20.2 unified settings, see https://forums.unrealengine.com/deve...66#post1529966
    For 4.21.0 unified settings, refer to 4.20.2 but use this one: EngineModification4.21.0.zip

    Limitations:
    • Written in CUDA so NVIDIA only.
    • Supports all 4 standard lights (point, spot, directional and sky)
      • However stationary skylight is not supported so if you have one in your scene it will still be baked since it is treated as a static one
      • Advanced lighting features such as soft shadows (SourceLength and SourceRadius) and IES are not respected when calculating indirect lighting. However you may still see some effect of them since their direct lighting is calculated on CPU
        • According to some tests the direct lighting is low quality sometimes because Lightmass quality level is set to "Preview". While this problem is actually irrelevant to GPULightmass, you'll probably want to set the quality level to "Production" to avoid such kind of mysterious problems.
    • Supports baking of standard surface lightmaps, volumetric lightmaps (also with faster voxelization), and sparse volume lighting samples
    • Lightmass parameters and quality settings specified in the editor are ignored except for Num Indirect Lighting Bounces
      • Current the number of samples (quality settings) is hardcoded in the program and you cannot change it since I haven't found an reliable way to expose them to the user
      • AO Mask generation is not supported
    • GPULightmass should work with Swarm distributed rendering naturally as long as you've correctly set up the environments on all machines. (esp. a sufficiently new NVIDIA driver)

    Useful Tips:
    • GPULightmass uses Brute Force as its Primary GI Engine and some form of radiosity caching as its Secondary GI Engine, which is very similar to vray.
      • Brute force is much more accurate than Irradiance Caching (Lightmass's primary GI engine) but it is also slower. It is also more sensitive to lightmap resolution since it actually calculates each lightmap texel, while irradiance caching is more or less resolution independent. You may want to tune down your lightmap resolutions firstly then slowly tune them up when working with GPULightmass.
      • Comparison of Brute Force vs Irradiance Caching:
      • Click image for larger version  Name:	V1.jpg Views:	1 Size:	121.6 KB ID:	1460558
      • Since adaptively placing more samples around corners (known as Retrace in vray) hasn't been implemented you may see sploches.
    • You can use command line to launch the editor and bake lighting to save GPU resources for GPULightmass, especially video memory.
      • Engine/Binaries/Win64/UE4Editor-Cmd.exe "path\to\your\project\yourproject.uproject" -run=resavepackages -buildlighting -allowcommandletrendering -map=/Game/Maps/MyMap.umap
      • Remember to replace Content with Game in the umap path
    • It is recommended to change Windows TDR settings to prevent the GPU from being timed out (unspecified launch failure and other Error crashes) under heavy workload
    • Some stats:
      • A scene having 30M triangles and 150 1K lightmaps requires 7GB video memory and ~3hrs to bake on a GTX1080
    Change Log:

    [04/16/2018] Fixed attenuation calculation of spotlights
    [04/14/2018] Further improved the adaptive hemisphere sampler to suppress visible artifacts
    [04/14/2018] Fixed issues with sparse volume lighting samples and masked materials
    [04/14/2018] Fixed a bug inside the adaptive hemisphere sampler. The number of samples is also raised. Now GPULightmass runs at Ultra High settings by default, which is a little bit overkill for most scenes.
    [04/13/2018] Added support for sparse volume lighting samples
    [04/13/2018] Fixed a bug which prevents GPULightmass from running on cards that are older than GTX10XX

    Known Issues:
    • Ray hit rejection by LOD/HLOD hasn't been implemented and you may see black splotches where lower LOD meshes poke out.
    How to Get the Best out of GPULightmass:
    • Currently GPULightmass uses all emissive materials in baking regardless of 'Use Emissive in Static Lighting' option. If you see sparkles they are probably from some small bright emissive sources (especially, small LED panels in kitchen). You'll want to use the LightmassReplace material node or set the EmissiveBoost to zero to remove them for GPULightmass. Starting from 4.20 GPULightmass respects 'Use Emissive in Static Lighting' option. However, the idea is to not use any small & bright emissive light sources in GPULightmass. If you want to get rid of sparkles, you can also try tuning down 'FireflyClampingThreshold'.
    • GPULightmass uses 'Two Sided Emulation' on all two-sided materials which could be the reason why people are seeing darken environments and light leaks. Currently the workaround is to turn off two-sided on the problematic materials. See https://forums.unrealengine.com/deve...32#post1477832
    Attached Files
    Last edited by Luoshuang; 04-04-2019, 06:30 PM.

  • replied
    Originally posted by Limks View Post
    After I use GPU render, it's fast but I get these light spot at my wall. Could you help me to fix this?

    Here is the screenshot
    https://imge.to/limks/?list=images&s...te_desc&page=1

    go back few posts earlier:

    https://forums.unrealengine.com/deve...94#post1635994

    Leave a comment:


  • replied
    After I use GPU render, it's fast but I get these light spot at my wall. Could you help me to fix this?

    Here is the screenshot
    https://imge.to/limks/?list=images&s...te_desc&page=1

    Leave a comment:


  • replied
    try to make it work, run it with the script, replace files and it does not work, keep calculating by CPU my current version is 4.22.3

    Leave a comment:


  • replied
    Hi everyone,

    After working on 3D visualisations for a while I have recently worked on an Unrel VR project and I feel quite amazed about the results.

    I was not able to use the GPULightmass yet as my graphic card was not in the list.

    As I want to buy a new computer to improve my workflow it would be great if anyone can give any info about those graphic cards that are in the list for using the GPULightmass.

    Many thanks in advance.

    Harl

    Leave a comment:


  • replied
    Hi,
    I am using the GPU baking function quite often. Due to the change to an Nvidia RTX GPU I have a bunch of questions. I would be very gratefull, if someone can comment or answer them:

    - Will there be a GPU baking version for 4.23 ? I use 4.23 (preview) now, because twosided foliage will be rendered with shadows and ao now in raytracing mode.
    - Does raytracing GI for example "revolution" the way of baking lightmaps? I have not really a clue, but it seems it could speed up this process somehow a lot.
    - When will be the GPU baking officially implemented in the UE4 engine?

    thanx a lot and greetings,
    Ronald

    p.s. the post above mine explains almost everything i asked. Reading makes smarter i guess. ;-(
    Last edited by ron25; 07-16-2019, 10:20 AM.

    Leave a comment:


  • replied
    Originally posted by InXile Entertainment View Post

    For anyone not keeping up with the thread, GPU Lightmass is not longer being developed by Luoshuang. Also, I'm pretty sure he doesn't use that user name anymore. His new user name is YujiangW

    Quote from his post page 78
    YujiangW
    Supporter
    #1156
    06-01-2019, 07:40 AM
    Hi, I'm Yujiang 'Luoshuang' Wang.
    I have open sourced GPULightmass here: https://github.com/AlanIWBFT/GPULightmass
    With the development of an official GPU Lightmass using DXR starting, GPULightmass is in a frozen state now. Its life is up to you community members!

    Ohh thanks a lot for the heads up, man! Really hoping his legacy will be continued!

    Leave a comment:


  • replied
    Originally posted by Jorge Barros View Post
    Hello Luoshuang , great work with this, very much appreciated!
    I would like to ask about compatibility with rect lights, are there any plans for integrating that in the near future?

    Thanks
    For anyone not keeping up with the thread, GPU Lightmass is no longer being developed by Luoshuang. Also, I'm pretty sure he doesn't use that user name anymore. His new user name is YujiangW

    Quote from his post page 78
    YujiangW
    Supporter
    #1156
    06-01-2019, 07:40 AM
    Hi, I'm Yujiang 'Luoshuang' Wang.
    I have open sourced GPULightmass here: https://github.com/AlanIWBFT/GPULightmass
    With the development of an official GPU Lightmass using DXR starting, GPULightmass is in a frozen state now. Its life is up to you community members!
    Last edited by InXile Entertainment; 07-16-2019, 11:45 AM.

    Leave a comment:


  • replied
    Hello

    I would like to share with you my first project Archviz in Unreal Engine

    I'm interesting in receiving all your comments.

    I hope you like it


    https://youtu.be/eF6gibe7qi0

    @Luoshuang
    thanks.
    Last edited by Saturndj; 07-14-2019, 05:15 PM.

    Leave a comment:


  • replied
    did anyone manage to make it work with latest UE 4.23 preview1 ?

    Leave a comment:


  • replied
    Originally posted by zeldads View Post

    They're going to implement their own solution based on Raytrace technologies. It will be a LOT more faster than the actual GPU Lightmass solution based on brute force.
    If you're an Epic Dev (studio working with UE4), you have access to the code and you can implement it by yourself. Otherwise, you will need to wait the next unreal version to get this new lightmass solution.
    Where is the official information from Epic concerning this new GPU light mapper?

    Leave a comment:


  • replied
    Originally posted by Melvixz View Post
    Luoshuang Thanks for this gpu lightmass baker. Was definitely very fast :- )
    what is your GPU?

    Leave a comment:


  • replied
    Hello Luoshuang , great work with this, very much appreciated!
    I would like to ask about compatibility with rect lights, are there any plans for integrating that in the near future?

    Thanks
    Last edited by Jorge Barros; 07-14-2019, 08:08 AM.

    Leave a comment:


  • replied
    this is revolution in light baking.

    Leave a comment:


  • replied
    Originally posted by 3darchstuffs View Post

    thats true. Its disappointing.
    They're going to implement their own solution based on Raytrace technologies. It will be a LOT more faster than the actual GPU Lightmass solution based on brute force.
    If you're an Epic Dev (studio working with UE4), you have access to the code and you can implement it by yourself. Otherwise, you will need to wait the next unreal version to get this new lightmass solution.

    Leave a comment:

Working...
X