EXR Layers are not fully updated on scene load or image refresh #36755

Closed
opened 2013-09-17 21:04:27 +02:00 by Jason Clarke · 10 comments

%%%--- Operating System, Graphics card ---
OS X 10.8.5

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

r600158

- Short description of error ---

Scenario: You have an existing multilayer EXR loaded in the compositor. For one reason or another, the number of layers in this file is changed (probably because a pass was enabled or disabled when the file was re-rendered). When simply reloading the .blend file or hitting "refresh" on the image datablock, the layer list will not update. It will still show the layers as they were when the file was first loaded. This no longer corresponds to what is actually in the file, so passes no longer correspond to their correct datasets. You get things like the "mist" pass reading data from the "normal" pass layer. To fix this, you need to open the file browser on the image block, and select the EXR again to force a layer list update.

- Steps for others to reproduce the error (preferably based on attached .blend file) ---
  1. Render a multilayer EXR with some set of a passes enabled
  2. Open a second .blend, load up the EXR from step one in the compositor.
  3. Go back to the first .blend, change whether some passes are enabled or not, re-render and save the EXR again, overwriting the first one.
  4. Return to the comp .blend, the passes will now be messed up. Refreshing the file will not change, you have to replace the image (opening the file browser) to force it to update.
    %%%
%%%--- Operating System, Graphics card --- OS X 10.8.5 - Blender version with error, and version that worked --- r600158 - Short description of error --- Scenario: You have an existing multilayer EXR loaded in the compositor. For one reason or another, the number of layers in this file is changed (probably because a pass was enabled or disabled when the file was re-rendered). When simply reloading the .blend file or hitting "refresh" on the image datablock, the layer list will not update. It will still show the layers as they were when the file was first loaded. This no longer corresponds to what is actually in the file, so passes no longer correspond to their correct datasets. You get things like the "mist" pass reading data from the "normal" pass layer. To fix this, you need to open the file browser on the image block, and select the EXR again to force a layer list update. - Steps for others to reproduce the error (preferably based on attached .blend file) --- 1. Render a multilayer EXR with some set of a passes enabled 2. Open a second .blend, load up the EXR from step one in the compositor. 3. Go back to the first .blend, change whether some passes are enabled or not, re-render and save the EXR again, overwriting the first one. 3. Return to the comp .blend, the passes will now be messed up. Refreshing the file will not change, you have to replace the image (opening the file browser) to force it to update. %%%
Author

Changed status to: 'Open'

Changed status to: 'Open'

%%%How are you refreshing the file? There is no reload button in the node, which perhaps should be added. Reload in the image editor seems to work here.

Probably it should not do this refresh automatically, only on a user action. Otherwise you can then lose some node links without even knowing it, if the EXR file is incomplete or changed for some reason.%%%

%%%How are you refreshing the file? There is no reload button in the node, which perhaps should be added. Reload in the image editor seems to work here. Probably it should not do this refresh automatically, only on a user action. Otherwise you can then lose some node links without even knowing it, if the EXR file is incomplete or changed for some reason.%%%
Author

%%%The image node actually does have a reload button. It's not on the node itself, but it appears in the N-panel. (incidentally, that's also true of Cycle's image node).

Primarily I mean loading the file. If you change an EXR then load a .blend that has it in the compositor, that image node will be broken. It will read the data from the file again (since that wasn't in the .blend file) but it will continue using the layer/pass list from when the scene was last saved, which no longer corresponds to the data it's reading. I guess you could argue the alternative is equally bad (the compositor trashing links and outputs when loading a scene).%%%

%%%The image node actually does have a reload button. It's not on the node itself, but it appears in the N-panel. (incidentally, that's also true of Cycle's image node). Primarily I mean loading the file. If you change an EXR then load a .blend that has it in the compositor, that image node will be broken. It will read the data from the file again (since that wasn't in the .blend file) but it will continue using the layer/pass list from when the scene was last saved, which no longer corresponds to the data it's reading. I guess you could argue the alternative is equally bad (the compositor trashing links and outputs when loading a scene).%%%
Author

%%%I guess in essence the issue is that I'd expect reloading a .blend to have the same effect as hitting "reload" on all image blocks at once, but that's not completely true for multilayer EXRs. %%%

%%%I guess in essence the issue is that I'd expect reloading a .blend to have the same effect as hitting "reload" on all image blocks at once, but that's not completely true for multilayer EXRs. %%%

%%%Ok, so reload works.

Right now it stores the pass index in the socket, rather than the pass name. Maybe that should be changed, will leave it to compo/nodes experts to decide.%%%

%%%Ok, so reload works. Right now it stores the pass index in the socket, rather than the pass name. Maybe that should be changed, will leave it to compo/nodes experts to decide.%%%
Member

%%%The issue here is that the image node does not simply display the image layers, like e.g. the layer selector in image editor does. It creates persistent sockets, which must be updated when the image layers change. This happens on image reload, but not right after loading a node (BKE_image_signal). There are probably comparable situations not related to the image node where a problem like this can occur, e.g. when removing images from a sequence (iirc image user structs store persistent image info too).

Nodes have the concept of "verification", but it's not very well defined atm and only used in a few special cases, like static socket templates changing between Blender versions or node groups updating. Cleaning up this procedure and making it work for image nodes might help.

%%%

%%%The issue here is that the image node does not simply display the image layers, like e.g. the layer selector in image editor does. It creates persistent sockets, which must be updated when the image layers change. This happens on image reload, but not right after loading a node (BKE_image_signal). There are probably comparable situations not related to the image node where a problem like this can occur, e.g. when removing images from a sequence (iirc image user structs store persistent image info too). Nodes have the concept of "verification", but it's not very well defined atm and only used in a few special cases, like static socket templates changing between Blender versions or node groups updating. Cleaning up this procedure and making it work for image nodes might help. %%%

%%%To me the problem isn't really that the sockets aren't added/removed, in my opinion that's something that can be left to the user to do manually, to avoid surprises. It may seem convenient, but as a general rule I think if you open a .blend, make a change in some unrelated area and then save it, there should be no changes. That's especially important if you work in a team, you want to be able to edit a part of a .blend file without of fear of breaking other stuff.

To me it's just strange that there is a pass index rather than a pass name. If it did a lookup by name, you might have too few or too many output sockets, but at least it would give you the right pass matching the socket name.%%%

%%%To me the problem isn't really that the sockets aren't added/removed, in my opinion that's something that can be left to the user to do manually, to avoid surprises. It may seem convenient, but as a general rule I think if you open a .blend, make a change in some unrelated area and then save it, there should be no changes. That's especially important if you work in a team, you want to be able to edit a part of a .blend file without of fear of breaking other stuff. To me it's just strange that there is a pass index rather than a pass name. If it did a lookup by name, you might have too few or too many output sockets, but at least it would give you the right pass matching the socket name.%%%
Member

%%%@brecht: True, names instead of indices would probably help a lot (although this would in turn break if you rename a EXR pass, not terribly bad i guess). I'll look into it, just have to be a bit careful with this node, it can be really nasty in terms of backward/forward compatibility.%%%

%%%@brecht: True, names instead of indices would probably help a lot (although this would in turn break if you rename a EXR pass, not terribly bad i guess). I'll look into it, just have to be a bit careful with this node, it can be really nasty in terms of backward/forward compatibility.%%%
Member

%%%Fixed as suggested in r60234. EXR passes are now matched by name in the compositor, so you get the correct outputs in the file node for the passes that still exist.%%%

%%%Fixed as suggested in r60234. EXR passes are now matched by name in the compositor, so you get the correct outputs in the file node for the passes that still exist.%%%
Member

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
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
3 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#36755
No description provided.