Projection to UV painting in Mari
This video demonstrates how to send projections from Nuke to Mari and back

From this we derive the following matte painting workflow that can be use to paint sky domes or skyline cylinders. This method also works on more straightforward geo projections

  1. Maya: Render the camera view in Maya that we want the matte painting for. You can render on layers for easy removal of foreground objects. Note that the geo can use multi-region UVs for added resolution.
    Export the geo (as OBJ) and camera (as FBX).
  2. Photoshop: Open the render in Photoshop and paint the matte. Begin with a rough layout.
  3. Mari: Bring matte geo (as OBJ) and camera (as FBX) into Mari and project on the UVs.
    See the Nuke Mari bridge step by step below
  4. Nuke: Once the map is completed, read the geo and UV texture into Nuke and render through the shot cam. Multi-region UV maps from Mari can be read in using the UDIM macro.

This process can be repeated with multiple cameras and every camera can be projected in Mari onto the geo at once. You can then integrate the images together into a whole texture map in Mari.

Nuke/Mari Bridge Step by Step

There are two basic ways to work with projections between Mari and Nuke. One is to do things manually, and the the other is to use the automated tools of the Nuke/Mari bridge. The best approach is to use a combination of both as needed. To be able to do that we will need to first set up the Nuke/Mari Bridge:

    Part I: Setup Nuke<>Mari Bridge

      Follow the instructions here to install the Nuke/Mari Bridge. In a nutshell this involves copying some files into your .nuke directory, and checking the "enabled" check boxes in both programs. You will then see a Mari menu in Nuke.
      • In Nuke this is in the Mari tab of the Project Settings (hotkey "s").
      • in Mari it's in the Scripts tab of the Preferences window.
    Part II: Setting up a projection in Nuke

    1. Read into Nuke your Photoshop matte (as a PNG), your .OBJ and your FBX camera.
    2. Attach these to a 3DProjector node like this:

    Part III: Setting up Projections in Mari:

      Now we need to get the projection into Mari. First we will cover how to do this using the Nuke/Mari Bridge, and then how to do the same manually.

      Using the Bridge In Nuke, select the projector and the geo, and send these to Mari with Mari > Send > Projection Components (Mari needs to be open for this to work).

      This will create a new Mari project with the geo, projecting the image onto its UVs through the camera. By default these files are written to the $NUKE_TEMP_DIR/MariData/ directory. This path can be changed in the Mari tab of the Nuke Project Settings.

      The Nuke/Mari Bridge will create a new Mari project with the geo, projector, and image, all ready to go.

      Manual setup in Mari You can setup camera projections in Mari essentially the same way you do in Nuke. You will need an OBJ file for the geo, an FBX file for the camera, and an image file to project.

      • The geo can be loaded in the Mari objects palette.
      • The camera is loaded in the projector palette (not be confused with the projection palette).
      • The image is loaded into the projector, either by clicking the "import" button (loading into the paint buffer without baking it onto the geometry's UVs) or the "project" button (which bakes it).

    Part IV: Working with projectors in Mari

      Navigating the projector camera You can use the magnify tool to zoom the camera frame into view (overscan), and pan with LMB or MMB. Double-click camera in the projectors pallette to reset the view if you tumble. You can also click the "home" key to go into fullscreen mode (hiding all palette windows).

      Adding additional projector cameras You can of course manually add all the cameras you want in Mari using the projector palette. If you would like to instead use the Nuke/Mari Bridge to do so, follow these steps:

      1. In Mari: Make sure you have the perspective tab selected. This is where the new camera(s) will be read in.
      2. In Nuke: Select your new 3Dprojector node, and Mari > Send > Projection Components. Since we already have the geo in Mari we don't need to send that again.

      Saving the UV texture(s) Once you're done painting you can either save the texture image normally (right-click in the layer palette and choose export layers) or send it directly to Nuke with Nuke > Send > UV Texture(s).

All content © copyright Light Collab.