Combining baked textures together in Maya with Python - Automated Baking Tool

Hi All,

I am attempting to write an automated baking tool for Maya (2016) and Vray (3.3).

The baking is organized per shader, often in these cases (where shaders belong to more than one mesh - with multiple shaders sometimes assigned ) I need to composite the shaders together using a generated mask. I have been able to cycle over the shaders generate the appropriate baking with masks per shader - but now am looking to combine these into a single image.

I’ve looked into PIL / Pillow for python but havent been able to successfully get the install to work within the Maya Python environment.

Does anyone have any tips as to what the best workflow may be to composite these images together.

I’m surprised you weren’t able to get PIL working. I’ve used it in the past and don’t seem to remember any issue with running it. How were you installing it?

see this thread for how to get PIL to work in versions of maya > 2013

spoiler alert: its not easy

Thanks for the replies. Unfortunately PIL isnt able to work with the openEXR format anyway, so ive been using the OpenEXR library in my testing which so far has been ok - though it is alot less intuitive to use. Also now considering the merits of writing a separate commandline utility or simply using something like ImageMagick to undertake the compositing procedures.

[QUOTE=rgkovach123;30122]see this thread for how to get PIL to work in versions of maya > 2013

spoiler alert: its not easy[/QUOTE]

I was able to use the above guide to get it running in 2014 but 2016 doesnt seem to allow under the same set of instructions (didnt try 2015)