Design: DrawManager Colormanagement #71357
Labels
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
7 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#71357
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This task will go over improvements I want to suggest to the Draw Manager color management. This ticket is in discussion, in the hope to get viewpoints of experts about the subject.
The scope of this ticket is limited to the draw manager as there are some isolated issues here. After the design is approved, the engineering plan can be written. In the engineering plan we will go on the how and code-technical implications.
Current Situation
DrawManager is used in many areas with other target colorspace needs than currently available. DrawManager has a flag
do_colormanagement
, what can either be on or off. When its on, it is up to the draw engines to do the correct expected color management actions. Most of the time this has been implemented with a lot of assumptions about colorspace of the input and output.For example:
Usages of DrawManager
Issues
Proposal
Generated GLSL color transfer functions by OpenColorIO configuration.
common_colormanagement_lib.glsl
. Make the functions OpenColorIO role based. this way it is more clear what function to use in what situation. The role based approach would also limit the configurations that needs to be handled by the shader. But some color management pre-processing needs to be done when images are not using a space defined by the role there in.To be able to set a target OpenColorIO role, when drawing to an offscreen buffer. At the end of the drawing the offscreen buffer is then converted to the ColorSpace that is in the colormanagement configuration for that specific Role.
When rendering and compositing the linear scene ref space (default REC709) must be used. This means that the overlay/mode engines will be drawing in the reference soace and only as a last step the view transform will be applied.
Note that this will also impact how Grease pencil blends colors and there will be rendering differences. These differences are currently also noticeable during final rendering of GP projects. Images that are rendered in the background are currently fixed to REC709 or sRGB. other colorspaces are ignored. We should transform the image buffer from its own encoding to the scene linear space.
Make sure that when overlays are drawn, the input buffers are transferred to the expected color space (display), and transferred back afterwards. Note that color transfers are not reversible and that leads to other artifacts. This part still needs more thought.
Added subscribers: @Jeroen-Bakker, @fclem
Added subscriber: @EAW
Added subscriber: @sebastian_k
Added subscriber: @item412
Added subscriber: @frameshift
Many many kudos for the write-up. This would tackle a huge amount of the current issues.
But doing it on the GPU would be less accurate, you once told me. How inaccurate are we talking? Is it worth the trade-off?
Added subscriber: @MichaelHermann
Just to be on the safe side, I'd like to highlight some stuff in an attempt to prevent any hardcoding from being left behind.
REC709the reference space and only as a last step the view transform will be applied.color space to one of them (depends a bit on use)own encoding to the scene linear reference space.I just like the word encoding because it implies more than just primaries. For instance, if I have a Filmic image, it can only be converted to the scene linear space by inverting that Filmic Log transform. Its primaries are still Rec. 709's, but its encoding is far from sRGB or BT.1886.
Thanks updated. The more I look into the subject the more issues I detect. Might be that I start with some small steps. As some stuff that OCIO provides is a bit hidden behind a wrapper. Need to find out if we actually want this wrapper still to be used. I don't like wrappers that limits possibilities.
Ironically, that makes me very happy :D
I get that, but something tells me they're there for a reason..?
Added subscriber: @Memento
I have added #72420 (Design: DrawEngine Color Management) as a sub-task for discussing a first step.
Changed status from 'Confirmed' to: 'Archived'
Removed subscriber: @Memento
@Jeroen-Bakker Could you elaborate on why this design is invalid? I'm not super familiar with the internals of Blender, but describing the issue might help people understand.
Hi Sam,
At the end we came up with a different design to solve this issue. the final design all draw engines work in linear scene ref space. drawing results into 2 images for each eye (render engine image and overlay engine image). when drawing to the screen these images are composited and converted to display space. This all is done in the GPUViewport. Also external render engines should now render in linear ref space when showing in the viewport.
@Jeroen-Bakker sounds great, thanks!