Search Unity

Tweaking lightmaps in photoshop

Discussion in 'Editor & General Support' started by ilya_ca, Mar 7, 2012.

  1. ilya_ca

    ilya_ca

    Joined:
    Nov 19, 2011
    Posts:
    274
    Hello, when unity generates a lightmap, it saves it in a 32-bit exr format.
    I'm editing this lightmap in photoshop to add some more detail using ambient-occlusion and cavity maps (using multiply blending). After I save the tweaked lightmap in 32-bit EXR format, it doesn't look much different from the original lightmap, but once I apply it over to my terrain, the terrain gets like 10 times brighter than it was originally. Where does this difference come from and how can I reduce the brightness? Visually the unity-generated lightmap and the one I made in photoshop look the same.

    Unity-generated lightmap:


    Tweaked lightmap with ambient occlusion map added:


    Terrain with unity-generated lightmap applied to it:


    Terrain with my custom map applied to it:


    What can I do to add all the ambient-occlusion detail and keep the same brightness?

    Thanks!
     
  2. SJAM

    SJAM

    Joined:
    Jan 11, 2009
    Posts:
    729
    Photoshop have some difficults with 32bits alpha... same issue with blend textures. Try to use GIMP
     
    Last edited: Mar 7, 2012
  3. ilya_ca

    ilya_ca

    Joined:
    Nov 19, 2011
    Posts:
    274
    So what are my options to combine the maps correctly?
     
  4. ilya_ca

    ilya_ca

    Joined:
    Nov 19, 2011
    Posts:
    274
    GIMP won't import the EXR lightmap...
     
  5. wcoastsands

    wcoastsands

    Joined:
    Sep 30, 2011
    Posts:
    44
    Make sure your Texture Type is set to Lightmap. I felt like such an idiot when I realized the reason I got these same results was just because I hadn't set the new textures to Lightmap after making making changes to the original, saving as a copy, and using the copy in the lightmap array. I'm using Photoshop CC with the OpenEXR format. Works fine for me.