How to give Textures a nice Glow
From Dark Wiki
originally written by gleeful (original Forum Post: http://modetwo.net/darkmod/index.php?showtopic=2377)
Contents |
Write a material for the glowing Texture
textures/darkmod/gleeful/ctywindow02_lit
{
noSelfShadow
noshadows
forceoverlays
{
map textures/darkmod/gleeful/ctywindow02_lit // this is the regular diffusemap
}
{
blend add
map textures/darkmod/gleeful/lit // this is the .tga to blend it with - an orange to
// white gradient in my case
red 0.3 // with the rgb values you can regulate the intensity
green 0.3
blue 0.3
}
}
Make a Patch Mesh
Then make a simple patch mesh in the editor (slightly bigger than the window), put the "flaresizeable" texture on it (which you can find in the sfx folder) and make it a func_static.
Place the Patch Mesh
Place the mesh one 0.125 unit before the window to avoid z-fighting.
Set the Flare Color
Now press "k", choose a color for the flare and diminish it's brightness until it is translucent. you can also use the key/value pair "shaderparm4/negative or positive value" to increase/decrease the size/intensity of the flare-effect.
The Result
An example can be seen here:
