ID 375230 - Merging EXR outputs with ExrCombine may result in unexpected channel names

Follow

Problem summary
When several EXR render outputs are merged using the ExrCombine utility (i.e. by rendering a render output of type "merge"), unexpected names may be constructed for the channels in the resulting output image. This applies specifically to EXR files rendered using RenderMan.

When merging EXR images, ExrCombine constructs the names of individual channels as "passName.channelName", with pass name being specified in the ExrCombine command, e.g.:

ExrCombine <exrfile 1> <passname 1> ... <exrfile n> <passname n> <outputfile>
A "color" output contains the channel names R, G and B, which are written to the final merged EXR output for example as P.R, P.G, P.B (if the pass name is specified as P).
The same output rendered as "raw" output from RenderMan contains the channel names P.x, P.y and P.z, which are written to the final merged EXR image as P.P.x, P.P.y and P.P.z. This introduces an extra layer in the EXR file, which may be unexpected.
 
Combining the same EXR images as in the second case using the exrmerge tool shipped with RenderMan results in channels named P.x, P.y and P.z in the merged output file.

Customer reported version
Katana 3.1v1

Customer reported platform
Linux

Steps to reproduce

  1. Launch Katana with RenderMan loaded.
  2. Create a CameraCreate node.
  3. Connect a RenderSettings node and set renderer to prman.
  4. Connect a RenderOutputDefine node, set outputName to P and channel to P.
  5. Connect another RenderOutputDefine node, set its outputName to merge and its type to merge.
  6. Select 'primary' and 'P' as the mergeOutputs.
  7. Change locationType to file and specify a renderLocation.
  8. Connect a Render node and render to disk.
  9. Inspect the rendered EXR file, for example by reading it into Nuke. Note that it contains a channel called 'P'.
     
  10. On the RenderOutputDefine node defining the 'P' output, change type from 'color' to 'raw'.
  11. Render to disk.
  12. Inspect the rendered image.

Expected behaviour
Both EXR files contain the same channels with the same names.

Actual behaviour
The second EXR file contains a channel called 'P_P' instead of 'P'.

Workaround
As a workaround, you can perform the merge via a 'script' output, using either ExrCombine and "primary" pass names, or if you have access to RenderMan the exrmerge tool shipped with RenderMan to combine raw EXR images.

Reproduced by support

Katana 5.0v3 - CentOS 7
Katana 5.0v1 - CentOS 7
Katana 4.5v3 - CentOS 7
Katana 4.5v1 - CentOS 7
Katana 4.0v8 - CentOS 7
Katana 4.0v1 - CentOS 7
Katana 3.6v1 - CentOS 7
Katana 3.5v1 - CentOS 7
Katana 3.1v1 - Windows 10 - CentOS 7
Katana 3.0v6 - Windows 10
Katana 2.6v4 - Windows 10
Katana 2.5v7 - Windows 10
Katana 2.0v1 - CentOS 7

Earliest version tested
Katana 2.0v1 - This issue appears to be in all versions of the product
Could not find a working RfK version to test with 1.6v3

 

    We're sorry to hear that

    Please tell us why