Search Unity

  1. All Pro and Enterprise subscribers: find helpful & inspiring creative, tech, and business know-how in the new Unity Success Hub. Sign in to stay up to date.
    Dismiss Notice
  2. Dismiss Notice

Scale in lightmap not increasing on Terrain

Discussion in 'Global Illumination' started by tanmaykulkarni, Apr 20, 2021.

  1. tanmaykulkarni

    tanmaykulkarni

    Joined:
    Nov 5, 2019
    Posts:
    41
    Heyy dudes, I've been trying to bake lighting for my big outdoor scene with a large terrain.

    The problem I face is when I set the scale in resolution of the terrain to a value greater than 0.1, it shows the warning that the object size has reached the max atlas size. My max atlas size is 4096 x 4096. I want a greater scale in lightmap for the terrain because when I bake light at a lower scale in lightmap, the baked shadows are way too blurry.

    My lighting mode is set to mixed, Lightmapper is Progressive CPU, and mode is Subtractive, and Lightmap resolution is 100 Texels per unit.


    I would appreciate any help in advanced.
     
  2. kristijonas_unity

    kristijonas_unity

    Unity Technologies

    Joined:
    Feb 8, 2018
    Posts:
    620
    Best way to get around this is to use multiple terrains. Otherwise, decrease lightmap scale for the terrain, and use distance shadowmask lighting mode.
     
  3. tanmaykulkarni

    tanmaykulkarni

    Joined:
    Nov 5, 2019
    Posts:
    41
    Thanks for the quick reply!
    But will distance shadowmask be performance friendly?
     
  4. kristijonas_unity

    kristijonas_unity

    Unity Technologies

    Joined:
    Feb 8, 2018
    Posts:
    620
    You will get an additional texture look up + slightly more expensive shader + realtime direct. Shouldn't be that different from what you are using now (mixed lights + subtractive). I suggest to profile your build before you fully commit to it.
     
  5. tanmaykulkarni

    tanmaykulkarni

    Joined:
    Nov 5, 2019
    Posts:
    41
    Oh thanks, but in my scene I have nearby 500 trees on terrains which cast shadows, so will realtime direct be expensive in this case? Also my platform is Android.
     
unityunity