Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
2 registered members (TipmyPip, AndrewAMD), 12,726 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
different u/v speed for skins at one model??? #209050
05/31/08 17:23
05/31/08 17:23
Joined: Dec 2005
Posts: 490
Germany/Berlin-Velten
kasimir Offline OP
Senior Member
kasimir  Offline OP
Senior Member

Joined: Dec 2005
Posts: 490
Germany/Berlin-Velten
Hello, i have one modell with 4 skins and i want to move 2 of these skins by using something like my.u/my.v .
The skins should move with separate speeds given by a variable, but my.u/my.v move all skins at once! (i don't want to create any extra models)

So is it possibe to create a material using a var for moving the skins??? (something like mtl.matrix)

German:
Hallo ich suche nach einer Möglichkeit die Skins eines Models mit unterschiedlicher Geschwindigkeit zu bewegen! My.u/my.v beeinflussen leider alle Skins! Gibts es evlt. einen Weg dieses abhängig von einer Variabel über ein Material zu steuern? (z.B. mtl.matrix)

THX Kasimir

Re: different u/v speed for skins at one model??? [Re: kasimir] #209051
05/31/08 17:31
05/31/08 17:31
Joined: Apr 2007
Posts: 582
Germany
Poison Offline
User
Poison  Offline
User

Joined: Apr 2007
Posts: 582
Germany


Everything is possible, just Do it!
Re: different u/v speed for skins at one model??? [Re: Poison] #209071
05/31/08 19:30
05/31/08 19:30
Joined: Dec 2005
Posts: 490
Germany/Berlin-Velten
kasimir Offline OP
Senior Member
kasimir  Offline OP
Senior Member

Joined: Dec 2005
Posts: 490
Germany/Berlin-Velten
THX -> but I am not familar with materials/effects - so pleace help me!

I tried this Code, but i have following Problems:

SED shows a Syntax-Error when running the script(i think it is not lite-c)

I want to move skin2 and skin3 in x-dircetion with using skill1 and skill2 -> how is it possible

How can i move the skin slower???

Code:
function mtl_UV_Clamp_event ();


MATERIAL* mtl_UV_Clamp =
{
	
   event = mtl_UV_Clamp_event;
	effect = "
		matrix matMtl;
		extern texture entSkin1;
		
		technique uvspeed
		{
			pass p0
			{
				Texture[1] = <entSkin1>;
				ColorOp[1] = SelectArg1;		
				TextureTransform[1] = <matMtl>;
				TextureTransformFlags[1] = Count2;
			}
		}";

}

function mtl_UV_Clamp_event ()
{
	mat_identity(mtl.matrix);
	mtl.ENABLE_RENDER = on;//<------------------ERROR Syntax???
	mtl.matrix31 = floatd(my.skill1, 1000);//how to change this to make it slower move?
	mtl.matrix32 = floatd(my.skill2, 1000);
}

THX kasimir


Re: different u/v speed for skins at one model??? [Re: kasimir] #209075
05/31/08 19:40
05/31/08 19:40
Joined: Apr 2007
Posts: 582
Germany
Poison Offline
User
Poison  Offline
User

Joined: Apr 2007
Posts: 582
Germany
Code:
function mtl_UV_Clamp_event ();


MATERIAL* mtl_UV_Clamp =
{
	
   event = mtl_UV_Clamp_event;
	effect = "
		matrix matMtl;
		texture entSkin2;
                 texture entSkin3;
		
		technique uvspeed
		{
			pass p0
			{
				Texture[1] = <entSkin2>;
				ColorOp[1] = SelectArg1;		
				TextureTransform[1] = <matMtl>;
				TextureTransformFlags[1] = Count2;

                                 Texture[2] = <entSkin3>;
				ColorOp[2] = SelectArg1;		
				TextureTransform[2] = <matMtl>;
				TextureTransformFlags[2] = Count2;
			}
		}";

}

function mtl_UV_Clamp_event ()
{
	mat_identity(mtl.matrix);
	mtl.flags = ENABLE_RENDER;
	mtl.matrix31 = floatd(my.skill1, 1000);//just change the values ;) 
        mtl.matrix32 = floatd(my.skill2, 1000);
}

np Poison :D


haven´t tested it but this should work.


Everything is possible, just Do it!
Re: different u/v speed for skins at one model??? [Re: Poison] #209079
05/31/08 20:06
05/31/08 20:06
Joined: Dec 2005
Posts: 490
Germany/Berlin-Velten
kasimir Offline OP
Senior Member
kasimir  Offline OP
Senior Member

Joined: Dec 2005
Posts: 490
Germany/Berlin-Velten
THX it was "flags"

but how i can move the second and third Skin??? (it works still with the first skin...)

Skin2 and Skin3 are only at Parts of the model!
I want to "animate" the tracks of a tank!

Last edited by kasimir; 06/01/08 05:36.

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1