PDA

View Full Version : Slide-Show-Shader


Tigris
11-15-2002, 08:26 PM
Ok, I want a advertising in my map, that blends from texture to texture- now in the shadered the following shader already does that, but ingame it's stuck at the first image...

textures/ad/ad1
{
qer_editorimage textures/ad/ad1
q3map_surfacelight 4000
surfaceparm noimpact
surfaceparm nomarks
surfaceparm nonsolid
surfaceparm trans
q3map_nolightmap
{
animMap 0.5 textures/ad/ad1 textures/ad/ad1_2 textures/ad/ad1_3 textures/ad/ad1_4
blendFunc GL_ONE GL_ONE
}
}

Tigris
11-17-2002, 07:32 PM
Anyone?

VIO
11-21-2002, 11:30 PM
if its stuck its prob because its not reading the other code maybe something is wrong with it im not good with shaders though. also try a diff texture and see if it works.

Tigris
11-22-2002, 11:23 AM
Ok, Q3ASE helped me- If anyone likes to use it:

textures/ad/ad1
{
qer_editorimage textures/ad/ad1_1.tga
surfaceparm noimpact
surfaceparm nomarks
surfaceparm nonsolid
surfaceparm trans
q3map_surfacelight 4000
{
map textures/ad/ad1.tga
blendfunc add
}
{
animmap 0.5 textures/ad/ad1_1.tga textures/ad/ad1_2.tga textures/ad/ad1_3.tga textures/ad/ad1_4.tga
}
}

Just make Textures called ad1_1.tga to ad1_4.tga and it circles through them.
You can also edit the "animap" line- the number tells the programm to make it a 0.5 FPS animation, so changing the pic every 2 Seconds.
The textures/ad/ad1_1.tga to ...ad1_4.tga describe which textures to use and in what order- if you want a particular texture to be shown longer that the normal duration just set it two times in a row in the shader.

If you use this shader I would like a note of thanks in the readme, was quite some work to figure it out ;)

NITEMARE
11-24-2002, 07:56 AM
good work man!
does anybody know if this animation can be triggered by a button? that would rock...

Tigris
11-25-2002, 09:28 AM
You could- make it a brush using func_train, then connect it with a trigger_once to make it move out of a wall behind the "screen"- that way it would look like it's being triggered by some event- Think I've heard of at least one other way to get the same effect, but right now I can't remember; perhaps RichDiesel has covered it in his tutorials...

NITEMARE
11-25-2002, 09:37 AM
i got that done already. i made it an effect and placed a fx_runner wich shows it allthe time at a fixed spot. fx_runner can be triggered so i guess i can do it...

Tigris
11-26-2002, 02:04 AM
Haven't worked with the FX yet, so I didn't know that. Gald though to hear you've got it working :)