Gamestudio Links
Zorro Links
Newest Posts
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, 7th_zorro, Ayumi), 749 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 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 | 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