UV multi-render pass workflow

 
 
 

A UV pass converts UV values to R/G values and creates a rasterized version of UV space. Using a UV pass, you can replace textures in 3D renderings as a post-process, without the need to track new textures in place.

To create a UV pass for your workflow, do as follows:

  1. Create a pass contribution map for the object(s) for which you want to retexture.

    Select your object, and in your Render Layer Editor, select Contribution > Create and Associate Pass Contribution Map.

  2. Open the Render Settings window; select mental ray as your renderer, and click the Passes tab. Click the Create new render pass button and select UVPass from the Create Render Passes window and click Create and Close to create the UV pass.
  3. Click the Associate Selected Passes button to associate the UV pass with your scene, and then with your pass contribution map.
  4. In the UV pass Attribute Editor, select Hold-Out. This option blacks out all other objects in your scene other than the object you are retexturing.

    Ensure that Filtering is disabled.

    NoteIn general, it is not advisable to perform filtering on a UV pass.
  5. Select Embed object ID in Blue channel. Selecting this option embeds values from the miLabel attribute on shape nodes directly to float values in the empty blue channel in the UV pass.

    This option allows you to separate the object(s) in your compositing software in order to make further changes.

  6. Create and add the miLabel attribute to the object's shape node. Click Select in the object's shape node Attribute Editor. Then select Attributes > Add Attribute.

  7. Enter miLabel as the Long name and select Integer as your Data Type.
NoteYou must use the name miLabel spelled exactly as stated.

You can now see the MI Label attribute under the Extra Attributes section of the shape node.

  1. Enter your MI Label value. To group objects, give all objects an identical MI Label.
  2. Under the Passes tab, click again and select Coverage from the Create Render Passes window and click Create and Close to create a coverage pass. The coverage pass provides the alpha for the object you want to retexture.
  3. Click to associate the coverage pass with your render layer and then with your pass contribution map.
  4. Render your pass using the .exr format. In the Common tab, select OpenEXR (exr) under File Output > Image format.
    NoteCurrently, only the OpenEXR file format is supported.
    Note Under the Quality tab, Framebuffer section, you must set your Data type to 32-bit float or 16-bit half float to avoid your image being clamped.

In your compositing software, you can then do as follows:

Note

You may want to render textures and lighting as separate passes to facilitate re-lighting in compositing. You can do so by multiplying the Diffuse Material Color pass by the Direct Irradiance pass after using the UV pass to retexture.