Search Unity

Question How do you create proper lightmap UVs by hand?

Discussion in 'Global Illumination' started by ebaender, Feb 18, 2022.

  1. ebaender

    ebaender

    Joined:
    Oct 29, 2020
    Posts:
    97
    I have never been able to understand how you are supposed to create the lightmap UVs for your own models, and I haven't been able to find any good resources explaining it either.

    So far I have always been using the automatic lightmap generation from Unity's model importer, but that always leads to tons of light bleeding / UV overlap that I have not been able to fix by adjusting the lightmap UV generation and GI settings.

    I UV mapped all my meshes by hand in Blender, so I tried copying them to the second UV layer leading to even worse results than the autogenerated UVs. The way I understand it now is that the texture UVs are no good since lightmap UVs have to follow completely different rules and can't overlap in any way.

    But apparently the autogenerated lightmap UVs from Unity or Blender are no good either, so how are they supposed to look?

    Can somebody explain the basics of creating lightmap UVs to me, or point me to a good resources to learn?
     
  2. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,807
  3. radsburied

    radsburied

    Joined:
    Jul 14, 2021
    Posts:
    4




    Some of this lightmapping knowledge is transferrable as well so you might as wlel have a look at this awesome content by Warren Marshall (used to work at Epic)

    There are 3d model/UV specifics to know about as well, like making sure your UVs are laid out properly for their intended lightmap resolution so that your UVs dont end up inbetween pixels. You do this by setting correct snapping/grid values for your UV editor that match whatever the intended lightmap resolution will be etc. Check the videos, its good stuff.
     
    LaurieAnnis, PutridEx and ebaender like this.
  4. ebaender

    ebaender

    Joined:
    Oct 29, 2020
    Posts:
    97
    @radsburied that's exactly the kind of thing I was looking for, thank you! :)