SUMMARY
Certain image files come with embedded metadata that describes parameters related to when the image was originally created. Nuke allows the inspection and customization of this metadata, and also permits transferring such metadata between images.
There may be situations where you need to share metadata without providing the pixel data, and this article explains how to copy the metadata from one image into another, using the CopyMetaData node.
As EXR files are currently the only format within Nuke that allows exporting of custom metadata, this technique is limited to rendering EXR files. However, we have an open feature request to include writing additional formats, which can be referenced by the following ID:
ID 382642 - Add the ability to read and write all metadata from all supported file formats
MORE INFORMATION
The following steps show how to copy the metadata of a source image into a CheckerBoard, without including any of the source image's original pixel data:
Copying metadata:
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 CopyMetaData node's Meta input to the Read node and the Image input to the CheckerBoard node:
5) Create a Write node
6) Set the Write node's file knob to a valid directory to create the rendered image, ensuring that the render is set to use the EXR file extension
7) Set the metadata knob to all metadata:
8) Render the EXR file using the Render button
9) To view the results of the render, bring the file back in using a new Read node
You will now have a CheckerBoard image that contains the metadata of the source footage but not the original pixel data.
The metadata can be inspected by switching to the Read node's Metadata tab. To confirm this metadata matches the original, a CompareMetaData node can be created and connected to the original Read node and the rendered Read node. 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:
2) In the ModifyMetaData's Properties, create a new action by clicking the + knob.
3) Once this is clicked, you will see a set value created under the action heading of the table:
4) Double-click on the set entry and change the action to remove
5) Double-click the empty area to the right of the set value (within the key column of the table)
6) When the Pick metadata key window appears, select the metadata you would like to remove
As an example, the "creator" metadata value is being selected for exclusion in the image below:
7) Re-render using the Write node
8) Read in the newly revised render and you can see that the key you have removed will not be included in the EXR image metadata
FURTHER READING
For more information on working with file metadata in Nuke, using ModifyMetaData and CopyMetaData nodes, or rendering metadata, please refer to the following sections of Nuke's online documentation:
We're sorry to hear that
Please tell us why