Page 1 of 1
Weapon Shaders. : [
Posted: Thu Apr 21, 2005 1:49 pm
by Ganemi
Hey, guys? Is there any way to get a weapon with a shader working, so that map lighting works with it? This sounds vague, so let me show you what I mean.
Normal view without the shader, and just a skin. The red glow from the teleporter appears on the RL.

Third person view.
Now, when I put my shader on the rocket launcher, the map lighting stops working. : [

Third person view.
models/weapons2/rocketl/rocketl
{
{
map textures/effects/rocketl.jpg
}
{
map textures\effects\newTeleporteffect3.jpg
blendFunc GL_ONE GL_ONE
rgbGen entity
tcMod scale .3 1
tcMod scroll -1 -5
}
}
Why is it acting so screwy? : (((
Posted: Thu Apr 21, 2005 2:03 pm
by ^misantropia^
Change rgbGen entity to rgbGen identityLighting.
PS1: don't use backslashes in filenames.
PS2: the image suffix should be tga even if it's a JPEG.
Posted: Thu Apr 21, 2005 4:51 pm
by Ganemi
: [ That didn't do it. It still looks the same, but now the script looks like this:
models/weapons2/rocketl/rocketl
{
{
map textures/effects/rocketl.tga
rgbGen identityLighting
}
{
map textures/effects/newTeleporteffect3.tga
blendFunc GL_ONE GL_ONE
rgbGen identityLighting
tcMod scale .3 1
tcMod scroll -1 -5
}
}
Posted: Thu Apr 21, 2005 5:24 pm
by Plan C
Dis you remove the double slash "//" in front of "models" in your shaderlist file?
Been a long time but I seem to remember something about having to remove them in order to make custom model shaders work.
Posted: Thu Apr 21, 2005 5:48 pm
by Ganemi
Shaderlist file? Whats that?
Would that have anything to do with why my gauntlet shader is not working, either?
Posted: Thu Apr 21, 2005 5:57 pm
by Plan C
In C:\Program Files\Quake III Arena\baseq3\scripts\... there's a file called 'shaderlist.txt'.
This is where all shader files are 'called'.
In order for shaders to work they must be mentioned here.
Posted: Fri Apr 22, 2005 1:25 pm
by Ganemi
http://img.photobucket.com/albums/v406/ ... cripts.jpg
Yeah...that sounds like why I can't get my gauntlet's new shader to work. I can't find that file though.
It doesn't seem like the cause of this problem, though. Maybe I don't know what I'm talking about, but it looks like the part that tells the skin to be "maped" again
Code: Select all
{
map textures/effects/rocketl.jpg
}
covers the whole map lighting up.
HeEeEeEeEeLp!! This is really bugging me.
Posted: Fri Apr 22, 2005 2:22 pm
by $NulL
Shader Manual:
rgbGen lightingDiffuse
Colors are computed using a standard diffuse lighting equation. It uses the vertex normals to illuminate the object correctly.
Design Notes:
rgbGen lightingDiffuse is used when you want the RGB values to be computed for a dynamic model (i.e. non-map object) in the world using regular in-game lighting. For example, you would specify on shaders for items, characters, weapons, etc.
Is this what you're looking for?
Posted: Fri Apr 22, 2005 3:06 pm
by Ganemi
I thought that wasn't working when I first loaded CTF4, but I was surprised to see that it did work very well. Thank you very much, $NulL.
One more question, though...is there a way to get a shader working for my gauntlet?
From Polycount:
Today, I realized that I had this model that I made, stashed somewhere on my hard drive, since last january. Now that I've find it, I'm going to try to skin it again. I really don't know how to skin any model that I make, though. Apparantly I need a UV map, so I can skin it.
(I'm going to skin the handle, and put a shader on the sword part, but I need a skin for the sword to have a shader on it)
Can someone please help me? : [