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

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:
    104
    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:
    1,080
    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:
    104
    Thanks for the quick reply!
    But will distance shadowmask be performance friendly?
     
  4. kristijonas_unity

    kristijonas_unity

    Unity Technologies

    Joined:
    Feb 8, 2018
    Posts:
    1,080
    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:
    104
    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.