Login | Register 
FEATURES
APPLICATIONS
DOWNLOADS
EDUCATION
BLOG
WIKI
FORUM
STORE

How to properly map/texture a trapezoid quad?

General discussion about anything TouchDesigner

How to properly map/texture a trapezoid quad?

Postby Achim » Sun Jun 10, 2018 4:06 pm

quad.PNG
quad.PNG (125.94 KiB) Viewed 530 times
How do I get the texture correctly stretched onto the trapezoid quad?
Achim
 
Posts: 1668
Joined: Wed Nov 14, 2007 1:52 pm

Re: How to properly map/texture a trapezoid quad?

Postby nettoyeur » Sun Jun 10, 2018 8:13 pm

Hey Achim, I added a Texture SOP, it this the result you wanted?
trapezoid-texture.png
trapezoid-texture.png (147.13 KiB) Viewed 519 times
Attachments
trapezoid_texturing.tox
(2.16 KiB) Downloaded 18 times
Idzard Kwadijk | freelance TouchDesigner consultant | LinkedIn
Checkout ChopChopChop.org - the TouchDesigner marketplace!
nettoyeur
 
Posts: 905
Joined: Mon Oct 15, 2012 12:00 pm
Location: Amsterdam, The Netherlands

Re: How to properly map/texture a trapezoid quad?

Postby Achim » Mon Jun 11, 2018 1:09 am

No. I’m sorry, I should have been more clear.

You just textured the quad after the distortion.
I want to texture first and then move the points and the whole texture is still on the quad, just stretched. Basically just like it would happen in a corner pin TOP.
Achim
 
Posts: 1668
Joined: Wed Nov 14, 2007 1:52 pm

Re: How to properly map/texture a trapezoid quad?

Postby malcolm » Mon Jun 11, 2018 1:32 pm

If you subdivide the single quad into many smaller quads after the transformation, things look much better again. This is a lot of articles about this around the web, but basically the mathematically correct solution involves using all 4 texture coordinates (stpq) and filling the q in correctly for this one case. However we don't support 4 component texture coordinates in TouchDesigner so you can't use that solution unfortunately.
User avatar
malcolm
Staff
 
Posts: 4054
Joined: Tue Nov 13, 2007 1:11 am

Re: How to properly map/texture a trapezoid quad?

Postby bLackburst » Tue Jun 12, 2018 3:55 am

Have you seen the cornerPin SOP in the pallette?
bLackburst
 
Posts: 291
Joined: Thu Sep 01, 2011 3:56 am
Location: Melbourne, Australia

Re: How to properly map/texture a trapezoid quad?

Postby malcolm » Tue Jun 12, 2018 11:43 am

Good point. I think Markus used similar math done manually in Python to get that result.
User avatar
malcolm
Staff
 
Posts: 4054
Joined: Tue Nov 13, 2007 1:11 am

Re: How to properly map/texture a trapezoid quad?

Postby Achim » Tue Jun 12, 2018 11:47 am

Not really. If you give the corner pin sop less subdivisions it suffers from exactly the same error
Achim
 
Posts: 1668
Joined: Wed Nov 14, 2007 1:52 pm


Return to General TouchDesigner Discussion

Who is online

Users browsing this forum: No registered users and 12 guests