Paint Mode: Color Sampling #98589

Open
opened 2022-06-04 14:46:11 +02:00 by Julien Kaspar · 4 comments
Member

NOTE: This task is currently to document the requirements for an updated color sampler for painting workflows. This should be the basis for discussions on the implementation.

Goal

Sampling colors is implemented in various different ways throughout Blender, each implementation with their own advantages and features.
The goal here is to combine all needed features into an easily accessible operator, with additional options to get other sampling effects.
This operator will then be used for color sampling in sculpt/paint mode and paint mode in the image editor.

The basic implementation in sculpt mode is already usable for now.

Requirements

Existing Features

  • Sample Merged (Only available in the keymap options or with the color picker button)
  • Add to Palette (Already available via left click)
  • Sample Size (Only in the image editor sample tool)
  • Live sample values for XY, RGBA, CMGB, HSVL, color (Only in the image editor sample tool)
  • Sample Interpolated vs Closest (Automatic for textures. Always picks closest in Weight painting. Not implemented for color attributes. Needs more investigation on what would be most useful.)

Accessibility

The easiest way to access the color sampling should always be with a shortcut.
For now the established default is S. We should follow this wherever possible to stay consistent.

Potentially the best usable way to implement this in the UI is as a button in the color picker instead of an active tool.
The disadvantages of making this an active tool are

  • that it doesn't directly relate to any particular color or brush/tool
  • it's more intuitive to use as a temporary one-click operation (No needs to keep it active)

Sample other Objects

It's already possible to pick any color of the screen when sampling merged colors.
When sampling the current paint slot of the Canvas this is not the case.
Multi-object workflows are very common so there needs to be an implementation to instantly sample local colors from another object.

Use active Canvas picker mode
One straight forward implementation would be to use the Canvas picker mode of the active object to define which colors will be picked. This mode can be set to:

  • Color Attribute
  • Image Texture
  • Material

Each of the other visible objects will have an active color attribute, image texture and node in the material.
So the desired approach is to look for that data and use it for color sampling other objects whenever the option "Sample Merged" is not used.

Color Sample Overlay

When painting for materials there will be cases where it is not obvious what color will be picked.
For example when picking from a greyscale image texture that is used for roughness, while you see the final material in Eevee with additional colors and procedural roughness textures mixed in.

This color sampling preview would ideally be shown directly on the brush cursor, comparing it side-by-side with the currently set color.

NOTE: This task is currently to document the requirements for an updated color sampler for painting workflows. This should be the basis for discussions on the implementation. # Goal Sampling colors is implemented in various different ways throughout Blender, each implementation with their own advantages and features. The goal here is to combine all needed features into an easily accessible operator, with additional options to get other sampling effects. This operator will then be used for color sampling in sculpt/paint mode and paint mode in the image editor. The basic implementation in sculpt mode is already usable for now. # Requirements ## Existing Features - Sample Merged (Only available in the keymap options or with the color picker button) - Add to Palette (Already available via left click) - Sample Size (Only in the image editor sample tool) - Live sample values for XY, RGBA, CMGB, HSVL, color (Only in the image editor sample tool) - Sample Interpolated vs Closest (Automatic for textures. Always picks closest in Weight painting. Not implemented for color attributes. Needs more investigation on what would be most useful.) ## Accessibility The easiest way to access the color sampling should always be with a shortcut. For now the established default is `S`. We should follow this wherever possible to stay consistent. Potentially the best usable way to implement this in the UI is as a button in the color picker instead of an active tool. The disadvantages of making this an active tool are - that it doesn't directly relate to any particular color or brush/tool - it's more intuitive to use as a temporary one-click operation (No needs to keep it active) ## Sample other Objects It's already possible to pick any color of the screen when sampling merged colors. When sampling the current paint slot of the Canvas this is not the case. Multi-object workflows are very common so there needs to be an implementation to instantly sample local colors from another object. **Use active Canvas picker mode** One straight forward implementation would be to use the Canvas picker mode of the active object to define which colors will be picked. This mode can be set to: - Color Attribute - Image Texture - Material Each of the other visible objects will have an active color attribute, image texture and node in the material. So the desired approach is to look for that data and use it for color sampling other objects whenever the option "Sample Merged" is not used. ## Color Sample Overlay When painting for materials there will be cases where it is not obvious what color will be picked. For example when picking from a greyscale image texture that is used for roughness, while you see the final material in Eevee with additional colors and procedural roughness textures mixed in. This color sampling preview would ideally be shown directly on the brush cursor, comparing it side-by-side with the currently set color.
Author
Member
Added subscribers: @JulienKaspar, @Jeroen-Bakker, @JosephEagar

Added subscriber: @Limarest

Added subscriber: @Limarest

I agree that sampling color from other objects is a crucial improvement for the current eyedropper

I agree that sampling color from other objects is a crucial improvement for the current eyedropper
Author
Member

From the recent module meeting, @JosephEagar mentioned a color sampler UI improvement in sculpt-dev.
This should be taken into account for the design.

From the recent module meeting, @JosephEagar mentioned a color sampler UI improvement in sculpt-dev. This should be taken into account for the design.
Julien Kaspar added this to the Sculpt, Paint & Texture project 2023-02-08 10:20:48 +01:00
Philipp Oeser removed the
Interest
Sculpt, Paint & Texture
label 2023-02-10 09:11:19 +01:00
Iliya Katushenock removed the
Status
Needs Triage
label 2023-08-24 17:38:18 +02: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 Assignees
2 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#98589
No description provided.