mari_nuke_txmake

To render more efficiently and to get some particular features working one has to feed Renderman with .tex files. Most regular image files can be converted to .tex files with the txmake executable that comes with RPS. However converting multiple files such as UDIM’s from Mari can be time consuming. So let’s make things a bit quicker… :)

I often use Nuke for things such as texture adjustments or making light cookies. Often I make minor adjustments and want to preview changes right away. So I would have to go and txmake my outputs every single time. Thanks to our Comp TD who generously helped me at this point I wrote a simple script to automate the .tex – conversion after rendering from within Nuke. You can obtain the script from HERE. Just place it within your .nuke directory. On the Write Nodes you would go to the “after render” line in the Python-tab and paste the following to execute the script after the render has finished:

import make_tex; make_tex.make_tex()

The script assumes that you are outputting .exr’s. In case you are using something different you can modify the script as needed.

When you are outputting load’s of UDIM’s from Mari and want to render with PRMan you have to convert them to .tex files to use them with the TextureAtlas Nodes. I found a very handy script online that does this already. However it involves a second step to make the conversion and isn’t handled by the python script itself. I removed the additional step and made it work in one go. You can get my modified version from HERE. It’s just a matter of cd’ing to the directory that holds the .tifs from Mari (to use something different you can modify the script) and executing the python file.

I tested those scripts only on Linux so far, but they should work no matter the OS.

Maybe someone will find this helpful… :)