Search Unity

Baking Light takes forever

Discussion in 'Global Illumination' started by mattukat2go, Aug 18, 2020.

  1. mattukat2go

    mattukat2go

    Joined:
    Aug 10, 2020
    Posts:
    33
    Hey,

    I'm pretty new in this thing. I just completed my first map and wanted to bake the light (I probably should have done it while doing it) but no it takes forever. It says something like 4 days when I stopped it and it never got more than 1%. Am I doing this wrong?

    Thanks for your help!
    Sebastian
     

    Attached Files:

  2. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,724
    Use the progressive GPU if you can, and also start with a lightmap resolution of say "1" and see how it goes from there.
     
    1000Nettles likes this.
  3. mattukat2go

    mattukat2go

    Joined:
    Aug 10, 2020
    Posts:
    33
    Thank you! I try that! Any other performance Ideas? My map is the standard size and I have a MacBook Pro 13" from 2020 with 16gb, a 2 GHz Quad-Core Intel Core i5 and an Intel Iris Plus Graphics 1536 MB.
     
  4. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,724
    Hmm you can't use GPU then. Try even lower Resolution and make sure your Samples values are low.
     
    circynllama likes this.
  5. mattukat2go

    mattukat2go

    Joined:
    Aug 10, 2020
    Posts:
    33
    Ok thanks! Is it possible, for final output to render the project on a different machine and import the light maps back into my laptop?

    PS: You did Lost Echo? I loved that game!
     
  6. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,724
    It should be possible, yes (although, there were some issues with generate lightmap UVs generating different UVs on a Mac and different on Windows, not sure if that's still the case, but that might cause issues). If you have some versioning to sync between different machines it should "just work", otherwise you need the to manually copy the LightingData.asset and the .exr files.

    Glad you enjoyed Lost Echo :)
     
    mattukat2go likes this.
  7. mattukat2go

    mattukat2go

    Joined:
    Aug 10, 2020
    Posts:
    33
    Ok, this took around 30min to complete. So I should just set this number up bit by bit until it looks good and renders ok, right? And I read that I can disable realtime lightening, what I've done. Should I turn it back up now? Or just keep it deactivated since it will be deprecated?
     
  8. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,724
    Or you can have specific meshes look better by selecting them and changing the scale in lightmap value in the inspector, so you can have certain meshes use more or less space in the lightmap.

    Disable the realtime lighting in the lighting settings, you're probably not using it anyway.
     
  9. mattukat2go

    mattukat2go

    Joined:
    Aug 10, 2020
    Posts:
    33
    Ok thank you a lot! Now I have something to "play" with!
     
  10. mattukat2go

    mattukat2go

    Joined:
    Aug 10, 2020
    Posts:
    33
    I played around a bit - now at light map resolution of 10 and everything worked fine except there are two objects rendered wrong in white... any idea what I could do?
     

    Attached Files:

  11. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,724
    Everything okay with the UVs of that house? Can't really tell what's wrong exactly.
     
  12. mattukat2go

    mattukat2go

    Joined:
    Aug 10, 2020
    Posts:
    33
    I check the UV!
     
  13. Sapper_Studios

    Sapper_Studios

    Joined:
    Feb 22, 2023
    Posts:
    5
    Make sure you have cleaned your GI cache.
    Go to Preferences >> GI Cache >> Clean Cache.

    Divide your scenes into blocks and bake lighting data separately by blocks
    Switch the "Lighting Data" according to the block.
     
    hamadhardy, tukyo and darryleffendi like this.
  14. Sapper_Studios

    Sapper_Studios

    Joined:
    Feb 22, 2023
    Posts:
    5
    One of the best solution is to use Adaptive probe volume