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
6 registered members (TipmyPip, Niels, dBc, Ed_Love, 3run, 1 invisible), 17,843 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
Wrapping Texture around Object #248170
01/25/09 00:23
01/25/09 00:23
Joined: May 2005
Posts: 133
Germany, Passau
AlexDeloy Offline OP
Member
AlexDeloy  Offline OP
Member

Joined: May 2005
Posts: 133
Germany, Passau
I'm just messing around with the shader tutorials an I tried to wrap a texture around a model which works but uses the UV Set defined in the model.
Is it possible to wrap it around the model regardless of the given UV Set of the model ?
The Point is that I deform the models at runtime but the textures should keep their proportions no matter what size the model gets.

Re: Wrapping Texture around Object [Re: AlexDeloy] #248612
01/27/09 23:01
01/27/09 23:01
Joined: Dec 2000
Posts: 4,608
mk_1 Offline

Expert
mk_1  Offline

Expert

Joined: Dec 2000
Posts: 4,608
differs on what you do. You can use a material matrix for fixed functions iirc or you can just read different coordinates from the texture in a shader
like
color = tex2D(texture0, texcoords.xy * 2); // with 2 being the scale factor


Follow me on twitter
Re: Wrapping Texture around Object [Re: mk_1] #248976
01/30/09 16:41
01/30/09 16:41
Joined: Jan 2003
Posts: 4,615
Cambridge
Joey Offline
Expert
Joey  Offline
Expert

Joined: Jan 2003
Posts: 4,615
Cambridge
you should try triplanar projection. use world coordinates and blend the textured based on the angle to your x, y and z axis. it's not trivial but works very well.

Re: Wrapping Texture around Object [Re: Joey] #249036
01/31/09 08:35
01/31/09 08:35
Joined: May 2005
Posts: 133
Germany, Passau
AlexDeloy Offline OP
Member
AlexDeloy  Offline OP
Member

Joined: May 2005
Posts: 133
Germany, Passau
Thanks for your replys, the next two weeks are packed with exams so I'll give it a try as soon as I got more time.


Moderated by  Blink, Hummel, Superku 

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