Search Unity

Baked Shadows are ugly for big GameObjects Receivers

Discussion in 'Global Illumination' started by Opeth001, Jan 9, 2020.

  1. Opeth001

    Opeth001

    Joined:
    Jan 28, 2017
    Posts:
    1,117
    Hello Everyone,

    i finally found a solution to bake lights and shadows in my scene but baked shadows are incoherent depending on the receiver Size which make it really ugly.

    the Green and Yellow prefabs are using the same asset but at different scales (1,1,1) vs (4,1,4) .



    im pretty sure it's a low level problem and unity has already found solutions for it but im new to Lighting stuff XD.
    so what are the workarounds/solutions to avoid these results.

    Thank You!
     
  2. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,792
    What is your atlas size? The outer mesh has probably hit the atlas limit and can't reach the density you're asking from it.

    Also, that is going to be a ton of lightmaps if you want to maintain the sharpness of 1 everywhere.
     
    Last edited: Jan 9, 2020
    Opeth001 likes this.
  3. Opeth001

    Opeth001

    Joined:
    Jan 28, 2017
    Posts:
    1,117
    ok i get what you mean! so what is the best approach to get good looking lightmaps for mobile without having ton of lightmaps ?
     
  4. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,792
    I uhhh... I don't want to derail you, since you were given advice about going for lightmaps in another thread if I remember correctly, but for that art style, I would go with realtime lighting with hard shadows and would turn off the shadows if the device is not powerful enough.

    Otherwise, if you want to stick with lightmaps, just accept that you are not going to get super sharp shadows this way and work with it.
     
    Opeth001 likes this.
  5. Opeth001

    Opeth001

    Joined:
    Jan 28, 2017
    Posts:
    1,117
    Thank you!!
     
  6. uy3d

    uy3d

    Unity Technologies

    Joined:
    Aug 16, 2016
    Posts:
    187
    On the mesh renderer you have a parameter called "Scale In Lightmap". You can change that on your scaled mesh to increase the lightmap texel density specifially for this mesh, without changing the global setting.