Weapon Shaders. : [

Discussion for Level editing, modeling, programming, or any of the other technical aspects of Quake
Post Reply
Ganemi
Posts: 564
Joined: Thu Apr 21, 2005 12:57 pm

Weapon Shaders. : [

Post 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.
Image
Third person view.
Image

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


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? : (((
^misantropia^
Posts: 4022
Joined: Sat Mar 12, 2005 6:24 pm

Post 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.
Ganemi
Posts: 564
Joined: Thu Apr 21, 2005 12:57 pm

Post 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
}


}
Plan C
Posts: 13
Joined: Sat Apr 09, 2005 6:25 pm

Post 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.
Ganemi
Posts: 564
Joined: Thu Apr 21, 2005 12:57 pm

Post by Ganemi »

Shaderlist file? Whats that?

Would that have anything to do with why my gauntlet shader is not working, either?
Plan C
Posts: 13
Joined: Sat Apr 09, 2005 6:25 pm

Post 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.
Ganemi
Posts: 564
Joined: Thu Apr 21, 2005 12:57 pm

Post 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.
$NulL
Posts: 100
Joined: Wed Mar 27, 2002 8:00 am

Post 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?
Ganemi
Posts: 564
Joined: Thu Apr 21, 2005 12:57 pm

Post 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:
Image

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? : [
Post Reply