Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Progressive Lightmapper bake time

Discussion in '2018.1 Beta' started by Julinoleum, Apr 10, 2018.

  1. Julinoleum

    Julinoleum

    Joined:
    Aug 31, 2011
    Posts:
    40
    Hello,

    I'm testing the progressive lightmapper on a very large scene that takes about 20-25 minutes to bake on Enlighten. I end up with 20+ hours bake time with the same settings plus Direct at 2 and Indirect at 16.

    Why would it be so long? Isnt it meant to be faster?
     
  2. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
    Enlighten is faster for large environments on very low preset

    You can use PLM for preview or interior lighting or high quality GI with longer bake time
     
  3. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,976
    its progressive, that doesnt mean its faster. It will be faster at prioritising the area you are looking at so you can cancel a bake when you see its creating artifacts and adjust accordingly. But as mentioned for larger scenes it will take longer due to high quality of baking compared to enlighten.
     
  4. DavidLlewelyn

    DavidLlewelyn

    Unity Technologies

    Joined:
    Aug 14, 2012
    Posts:
    34
    Hi Julinoleum,

    Very difficult to diagnose anything here without seeing your actual lighting settings for either back-end. Are you able to share the exact settings you are using.

    Scene setup also has a large influence on the performance results. Again, very difficult to offer comment without seeing your scene. Is there any way you could share this with us, or is it under license?
     
  5. Julinoleum

    Julinoleum

    Joined:
    Aug 31, 2011
    Posts:
    40
    I can share you the settings but the content is under liscence.

    upload_2018-4-11_10-15-43.png
     
  6. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,976
    You only shared the enlighten settings, what about PLM? otherwise hard to diagnose problem between the two
     
    hippocoder likes this.
  7. Julinoleum

    Julinoleum

    Joined:
    Aug 31, 2011
    Posts:
    40
    Oops, my bad.

    upload_2018-4-11_11-18-28.png
     
    MadeFromPolygons likes this.
  8. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,976
    turn off ambient occlusion, that will add tons to the bake. turn down your resolution of lightmap for now, untill you have settings perfect no need to bake at a higher res as itll just increase the time. Better to use PLM, zoom into a region and prioritize view and quickly bake that area to iterate on settings.

    Try changing your lighting mode from subtractive to the others so you can determine if the issue is tied to that mode.

    Make sure you dont have too many lights active in the scene and that the correct ones are set to baked.

    Make sure you dont have objects marked as lightmap static that shouldnt be.


    make sure in quality settings you dont have a ridiculous amount of pixel lights active.
     
  9. DavidLlewelyn

    DavidLlewelyn

    Unity Technologies

    Joined:
    Aug 14, 2012
    Posts:
    34
    @Julinoleum All good advice above from Daemonhahn.

    6 texels per unit is a very low base, even in the context of an outdoor environment. It's pretty concerning that this is creating such lengthy precomputes. What sort of surface area are we talking about here? Is it a particularly large open world for example?

    I also see that your default Enlighten settings were using very low, so this could be unfairly distorting timings in favour of the Enlighten setup.

    Other things which are worth checking would be to ensure that smallish convex objects are probe lit (by making them non static and using light probes).

    Additionally, make sure you have valid lightmap UVs or if you do not have any manual UVs, ensure `Generate Lightmap UVs` is enabled from your model import settings. Poor UVs can be a cause of lost baking performance.

    So difficult to help without being able to see your project however.
     
    Last edited: Apr 18, 2018
  10. Julinoleum

    Julinoleum

    Joined:
    Aug 31, 2011
    Posts:
    40
    Those are good things to know. When I'll have a little free time I'll test it again.

    The small objects are probably what is causing it. Maybe the UVs as well but considering the ammounts of assets I have to deal with in so little time, kind of hard to make sure about time.

    It's not an open world but the scene is quite huge. With this low texel density, I have 4 x 2048. Did not want the area to be so huge but I have to deal with it since it wasnt my decision in the first place.
     
  11. xCyborg

    xCyborg

    Joined:
    Oct 4, 2010
    Posts:
    633
    Add to that no caching system, PLM keeps rebaking even when nothing changed.