- Home /
Flashlight origin effect
Hi. I moddeled a flashlight and added a spotlight. However, the flashlight itself doesn't emit anything. I am trying to figure out how to light the glass part up and add some sort of cone thingy to represent that the light is actually coming out of the flashlight. I was thinking it could be done with a particle system I haven't managed sth good so far. Please any advice or idea would be appreciated...¨
Thx
EDIT1: spotlight (not point light); added pictures of current and desired fx
[1]: /storage/temp/26628-flashligt_desired.jpg
[2]: /storage/temp/26629-spotlight.png
Answer by Loius · May 18, 2014 at 04:57 PM
Create an actual cone, put a translucent material on it that matches your light color. Hard edges result from this.
Go more advanced and create a wispy, foggy translucent texture to go on top of your cone and apply some basic UV scrolling to the material for a little better look.
Go super advanced and create a texture that is the beam effect, and manipulate a mesh at runtime so that it uses that texture and always faces the camera and has its points at the edges of the light spot and at the light origin, making it look exactly like you want.
Thank you so much! that works. I have only one thing left. when someone would point the light at me I'd like it to "blind" me with the light. how could I achieve such an effect?
try putting a white texture infront of the camera that covers the whole viewport (can be done with a GUITexture) and have it 100% transparent. Check with raycasting if the spotlight is shining in the camera and if it is, make it less transparent. Tweak till happy.
Answer by getyour411 · May 17, 2014 at 11:50 PM
Cone thingy = spotlight
oh I am sorry I always confuse these. I am already using spotlight, not point light. the problem is not not-having the light. I just have a dark flashlight model and light in front of it. I'd like it to look like the light is co$$anonymous$$g from the model. I've attached two images. One is my current state and the second one is the effect I am trying to achieve
[1]: /storage/temp/26625-flashligt_desired.jpg
[2]: /storage/temp/26624-spotlight.png
I can't test it (heading out the door now) but try adding a Flare at the light origin
thx that worked out wonderfully with the cone texture from the other answer :)
Your answer
Follow this Question
Related Questions
Flashlight battery script 3 Answers
How do I get my flashlight to work? 1 Answer
2D Lighting Effects in Unity? 0 Answers
I can't see light effects in Android AVD 0 Answers
Flash light off on start 1 Answer