Thursday, October 6, 2011

multi-channel exr & 3delight

I've been rendering some multi-channel exr files lately using 3delight. Everything is right but the size of every file is around 39 MB each and some sequences are very long. The compression I'm using is zips but I still feel I'm wasting disk space.. really.

UPDATE: I *was* using opensuse 10.2 and somehow, using "zip" compression in rendermn.ini was causing errors with nuke and others. After switching to ubuntu 10.0.4 everything is perfect (small files).. and makes me feel a bit silly. So my best advice would be: use ubuntu.

A Solution? Using python and nuke to rewrite the files with all channels into a new file. Of course this comes *after* everything is rendered and as a fix.

Reading some posts at vfxtalk and nuke forum, I got this as a base for a more robust script:


import sys
r = nuke.nodes.Read(file = sys.argv[1])
w = nuke.nodes.Write(file = sys.argv[2])
w.setInput(0, r)
nuke.execute("Write1", 1, 5)

And it's executed with nuke -t myimage.####.tif myimage.####.jpg

To be honest, I'm not very familiar with python but I had to get around listing directories, building lists, splitting strings and finally renaming/removing files. It still lacks basic stuff like avoid screwing more than one image sequence if there's more than one in every directory and deleting everything without asking... I guess you get the idea ;)

So, after everything was re-compressed (from 39MB to 6/7/9MB each), I'm trying to do it right after 3delight finishes rendering the image (using post render mel). I wish I could use imagemagick to do it, but I'm still unsure if multi-channel is supported.

Is there any other way to do something like this? I'm thinking rendering tif files and using imagemagick to create exr files could be an option. Or simply stick to tif files and use folders!

This helped me a lot:

Offtopic: Tomorrow Immortal will be playing here in Mexico City! never thought I could be in one of their shows. ^_^

No comments: