Gamestudio Links
Zorro Links
Newest Posts
Trades during a running bar
by Martin_HH. 09/18/26 12:45
Capital slider is not saving in Z12
by frutza. 09/17/26 13:36
Avoiding pop-up training parameter results
by Martin_HH. 09/16/26 21:31
What are you working on?
by rayp. 09/16/26 20:20
Future of ZorroHFT
by TipmyPip. 09/16/26 09:28
Fun Arcade Car Physics (nfs style)
by rayp. 09/16/26 05:23
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
1 registered members (3run), 3,107 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
lokkalyansamiti, rahulbuilds, speedx, liop, Bauer097
19235 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