Image.save_render saves OpenEXR Multilayer as a regular OpenEXR with no layers #71087

Open
opened 2019-10-25 05:39:16 +02:00 by Grant Wilk · 6 comments

System Information
Operating system: Windows 10
Graphics card: (2x) NVIDIA GeForce GTX 1070

Blender Version
Broken: (2.80 release)

When exporting a Multilayer OpenEXR file using Blender's Python API and the bpy.types.Image.save_render function, the image is exported as a regular OpenEXR file with neither layers nor passes.
This is NOT an issue with the way Blender reads Multilayer OpenEXR files because exploring the EXR files with other software yields missing layers and passes as well.

Exact steps for others to reproduce the error

  1. Download and open the attached .blend at the bottom of this file (openexr_bug_24_10_19.blend)
  2. Note that there are multiple passes being rendered (Combined, Z, Mist, etc.) and there are also multiple layers being rendered (View Layer and Composite)
  3. Click "Run Script" in the text editor. This script will render an image, configure its output settings to be a Multilayer OpenEXR, then write it to the same directory that the Blender file is in.
  4. Import the exported OpenEXR (named "script_output.exr") into Blender's compositor either by clicking and dragging it in, or by opening it in an image node
  5. Note that the image is missing the extra layers that should be included (Normal, AO, Mist, etc.)

It may be useful to note that if you actually tear apart the exported OpenEXR file, the only channels included are 'R', 'G', 'B', and 'A'.

Expected behavior, for comparison

  1. In the Image Editor with the rendered image, select Image > Save As and save it somewhere using the settings detailed in the script (Multilayer OpenEXR, RGBA, 32-bit depth, No Codec)
  2. Import the saved OpenEXR in Blender's compositor either by clicking and dragging it in, or by opening it in an image node
  3. Observe how there is an additional "Layer" option in the image node, and depending on the layer that is selected, different passes appear as outputs from the node

It may be useful to note that if you tear apart this OpenEXR file, the channels included are: 'Composite.Combined.R', 'Composite.Combined.G', 'Composite.Combined.B', ... all the way through all of the image layers and passes.

Included Files
openexr_bug_24_10_19.blend

**System Information** Operating system: Windows 10 Graphics card: (2x) NVIDIA GeForce GTX 1070 **Blender Version** Broken: (2.80 release) When exporting a **Multilayer OpenEXR** file using Blender's Python API and the [bpy.types.Image.save_render ](https://docs.blender.org/api/blender2.8/bpy.types.Image.html?highlight=save_render#bpy.types.Image.save_render) function, the image is exported as a **regular OpenEXR** file with neither layers nor passes. This is NOT an issue with the way Blender reads Multilayer OpenEXR files because exploring the EXR files with other software yields missing layers and passes as well. **Exact steps for others to reproduce the error** 1. Download and open the attached .blend at the bottom of this file (openexr_bug_24_10_19.blend) 2. Note that there are multiple passes being rendered (Combined, Z, Mist, etc.) and there are also multiple layers being rendered (View Layer and Composite) 2. Click "Run Script" in the text editor. This script will render an image, configure its output settings to be a Multilayer OpenEXR, then write it to the same directory that the Blender file is in. 3. Import the exported OpenEXR (named "script_output.exr") into Blender's compositor either by clicking and dragging it in, or by opening it in an image node 4. Note that the image is missing the extra layers that should be included (Normal, AO, Mist, etc.) It may be useful to note that if you actually tear apart the exported OpenEXR file, the only channels included are 'R', 'G', 'B', and 'A'. **Expected behavior, for comparison** 1. In the Image Editor with the rendered image, select Image > Save As and save it somewhere using the settings detailed in the script (Multilayer OpenEXR, RGBA, 32-bit depth, No Codec) 2. Import the saved OpenEXR in Blender's compositor either by clicking and dragging it in, or by opening it in an image node 3. Observe how there is an additional "Layer" option in the image node, and depending on the layer that is selected, different passes appear as outputs from the node It may be useful to note that if you tear apart this OpenEXR file, the channels included are: 'Composite.Combined.R', 'Composite.Combined.G', 'Composite.Combined.B', ... all the way through all of the image layers and passes. **Included Files** [openexr_bug_24_10_19.blend](https://archive.blender.org/developer/F7855576/openexr_bug_24_10_19.blend)
Author

Added subscriber: @remi_creative

Added subscriber: @remi_creative
Grant Wilk changed title from OpenEXR Multilayer exports OpenEXR instead of OpenEXR Multilayer to OpenEXR Multilayer exports an OpenEXR without layers 2019-10-25 05:40:08 +02:00
Grant Wilk changed title from OpenEXR Multilayer exports an OpenEXR without layers to OpenEXR Multilayer exports a regular OpenEXR with no layers 2019-10-25 05:40:23 +02:00

Added subscriber: @Zohaib

Added subscriber: @Zohaib

Added subscriber: @brecht

Added subscriber: @brecht

These API functions should be changed to use BKE_image_save.

These API functions should be changed to use `BKE_image_save`.
Philipp Oeser changed title from OpenEXR Multilayer exports a regular OpenEXR with no layers to Image.save_render saves OpenEXR Multilayer as a regular OpenEXR with no layers 2020-01-27 11:45:54 +01:00

Added subscriber: @Rabit

Added subscriber: @Rabit

Added subscriber: @iaian7

Added subscriber: @iaian7
Philipp Oeser removed the
Interest
Python API
label 2023-02-10 09:04:44 +01:00
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
5 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#71087
No description provided.