Search Unity

Proper way to bake lightning

Discussion in 'Global Illumination' started by polluxik, Nov 8, 2021.

  1. polluxik

    polluxik

    Joined:
    Aug 17, 2017
    Posts:
    11
    Hey! I am experimenting with baking lights... I watched few tutorials about how to bake lights etc... But I still don't know how to properly use baking... I used like 5 objects with 9 point lights and I was stucked on Baking 0%... for like 5 minutes or more.. I have r5 2600 and gtx 1660 ti... I used both of them.. but still stucked... Is there something I need to care about, because I need to set 90% objects from scene to static to apply baked lights... Also I lowered lightmap resolution to see if it is faster or not.. but no result.. Is there someone who can properly describe how to use baked lightning or good tutorial to watch ? Thank you for reading!
     
  2. Nicrom

    Nicrom

    Joined:
    Nov 17, 2013
    Posts:
    421
    Hi. Do you have Generate Lighmap UVs enabled on the import settings of your models? Also, for small objects you should not make them static, but use Light Probes.

    If you need totorials, I sugest you take a look at the Uguruz Youtube channel. He has some really detailed tutorials on this subbject.
     
  3. polluxik

    polluxik

    Joined:
    Aug 17, 2017
    Posts:
    11
    Yes I have Generate Lighmap UVs, also I've set static to only 1 object(building), tried to bake the lights and again the time is increasing every second. But when I set static value to false on that object.. bake is instant... And I will look at this channel, thanks.
     
    Nicrom likes this.
  4. SpockBauru

    SpockBauru

    Joined:
    Apr 12, 2021
    Posts:
    23
    I had a similar issue and solved by disabling "Progressive Updates" in Unity 2021.2.3f1 and letting everything else as default.

    Also sometimes I need to decrease the "Max Lightmap Size" to 1024, even having 8GB of vRAM.

    When the baking fails I need to restart the PC otherwise I'll always get infinite baking times with 0% of CPU/GPU utilization.

    Lowering the lightmap resolution usually make things worse on my end.

    For some reason Unity's Progressive GPU Lightmapper is extremelly unstable on my GTX 1070.
     
    Last edited: Nov 20, 2021