- Home /
Flashlight Cookie Not Displaying
Hello guys!
I have a flashlight (spotlight) and a cookie that I made for it. It is 256x256 and greyscale/grayscale, I imported into unity, and I don't get the image displaying, I get it as a pointlight, which in the editor is messed up, because it has a sharp cutoff on the sides where the light should be. Would you mind testing this for me? Heres the link: http://i.imgur.com/LtWjVGT.jpg
Thanks!
Yes, there is something not quite right here. From the Unity Documents : Spot lights can also have cookies - a texture projected down the cone of the light. This is good for creating an effect of light shining through the window. It is very important that the texture is black at the edges, has Border $$anonymous$$ipmaps option on and its wrapping mode is set to Clamp. For more info on this, see Textures.
There also must be some special technique for creating these images, and what format they are saved as. To test yours, my settings were :
Texture Type : Advanced
Alpha from Greyscale : True
Border $$anonymous$$ip $$anonymous$$aps : True
Wrap mode : Clamp
$$anonymous$$ax size : 256
Format : Automatic Truecolor
This sort of works, but there still is a problem you will see outside the border light appears again. Hopefully someone with experience with this will come along and help.
Documents :
yeah I actually found the LightCookies assets and fount one I liked, but I would still like to know what the problem is with this.
Answer by Destroyanad · Jun 05 at 09:44 PM
I know this is old and this wont help, but theres people like me that are/were having the same problem so ill put a solution here.
You want to change "Wrap Mode" to clamp, "Texture Type" to Cookie, and "Alpha Source" to From Gray Scale
Your answer
Follow this Question
Related Questions
Cookie not correctly set in UnityWebRequest in 2018.3 1 Answer
My Draw Calls go from 30 to 125 and I have twice as much tris/verts when I enable a spotlight. Why?? 1 Answer
save cookie after login and use it for login again 0 Answers
Workaround for SET-COOKIE bug in www.responseHeaders? 2 Answers
System cookies login application?,Cookie systeme login FPS Game 0 Answers