Color-Picker preview does not consider the current View Transform selected #124544

Open
opened 2024-07-11 18:15:53 +02:00 by Liam Collod · 4 comments

Hello,
I am reporting what seems to be a bug or more like a missing implementation.

topics: graphical-interface, color-management, color-picker, OCIO

observation

When using the Color-Picker we can notice that the GUI preview is not updated when we change the active View Transform being applied. Actually, the color-picker seems hardcoded to use the first View (OCIO term) defined in the config for the active Display.
On the positive side, we can notice that changing the active Display in the GUI does update the color-picker GUI preview accordingly.

steps to reproduce

Here is a recording showcasing the issue, first part showcases the change of Display works as expected but then the change of View-Transform does not.

recorded on Blender 4.1.1, branch: blender-v4.1-release, platform: 'Windows-10-10.0.19045-SP0' with native color config

indentification

I tried to browse the code to confirm the observation which led me to:

const char *view_name = colormanage_view_get_default_name(display);

If I correctly understand the code it seems we are only tracking the active Display which is being provided as a parameter, however for the view we rely on colormanage_view_get_default_name :

const char *name = OCIO_configGetDefaultView(config, display->name);

which basically relies on the native OCIO function OCIO_configGetDefaultView:

https://opencolorio.org/old/developers/api/OpenColorIO.html#Config::getDefaultView__cCPC
(sharing the legacy doc because Git Blame indicate the line hasn't moved in 12 years)

conclusion

By not using the View-Transform in the generation of the color-picker GUI we rely on OCIO native behaviour of providing us a default View, happening to just be the first View defined for a given Display in the current OCIO config.

This behaviour forces OCIO config authors to make sure they sort their View according to which one they want it to be used for Blender color-picker but also means that artist will never get the actual preview of their picked color once it has gone through the View Transform and just rely upon whatever the config author have defined (or not).

I also want to point out that the same issue can be found for Looks, where changing the active Look will not impact the color-picker. However, also applying the active Look in the color-picker might be a more subjective decision than the View.


This is the first time I am reporting what seems to me like a bug so please let me know if this is not the appropriate platform of if anything is missing.
Best,
Liam.

Hello, I am reporting what seems to be a bug or more like a missing implementation. topics: graphical-interface, color-management, color-picker, OCIO # observation When using the Color-Picker we can notice that the GUI preview is not updated when we change the active `View Transform` being applied. Actually, the color-picker seems hardcoded to use the first `View` (OCIO term) defined in the config for the active `Display`. On the positive side, we can notice that changing the active `Display` in the GUI does update the color-picker GUI preview accordingly. ## steps to reproduce Here is a recording showcasing the issue, first part showcases the change of `Display` works as expected but then the change of `View-Transform` does not. > recorded on Blender 4.1.1, branch: blender-v4.1-release, platform: 'Windows-10-10.0.19045-SP0' with native color config <video src="/attachments/5ec6ffd6-0d95-4bbd-9611-4ac8e10483f9" title="2024_07_11_173601_x.mp4" controls></video> # indentification I tried to browse the code to confirm the observation which led me to: https://projects.blender.org/blender/blender/src/commit/6e683e26ccb671d80d25f3ca1fc1d78177901dd3/source/blender/imbuf/intern/colormanagement.cc#L990 If I correctly understand the code it seems we are only tracking the active `Display` which is being provided as a parameter, however for the view we rely on `colormanage_view_get_default_name` : https://projects.blender.org/blender/blender/src/commit/6e683e26ccb671d80d25f3ca1fc1d78177901dd3/source/blender/imbuf/intern/colormanagement.cc#L3097 which basically relies on the native OCIO function `OCIO_configGetDefaultView`: > https://opencolorio.org/old/developers/api/OpenColorIO.html#Config::getDefaultView__cCPC > (sharing the legacy doc because Git Blame indicate the line hasn't moved in 12 years) # conclusion By not using the View-Transform in the generation of the color-picker GUI we rely on OCIO native behaviour of providing us a default `View`, happening to just be the first `View` defined for a given `Display` in the current OCIO config. This behaviour forces OCIO config authors to make sure they sort their View according to which one they want it to be used for Blender color-picker but also means that artist will never get the actual preview of their picked color once it has gone through the `View Transform` and just rely upon whatever the config author have defined (or not). I also want to point out that the same issue can be found for `Looks`, where changing the active `Look` will not impact the color-picker. However, also applying the active `Look` in the color-picker might be a more subjective decision than the `View`. --- This is the first time I am reporting what seems to me like a bug so please let me know if this is not the appropriate platform of if anything is missing. Best, Liam.
Liam Collod added the
Type
Report
Severity
Normal
Status
Needs Triage
labels 2024-07-11 18:15:54 +02:00
Iliya Katushenock added the
Interest
User Interface
label 2024-07-11 19:41:41 +02:00
Member

Apparently the same thing as #124401 ... But this report does provide more details

Apparently the same thing as #124401 ... But this report does provide more details
Author

Thanks for the reference, however on first look I don't feel it is related ?

Thanks for the reference, however on first look I don't feel it is related ?
Member

I think this is intentional - if the view was applied to the color preview, then e.g. pure white for texture painting would be displayed as grey if a Filmic transform is selected.

The display is not ignored since color inputs are assumed to be in the scene linear colorspace of the OCIO config, so if you set the display to something different, that warrants a transform.

Of course, this is not ideal in all cases. Ideally, we'd know whether a given input represents a reflectivity or a luminance and transform accordingly, but I don't think that's practical.

I think this is intentional - if the view was applied to the color preview, then e.g. pure white for texture painting would be displayed as grey if a Filmic transform is selected. The display is not ignored since color inputs are assumed to be in the scene linear colorspace of the OCIO config, so if you set the display to something different, that warrants a transform. Of course, this is not ideal in all cases. Ideally, we'd know whether a given input represents a reflectivity or a luminance and transform accordingly, but I don't think that's practical.
Author

if the view was applied to the color preview

The view is currently applied, which is why I spotted the issue ! You don't notice it with the Blender default config because the first View is Standard. However if you use any other config that doesn't have a Standard view, or at least not first, your color-picker will not look "as expected".

I can go along the argument of "let's not apply the View", but in that case Blender probably have to provide it's own scene > display transform because you can't assume it from an arbitrary OCIO config (which I guess would be hard to mix with the current OCIO code).

> if the view was applied to the color preview The view is currently applied, which is why I spotted the issue ! You don't notice it with the Blender default config because the first `View` is `Standard`. However if you use any other config that doesn't have a `Standard` view, or at least not first, your color-picker will not look "as expected". I can go along the argument of "let's not apply the View", but in that case Blender probably have to provide it's own scene > display transform because you can't assume it from an arbitrary OCIO config (which I guess would be hard to mix with the current OCIO code).
Pratik Borhade added
Status
Confirmed
Module
Render & Cycles
and removed
Status
Needs Triage
labels 2024-08-02 07:46:19 +02:00
Bart van der Braak added
Type
Bug
and removed
Type
Report
labels 2024-08-14 12:57:07 +02:00
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
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
Viewport & EEVEE
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
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
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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#124544
No description provided.