Search Unity

Question Crappy results with lightmapper in URP, tips?

Discussion in 'Global Illumination' started by Jelmer123, Feb 20, 2021.

  1. Jelmer123

    Jelmer123

    Joined:
    Feb 11, 2019
    Posts:
    243
    Trying to bake some nice lighting for this apartment scene. The model is imported with generate UVs for lighting checked. Renderpipeline is URP in Uniti2020.1.17. Scene scale is correct, the window/glass is excluded from shadows. (the ceiling is missing)
    Rendersettings default-highresolution.

    However, this looks a little bit crappy! :D
    What could be the problem here?


    Screenshot 2021-02-20 203205.png


    Screenshot 2021-02-20 204020.png


    This is a test render in 3ds max, and sort of what I want to achieve with baked lighting:
    wip5.jpg
     
    Last edited: Feb 22, 2021
  2. Jelmer123

    Jelmer123

    Joined:
    Feb 11, 2019
    Posts:
    243
    I now see that "generate lightmap UV" gives non optimal results.. Though it shouldn't be the cause for the problems above.

    Look at the ground for example in the picture on the top of my post, it is full of artifacts while it is just a plane.... Also in the UV layout (the yellow object):
    Screenshot 2021-02-20 212425.png
     
    Last edited: Feb 22, 2021
  3. Jelmer123

    Jelmer123

    Joined:
    Feb 11, 2019
    Posts:
    243
    You know what; I just tried Unreal with hardly any experience and get this.
    I think I'll stick with Unreal for this one.. :/
    I wonder if Unity has plans to update the UV generation for lightmaps? Unreal does it dynamically, even accounting for the lightmap resolution and adapting the padding between UVs to avoid bleeding as I understood it.. Screenshot 2021-02-21 221521.png
     
    Last edited: Feb 22, 2021
    kristijonas_unity likes this.
  4. kristijonas_unity

    kristijonas_unity

    Unity Technologies

    Joined:
    Feb 8, 2018
    Posts:
    1,080
    Hey! I'd suggest you check out this primer on how to use progressive lightmapper in URP:


    Also, please take a look through one of our pinned posts which deals with lightmap artifacts, like the one's you are seeing: https://forum.unity.com/threads/faq...hen-i-bake-a-scene-how-can-i-fix-them.951444/

    Improved lightmap UV packing and unwrapping is something that high on the priority list. Currently the team is focused on bringing GPU lightmapper out of preview for 2021.2. We did introduce packing-related improvements in 2020.1. You can read more about it here: https://forum.unity.com/threads/2020-1-new-feature-auto-pack-margin.827859/
     
    Jelmer123 likes this.
  5. Jelmer123

    Jelmer123

    Joined:
    Feb 11, 2019
    Posts:
    243
    Ok thanks very much! I'll look into this and also try 2020.1++
    Unreal is maybe nice for the graphics, but it certainly has its own pains :D ;)
     
    kristijonas_unity likes this.