- Home /
Glow in Unity
This question has been asked a lot, but there doesn't seem to be a particularly definitive answers. Is there really no good way to have glowing dynamic (not light baked with self illuminated) objects in Unity, I'm not talking about halos on lights. Using the glow effect from pro feels INCREDIBLY unintuative,as every object has exactly the same colour glow applied to it in the same manner, and you need a seperate camera for each type of glow.
Is there not a feasible way where one can simply make a glow shader? Being fairly uneducated on shaders I can't immediately propose a way, but using a pixel shaders where adjust the pixels on screen by taking an object with the shader on, and applying a semi opaque application of the same pixels bleeding outwards doesn't seem like it should beyond the capabilites of the engine. The glow is a thing I've been seriously pining for, and Unreal seems to be able to do, incredibly easy.
Answer by whydoidoit · Apr 13, 2013 at 09:50 AM
You could create a shader that worked like a toon shader (pancaking out the back faces and drawing them (rather than culling them) using some kind of transparent effect for the glow). There's a toon shader tutorial I wrote on Unity Gems that could be a starting point for you - such a shader written so it didn't draw front faces could be applied onto an object to draw a basic glow - however you'd always potentially suffer from not being able to quite get a smooth effect.
I guess that you could run the glow intensity based on the distance the normal had been projected to get the expansion effect - hmmm, could work.
I'm currently reading through those Unity Gems pages, since I am trying to create a similar shader myself. I am thinking of learning a bit about shaders in general, then following the steps on this page to learn about making a glow shader in particular*. Anyway, only found out about those Gems pages on shaders after reading this question, so I'll have to thank you for that!
*Or at the very least use the fragment shader code there and convert it to work in Unity, if I don't get all the magic talk around there...x]
Your answer
Follow this Question
Related Questions
How to create dota2 alike glowing effect? 3 Answers
Use Glow Effect in Unity Free 1 Answer
volumetric light/sun shaft test 1 Answer
Light glow effect test 3 Answers
Unity 5 2D Bloom Effect? 2 Answers