blended shaders


(FAQIS) #1

Hii

So im seaeching for a way to blend 2 pics/shaders in one…

So for example the effects textures can look very cool…
But now I wonder if its possible to get a metal mirror even in a dusty metal

My idea is to maybe make a tga thats partically transculent at top or something but I got no idea how…
If you know any good way to do this?


(Loffy) #2

I do not know how to do it right away but perhaps you can use alpha fades? Link to Simon’s web site and terrain blending.


(Teuthis) #3

texture blending will for sure do the job for the two textures you wanna blend over. There is a tutorial by Socs which helped me a lot. You will find the link in a recent post from me here. Not sure whether you can blend shaders but technically you might be able to make one out of two (but that’s not blending because you will have both shaders fully functional). what you can do is to use the same texture with 2 different shaders. You need to have the same texture twice with different names. each texture then has it’s own shader and when you put the two textures next to each other won will have the feeling that the shaders are blended.


(FAQIS) #4

Yep, 1/2 thanks to you… 1/4 each… Lol…

Nope… Im not searching for a terrain blending…
Ive already followed soc’s (simonoc’s) tutorial :confused:
It was very clear and good tutorial 9 out of 10
(in fact Ive maded a shader called FAQIS’ blend
(Faqis_blend) that using original textures and blending them…
Also tried to make a alpha system in 3 stages but it didnt work:(

So in my terrain blending I used alpha poles with diffren color

Red = 0
Green = 50 (not working :()
Blue = 100

//thats my tip to everyone make a visual hint in the editor;)

Well what I was askin for was if its possible to use the effects as a primary texture and then use a dust texture upon it…

Like 50% metal mirror
And 50% dusty and non mirror metal?

I dont know how the effects are created :(…
But I guess they are used in mml_helmsdeep?

If you also look close at the gold crates you will see the gold got a shiny mirror effect

Also all guns are a little bit of a mirror in et… But only a little bit!

So to make a texture that is shiny at places where there not is dust or rust

So no terrain… We are talking about plates and metal now…

////back to offtopic:

Faqis_blend + mf_mf_mf (minecraft package) can be downloaded in genesis clan pk3
Its okey to use my terrain blend in your map… BUT DONT EDIT THE SHADER UNLESS YOU RENAME IT!
download: http://www.mediafire.com/?rjevii3l2a9m9ne

The pk3 contains:

(map): Genesis minecraft frag
(map): Genesis forest frag
(map): Genesis desert frag
(menu(s): Genesis menu package (direct connect)
(shader): Faqis_blend
(shader): mf_mf_mf

Genesis direct connect menu isnt updated so n!tmod direct connect doesnt work becouse of mismatching IP…

mf_mf_mf is a minecraft styled texture pack for genesis minecraft frag


(stealth6) #5

textures/stealth6/ametal_m01 // path displayed in radiant
{
	qer_editorimage textures/stealth6/ametal_m01.tga // path to texture displayed in radiant
	{
		map textures/effects/wdfx_W.tga // shiny effect
		rgbGen identity
		tcGen environment
	}
      {
		map textures/stealth6/ametal_m01.tga // metal texture
		blendFunc GL_ONE GL_ONE_MINUS_SRC_ALPHA
		rgbGen identity
      } 
	{
		map $lightmap // add lighting
		blendFunc GL_DST_COLOR GL_ZERO
		rgbGen identity
	}
}

Make a texture with an alpha channel. The white parts won’t be shiny, the black parts will be shiny, save it as a 32 bit tga file. Use the above shader.
You can change the shiny effect by replacing “map textures/effects/wdfx_W.tga”
I think there are 3 different ones in pak0.pk3:
textures/effects/wdfx_W.tga
textures/effects/tinfx.tga
textures/effects/wdfx4.tga


(FAQIS) #6

Wow man! I knew it should work some way… Hehe…

Great thanks man!!!


(FAQIS) #7

Ehhmm…

But that effect is an jpg?!?!

And it doesnt work baby :frowning:


(stealth6) #8

You can always write texturename.tga in a shader. If it can’t find a tga file then it will look for a jpg file. Also it does work, I tried it. What is going wrong for you?

EDIT: If you meant the metal texture is a .jpg I picked 1 from pak0.pk3, opened it in photoshop, added an alpha layer, saved it as tga. That’s why the path is also different.


(FAQIS) #9

Hmm…

It is maybe an error in my shader…
Had another error in a texture (a ventile with holes in alpha) and it did work when I changed something
But I cant remember what :confused:

I will post the shader here if I not find the bug.


(Mateos) #10

Even with a JPG you should be able to give it an alpha value through shader, the engine will fade it.