- Home /
a 'bar' or neon like light.
Hi,
I'm trying to create a neon light within unity. I know you can have a self illuminated shader using lightmapping and have the light baked onto the scene, but I need the light to be dynamic. When the neon light moves around in the game the light needs to follow and affect the whole scene.
Thanks!
Assu$$anonymous$$g you solved this but the best way I have found to simulate this is to do the following:
Create a texture like this - http://i.imgur.com/Cex26Tm.jpg
Apply it to a new material as Particles/Additive
Create a new GameObject, add a line renderer component to it, set the material to the one you created and input the 2 points you want the neon light to go between.
Answer by Yohan_Games · Oct 13, 2012 at 04:46 PM
There is a Glow Effect Script in (Image Effects) Pro Only. If you don't have pro. there is no way to do it (i think)
Hope it helped :) - Yohan
Answer by RC-1290 · Oct 13, 2012 at 04:46 PM
For the light object (as fluorescent tube, I assume) to be bright, even when no other light is shining on it, you can use a shader from the self-illuminated category.
To create the glow around the light, you can use a Light Halo or the Glow Image Effect. Since you are talking about creating a tube light, the halo might not fit the shape of the glow you want to create, so the image effect might be your best option.
And of course, the light it casts on other objects. You could probably get a pretty decent effect by using multiple point lights, along the length of the tube.
Answer by VectorDan · Oct 13, 2012 at 07:49 PM
Thanks for your replies! I've been trying various ways to do this... It seems like the best option is to use the glow image effect in unity pro and set the alpha to black on the items I dont want to glow. The only problem with that is the glow effect makes everything glow the same colour... I'm hoping I can do something with Layers or multiple cameras in the same scene... but that could get pretty messy.
You should be able to manipulate the glow color, since the glow is created by slightly blurring the image, and showing that for the bright parts of the image (when using HDR, without HDR, the alpha channel is used for this data). On the page for the Bloom effect (Bloom is basically fancy glow), you can see the yellow lamp in the background having a yellow glow. By changing the color of the tube, you can control the color of the glow.
If you want the light to still have a white core, there are still some tricks you can do with HDR rendering to make the object brightness clip out of range, but I'm still figuring out exactly how to get that right.