Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Strange (or normal?) progressive Lightbuild rendertime behavior with LODs.

Discussion in 'Global Illumination' started by Milanis, Jul 15, 2019.

  1. Milanis

    Milanis

    Joined:
    Apr 6, 2018
    Posts:
    55
    Hello fellow Lightbuildlovers,

    I have a question about the progressive (cpu) light building in 2018.4.2f1. We have regular FPS sized maps in a game project I am working with and within we placed a couple of rocks with LOD's.



    Now here comes the part that I don't understand: With our bake settings and keeping everything simple as it is, the render times are horrible high like 10 hours and more. Without the stones and rocks (simple ones), the terrain needs like 3 minutes for bake. Now if I turn of the lightmap static on LOD 1 and LOD 2 of these rocks, the whole render time goes down to like 10-12 minutes.

    How does it come, that the LODs are causing these ridiculous baking times. I would expect 2 times the rendertime based on the rendertime of LOD 0, but not times 100.

    I am pretty thankful for any suggestion how to setup or handle LOD lightbaking the proper way, speeding up the whole process!

    Here are two screenshots of the Rock LOD and lightmapping settings:




    Kind regards,
    Tobias
     
    Last edited: Jul 15, 2019
  2. kristijonas_unity

    kristijonas_unity

    Unity Technologies

    Joined:
    Feb 8, 2018
    Posts:
    1,080
    Currently, the Progressive lightmapper does not handle baked LODs in an optimized way. We are currently working on a more streamlined solution to mitigate this problem.

    In the meanwhile, I would strongly suggest that you'd have your lower LODs set as dynamic objects, and have them receive lighting from light probes instead. This will save on precious lightmap space and will increase light bake speeds considerably.

    If you absolutely need baked lightmaps on your lower LODs, you could try using a custom script, such as this one - https://github.com/laurenth-unity/LODLightmapScripts
    Keep in mind that we cannot guarantee proper functionality of 3rd party scripts, so use them at your own discretion.
     
  3. Milanis

    Milanis

    Joined:
    Apr 6, 2018
    Posts:
    55
    Thanks for the heads-up. For now, we deactivated all LOD systems. We're just using Unity's in-house solutions at the moment. In general, the light-baking feels pretty unstable in general. Sometimes it wants to render forever but when you actually restart Unity or the PC, it renders fine in like 15 minutes. Russian roulette for worldbuilders when you have your sprint and deadlines. :-/

    Three wishes I would love to see one day (while I know you can't do magic out of the box ♥):
    - Swarm rendering
    - Partial light re-bake (just bake changes that have been made)
    - Volumetric Lightmaps: Set a volume that captures the level and creating light-probes with density based on tagged or important structures. (Yes, I got spoiled by UE4 for years working with it and within I don't really understand why Unity is doing things so complicated like Lightprobe generation..by hand..?)
     
    Last edited: Jul 25, 2019