How to Create Surface Light Shaders

I have been trying for a week now to make a custom surface light shader.

I have noticed that surface light shaders such as textures/base_light/ceil_white5k from pak0.pak work just fine. However, when I try to make a surface light that follows the same patteren it just failes to emit light and only shows up as a regular, non-light emitting, texture.

For example here is the shader for textures/base_light/ceil_white5k:

textures/base_light/ceil_white5k as extracted from pak0.pak:

textures/base_light/ceil_white5k
{
qer_editorimage textures/base_light/ceil1_38.tga
surfaceparm nomarks
q3map_surfacelight 5000
{
map $lightmap
rgbGen identity
}
{
map textures/base_light/ceil1_38.tga
blendFunc GL_DST_COLOR GL_ZERO
rgbGen identity
}
{
map textures/base_light/ceil1_38.blend.tga
blendfunc GL_ONE GL_ONE
}
}

Now if I even copy that one verbatim changing only the paths to the shader text and image files, all I get is a regular texture displayed on a non-light emitting brush.

Here’s a screen shot from Wolfcam it does the same thing in ioquake of a brush covered with a copy of the above shader extracted from the pk0.pak given a different name and put into the base sripts and texture folders.

As you can see the texture shows up fine although there is an absence of any emitted light from the surface of the brush to illuminate the small room I have it in.

Any help would be appreciated.

BTW Wolfcam seems to lack or has misplaced the shaders for the machine gun muzzle flash and model blood splater when being hit. Anybody know what they are called?

q3map_surfacelight only affects the map compiler. Maybe q3map2 doesn’t find your shader?

Well, I have other shaders that I wrote in the same folder that work, so I think q3map2 can find the folder. Just for giggles I tried compiling the same map with NetRadiant and it worked. So the problem must be in either the options sent to q3map2 by GtkRadiant or a bug in the version of q2map2 that my install of GtkRadiant included.

Anyway at least the lights are on.

1 Like