USD Export from Nuke
Nuke Stage can be used with USD files and B44 EXR sequences generated from any DCC which supports those formats. However, there are advantages in using Nuke with Nuke Stage to prepare assets.
It is recommended to use the latest version of Nuke for asset preparation, and the minimum recommendation is Nuke 16.0. However, basic USD features are available from Nuke 15.0. Nuke is a powerful node-based compositing tool perfect for preparing 2D and 2.5D content. You can use textured cards and to create a scene like the one below, to crop and grade images as well as edit the USD until you are happy with the content.
Nuke matches Nuke Stage by using a Hydra Renderer in its viewport. This ensures that the scene you’re seeing in Nuke is exactly what you will see in Nuke Stage.
Tip: For optimal image content performance in Nuke Stage, ensure you are using B44 EXRs and that the EXR data window (“bbox” in Nuke) is static and covers the total area any animated data window covers within a sequence. An AdjustBbox node can be used to do this in Nuke.
Once you are happy with the asset in Nuke, you can export it for use in Nuke Stage. Native USD export options are still a work in progress in Nuke, but we currently provide a group node to do this called StageUSDExport.
Note: This node is a temporary solution and there may be circumstances where it is untested. A script containing the node can be found as a separate download file on the Nuke Stage downloads page.
Using the StageUSDExport Node
You can attach the group node to any USD nodes within Nuke. This will export any upstream USD and accompanying images.
1. | Within the node, define the USD filepath for the scene to export. You can write to *.usda, *.usdc or *.usd. |
2. | Choose the frame range for the export. |
Note: If you input an image into a Material or Geo node, and there are animated knobs within nodes in the branch, use a FrameRange node in that branch to define the range of any animation.
3. | Enable Emissive Materials to create emissive materials in the USD file. Emissive materials are suitable for cards and other 2.5D scenes. |
4. | You can define whether to Write Images on export. When enabled, all nodes you've included in your node graph will be baked. They will be written out on export to include nodes like grades or crops. This means any exported scene should look exactly as it does in Nuke. |
When this option is disabled, it will use any existing input images in the node graph as the textures for the USD file, and will ignore any nodes. If you do write images, it will create all those images in a self-contained folder in the same location as you're writing your USD file.
5. | Choose whether to enable Override Existing Images to override images that may already exist, or keep the existing version by having this box unchecked. |
6. | All Images will be written in B44 EXR format from the node, but you can define the datatype, the output transform and whether or not to premultiply or autocrop the images. |
7. | Press Execute. The USD file and images will be written out to disk. |
This USD scene can then be loaded in Nuke Stage, where the scene will match what you saw in Nuke, providing all color transforms are the same.
If you created any sequences in Nuke, ensure to create nodes for them in Nuke Stage by going to Project Graph > Scene > USD Stage > Create Nodes for USD Textures. Enable the Nodes for animated textures tickbox. This will ensure the best performance for EXR playback.
Managing Color Transforms
Nuke applies a display color transform in the Viewport, which Nuke Stage doesn’t by default.
To ensure the color transforms in Nuke Stage match the Nuke 2D viewport, you can disable the view transform in the Nuke viewer (within the Viewer settings).
Alternatively, navigate to Project Graph > Hardware > OCIO. In the Properties panel, adjust the Viewport display-view transform settings to match the one used in the Nuke project.
The Nuke 3D viewport doesn’t use any OCIO transform, and instead applies a sRGB transform via USD. To best match this in Nuke Stage, set the Viewport display-view transform > Display-view transform property to sRGB -Display | un-tone-mapped in the OCIO Properties panel.