PDA

View Full Version : Coloured Glow Effect on Object



savage
15-01-2005, 03:04 PM
This is probably really easy, but how can I make a mesh have a coloured glow effect around it. Initially it will be a sphere, but that sphere will deform over time, but I still want it to be able to switch between a blue glow and a red Glow.

Would the Radial Blur effect from Nehe ( http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=36 ), be ok or is that too CPU intensive?

Paulius
15-01-2005, 05:22 PM
NeHes?¢_~s radial blur is not exactly a glow, and while it doesn?¢_~t do anything on the CPU it is a very poor filtrate eating implementation. The way I did glow in my intro Elerium http://www.pgd.netstarweb.com/viewtopic.php?t=1495 is: Clear buffers, render glowy stuff in a small power of two viewport and copy it to a texture, bind the same texture to 2 texture units, without clearing the screen, draw a quad with one texture mapped with screen coordinates a bit jittered to top, the other one a bit to bottom(now it is blurred vertically), copy the viewport to the same texture again and render another quad with one texture?¢_Ts coordinates a bit jittered to the left and another a to the right(now it is blurred in all directions), all with additive texture environment off course, copy it to the same texture again draw the scene in a normal viewport and finally draw the glow texture on top, if you want more contrast you could draw a translucent black quad on top on the first pass. This way you can?¢_Tt blur more then by the size of one pixel on the glow texture, but AFAIK there?¢_Ts no other way to do blur without pixel shaders. On the side note multitexturing can save a great deal of fillrate with such postprocessing effects, as all decent cards like non mx GeForce?¢_Ts have at least 2 texture mapping units.