PDA

View Full Version : query & write colors of file texture


r4inm4ker
09-22-2008, 05:15 AM
Hi, there're a couple of questions I'd like to ask here:

1. Is there any way to query RGB values of every pixel in a file texture? I'd like to know how to do it either with MEL or API.
2. is there any MEl or API function to write out an image file (i.e. tiff or exr) without having to use external library such as python imaging library etc?

What I'm gonna do is basically read an input texture, modify it, and then output the modified result into a new file, all in Maya if possible. Any help would be very appreciated.


-Jefri

GiantG
09-22-2008, 08:50 AM
Hi.

You can use colorAtPoint to parse you input texture.
Or just take a file node to load the base texture.
To modulate you texture you can use maya color utilities. They are pretty powerful.
You have plenty of blendmodes as well.

Then do a compositeTest 512 512; to write your texture.

But Maya is not a good choice for doing this stuff. It's damn slow.
I recommend to do this outside maya

r4inm4ker
09-23-2008, 02:56 AM
Yeah, after some surveys, I guess I'd just use libtiff for image IO. But I still need colorAtPoint somewhere in the process of computing some modification to the image.
Thanks for the reply.

-Jefri

CGTalk Moderation
09-23-2008, 02:56 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.