Data Sharing - Maya, Nuke

  This use case shows how to sharing projection plane and camera position between a May scene and a Nuke graph-node.
Project Context
The pipeline involved steps are: modeling and compositing. See
Pipeline Integration Overview
The artists tasks should be:
  • Step 1: First, the modeling artist creates the 3d background (a building)
  • Step 2: Through a 3d process, the modeling artist creates a projection plane (a wall), sets the camera position and executes the background rendering
  • Step 3: Through a compositing process, the compositing artist retrieves the rendered background, the projection plane and the camera position into the Nuke graph-node.
  • Step 4: Finally, the compositing artist animates the rendering camera and execute the graph-node rendering (2nd compositing process)
So, if the 3d scene has to be changed, the compositing artist can easily updates the graph-node and the final rendering: just replay the 2 compositing proc
Demonstration
rendering result
Assembler Project
3 process are used:
 render-background
What this 3d process does:
  • Load the 3d scene background-building
  • Create the projection wall
  • Set the camera position and the focal length
  • Render the background creation (single image)
process: render-background
<Process id="render-background" type="3d" delegate="maya">
     <Input creationId="background-building"/>
     <Object name="plane" create="wall" active="true">
          <Param name="length">33.5</Param>
          <Param name="height">32</Param>
          <Param name="thickness">0.01</Param>
          <Param name="pos">-16.75;0;-33.5</Param>
     </Object>
     <Camera name="camera">
          <Param name="shape.focalLength">36</Param>
          <Param name="pos">0;10;0</Param>
     </Camera>
     <Render>
          <Param name="creationId">background</Param>
          <Param name="camera">camera</Param>
          <Param name="renderer">arnold</Param>
          <Param name="default.gammaCorrection">2</Param>
     </Render>
</Process>
 set-background
  • Load the graph-node nukeBackground
  • Set Read Node file with the background creation filename
  • Set the Card Node according to the 3d scene projection wall (size & position)
  • Set the Camera Node (projection camera) according to the 3d scene camera (focal length & position)
process: set-background
<Process id="set-background" type="compositing">
     <Input creationId="nukeBackground"/>
     <Node name="read">
          <Param name="file">file(background)</Param>
     </Node>
     <Node name="card">
          <Param name="card.source">render-background.plane</Param>
     </Node>
     <Node name="camera">
          <Param name="camera.source">render-background.camera</Param>
     </Node>
</Process>
 render-animation
  • Animate the render Camera Node position (translate)
  • Execute the graph-node rendering
process: render-animation
<Process id="render-animation" type="compositing">
     <Node name="renderCamera">
          <FuncParam name="translate" type="square" frames="1-248/11">
               <Param name="begin">-5;6;0</Param>
               <Param name="end">5;6;0</Param>
          </FuncParam>
     </Node>
     <Render nodeName="writer">
          <Param name="creationId">outputComp3</Param>
          <Param name="frames">1-248</Param>
     </Render>
</Process>
 Creations
See Creation Overview
background-building
<Creation id="background-building" filename="background.mb"/>
background
<Creation id="background" filename="background.jpeg">
     <Info name="width">1920</Info>
     <Info name="height">1080</Info>
     <Info name="update">1531846319137;17/07/2018 05:51:59</Info>
</Creation>
nukeBackground
<Creation id="nukeBackground" filename="background.nk" />
outputComp3
<Creation id="outputComp3" filename="compositing/outputComp3/frame.jpg">
     <Info name="index.list">true</Info>
     <Info name="frameToVideo">true</Info>
     <Info name="frame">1-248</Info>
</Creation>