Using Cookies to Create Realistic Lighting

Renato Figueiredo
2 min readMar 19, 2024

--

Objective: Learn how Cookies work in Unity.

So what are cookies in terms of lighting ? They are textures that are used to shape the appearance of light sources, such as point lights or spotlights, by projecting patterns or shapes onto surfaces in the scene.

If you go to google and type “cookie light texture” you will find a bunch of images.

This is my example.

So in Unity, we can simply import it, and assign it as a cookie.

Assigning our texture to Cookie.

So now lets see how our spotlight looks without the cookie texture.

Default spotlight in Unity.

As we can see, it generated a very bland and boring light, that doesn’t really look real. Now we are going to apply our cookie texture to it.

Assigning our cookie texture to our Spotlight.

And now lets see how our spotlight looks with our new texture.

Spotlight with our Cookie texture applied.

As we can see, now it looks more like a lantern type of light, so we can use Cookies to manipulate this, and make more realistic lighting to specific situations, such as in this case, creating a lantern type of lighting, that can be used in horror games and such.

--

--