Create a 'UV' Render Pass in Maya

uvPassImage01

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.

uvPassImage02

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.

uvPassImage03

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.

uvPassImage04

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’.

uvPassImage05

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.

uvPassImage06

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

uvPassImage07

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).

uvPassImage08

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

uvPassImage09


We offer video training in 3D, compositing and visual effects tools and techniques. Choose from a range of software and techniques including Maya, Arnold, Nuke and more. We also offer technique based videos for areas such as Deep Compositing and Core Skills.
Where in the past we offered a range of training from on-site, to video, to consultancy, now spherevfx offers a simple choice of either video training or free written training.
Because all our training is either video based or written we can train anyone, from whole departments, small teams or individual artists/freelancers.
We’ve had the privilege of training artists from some of the top visual effects companies in the world including: Industrial Light and Magic, Framestore, DreamWorks Animation, MPC, Digital Domain, Cinesite, Animal Logic, Ghost VFX, Hybride, Luma Pictures, Pixomondo, Prime Focus, Sony Pictures Imageworks, and Weta Digital.