Can't Sample the correct color from non-color images #82093

Closed
opened 2020-10-26 15:21:57 +01:00 by Diogo Valadares Reis dos Santos · 10 comments

System Information*
Operating system: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: AMD Radeon RX 5700 XT ATI Technologies Inc. 4.5.13587 Core Profile Context 20.4.2 26.20.15029.27017

Blender Version
Broken: 2.91.0 Beta, branch: master, commit date: 2020-10-22 21:22, hash: baa24f1c91
Worked: : 2.90.1, branch: master, commit date: 2020-09-23 06:43, hash: 3e85bb34d0

Exact steps for others to reproduce the error

When sampling the color of non-sRGB textures in the image editor, instead of getting the color you want using the shortcut "S", you get the color plus the difference of the color space.

Result from using "s" and painting on a normal map in 2.91:
image.png
2.90.1:
image.png

*System Information** Operating system: Windows-10-10.0.19041-SP0 64 Bits Graphics card: AMD Radeon RX 5700 XT ATI Technologies Inc. 4.5.13587 Core Profile Context 20.4.2 26.20.15029.27017 **Blender Version** Broken: 2.91.0 Beta, branch: master, commit date: 2020-10-22 21:22, hash: `baa24f1c91` Worked: : 2.90.1, branch: master, commit date: 2020-09-23 06:43, hash: `3e85bb34d0` **Exact steps for others to reproduce the error** When sampling the color of non-sRGB textures in the image editor, instead of getting the color you want using the shortcut "S", you get the color plus the difference of the color space. Result from using "s" and painting on a normal map in 2.91: ![image.png](https://archive.blender.org/developer/F9088497/image.png) 2.90.1: ![image.png](https://archive.blender.org/developer/F9088506/image.png)

Added subscriber: @Diogo_Valadares

Added subscriber: @Diogo_Valadares
Member

Added subscribers: @Jeroen-Bakker, @lichtwerk

Added subscribers: @Jeroen-Bakker, @lichtwerk
Member

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

Changed status from 'Needs Triage' to: 'Confirmed'
Jeroen Bakker was assigned by Philipp Oeser 2020-10-26 15:54:53 +01:00
Member

Can confirm, is this also something you could take care of @Jeroen-Bakker?

Can confirm, is this also something you could take care of @Jeroen-Bakker?
Member

I can have a look this week.

I can have a look this week.
Member

Cause seems like the old implementation assumes that the color buffer where it reads the sample from is always in sRGB. The image editor now has a linear buffer that could be used for correct color picking or similar what we do for the 3d viewport is to use custom logic towards the image. That would lead to other artifacts (not able to color pick from overlays).

Cause seems like the old implementation assumes that the color buffer where it reads the sample from is always in sRGB. The image editor now has a linear buffer that could be used for correct color picking or similar what we do for the 3d viewport is to use custom logic towards the image. That would lead to other artifacts (not able to color pick from overlays).
Member

use custom logic towards the image. That would lead to other artifacts (not able to color pick from overlays).

We had this this TODO anyways #81673, so I'd go for picking it from the linear buffer (and worry about overlays later)

> use custom logic towards the image. That would lead to other artifacts (not able to color pick from overlays). We had this this TODO anyways #81673, so I'd go for picking it from the linear buffer (and worry about overlays later)
Jeroen Bakker changed title from Can't Sample the correct color from non-sRGB images to Can't Sample the correct color from non-color images 2020-10-27 16:47:20 +01:00
Member

Issue isn't the color sampler. I did some adjustments to make sure of that the right color is sampled D9408: Fix #81673: Color picker picks up UI and Overlay. The issue is that image painting does not take color management into account, but the color sampler does. The drawing of the image editor now follows a more strict color pipeline what made this issue noticable.

The correct solution is to add color management to all painting tools, but that isn't the right scope for now. I will see if we can work around the differences between 2.90 and 2.91 in a reliable way.

Issue isn't the color sampler. I did some adjustments to make sure of that the right color is sampled [D9408: Fix #81673: Color picker picks up UI and Overlay](https://archive.blender.org/developer/D9408). The issue is that image painting does not take color management into account, but the color sampler does. The drawing of the image editor now follows a more strict color pipeline what made this issue noticable. The correct solution is to add color management to all painting tools, but that isn't the right scope for now. I will see if we can work around the differences between 2.90 and 2.91 in a reliable way.

This issue was referenced by c08827e659

This issue was referenced by c08827e659e5f48034b4f9d4612bd309ea63ff03
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Thomas Dinges added this to the 2.90 milestone 2023-02-08 16:25:39 +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
4 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#82093
No description provided.