Using Lighting Cookies to Resemble Light Filtering Through Glass

Alberto Garcia
3 min readMay 31, 2023

--

This is how a normal spot light usually looks: plane, simple and too perfect to be real. Even though futuristic environments might benefit from this plane lighting, it does not always fit well into a scene nor is it all that unity can offer for a spot light.

To change this, I’ll be using a Light Cookie Texture to recreate the effect that light gets from traveling through glass out of a bulb. The best case for this would be flashlights as they are commonly known for having that shape onto the objects they lighten up.

Light Cookie Texture for Unity

This will be the texture I will use as I find it fit for a Sci-Fi lab room. So first, let’s tweak the cookie texture by setting it’s texture type to “Cookie”.

Cookie Texture Type

And set it up appropriately to a spotlight, from Gray Scale and Alpha is Transparent enabled. Click Apply.

After the edits are applied, drag and drop the cookie texture into the spotlight settings, under Emission into the Cookie handler. It might give a warning message with a Fix option, click Fix and it should now have the cookie effect of glass silhouettes traveling through the bulb.

Subtle cookie texture

This cookie texture is not as detailed as others and that is fine; for the purposes of this scene, I really enjoy the subtle silhouettes created as it is a Science room and the equipment should be way modern. Still with this we can already see noticeable changes when playing around with the shape of the outer and inner angle of the spot light:

Tweaking outer and inner angle of spotlight with cookie texture

Here is another great example of a cookie texture that fits perfectly for a flash light in an exploration game mode:

A famous example from Left4Dead Game Flashlight and its Cookie Texture.

from Left4Dead

This same cookie effect is also possible and great for Point Lights to recreate the emission created by old lamps near walls.

point light with cookie texture on wall

Awesome tool to personalize experiences even further and give a stylized ambient for older types of bulbs.

--

--

Alberto Garcia
Alberto Garcia

No responses yet