create custom texture

13 views
Skip to first unread message

miarmy

unread,
Aug 1, 2016, 9:20:51 AM8/1/16
to Python Programming for Autodesk Maya
hi!
i have u and v parametr of a mesh, can i write the one pixel with them??
like 3d point tool, but with U and V parametr and python....

Marcus Ottosson

unread,
Aug 1, 2016, 9:35:35 AM8/1/16
to python_in...@googlegroups.com
That UV coordinate you have is a 0-1 coordinate of an possible texture image.

If you were to put a pixel at [0.5, 0.5] on a 500x500 image, you'd be putting a pixel right at the center, at 250x250.

The mesh doesn't play a part here, once you have the UV coordinate you're in 2d-land already. The trick is usually getting the UV coordinate from 3d space, but it sounds like you've already got it, in which case you're nearly home.
Reply all
Reply to author
Forward
0 new messages