How to give Textures a nice Glow

From The DarkMod Wiki
Jump to navigationJump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Originally written by gleeful on http://forums.thedarkmod.com/topic/2377

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:

screen20.jpg