Page 1 of 1
Shader speed of movement question.
Posted: Fri Apr 22, 2005 1:41 am
by Magnus
I have been looking through obsidian's shader manual and can't find exacly what I am looking for.
I am wondering what variable controls how fast a shader moves across the surface of whatever it is applied to.
Like the shader firegorre.tga moves really fast on gorre and krusade, but the clouds in many of the skys move kinda slow.
I created a bot and applied a shader to it with a texture I created myself, but it moves around in the bot like crazy. I would like to slow it WAY down.
Thanks.
Posted: Fri Apr 22, 2005 2:11 am
by ^misantropia^
It's the
tcMod scroll x y command. x and y control the horizontal and vertical scroll speed.
//Obsidian: Fixed link.
Posted: Fri Apr 22, 2005 2:12 am
by ^misantropia^
Damn, I've been beat

Posted: Fri Apr 22, 2005 3:42 am
by obsidian
You've linked to the wrong paragraph, misantropia. I've fixed it for you.
Textures use s and t coordinates which correspond to x and y in 3D space.
If you are using other tcMod functions (rotate, scale), make sure that tcMod scroll is the LAST tcMod operation listed in your shader.
Posted: Fri Apr 22, 2005 4:14 am
by Magnus
So if I change the values in red to lets say 0.025 0 0.9 then the shader will move more slow and gentil?
{
map textures/sfx/aeolusclouds.tga
blendFunc GL_ONE GL_ZERO
tcmod scroll 0 1
tcMod turb 0 .25 0 1.6
tcmod scale 4 4
rgbGen identity
}
{
map models/players/aeolus/default.tga
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
rgbGen lightingDiffuse
}
Posted: Fri Apr 22, 2005 4:29 am
by Magnus
Ok, I tried the above settings and it did slow the shader down, but it seemed to move in a almost linear straight from the floor up direction.
I want to get a kind of effect like clouds moving along, but also gently and slowly swaying back and fourth. If you guys know exactly what values will acheive that effect let me know. Untill I hear back from you I will play with it a bit to see if I can get it on my own.
Thanks to you all for the help!
BTW, obsidian thanks for the help and opinion by e-mail! :icon14:
And misantropia...thanks to you too man! Now go to bed and get some rest you frag monger! Just kidding!
Oh, and don't wamt to leave you out Kaziganthe. Thanks man!
Posted: Fri Apr 22, 2005 5:50 am
by Lenard
...wtf
Posted: Fri Apr 22, 2005 8:22 am
by Magnus
Could you please clarify what you are ...wtf-ing about? :icon25:
Thanks.

Posted: Fri Apr 22, 2005 8:31 am
by Magnus
BTW, I think I have it. The tcmod scroll determines how fast or if the shader "scrolls" in a linear direction.
The tcmod turb determines the how fast the shader sways back and fourth. The first value controls how fast or if the shader will sway in x direction and the second value controls how fast or if the shader will sway in y direction. Correct?
I think I have it down right now. Please correct me if I have it wrong and explain where I went off the path..lol.
Thanks again guys!
Posted: Fri Apr 22, 2005 12:24 pm
by ^misantropia^
Yep. Regarding the speed of scrolling: tcMod scroll 0.25 0.4 should do the trick.
BTW: thanks, obsidian.