Small tutorial for shaders -1 reply

Please wait...

Silken

Slightly cooler than a n00b

50 XP

30th July 2002

0 Uploads

40 Posts

0 Threads

#1 16 years ago

Make folder called shaders in base directory where other folders are (Models, Sounds, Scripts, Botfiles).

Then make file inside called "name of model".shader (Example Luke.shader)

Open it with notepad to start writing commands

Here are commands for basic 3:

Specular maps:

models/players/Sirian/Hood // Name of base surface { { map models/players/Sirian/Hood.tga // Name for base color texture rgbGen lightingDiffuse } { map models/players/Sirian/Hood_spec.tga // Name of Specular texture blendFunc GL_SRC_ALPHA GL_ONE alphaGen lightingSpecular detail } }

Easiest to use Greyscale specular textures. White gives most specular when black is none.

Self-Illuminating:

models/players/Sirian/Legs // Name of base surface { { map models/players/Sirian/Legs.tga // Name for base color texture rgbGen lightingDiffuse } { map models/players/Sirian/Belt_glow.tga // Name for Self-Illuminating texture blendFunc GL_ONE GL_ONE } }

Self-Illuminating areas gets color from Illuminating textures. If want green light for example then add green spot to Illuminating texture.

Reflection:

models/players/Sirian/Hood // Name of base surface { { map models/players/Sirian/Hood.tga // Name for base color texture

rgbGen lightingDiffuse } { map gfx/effects/chr_white_add_mild.tga // Name for reflection texture blendFunc GL_SRC_ALPHA GL_ONE detail tcGen environment } }

Some notes from Specular and Self-Illuminating Textures. They use same texture coordinates as Base color texture. Means if you like to have that one light in color texture to light up then you need to panit to exact spot on Luminosity texture. However Specular and Self-Illuminating textures dont have to be same size as Base texture.

I hope this helps some. And i propably forgot to add something here already.




Cloud_guy

Revenge was here.

50 XP

11th July 2002

0 Uploads

2,433 Posts

0 Threads

#2 16 years ago
Then make file inside

what do you mean make a file inside what kind of file?




Silken

Slightly cooler than a n00b

50 XP

30th July 2002

0 Uploads

40 Posts

0 Threads

#3 16 years ago

Typing error. Should read following. Make .shader file inside Shaders folder.




Silken

Slightly cooler than a n00b

50 XP

30th July 2002

0 Uploads

40 Posts

0 Threads

#4 16 years ago
Cloud_guy

Revenge was here.

50 XP

11th July 2002

0 Uploads

2,433 Posts

0 Threads

#5 16 years ago

do i need the shader program to make a shader cus i did what you said and it didnt look like a shader file is it bcuz i dont have the sahder program




Silken

Slightly cooler than a n00b

50 XP

30th July 2002

0 Uploads

40 Posts

0 Threads

#6 16 years ago

For shader textures you of course need Painting program (Photoshop, Paint Shop Pro or even windows Paint is suffient :D )

And viewer for to see changes made in shader file. I used JKII as viewer with devmap command to change angles. Not the best option but will do.

But to make shader file any word processor will do (Notepad, Wordpad, etc)