Vertex color interpolation is incorrect #90223
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
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#90223
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?
System Information
Operating system: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: GeForce RTX 2070/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 456.71
Blender Version
Broken: version: 2.93.0, branch: master, commit date: 2021-06-02 11:21, hash:
84da05a8b8
Worked: 2.79, in vertex paint mode and blender internal render, but not in cycles render or cycles material preview
Short description of error
Vertex colours are interpolated incorrectly, they seem to be interpolated as sRGB rather than linear. This goes for Eevee, Cycles, viewport render, and grease pencil vertex colours.
Note that this is NOT vertices having the wrong colours! This is the colours in-between the vertices being wrong
Expected results:
(2.79 vertex paint mode)
(2.79 blender internal material preview)
(Interpolation between two colours using a gradient texture, correcting both colour's gamma before and after)
(Similar setup in Krita)
Actual (incorrect) results:
(vertex colours in all render views)
(same gradient and colours except mixed without correction)
There is no way around this, short of just painting the linear colours yourself and then gamma correcting them in-material. My only suggestion is something along the lines of vertex colours having their own colour space option dropdown in the same way images do, so vertex colours can be used for a non-visual purpose in addition to being correctly interpolated for visual purposes.
errcol.blend
Added subscriber: @Consta
Added subscriber: @scurest
Added subscriber: @mano-wii
Changed status from 'Needs Triage' to: 'Needs Developer To Reproduce'
Blender seems to do a simple vector interpolation representing RGB colors.
I'm not sure how it should be a color interpolation and what is that gamma correction.
Needs developer assistance.
Added subscriber: @EAW
Thank you for the report @constachymic.
You have this reversed, actually. But don’t fret, you are in good company.🤗
I looked at this earlier but didn’t respond until now because I wanted to triple check to make sure I was giving you the correct information.
All gradient strips come from https:*blog.johnnovak.net/2016/09/21/what-every-coder-should-know-about-gamma/ which is under the very permissive WTFPL license.
The bottom gradient is Yellow to Cyan, which is close to the one you are using here. The top of each gradient strip is interpolated in a linear space, and the bottom is in sRGB space.
It is the sRGB that goes to a more saturated green in the middle of the strip, while the linear interpolation stays lighter.
In the linear interpolated Figure 1, the middle of the strip isn't what we call middle grey. It is a lighter color.
In order for the middle of the strip to be halfway in between black and white in our minds, an adjustment (here gamma 2.2) must be made.
Below is an image I made in Krita using the gradient tool, using Blender's OCIO config with the same settings as your file in Blender. I saved it as a PNG with
Force sRGB
checked in the export settings. As you can see, it matches Blender's linear interpolation.Now, you might prefer the look of the sRGB interpolation between certain colors, and that is a perfectly valid creative choice. You already have shown you know how to do this via gamma manipulation in the shader. Adding a dropdown for vertex colors is a feature request that would require a design and approval, which is out of scope of the bug tracker.
#91759 shed a light on this problem.
Eevee, Cycles, viewport render, grease pencil vertex colors consider
Vertex Colors
to besRGB
. However they areRGB
.The question to find out is: who is wrong?
The behavior in Blender 2.79 may be the deciding factor.
Closed as duplicate of #91759