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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Using baked lightmaps as textures or: How do I get lightmap and texture uv perfectly aligned?

Discussion in 'Global Illumination' started by Deleted User, May 29, 2015.

  1. Deleted User

    Deleted User



    What do I have to do to have the lightmaps from baked GI align perfectly with the textures?

    Background: I would like to use the result from baked (or even realtime) GI in unity as a basis for hand-drawing textures in photoshop (including hand-drawn lighting). I have carefully set up the UVs of my custom meshes so that hand-drawing is easy and yields nice results, however I can't get unity to bake a useful lightmap using those exact UVs. I did set the mesh.uv2 to the same array as mesh.uv (which, in this case, covered the whole square from uv=(0,0) to uv=(1,1)), but my mesh ends up black with bright stripes and the lightmap only consists of a narrow strip of mostly black with a few bright pixels along the v-axis.

    The only way I get proper lightmaps is by having unity generate its own lightmap UVs for every mesh. The resulting lightmaps however are not well-suited for hand-drawing, hence my question.