How do I add a Light Cookie to my Roblox Game?

Read the title, if you don’t know what a “Light Cookie” is then read this Unity Documentation here: Unity - Manual: Cookies. I also left some Screen Shots of what I’m kinda looking for.

I only know of a somewhat limited work-around for this, which is more of an inverted version of the cookies:

  1. Create a SurfaceLight with shadows enabled (Future lighting theme)
  2. Find/make a decal that represents the kind of shadows you want to create, with transparency e.g.:
    image
  • the squares being transparent, this would give a shadow the shape of the window frame.
  1. Place this decal on the top face of an invisible part, and face the decal opposite to the SurfaceLight

Limitations:

  • You can’t alter the intensity of the shadows without creating a second invisible light source (example below)
  • The decal should be in a position that isn’t visible to the player.

Example 1:


in this example, the intensity of the shadow can only be binary, determined by the transparency of the decal

Example 2:



in this example, a second invisible light source is used to reduce the intensity of the shadow, by using a higher brightness and lower position than the original light source.

Hope this is a viable solution for you :+1: :slight_smile:

2 Likes

This helped a lot thank you!!!

1 Like

Btw do you know if its possible to edit the color of the cookie?

1 Like

If you mean the colour of the light, just use the Color property under the SurfaceLight.
If you mean the shadows created by the light, I’m not sure if that’s possible without mixing the colours by adding a second light source below the decal:

It works to a certain degree but isn’t as variable or precise as you might need it to be.

Glad I could help out, good luck with development! :smiley:

1 Like

Awesome thanks bro bro, I’ll def add you to the credits for helping me with this. Cuz I have been trying to find out how to do this for days now.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.