Grease pencil eyedropper doesn't sample correct vertex color. #82992

Open
opened 2020-11-25 11:15:03 +01:00 by Jonathan Mielke · 7 comments

System Information
Operating system: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: GeForce RTX 2070 SUPER/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 457.30

Blender Version
Broken:

version: 2.90.0, branch: master, commit date: 2020-08-31 11:26, hash: `rB0330d1af29c0`
version: 2.92.0 Alpha, branch: master, commit date: 2020-11-24 16:32, hash: `rBe922dd7d8a30`
version: 2.83.9, branch: master, commit date: 2020-11-11 06:30, hash: `rB4abfc0bcd5c8`

Worked: (unknown maybe never)

Short description of error
When using the grease pencil eye dropper with filmic color management selected; the sampled color is different than the original vertex stroke color.
Works as expected with standard color management selected
(Note this is confusing to new users as they expect to color sample and return the previous color of their previous stroke.)

with filmic enabled: with filmic disabled:

Exact steps for others to reproduce the error

  • Start with a new file
  • Set color management to filmic.
  • Add grease pencil object
  • Enter Draw Mode
  • Paint in vertex color mode using a lighter color.
  • With a blank palette use the color eyedropper tool on the stroke you just made
  • now paint with the sampled color in the palette
  • result should be slightly darker than the first stroke.

video reference:
with filmic enabled:
Desktop 2020.11.25 - 02.35.06.03.mp4

with filmic disabled:
Desktop 2020.11.25 - 02.36.30.06.mp4

**System Information** Operating system: Windows-10-10.0.19041-SP0 64 Bits Graphics card: GeForce RTX 2070 SUPER/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 457.30 **Blender Version** Broken: ``` version: 2.90.0, branch: master, commit date: 2020-08-31 11:26, hash: `rB0330d1af29c0` version: 2.92.0 Alpha, branch: master, commit date: 2020-11-24 16:32, hash: `rBe922dd7d8a30` version: 2.83.9, branch: master, commit date: 2020-11-11 06:30, hash: `rB4abfc0bcd5c8` ``` Worked: (unknown maybe never) **Short description of error** When using the grease pencil eye dropper with filmic color management selected; the sampled color is different than the original vertex stroke color. Works as expected with standard color management selected (Note this is confusing to new users as they expect to color sample and return the previous color of their previous stroke.) |with filmic enabled:|with filmic disabled:| |--|--| |<video src="https://archive.blender.org/developer/F9371464/Desktop_2020.11.25_-_02.35.06.03.mp4" controls></video>|<video src="https://archive.blender.org/developer/F9371475/Desktop_2020.11.25_-_02.36.30.06.mp4" controls></video>| **Exact steps for others to reproduce the error** - Start with a new file - Set color management to filmic. - Add grease pencil object - Enter Draw Mode - Paint in vertex color mode using a lighter color. - With a blank palette use the color eyedropper tool on the stroke you just made - now paint with the sampled color in the palette - result should be slightly darker than the first stroke. video reference: **with filmic enabled:** [Desktop 2020.11.25 - 02.35.06.03.mp4](https://archive.blender.org/developer/F9371464/Desktop_2020.11.25_-_02.35.06.03.mp4) **with filmic disabled:** [Desktop 2020.11.25 - 02.36.30.06.mp4](https://archive.blender.org/developer/F9371475/Desktop_2020.11.25_-_02.36.30.06.mp4)

Added subscriber: @JSM

Added subscriber: @JSM

#83129 was marked as duplicate of this issue

#83129 was marked as duplicate of this issue
Member

Added subscribers: @antoniov, @Jeroen-Bakker, @lichtwerk

Added subscribers: @antoniov, @Jeroen-Bakker, @lichtwerk
Member

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

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

Yep, Grease Pencil "just" uses eyedropper_color_sample_fl which can pick up colors from Image Editors, Compositor etc. correctly, but "only" uses simple OpenGL pixel reading in the 3D viewport.
So in fact, the above actually goes through colormanagement (eyedropper_color_sample_fl does IMB_colormanagement_display_to_scene_linear_v3 & eyedropper_gpencil_color_set does IMB_colormanagement_scene_linear_to_display_v3), but you get possible viewport shading happening to strokes baked in and also exposure and gamma [@Jeroen-Bakker: not sure if these are part of the OCIO processing?]

It would be good indeed to be similar to texture painting, where paint_sample_color goes in and does not sample the viewport pixel but the texture color [at least if the Sample Merged option is OFF].
So for Grease Pencil, this would need to add the Sample Merged option, pick up the color from the material [and/or Vertex Color] and not using OpenGL [OpenGL should only be used if Sample Merged option is ON].

This is not a bug though (more of a TODO), it is just not implemented that way, would like to ask @antoniov and @Jeroen-Bakker though if they would like to keep this task open (it is definitely useful to pick "correct" colors from other strokes as well, no?)
Will confirm for now.

Yep, Grease Pencil "just" uses `eyedropper_color_sample_fl` which can pick up colors from Image Editors, Compositor etc. correctly, but "only" uses simple OpenGL pixel reading in the 3D viewport. So in fact, the above actually goes through colormanagement (`eyedropper_color_sample_fl` does `IMB_colormanagement_display_to_scene_linear_v3` & `eyedropper_gpencil_color_set` does `IMB_colormanagement_scene_linear_to_display_v3`), but you get possible viewport shading happening to strokes baked in and also exposure and gamma [@Jeroen-Bakker: not sure if these are part of the OCIO processing?] It would be good indeed to be similar to texture painting, where `paint_sample_color` goes in and does not sample the viewport pixel but the texture color [at least if the `Sample Merged` option is OFF]. So for Grease Pencil, this would need to add the `Sample Merged` option, pick up the color from the material [and/or Vertex Color] and not using OpenGL [OpenGL should only be used if `Sample Merged` option is ON]. This is not a bug though (more of a TODO), it is just not implemented that way, would like to ask @antoniov and @Jeroen-Bakker though if they would like to keep this task open (it is definitely useful to pick "correct" colors from other strokes as well, no?) Will confirm for now.

You are right @lichtwerk, the difference is the color correction and if there is a way to skip this, maybe it would be better.

Anyway, also can be differences if you sample a stroke in a grease pencil with the lighting enabled, because the color can change.

We can keep this open as ToDo.

You are right @lichtwerk, the difference is the color correction and if there is a way to skip this, maybe it would be better. Anyway, also can be differences if you sample a stroke in a grease pencil with the lighting enabled, because the color can change. We can keep this open as ToDo.

Added subscriber: @Jkecwlkr

Added subscriber: @Jkecwlkr
Philipp Oeser removed the
Interest
Grease Pencil
label 2023-02-09 15:19:43 +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
5 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#82992
No description provided.