Light Part 5
Shaders
Now lets look at a lava texture and its shader.
I picked liquids/lavahell2
Insert pic from level

Now the shader:
For textures/liquids/lavahell2
{
// Added to g3map_global texture on May 11, 1999
qer_editorimage textures/liquids/lavahell.tga
q3map_globaltexture
qer_nocarve
surfaceparm noimpact
surfaceparm lava
surfaceparm nolightmap
q3map_surfacelight 3000
tesssize 256
cull disable
deformVertexes wave 100 sin 5 5 .5 0.02
fogparms ( 0.8519142 0.309723 0.0 ) 128
{
map textures/liquids/lavahell.tga
tcMod turb .25 0.2 1 0.02
tcMod scroll 0.1 0.1
}
}
Wait a minute this is a tutorial on light not shaders.
You can see that this lava gives off a lot of light with a q3map_surfacelight 3000
it should..
Let's look at a light-emitting texture.
For this tutorial I chose gothic_light/gothic_light3_3k
which has a light value of q3map_surfacelight 3000. Now
this may seem like a high number but for such a small
light texture it's not. Roughly speaking, the smaller the
light-emitting texture the higher the light value has to
be.
Here's the shader
textures/gothic_light/gothic_light3_3k
{
qer_editorimage textures/gothic_light/gothic_light3.tga
q3map_lightimage textures/gothic_light/gothic_light2_blend.tga
q3map_surfacelight 3000
// light 1
surfaceparm nomarks
{
map $lightmap
rgbGen identity
}
{
map textures/gothic_light/gothic_light3.tga
blendFunc GL_DST_COLOR GL_ZERO
rgbGen identity
}
{
map textures/gothic_light/gothic_light2_blend.tga
rgbGen wave sin .6 .1 .1 .1
blendfunc GL_ONE GL_ONE
}
}
"That's all I'm going to say about shaders for the
moment."
Now there are many more light textures to pick from.
Some have moving part in the shader.
Let's talk about the one with the blue streak in it.
sfx/border11c
A very cool texture.
But how do you get it to wrap around corners? Go ahead
and try to do it with brushes. When you are done pulling
your hair out read on.
It's done with a simple patch mesh, (curve menu
then simple patch mesh). First build a
brush the size of one of the walls where you want this
texture. Then go to the curve menu and turn it into a
mesh. A little box will pop up and ask what patch density
you want.
For this map I used width 11 and height 3.
Then all I did was vertex edited the patch so it went all
around the room. There are brushes with caulk behind the
mesh because as you know meshes don't block Vis or seal a
map from the void.
I will explain this better in my next tutorial Mesh's
101
There is one more trick up my sleeve to help light up a
level.
To stop this page from
getting any longer, the proper use of light-emitting
textures like skies and lava add real moody light.
And it's a lot easier to do than tons of light entities.
Lets go to the next page to talk about light beams Lighting part
6