Texture Paint: Color Sampling ignoring Texture Interpolation setting #88440

Closed
opened 2021-05-20 21:21:24 +02:00 by Jonas Meyer · 13 comments

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

Blender Version
Broken: version: 2.92.0, branch: master, commit date: 2021-02-24 16:25, hash: 02948a2cab
Worked: ?

Short description of error
The color picker in "Texture Painting" mode ignores the interpolation method the texture uses. It always seems to sample the color as if the texture interpolation was linear, even when it is set to something else.

Exact steps for others to reproduce the error

  • Open attached .blend file.
  • Change shading to "Rendered" or "Material Preview".
  • Enter Texture Paint mode.
  • Sample one of the colors.
  • Notice that the sampled color does not match what is displayed.
  • Change the texture interpolation to "Linear" to see that this is what is actually sampled.

blender_colorPicker_ignoringTextureSampling.blend

Expected Behaviour
Color sampler samples what the user sees in the viewport and doesn't ignore the texture interpolation.

**System Information** Operating system: Windows-10-10.0.19041-SP0 64 Bits Graphics card: GeForce RTX 3080/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 462.31 **Blender Version** Broken: version: 2.92.0, branch: master, commit date: 2021-02-24 16:25, hash: `02948a2cab` Worked: ? **Short description of error** The color picker in "Texture Painting" mode ignores the interpolation method the texture uses. It always seems to sample the color as if the texture interpolation was linear, even when it is set to something else. **Exact steps for others to reproduce the error** - Open attached .blend file. - Change shading to "Rendered" or "Material Preview". - Enter Texture Paint mode. - Sample one of the colors. - Notice that the sampled color does not match what is displayed. - Change the texture interpolation to "Linear" to see that this is what is actually sampled. [blender_colorPicker_ignoringTextureSampling.blend](https://archive.blender.org/developer/F10131471/blender_colorPicker_ignoringTextureSampling.blend) **Expected Behaviour** Color sampler samples what the user sees in the viewport and doesn't ignore the texture interpolation.
Author

Added subscriber: @JJG

Added subscriber: @JJG
Author

Also just to make this more obvious without needing to understand what I wrote above or opening the example file.
texInterp_sampling.png

Also just to make this more obvious without needing to understand what I wrote above or opening the example file. ![texInterp_sampling.png](https://archive.blender.org/developer/F10131887/texInterp_sampling.png)
Member

Added subscriber: @EAW

Added subscriber: @EAW
Member

Changed status from 'Needs Triage' to: 'Needs User Info'

Changed status from 'Needs Triage' to: 'Needs User Info'
Member

Thank you for the report. The picture is helpful for conveying the issue you are experiencing, however, I cannot reproduce the issue.
I tested 2.92, and 3.0. Are you able to have the color picker select the magenta color between the blue and the red even when the interpolation is set to closest?


Tested using:
OS: Windows-10-10.0.19041.630-SP0 64 Bits
GPU: GeForce GTX 470/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 391.35

Thank you for the report. The picture is helpful for conveying the issue you are experiencing, however, I cannot reproduce the issue. I tested 2.92, and 3.0. Are you able to have the color picker select the magenta color between the blue and the red even when the interpolation is set to `closest`? --- Tested using: OS: Windows-10-10.0.19041.630-SP0 64 Bits GPU: GeForce GTX 470/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 391.35
Author

Yes, the color picker seems to do all sorts of craziness for me when I use closest. Here is a video of it. Also seems like it works a bit strangely with linear interpolation.
colorsamplerTextureInterp.mp4

Yes, the color picker seems to do all sorts of craziness for me when I use closest. Here is a video of it. Also seems like it works a bit strangely with linear interpolation. [colorsamplerTextureInterp.mp4](https://archive.blender.org/developer/F10134574/colorsamplerTextureInterp.mp4)
Member

Changed status from 'Needs User Info' to: 'Confirmed'

Changed status from 'Needs User Info' to: 'Confirmed'
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

Ah, I was using the E shortcut over the color bar, which activates the eyedropper modal, which confirms the sample upon mouse release. I was just clicking (press & release) at single points.
I can confirm that the S sampling shortcut does indeed sample using linear interpolation in the 3D viewport, unless Samples Merged is checked.
Looking at the key map, I see that the eyedropper modal will continuously sample as long as the left mouse button is held down. This too samples using linear interpolation.

I don't think this is technically a bug, as void paint_sample_color has bilinear_interpolation_color_wrap.
I will mark as confirmed based off of @lichtwerk's confirming #88300 (Color Picker in texture mode sampling incorrect values (sample merged OFF, sampling from another object)) as a TODO.

Ah, I was using the `E` shortcut over the color bar, which activates the eyedropper modal, which confirms the sample upon mouse release. I was just clicking (press & release) at single points. I can confirm that the `S` sampling shortcut does indeed sample using linear interpolation in the 3D viewport, unless `Samples Merged` is checked. Looking at the key map, I see that the eyedropper modal will continuously sample as long as the left mouse button is held down. This too samples using linear interpolation. I don't think this is technically a bug, as [void paint_sample_color](https://developer.blender.org/diffusion/B/browse/master/source/blender/editors/sculpt_paint/paint_utils.c$453) has `bilinear_interpolation_color_wrap`. I will mark as confirmed based off of @lichtwerk's confirming #88300 (Color Picker in texture mode sampling incorrect values (sample merged OFF, sampling from another object)) as a `TODO`.
Author

I was not able to sample the correct colors with E either, the behavior seemed identical to the one seen in the video where I use S .
I would argue that void_paint_sample_color should sample what a user actually sees instead of something completely different, there is no way for a user to look at the current behavior and conclude that it makes sense, a user would probably just think it is broken.

Also naive question but couldn't a lot of this be solved by sampling directly from the DiffuseColor buffer? The same one you can access from EEVEE.

I was not able to sample the correct colors with `E` either, the behavior seemed identical to the one seen in the video where I use `S` . I would argue that [void_paint_sample_color](https://developer.blender.org/diffusion/B/browse/master/source/blender/editors/sculpt_paint/paint_utils.c$453) should sample what a user actually sees instead of something completely different, there is no way for a user to look at the current behavior and conclude that it makes sense, a user would probably just think it is broken. Also naive question but couldn't a lot of this be solved by sampling directly from the `DiffuseColor` buffer? The same one you can access from EEVEE.
Member

This was actually fixed by 0d43ff43a4, no ?

This was actually fixed by 0d43ff43a4, no ?
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Philipp Oeser self-assigned this 2022-05-11 11:36:25 +02:00
Member

In #88440#1356614, @lichtwerk wrote:
This was actually fixed by 0d43ff43a4, no ?

Seems so, will close this as resolved, feel free to comment again if this is a misunderstanding (we can always reopen in such case)

> In #88440#1356614, @lichtwerk wrote: > This was actually fixed by 0d43ff43a4, no ? Seems so, will close this as resolved, feel free to comment again if this is a misunderstanding (we can always reopen in such case)
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
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#88440
No description provided.