Gamestudio Links
Zorro Links
Newest Posts
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
2 registered members (alibaba, vicknick), 1,379 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
entity texture tiling #292288
10/01/09 18:06
10/01/09 18:06
Joined: May 2009
Posts: 1,816
at my pc (duh)
darkinferno Offline OP
Serious User
darkinferno  Offline OP
Serious User

Joined: May 2009
Posts: 1,816
at my pc (duh)
well am not sure if this is where this should go but heres what i want to achieve:



normally when an entity is scaled, its skin gets stretched but what i want to do is have the skin repeat/tile, is there away to accomplish this with/without a shader? doesnt matter either way

-thanks in advance-

Re: entity texture tiling [Re: darkinferno] #292428
10/03/09 12:46
10/03/09 12:46
Joined: Jun 2008
Posts: 151
Ukraine
XD1v0 Offline
Member
XD1v0  Offline
Member

Joined: Jun 2008
Posts: 151
Ukraine
darkinferno you can scale UV texture coordinate for each vertex in model (ent_getvertex,ent_setvertex)


A7 Commercial cool
Celeron 1700, GeForce 5500 FX 256mb, 1 Gb Ram
Re: entity texture tiling [Re: XD1v0] #292434
10/03/09 14:23
10/03/09 14:23
Joined: Oct 2006
Posts: 470
Balkan
Ganderoleg Offline
Senior Member
Ganderoleg  Offline
Senior Member

Joined: Oct 2006
Posts: 470
Balkan
If your using MED then only way to make textures tile (in their original size) after resizing (scaling faces or changing vertex position) is to go to Skin Editor and resize the skin mapping (by scaling faces or changing vertex position).

Sorry- you meant ingame re-scaling of textures blush ...don't know about that.



Last edited by Ganderoleg; 10/03/09 14:55.

>>Demos free3DModels Tutorials<<
>>>>>>> by Pavle Nikolic <<<<<<<

Re: entity texture tiling [Re: XD1v0] #292436
10/03/09 14:46
10/03/09 14:46
Joined: May 2009
Posts: 1,816
at my pc (duh)
darkinferno Offline OP
Serious User
darkinferno  Offline OP
Serious User

Joined: May 2009
Posts: 1,816
at my pc (duh)
Originally Posted By: XD1v0
darkinferno you can scale UV texture coordinate for each vertex in model (ent_getvertex,ent_setvertex)
i read up on it but didnt see any information about UV coordinates so am not entirely sure, any tips?

Re: entity texture tiling [Re: darkinferno] #292524
10/04/09 13:56
10/04/09 13:56
Joined: Feb 2006
Posts: 385
Oldenburg,Germany
Ralph Offline
Senior Member
Ralph  Offline
Senior Member

Joined: Feb 2006
Posts: 385
Oldenburg,Germany
Edit:
I dont read that you doesnt want to use a shader...
But i made a texture tiled function a while ago..search at my name and you will find it. wink
You can try a pixel-shader like this:
Code:
MATERIAL* tiled_texture ={
	effect="
	float4 vecSkill1;
        sampler2D smpSource = sampler_state { texture = <entSkin1>; };
        float4 myShader( float2 Tex : TEXCOORD0 ) : COLOR0 
	{
                Tex.x = Tex.x * vecSkill1[0];
                Tex.y = Tex.y * vecSkill1[1];
                return tex2D(smpSource,Tex.xy);
        }

	technique postFX 
	{ 
		pass p1 
		{ 
			PixelShader = compile ps_2_0 myShader(); 
		} 
	}
	";
}
//And this should be in the entity function
function entity_func(){
	my.material = tiled_texture;
	while(1){
		tiled_texture.skill1 = floatv(my.scale_x+my.scale_z);
		tiled_texture.skill2 = floatv(my.scale_y+my.scale_z);
		wait(1);
	}
}


(This is not tested, but it should work)
Greetings Ralph

Last edited by Ralph; 10/04/09 15:26.

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