Create a ticket
Follow

Q100419: Copying metadata into an EXR file

SUMMARY

Certain image files come with embedded metadata that define the parameters used when the image was originally created. Nuke allows the inspection and customisation of parts of this metadata, and also permits copying such metadata between images. 

There may be situations where you need to share metadata without providing the pixel data. This can be done in Nuke by copying the metadata from a source image, and inserting it into a sample EXR image. 

This article explains how to copy the metadata from a source image into a sample EXR image, using the CopyMetaData node and a CheckerBoard. 

 

MORE INFORMATION

Copying metadata

The following steps show how to copy the metadata of a source image into a CheckerBoard, without including any of the original pixel data.

1) Create a Read node and import the file that you wish to extract the metadata information from

2) Create a CheckerBoard node

3) Create a CopyMetaData node and set the metadata from knob to meta only

4) Connect the Meta input from the CopyMetaData to the Read node and the Image input into the CheckerBoard node.

marcie.PNG

5) Create a Write node, within this Write node:

a) Select a directory to create the rendered image, ensuring that the render is set to use the EXR file extension.

b) Set the metadata knob to all metadata

Write.PNG

7) Render the EXR file using the Render button

8) To view the results of the render, bring the file back in using a new Read node.

Result: You will now have a CheckerBoard image that contains the metadata and not the original pixel data. 

9) To inspect the copied metadata go to the Metadata tab of CheckerBoard Read node. The results of this will show the embedded metadata.

10) To confirm this metadata matches the original, create a CompareMetaData node and connect the A input into the original Read node and the B input into the rendered CheckerBoard Read node.

Comparemeta.PNG  Comparemeta2.PNG

NOTE: The two files will not match 100 percent when compared as filesizes, filenames, but most embedded metadata should be present. 

 

Removing metadata 

If there is any metadata you would like to exclude from the rendered EXR, you can remove this from the metadata by using a ModifyMetaData node:

1) In the example workflow above, create a ModifyMetaData node between the CopyMetaData and Write nodes

modify.PNG

12) In the ModifyMetaData properties bin, create a new action by clicking the + knob

13) Once this is clicked, you will see a set value created under the action heading of the table

set.PNG

14) Double-click on the set entry and this will prompt you to either keep set or change to remove. Select remove.

15) Double-click the empty area to the right of the set value (within the key heading of the table)

16) When the 'Pick metadata key' window appears, select the metadata value you would like to remove.

As an example, I am selecting the 'creator' metadata value to exclude in the image below

remove_metadata.PNG

17) Re-render using the Write node

18) Read in the newly revised render and you can see that the value you have removed will not be included in the revised EXR image metadata.

NOTE: As EXR is the only format currently within Nuke that allows the exporting of custom metadata, this technique is unfortunately limited to rendering as EXR files. 

 

ADDITIONAL INFORMATION

For more information on using the ModifyMetaData and CopyMetaData nodes, please refer to the following Online Help links:

ModifyMetaData node
CopyMetaData node

Was this article helpful?
/

We're sorry to hear that!

Please tell us why.
0 out of 0 found this helpful

Comments