Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Frustrated with lightmaps, need help

Discussion in 'Global Illumination' started by Reshima, Jun 4, 2020.

  1. Reshima

    Reshima

    Joined:
    Dec 10, 2012
    Posts:
    51
    Hi,

    In light of Unreal Engine 5 announcements, they used a few words that got me excited: "No baking of lightmaps".

    Whether that is completely true or not, it got me very excited because I'd say if there's one thing that makes my experience in Unity a nightmare is baking lightmaps.

    Now, the reason for this is because my lightmaps are either having issues with UV Overlaps or just the amount of time it takes to bake my scenes.

    I've seen plenty of talks and have implemented many of these best practices:

    - Exclude smaller objects
    - Exclude objects that receive indirect light only
    - Surfaces with low light variation
    - Use light probes for these excluded objects
    - Decrease texel resolution per object or for the whole scene
    - Decrease the number of charts

    Now even if I do all these things, it could still take 10 minutes to bake a relatively small scene I have set up. I have a an RTX 2080 TI GPU and i9 9920x CPU and both Progressive CPU and GPU are slow.

    Is it normal for baking to be this slow?

    Also, what are the best practices for actually generating the lightmap UVs? I tend to use Blender's Lightmap Pack function for this, which usually gives me many many small islands. Unity's function is similar. But I have the hunch that one of the reasons my lightmaps are slow to bake is because of the number of charts.

    Are there any tips here to improve the number of charts for a lightmap? Would it be ok if I put surfaces that are on different planes in the same island or should I always keep them in separate charts?

    Any other tips to improve performance and make my life easier while creating levels? Any help is appreciated.

    Screenshots to illustrate my settings and the baked result: https://imgur.com/a/AydB0HX
     
  2. unit_dev123

    unit_dev123

    Joined:
    Feb 10, 2020
    Posts:
    989
    what does ur actual scene look like?
     
  3. Bordeaux_Fox

    Bordeaux_Fox

    Joined:
    Nov 14, 2018
    Posts:
    589
    Well, I have only a RTX 2060. I would be glad if it "only" takes 10 minutes. You really consider 10 minutes as too much, hm? The GPU lightmapper is still not finished. They will work on the memory footprint and the speed. But my current project is locked with Unity 2019.4. So I cannot get the lightmapper benefits in the beta and alpha.

    So all in all you're in a better situation than me. ;)
     
    Last edited: Jun 10, 2020
  4. giorgos_unity

    giorgos_unity

    Unity Technologies

    Joined:
    Nov 14, 2019
    Posts:
    38
    Hi Reshima! Judging from your settings, what is likely causing the slowdown is Progressive Updates. There is a known issue with that functionality, and we are currently testing a fix for it in the most recent beta. If uncheck Progressive Updates, you are likely to see better bake times.
     
    Reshima likes this.