Shaders again.

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

Shaders again.

Post by Ganemi »

I'm having shader problems again.

Image

I'm trying to get my RL to look glossy, like the BFG. but, I want that floating blueish white image on my RL to be ontop of everything while the image that is used in that BFG shader is opaque, and makes the RL look shiny.

Alright, so that's not the real problem anymore. I got my RL looking all spiffy, but I only want that to work on the barrel, not the rear of the gun. My clanmate showed me how to do it a while ago, but he's not...around anymore.

I've tried different combinations to get it to work, but it doesn't. Looks like I've lost my already callous touch. Could someone help, please?
Ganemi
Posts: 564
Joined: Thu Apr 21, 2005 12:57 pm

Post by Ganemi »

About 25 people viewed, but no one responded. Well, that's alright. I don't think anyone could've understood what I meant, but anyway, this is what I was trying to do:

Image

Yay.
User avatar
Scourge
Posts: 15559
Joined: Mon Mar 25, 2002 8:00 am

Post by Scourge »

Well, the majority of the people here are mappers not modellers. There are some, just not very many so it may take a while to get an answer. Glad you got it figured out anyway. :)
Lenard
Posts: 737
Joined: Mon Aug 04, 2003 7:00 am

Post by Lenard »

Yeah, looks nice.
[img]http://myspace-001.vo.llnwd.net/00555/10/05/555355001_l.gif[/img]
$NulL
Posts: 100
Joined: Wed Mar 27, 2002 8:00 am

Post by $NulL »

Can you post your shader, so we know what youve got so far.
Ganemi
Posts: 564
Joined: Thu Apr 21, 2005 12:57 pm

Post by Ganemi »

models/weapons2/rocketl/rocketl
{
{
map textures/effects/rocketl.tga
rgbGen lightingDiffuse
}
{
map textures/effects/tinfx2d.tga //The shiny part, ofcourse.
blendfunc gl_one gl_one_minus_src_color
rgbGen lightingDiffuse
tcMod scroll 0.005 0.005
tcGen environment
}
{
map textures/effects/newTeleporteffect3.tga //A big scrolling blueish white image that I've grown fond of.
blendfunc add
tcMod scale 0.3 1
tcMod scroll -1 -5
}
{
map textures/effects/rocketl2.tga //In this image, the blue part of the rocket launcher is an alpha layer.
blendfunc blend
rgbGen lightingDiffuse
}
}


I tried to add the same effect to all the metallic parts of the grenade launcher, the plasma gun, the railgun, and the lightning gun, but the scripts just aren't working for the railgun or the lightning gun.
o'dium
Posts: 11712
Joined: Sun Mar 25, 2001 8:00 am

Post by o'dium »

Heres mine, its a bit more simple than yours.

http:\\www.quake2evolved.com\odium\q3_od_rl_new.pk3

Also, heres my shader. Take a look at my pics and shader to see how to optimize yours a bit better:

Code: Select all

models/weapons2/rocketl/rocketl
{
	{
		map models/weapons2/rocketl/rocketl.tga
		rgbGen lightingDiffuse
	}
	{
		map textures/effects/tinfx2b.tga
		tcGen environment
		blendFunc add
		rgbGen lightingdiffuse
	}
	{
		map models/weapons2/rocketl/rocketl.tga
		blendfunc blend
		rgbGen lightingDiffuse
	}
}
Ganemi
Posts: 564
Joined: Thu Apr 21, 2005 12:57 pm

Post by Ganemi »

Do you know how to add that second stage, in a way that causes the texture to move across the rl's surface when the mouse is moved?

I think i mean tcGen lightmap, but when I tried that, it was very glitchy.
o'dium
Posts: 11712
Joined: Sun Mar 25, 2001 8:00 am

Post by o'dium »

You cant, because the position of the enviroment map is relevent to the camera, not the world (Which is both right and wrong in different peoples views. IMHO, it should be the world, not the camera, which would mean the env map would move with your camera, because it IS a reflection afterall.)
Ganemi
Posts: 564
Joined: Thu Apr 21, 2005 12:57 pm

Post by Ganemi »

That post was confusing, though I get why environment works the way it does, and the 1st person rl's texture doesn't move. Yesterday I replaced the tcGen environment with tcGen lightmap, but then the texture moved quickly with the smallest nudge of my mouse. That's what I'm trying to smooth out.: ]

A GIF of what I'm talking about.

Image
It came out laggy for some reason. *shrugs*
Post Reply