Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Baked-in lighting and shadows for large object look awful

Discussion in 'General Graphics' started by cemsaginda, Sep 3, 2023.

  1. cemsaginda

    cemsaginda

    Joined:
    Jan 9, 2022
    Posts:
    3
    Hello. I am trying to bake light in my residential site project. The image obtained after about 10 hours of baking time is as follows:

    upload_2023-9-3_13-24-53.png

    My lighting settings are as follows:

    upload_2023-9-3_13-25-44.png

    Where is the problem? can you help me?
     
  2. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,362
    Set the mode to directional if you use directional lights.
    Set the lightmapper to GPU for faster speeds.
    Look into what settings do to tune them.
    Scale down the model if possible, right now you are baking 3GB of maps which is too much
    Increase lightmap size to 4k or more as you're loading the maps in the same area anyway
     
  3. cemsaginda

    cemsaginda

    Joined:
    Jan 9, 2022
    Posts:
    3
    It automatically switches to the CPU because the GPU gives a low memory warning. I realize the time is very long, but I think I'll let it bake at night. What is the reason for this awful appearance?
     
  4. wwWwwwW1

    wwWwwwW1

    Joined:
    Oct 31, 2021
    Posts:
    625
    Looks like the building (mesh) has a terrible lightmap UV.
    UV.jpg

    You can either manually create an non-overlapping UV (save to the second UV set) in a 3D modeling software or tick the "Generate Lightmap UVs" in Unity import settings.
    GenerateLightmapUV.jpg

    Not all objects need to be baked into lightmaps. I suggest disabling baking for all semi-transparent objects (ex. glass window) first. You can also find lots of useful information in the GI sub-forum, like these two threads.
    GI_SubForum.jpg
     
    DevDunk likes this.
  5. cemsaginda

    cemsaginda

    Joined:
    Jan 9, 2022
    Posts:
    3
    My models configuration is here:
    upload_2023-9-4_9-20-58.png
    But same result :(
     
  6. wwWwwwW1

    wwWwwwW1

    Joined:
    Oct 31, 2021
    Posts:
    625
    Are you using Unity 2021.2+? The minimum VRAM required is 2GB if disabling denoising (Intel Open Image Denoiser).

    Maybe the auto-generated lightmapUV (of this mesh) is still not good enough for progressive lightmapper.

    You can also try using Enlighten Realtime GI instead, but it usually cannot bake shadows and AO.

    You need to change all the lights from baked to real-time for Enlighten GI. I suggest using a lower indirect resolution first (ex. 0.25), and increase it (ex. 1.0) if everything is fine.
    EnlightenGI.jpg
     
  7. POOKSHANK

    POOKSHANK

    Joined:
    Feb 8, 2022
    Posts:
    70
    it seems like your life is going to be painful, so i'm going to throw the idea out of baked lighting in vertex colors generated elsewhere.