Image Editor not sampling color from the the currently selected pass #90772

Closed
opened 2021-08-19 12:09:47 +02:00 by Philipp Oeser · 8 comments
Member

System Information
Operating system: Linux-5.13.0-0.rc6.45.fc35.x86_64-x86_64-with-glibc2.33.9000 64 Bits
Graphics card: NVIDIA GeForce GTX 970M/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 465.31

Blender Version
Broken: version: 3.0.0 Alpha, branch: master, commit date: 2021-08-19 07:56, hash: 4db4123409
Broken: 2.92.0
Worked: 2.91.2

Caused by ebaa3fcedd

Short description of error
Image Editor not sampling color from the the currently selected pass

Exact steps for others to reproduce the error
from the default startup scene:

  • change the 3D view to an Image Editor
  • open EXR from below
  • in the header, change the layer from Composite to View Layer
  • sample a color from the image using {key LMB} (note the status bar doing this)
  • in the header, change the pass from Combined to AOV
  • note in the status bar that we are still sampling from the Combined pass
  • interestingly, when file is saved in that state and reverted: all is fine (you can now change passes / layers and sampling takes this into account correctly)

0001_30.exr

**System Information** Operating system: Linux-5.13.0-0.rc6.45.fc35.x86_64-x86_64-with-glibc2.33.9000 64 Bits Graphics card: NVIDIA GeForce GTX 970M/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 465.31 **Blender Version** Broken: version: 3.0.0 Alpha, branch: master, commit date: 2021-08-19 07:56, hash: `4db4123409` Broken: 2.92.0 Worked: 2.91.2 Caused by ebaa3fcedd **Short description of error** Image Editor not sampling color from the the currently selected pass **Exact steps for others to reproduce the error** from the default startup scene: - change the 3D view to an Image Editor - open EXR from below - in the header, change the layer from `Composite` to `View Layer` - sample a color from the image using {key LMB} (note the status bar doing this) - in the header, change the pass from `Combined` to `AOV` - note in the status bar that we are still sampling from the `Combined` pass - interestingly, when file is saved in that state and reverted: all is fine (you can now change passes / layers and sampling takes this into account correctly) ![0001_30.exr](https://archive.blender.org/developer/F10291325/0001_30.exr)
Author
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Author
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Philipp Oeser self-assigned this 2021-08-19 12:10:22 +02:00
Author
Member

Will check on this a bit myself.

Will check on this a bit myself.

This issue was referenced by 1af6e0daaf

This issue was referenced by 1af6e0daaf6ba47c083e9cd451fe145f7545bc79

This issue was referenced by 5aa3167e48

This issue was referenced by 5aa3167e48b202f4883ce948ba8e3469e3eaf3ec
Author
Member

Added subscriber: @Jeroen-Bakker

Added subscriber: @Jeroen-Bakker
Author
Member

This will need a bit more investigation, but here are some notes/questions for now:

  • this reason for all this is that we are looking up a cached image buffer via an index (and this index is not right in our case)
  • depending on the type of image this index can have different meaning (stereo image, layers&passes, ...)
  • this index is usually taken from an ImageUser (the ImageEditor is such a user -- and in its UI you can pick the displayed layer/pass for example via template_image_layers), this is stored in ImageUser->multi_index
  • this is where I need more research (procedure of updating ImageEditor ImageUser seems weird -- when changing something in the UI the template acts on a copy of the original ImageUser, the real ImageUser gets updated when aquiring the ImageBuf? [see e.g. usages of BKE_image_multilayer_index / BKE_image_multiview_index])
  • so summing it up for now: the ImageEditor ImageUser is not really up-to-date when starting the sampling, it has a multi_index of zero (and with this [false] index, it finds a [false] cached image -- the wrong pass)
  • also need to check why this was not a problem in 2.91

that being said, D12267 is already working (making sure we dont overwrite multi_index with something wrong)

This will need a bit more investigation, but here are some notes/questions for now: - this reason for all this is that we are looking up a cached image buffer via an index (and this index is not right in our case) - depending on the type of image this index can have different meaning (stereo image, layers&passes, ...) - this index is usually taken from an ImageUser (the ImageEditor is such a user -- and in its UI you can pick the displayed layer/pass for example via `template_image_layers`), this is stored in `ImageUser->multi_index` - this is where I need more research (procedure of updating `ImageEditor` `ImageUser` seems weird -- when changing something in the UI the template acts on a copy of the original `ImageUser`, the real `ImageUser` gets updated when aquiring the ImageBuf? [see e.g. usages of `BKE_image_multilayer_index` / `BKE_image_multiview_index`]) - so summing it up for now: the `ImageEditor` `ImageUser` is not really up-to-date when starting the sampling, it has a multi_index of zero (and with this [false] index, it finds a [false] cached image -- the wrong pass) - also need to check why this was not a problem in 2.91 that being said, [D12267](https://archive.blender.org/developer/D12267) is already working (making sure we dont overwrite `multi_index` with something wrong)
Author
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
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
Asset Browser Project
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#90772
No description provided.