Jump to content
Crustedink

adding metadata to exr

Recommended Posts

Hey there,

first odforce post and of course a question.

i am currently looking for an option to add costum meta data to my render output (exr file).

to be more specifiy, i want to save the focal length of my render cam  to the meta data of my exr to read them later on in nuke. all ready found a way to put it in the comments, but would be cleaner to have it as costume data. i even found the vm_image_exr_attributes, but it seems like its not working (or i am using it wrong). would be great to get some help.

 

cheers

Share this post


Link to post
Share on other sites

The parameter can be a little fussy when using expressions and will silently fail if something is off a little.  For example using backticks doesn't seem to work.  The file I attached has three ways of dynamically setting attributes.  Two seem to work and one doesn't.

exr_attrs.hip

Edited by jonp

Share this post


Link to post
Share on other sites

sorry, jon, was to busy to answer you.
your script works perfect and excactly what i wanted. had a similiar approach but missed something, i guess.

the only odd thing is, that it only works in houdini 14 and not in any houdini 15 version, maybe some kind of bug

Share this post


Link to post
Share on other sites

You're right, I just tried it myself and it doesn't work in Houdini 15.

 

Did you file a bug or figure out why this is?

Share this post


Link to post
Share on other sites

Yes, it's confirmed bug in H15, not solved yet.

 

As workaround I'm setting attributes with exrstdattr via shell/python post-frame script.

 

You can find a little bit older but already compiled version here

Share this post


Link to post
Share on other sites

Hey,

I just tested the three approaches against 16.5 and every one is working.

Just be cautious if using the python version. It fails quite silently, doesn't raise an error if an attribute is missing or a node is not found. Due to the raised error there won't be a return value and no meta data will be writen into the exr.

To avoid that, the easiest solution would be a try..except statement arounf every attribute/node query.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×