This page provides a tutorial on Exporting .exr and deep .exr in one render. 

Page Contents ×

Overview


In this tutorial, we outline a simple workflow of how to export an .exr and a deep .exr files at the same time (in one render), to save up on render resources.

Using the OutputDeepWriter plugin that comes with V-Ray's installation, we put up a short script for the Post Translate Python Script in the Render Settings, that exports the deep .exr . Through the standard Common tab settings, we set the export of a multichannel .exr file.

This workflow is especially useful if you need to export Render Elements that both have and don't have the deep output option.

The result is a single render that outputs a multichannel non-deep EXR file containing all the render elements as 2D images and a deep EXR that only contains those render elements that have been set for deep output.

 


Set the Render Elements


For comparison reasons, we add two channels - Diffuse and Lighting render elements.

 

 

 

The Diffuse Render Element has its Deep output option on. 

The Lighting Render element has its Deep output option off.

 

 

A deep .exr file will only contain the render elements that have their Deep output option enabled. It will not contain any other render elements. In this case, the deep exr will contain only the Diffuse channel. 

The standard multichannel .exr file will contain all of your render channels, regardless of their Deep output information.

 

Using the OutputDeepWriter plugin


You can access the OutputDeepWriter plugin documentation from two places - the plgparams tool information or an .html file.

Access through the Plgparams tool

Run the plgparams tool that comes along with the V-Ray for Maya installation. To see full information on how to access a node from plugin, follow the link.

To point plgparams to the folder where your plugin resides, use this command:

 

plgparams -plugindir <plugin folder>

 

The standard place of the tool is in the bin folder of your V-Ray installation, under the vray folder:
  • Windows: C:\Program Files\Autodesk\MayaNNNN\vray\bin
  • Linux: /usr/autodesk/mayaNNNN/vray/bin
  • Mac OS X: /Applications/Autodesk/mayaNNNN/vray/bin

 

If you run the plgparams tool from the bin folder, you can access the OutputDeepWriter plugin information by typing the following:

plgparams -plugindir "../vrayplugins" "OutputDeepWriter"

Access through an HTML file

Navigate to the PluginDoc folder in the same vray location as above. Look for an .html file called OutputDeepWriter.

 

Exporting a deep exr


To export a deep .exr using OutputDeepWriter plugin, you have to put it in the Post Translate Python Script of the Render Settings window. For more information on how to use Post Translate Python API, visit the Python Access to the Translated V-Ray Scene page.

An example code is as follows:

from vray.utils import *

odw=create('OutputDeepWriter', 'vrayOutputDeepWriter')
odw.set('file', <output_file>)

After 'file', enter your output file directory and the (desired) name of the deep .exr.

 

Example Post Translate Python Script that exports deep .exr file

 

The maya.cmds python module or pymel.core can be used to query the active workspace and save the deep file to a path relative to the project.

from vray.utils import *
import maya.cmds as cmds

ws=cmds.workspace(q=True, act=True)
rd=ws+'/images/'
fn='scene_deep.exr'
o=rd+fn

odw=create('OutputDeepWriter', 'vrayOutputDeepWriter')
odw.set('file', str(o))


Exporting an exr


At the same time, set the Image Format to exr (multichannel) in the Image File Output rollout of the Common tab in the Render Settings. Note, that any other image format will fail to export both .exr files.

 

Set the Image Format to exr (multichannel).

 

Set the Sampler Type to Bucket.

 

 

 

 

Now when you render, you will export two separate .exr files at the same time (one of them deep .exr).