Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Spot Light Cookie Not Working

Discussion in 'Global Illumination' started by John-B, Mar 20, 2017.

  1. John-B

    John-B

    Joined:
    Nov 14, 2009
    Posts:
    1,259
    I'm updating a project from 4.x that used a baked spot light with a cookie. Cookies are realtime only since Unity 5, but the old spot light and cookie will not work in realtime. I can create a new, empty project, add a spot light and the same cookie, and shine it on a surface, and it works, I see the cookie. But in the updated project, the cookie is ignored. I set the spot light to realtime, turned off the other lights to make sure it's not being washed out, cleared baked data, but no cookie effect.

    The cookie has not changed from the original project, a grayscale image imported as a cookie, alpha from grayscale, light type is spot. In my test project, the only thing I could find that turned the cookie off was if Pixel Light Count is set to zero. In the updated project, Pixel Light Count makes no difference. I've tried every light, cookie texture, and quality setting, but nothing makes a difference. I also tried setting the spot cookie in Lighting -> Other, but that doesn't work either. Are there any other Quality or other settings that could cause a cookie to not work?
     
  2. John-B

    John-B

    Joined:
    Nov 14, 2009
    Posts:
    1,259
    I just updated another similar 4.x project with different results. Like the one in my original post, this one had baked light maps with spotlight cookies. But with this one, the baked lightmaps are still there in Unity 5 and look just like they do in Unity 4. I wonder if I don't do a rebuild, will those old light maps keep working? With the other project, the lightmap files were still there, but they didn't show. And they can not be rebuilt in Unity 5 with cookies.