Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Enter the 2020.2 Beta Sweepstakes for a chance to win an Oculus Quest 2.
    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:
    39
    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. LightingBox2

    LightingBox2

    Joined:
    Mar 31, 2015
    Posts:
    2,834
    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:
    2,576
    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:
    26
    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:
    39
    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:
    2,576
    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:
    39
    Oops, my bad.

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

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    2,576
    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:
    26
    @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:
    39
    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:
    579
    Add to that no caching system, PLM keeps rebaking even when nothing changed.
     
unityunity