Page MenuHome

Can't Sample the correct color from non-color images
Closed, ResolvedPublicBUG

Description

*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: rBbaa24f1c91d2
Worked: : 2.90.1, branch: master, commit date: 2020-09-23 06:43, hash: rB3e85bb34d0d7

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:


2.90.1:

Event Timeline

Philipp Oeser (lichtwerk) changed the task status from Needs Triage to Confirmed.Oct 26 2020, 3:54 PM
Philipp Oeser (lichtwerk) triaged this task as High priority.
Philipp Oeser (lichtwerk) changed the subtype of this task from "Report" to "Bug".

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

I can have a look this week.

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).

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 T81673, so I'd go for picking it from the linear buffer (and worry about overlays later)

Jeroen Bakker (jbakker) renamed this task from Can't Sample the correct color from non-sRGB images to Can't Sample the correct color from non-color images.Oct 27 2020, 4:47 PM

Issue isn't the color sampler. I did some adjustments to make sure of that the right color is sampled D9408: Fix T81673: 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.