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

Pretty colored lightmaps

Discussion in 'Editor & General Support' started by cwisbg, Dec 21, 2011.

  1. cwisbg

    cwisbg

    Joined:
    Jul 27, 2011
    Posts:
    88
    So after baking out some light maps i then brough them into photoshop. it didnt come in with a default color space so i assign the default(Adobe RGB 1998). after editing and re-saving out hte lightmaps in unity they are now blue!

    in photoshop the problem seemed to arrise when i tried to ajust things with ajustment layers.

    is there anyone who is running into this aswell? work around?
     
    Last edited: Dec 21, 2011
  2. rokstar234

    rokstar234

    Joined:
    Mar 29, 2011
    Posts:
    94
    Sometimes Photoshop will do things to Images that Unity doesn't like, DDS images for example always appear distorted sometimes saturated in billions of weird patterns and colors. what exatly did you do to the image. sometimes, re-rastering will help show what unity would perceive
     
  3. Giometric

    Giometric

    Joined:
    Dec 20, 2011
    Posts:
    170
    I've had this issue as well, but have absolutely no idea what causes it. It also seems very random, sometimes all maps are perfectly fine even edited from Photoshop, and there'll just be this one random one that always turns blue or purple or whatever. Of course, the colors are perfectly fine everywhere except for Unity :p

    I don't know of a way to fix this, but the way I work around it is to simply save a 16-bit TIFF of the lightmap and import that into Unity (make sure you set it to "Lightmap" in the import settings). Rinse and repeat whenever you need to re-bake.
     
  4. chronos78

    chronos78

    Joined:
    Dec 6, 2009
    Posts:
    154
    Don't know if you guys have already found a solution for this but after a bit of playing around I found that if you flatten the image in Photoshop prior to saving as an .exr the colors will go back to the way they should be.
     
  5. Giometric

    Giometric

    Joined:
    Dec 20, 2011
    Posts:
    170
    I can confirm that this is the case, accidentally discovered the fix a good while after this thread dropped off the map originally :p Does this qualify as a bug, I wonder? Though I guess I'm not sure if this would be a bug with Photoshop or Unity.
     
  6. Fuzzy

    Fuzzy

    Joined:
    Feb 11, 2011
    Posts:
    266
    I remember when baking .exr lightmaps in 3ds max they appeared blue when they were saved as RGBA, everything was fine when it was saved without the alpha channel (RGB).