Create a 'UV' Render Pass in Maya


When exporting a 3D model out of Maya (or your favorite 3D package) as either an .fbx or .obj the UV data which controls how the textures are applied to the object are baked into the geometry and are available to you inside Nuke. However for some tools such as the STMap you need the UV’s as a render pass and this tip is designed to show you one way to achieve this inside of Maya.

First of all create a new ‘Render Layer’ and add your objects.


Next change your ‘Render Settings’ to use mental ray as the Renderer and under the ‘Passes’ tab create a ‘Custom Colour’ pass and move it from Scene Passes down into Associated Passes. This way it’s assigned to the ‘Render Layer’ you just made.


Now in your ‘Hyper Shader’ create three new nodes, firstly from the Maya Nodes ‘surfaceShader’, secondly from under the mental ray section a ‘mib_texture_vector’ node and also a ‘writeToColorBuffer’ node.


From here we need to wire this together so firstly, via the ‘Connection Editor’ (it will pop up if you drag one node onto the other via the middle mouse button), connect the ‘surfaceShader.outColor’ to the ‘writeToColorBuffer.evaluationPassThrough’.

Next connect the ‘mib_texture_vector.outValue’ to the ‘writeToColorBuffer.color’.


Next double click on the ‘writeToColorBuffer’ node to open up it’s parameters in the ‘Attribute Editor’. At the top in the ‘Frame Buffer Options’ change the ‘Custom Color Pass’ to ‘customColor’ and you will notice in the ‘HyperShader’ the nodes are now connected.


Now double click on the ‘mib_texture_vector’ node and in the ‘Attribute Editor’ under ‘Parameters’ change the Project section to ‘UV’.


By default the shader will extract the first UV (0), but if you have multiple UVs, you may need to increase the ‘Select’ attribute to 1, 2, or more.

Also and very importantly make sure you apply the ‘surfaceShader’ to your geometry.

The final this you must do before rendering is change your colour bit depth from the standard 8bits per channel to 32bit (full float). To do this again open up your ‘Render Settings’ and at the bottom of the ‘Quality’ tab change the ‘Date Type’ to ‘RGBA (Float) 4×32 Bit).


In order to see your render pass you must ‘Batch Render’ your scene.