Workflow

Sending a Projection Setup

To send a Nuke projection setup to Mari follow these steps:

1.   Select the Project3D node and the Geometry node that the projection is applied to, or select multiple nodes at once to send to Mari.

Note:  If you want to merge the Nuke projection with a Mari project that is currently open, and the required geometry is already part of that project, you don't need to select the Geometry node.

2.   If Mari is not already running, select Mari > Launch Mari or click on the Mari icon in the Mari panel to launch it.
3.   In Nuke, select Mari > Send > Projection Components or click on the Send icon in the Mari menu.

This pre-renders the texture to the location specified in mari data dir. The name of the pre-rendered file is derived from the node name and the current frame. If you sent the texture to Mari before, you are asked if you want to overwrite the file. If you select No, the existing file is used.

Note:  You can also opt to export the projection instead of sending it to Mari using the Nuke<>Mari bridge.

To export:
1. In Nuke, select Mari > Export > Projection(s)... or click on the export icon in the Mari panel.
2. Set a directory location in the Export Mari Projection dialog.
3. In Mari, select Nuke > Import Projection and select the file in the Load Nuke Projection dialog to import the projection into Mari.
This lets you send files between the two applications without a socket connection.

Note:  When exporting files to disk in Nuke, an .nmb extension is assigned (for Nuke<>Mari Bridge). When exporting from Mari, an .mnb extension is used (for Mari<>Nuke Bridge).

Sending or Importing Projections to Mari

Once the projection has been sent or imported into Mari, follow these steps to set up the projections in your project:

1.   If there is no project open in Mari, the script creates a new project and asks you to create a channel for your projection. In the Mari - New Projection dialog, you are prompted to enter a Channel name, set the Mapping scheme, provide a Channel resolution and finally, select the Projector resolution for the new channel.

Note:  Ensure that you don't compromise the incoming image's resolution by selecting a texture size that is too low.

If you already have a project open (for example, if you are re-importing the projection), you are asked if you want to apply the incoming projection to the current project or open a new project.

2.   Mari sets up:

objects in the Objects palette for each Geometry node sent or exported from Nuke,

projectors in the Projectors palette for each Project3D node sent or exported from Nuke,

the channel that you specified in the Mari - New Projection dialog in the Channels palette, and

all the sent or imported cameras, created as layers in the specified channel’s layer stack, with masks to help blend projections together.

Depending on the complexity of the projection being sent or imported into Mari, this may take some time.

3.   Images are also imported into the Image Manager to keep track of the projection textures sent or imported into Mari.

Sending or Exporting Projections to Nuke

Once you have finished your texture work in Mari, you have several options to send the data back to Nuke. You can use one of the following. In Mari:

1.   Select Nuke > Send > Projection Texture to unproject the texture through the current projector. The texture is rendered to the Mari data directory and the filename is based on the name of the projector that it is unprojected from.
2.   Once the texture has been written to disk, Nuke creates a Read node. This Read node should be connected to the Project3D node, replacing the original texture with the new texture from Mari.
3.   Select Nuke > Send > Unique Projection Texture to unproject the texture through the current projector, like Projection Texture. However, it saves the unprojected texture with a unique file name to ensure that it does not overwrite (or is potentially overwritten by) any other version of the texture that is sent to Nuke.
4.   Select Nuke > Send > UV Texture(s) (All Channels) to export a set of UV textures from all channels in the Channels palette to the Mari data directory. The filename is based on the object (which in this case is the original Geometry node that you sent to Mari) and the channel name. The channels are flattened for export.
5.   Once the texture has been written to disk, Nuke creates a Read node. Since this is a UV texture and not a projection texture, you need to connect it directly to an ApplyMaterial node instead of the Project3D node.
6.   Select Nuke > Send > UV Texture(s) (Current Channel) to export a set of UV textures from the current channel in the Channels palette to the Mari data directory. The filename is based on the object (which in this case is the original Geometry node that you sent to Mari) and the channel name.
7.   Once the texture has been written to disk, Nuke creates a Read node. Since this is a UV texture and not a projection texture, you need to connect it directly to an ApplyMaterial node instead of the Project3D node.
8.   Select Nuke > Send > Current View to create a projector of the current view in Mari (Perspective View only) and send it to Nuke along with the unprojected texture. In addition to the Read node, an additional Camera node is created that represents Mari's canvas at the time of the export.
9.   Select Nuke > Send > Current Projector to send the current projector in Mari's Projectors palette to Nuke along with the unprojected texture. In addition to the Read node, an additional Camera node is created that represents Mari's canvas at the time of the export.

Warning:  If you create a projector in Mari and intend to send it to Nuke to project onto a ReadGeo node, it is advisable that you create your projector while in Perspective view. If you choose to create a projector while in Ortho view, the projection may not look the way you expected.

10.   Select Nuke > Send > All Projectors to send all projectors in the Projectors palette to Nuke along with their unprojected textures. In addition to the Read node, a new Camera node is created that represents Mari's canvas at the time of the export.

Note:  You can also opt to export the projection instead of sending it to Nuke using the Nuke<>Mari bridge.

To export:
1. In Mari, select any of the seven options from the Mari > Export menu.
2. Set a directory location in the Export Nuke Projectors dialog.
3. In Nuke, select Mari > Import Projection and select the file in the Load Mari Projection dialog to import the projection into Nuke.
This lets you send files between the two applications without a socket connection.

Note:  When exporting files to disk in Nuke, an .nmb extension is assigned (for Nuke<>Mari Bridge). When exporting from Mari, an .mnb extension is used (for Mari<>Nuke Bridge).

Sending a Sequence Projection Setup

In addition to sending a single projection setup, Nuke can also export multiple snapshots of an animated projection to Mari. This can be used for painting clean plates by combining multiple frames of an image sequence and projecting them through the match-move camera at their respective frames.

This workflow is the same as Sending a Projection Setup, with the exception of a Frame Range dialog that asks for the frames that the snapshots should be taken from.

Note:  When planning to return a UV texture from Mari for a Geometry node, you should uncheck the Geometry node's Image Aspect checkbox at this stage. If you don’t, the image size changes when plugging in the UV map later on, causing a line-up error.

To send a Nuke Sequence Projection Setup to Mari, follow these steps:

1.   Select the Project3D node and the Geometry node that the projection is applied to.
2.   Click Mari > Send > Sequence Projections.
3.   Enter the frame numbers in the Frame Range dialog.

4.   Like before, if there is no project open in Mari, the script creates a new project and prompts you to specify a channel for your projections. You are prompted to enter a Channel name, set the Mapping scheme, provide a Channel resolution and finally, select the Projector resolution for the new channel.
5.   Once your projections have been imported, Mari creates separate projectors for each frame in the sequence.
6.   Proceed with the necessary texture work and, following the steps outlined in Sending or Exporting Projections to Nuke, send the data back to Nuke.

Sending Image Nodes

You can also send any number of Read nodes directly from Nuke to Mari. To do this, select the Image nodes you want to send in Nuke, click Mari > Send > Images and select from one of the following options:

All Read Nodes - To send all Read nodes in the Node Graph.

Selected Read Nodes - To send only the selected Read nodes in the Node Graph.

Selected Nodes - To send all Read nodes in the Node Graph. These appear in the Image Manager in Mari.

Sending a Lookup Table (LUT)

To ensure that images in Mari look the same as they do in Nuke, Nuke's current Viewer LUT is approximated in a 10-bit 1D LUT and sent to Mari as a viewing LUT. If you change the viewerProcess menu in Nuke’s Viewer, you can update Mari's viewer LUT accordingly by clicking Mari > Send > LUT.