Blender does not properly handle EXRs with both named and un-named layers #34174

Closed
opened 2013-02-09 03:37:21 +01:00 by Jason Clarke · 8 comments

%%%--- Operating System, Graphics card ---
Mac OS X 10.8.2, ATI 5770

- Blender version with error, and version that worked ---

r54366M x64 (2.66rc1)

- Short description of error ---

Blender does not seem to properly handle multilayer OpenEXR files that also contain an unnamed layer. This may be due to the fact that Blender does not itself generate such a file that I've found. However, Maya likes to spit them out, by only labeling passes other than MasterBeauty (equivalent to the "combined" pass in Blender). This makes using Blender's compositor with Maya renders a bit difficult.

The bug comes in two forms:

If the file contains 1 named layer and 1 unnamed layer, Blender will treat it as a single-layer EXR, the named layer will be ignored.

If there is more than 1 named layer, Blender will treat it as a multi-layer EXR, and the unnamed layer will be ignored.

As a result, you are never able to load all passes into the compositor. For example, there's no way whatsoever to do DoF in the compositor on a Maya render without rendering each pass to a separate file, as there is no way to load the combined and depth layers into the compositor simultaneously.

- Steps for others to reproduce the error (preferably based on attached .blend file) ---

You can find a sample EXR file here (tracker doesn't seem to like it as an attachment): htp://dtc-wsuv.org/jclarke/exr_layer_bug_masterLayer_persp.exr

It contains a primary layer (that is not named), then depth and AO passes on named layers. You can view all 3 layers correctly by opening the file in DJV (http://djv.sourceforge.net/). If you load the file into the image editor, the main layer will not be seen, Blender will only see the depth and AO passes, and claims there is nothing else in the file.
%%%

%%%--- Operating System, Graphics card --- Mac OS X 10.8.2, ATI 5770 - Blender version with error, and version that worked --- r54366M x64 (2.66rc1) - Short description of error --- Blender does not seem to properly handle multilayer OpenEXR files that also contain an unnamed layer. This may be due to the fact that Blender does not itself generate such a file that I've found. However, Maya likes to spit them out, by only labeling passes other than MasterBeauty (equivalent to the "combined" pass in Blender). This makes using Blender's compositor with Maya renders a bit difficult. The bug comes in two forms: If the file contains 1 named layer and 1 unnamed layer, Blender will treat it as a single-layer EXR, the named layer will be ignored. If there is more than 1 named layer, Blender will treat it as a multi-layer EXR, and the unnamed layer will be ignored. As a result, you are never able to load all passes into the compositor. For example, there's no way whatsoever to do DoF in the compositor on a Maya render without rendering each pass to a separate file, as there is no way to load the combined and depth layers into the compositor simultaneously. - Steps for others to reproduce the error (preferably based on attached .blend file) --- You can find a sample EXR file here (tracker doesn't seem to like it as an attachment): htp://dtc-wsuv.org/jclarke/exr_layer_bug_masterLayer_persp.exr It contains a primary layer (that is not named), then depth and AO passes on named layers. You can view all 3 layers correctly by opening the file in DJV (http://djv.sourceforge.net/). If you load the file into the image editor, the main layer will not be seen, Blender will only see the depth and AO passes, and claims there is nothing else in the file. %%%
Author

Changed status to: 'Open'

Changed status to: 'Open'
Member

%%%Let me check this.

However, if you make maya give layers a name, does it all work fine?
In blender the layer name is used to map things, so it needs to be unique names preferably.

Long ago (2005!) I proposed to the openexr group to define a convention for layer+pass names, to allow interoperability better. That wasn't accepted.
At that time, Blender was the first to support this even :)%%%

%%%Let me check this. However, if you make maya give layers a name, does it all work fine? In blender the layer name is used to map things, so it needs to be unique names preferably. Long ago (2005!) I proposed to the openexr group to define a convention for layer+pass names, to allow interoperability better. That wasn't accepted. At that time, Blender was the first to support this even :)%%%
Member

%%%Hi Jason,

Having a primary layer just with names "R" "G" B" "A" in openexr seems to be quite common. it allows standard viewers to show something as well.
I've added support for this in Blender now too. It shows menus for browsing layers and passes without a name now, a bit weird - but at least this works fine.

Is in svn now, and you will get it in the RC and release within a week!%%%

%%%Hi Jason, Having a primary layer just with names "R" "G" B" "A" in openexr seems to be quite common. it allows standard viewers to show something as well. I've added support for this in Blender now too. It shows menus for browsing layers and passes without a name now, a bit weird - but at least this works fine. Is in svn now, and you will get it in the RC and release within a week!%%%
Member

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Member

%%%BTW: the fix is for the primary layer.

The file also has an unknown pass customDepth ... not sure what this is?

For multilayer, blender sticks to strict ordering of layer name + pass name + channel. Now if we could figure out what's "standard" now...%%%

%%%BTW: the fix is for the primary layer. The file also has an unknown pass customDepth ... not sure what this is? For multilayer, blender sticks to strict ordering of layer name + pass name + channel. Now if we could figure out what's "standard" now...%%%
Author

%%%Awesome, thanks!

Btw, for anyone coming along and seeing this through Google or whatever, I thought I should add something about Maya's layer naming: as far as I know, it will always have an "R" "G" B" "A" ("unnamed") layer. By default, it will also give the layers names that don't match up with Blender's convention. They'll load fine, but you'll get weirdness like the layer/pass menus in Blender giving you a choice of camera. You can get Maya to name the layers the way Blender expects by going to the Render Globals > Common tab, turning on custom framebuffer naming, and changing it to: .%%%

%%%Awesome, thanks! Btw, for anyone coming along and seeing this through Google or whatever, I thought I should add something about Maya's layer naming: as far as I know, it will always have an "R" "G" B" "A" ("unnamed") layer. By default, it will also give the layers names that don't match up with Blender's convention. They'll load fine, but you'll get weirdness like the layer/pass menus in Blender giving you a choice of camera. You can get Maya to name the layers the way Blender expects by going to the Render Globals > Common tab, turning on custom framebuffer naming, and changing it to: <RenderLayer>.<RenderPass>%%%
Author

%%%customDepth pass was me hitting the wrong button when making the file. I meant to hit "CameraDepth" next to it in the menu, which is a pass Mental Ray has for getting the z-buffer. I switched the type to camera depth before actually rendering this file, but when you make a new pass in Maya, it creates a node/datablock to represent it (named for the pass type by default) and its settings, and the pass name string apparently takes the name of this node, not the name of the pass type.%%%

%%%customDepth pass was me hitting the wrong button when making the file. I meant to hit "CameraDepth" next to it in the menu, which is a pass Mental Ray has for getting the z-buffer. I switched the type to camera depth before actually rendering this file, but when you make a new pass in Maya, it creates a node/datablock to represent it (named for the pass type by default) and its settings, and the pass name string apparently takes the name of this node, not the name of the pass type.%%%
Member

%%%Thanks for the info, I've resent my request to the OpenEXR list about mapping out together what the used conventions are, and if we could align this a bit. %%%

%%%Thanks for the info, I've resent my request to the OpenEXR list about mapping out together what the used conventions are, and if we could align this a bit. %%%
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#34174
No description provided.