Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, VoroneTZ, dpn), 1,346 guests, and 10 spiders.
Key: Admin, Global Mod, Mod
Newest Members
LucasJoshua, Baklazhan, Hanky27, firatv, wandaluciaia
19053 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 | chip programmers | 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