Gamestudio Links
Zorro Links
Newest Posts
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
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
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, bigsmack, monarch), 1,240 guests, and 9 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19058 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