Page MenuHome

ProjectionPaint: Insufficient Soften treshold or blur kernel radius hardcoded
Needs Information from Developers, NormalPublic

Description

System Information
Operating system: Windows 64bits

Blender Version
Broken: 2.90.1
Worked: N/a

Short description of error
The Soften stops working for color difference of less than ~10% , making it practically useless for everything except low-color images. (https://blender.stackexchange.com/questions/203414/2d-texture-paint-quality-to-3d)
GIF:

Exact steps for others to reproduce the error

  • Open attached file
  • Execute Soften, on only few pixels of the texture at same time (under the Cursor area) .

Expected behavior

  • Undo the change .
  • In the Image Editor, Soften the image with 2px brush Radius .

Related Objects

Event Timeline

irvnriir (irvnriir) renamed this task from Insufficient Soften treshold in: 3D Viewport \ Texture Paint to Insufficient Soften treshold in: 3D Viewport \ Texture Paint !.Nov 29 2020, 1:32 PM

Can you provide a simple .blend file so that we can visualize the problem?

Things that can affect the color picker result:

  • Material properties (Specular, alpha)
  • Color management.
Germano Cavalcante (mano-wii) changed the task status from Needs Triage to Needs Information from User.Dec 4 2020, 8:17 PM
irvnriir (irvnriir) added a comment.EditedDec 6 2020, 3:39 AM

everything in the thread talks about the Soften Threshold, which is no different in any .blend . on the video, no Material settings except Base Color is edited .
the Eyedropper issue is already solved as stated by the link .

A simple .blend file would still be appreciated (if you don't mind).
To attach a file, simply drag and drop it into the comments area.

I was unable to reproduce the problem but I may have done something wrong.

irvnriir (irvnriir) added a comment.EditedDec 7 2020, 10:07 PM

1_

You probably met the threshold changing with the brush size (amount of subject pixels) .
I don't know how it gets to this, but it looks alike: a falloff with complete merge at center and 10% at borders of the brush, that selects the value based on position of the subject pixels' centers; or something similar ( ! that has no relation to the Falloff setting ! ) .

Execute Soften on only few pixels of the texture -- under the Cursor area .

p.s. This is an issue, because masking everything around and zooming out, for each Soften operation is unacceptable .

2_

And after creating the new project, the color issue got back globally . This time, nothing in Color Management, the Material params you mentioned and Viewport Shading have helped .

I can't reproduce the problem:

And unfortunately the description in the report is missing a lot of information that is required.
I could edit the description, but maybe it will not be possible :\

... you are reproducing it, on any not pixelated graphics these edges you show on your video, are highly visible . you could at least measure the difference between the adjacent pixels, before saying "can't reproduce" .

if you see any info that you think is "required", point it out . because i don't see any .

... you could at least measure the difference between the adjacent pixels, before saying "can't reproduce".

Sorry, but I don't understand what you mean.
The texture is 16x16 pixels, what gradient is expected?
You need to explain the problem in a way that even non-artists can understand.

if you see any info that you think is "required", point it out . because i don't see any .

When submitting a bug, there is a template indicating everything the report needs to contain.

That said, this report is missing:

  • ... "previous Blender versions to find the latest version that was working as expected."
  • ... "steps to redo the bug consistently ..., and include a small and simple .blend file to demonstrate the bug."

A guideline for making a good bug report can be found at https://wiki.blender.org/wiki/Process/Bug_Reports

Germano Cavalcante (mano-wii) changed the task status from Needs Information from User to Needs Triage.Dec 8 2020, 1:33 PM
Germano Cavalcante (mano-wii) updated the task description. (Show Details)

I edited the description. And I tagged the Sculpt, Paint & Texture developer team to take a look. (Even not yet confirmed)

irvnriir (irvnriir) updated the task description. (Show Details)EditedDec 8 2020, 6:43 PM

Thanks for effort to make it more accessible and for attention to the report . The subject issue really seems very obvious for me .

The example file doesn't showcase the issue, i provided it for settings/project setup . I put the new one .

irvnriir (irvnriir) added a comment.EditedDec 8 2020, 7:09 PM

I've run some more tests and figured that the IE's Soften rely on Kernel Radius more than i expected (with KR 1 its close to TP's one) . But the fact that it still change only pixels under the cursor, allow to use it anyway .

So probably a solution could be to add the Kernel Radius to the 3D Viewport \ Texture Paint \ Soften . And a threshold setting would be also and maybe even more, useful . (merge the color of pixels under Cursor, until the difference between them is equal or below the Threshold)

Philipp Oeser (lichtwerk) changed the task status from Needs Triage to Needs Information from Developers.Jan 18 2021, 4:22 PM

I have found that the Kernel Radius for projection painting (3D viewport) is hardcoded to 0.5.
Apparently with this reasoning:

/* paint blur kernels. Projective painting enforces use of a 2x2 kernel due to lagging */

And indeed using a bigger kernel is quite slow in the viewport.
You can test it with this patch:

1
2
3diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py
4index 5d241e8e216..b1fbaddada2 100644
5--- a/release/scripts/startup/bl_ui/properties_paint_common.py
6+++ b/release/scripts/startup/bl_ui/properties_paint_common.py
7@@ -951,8 +951,7 @@ def brush_settings_advanced(layout, context, brush, popover=False):
8 layout.separator()
9 layout.row().prop(brush, "direction", expand=True)
10 layout.prop(brush, "sharp_threshold")
11- if mode == 'PAINT_2D':
12- layout.prop(brush, "blur_kernel_radius")
13+ layout.prop(brush, "blur_kernel_radius")
14 layout.prop(brush, "blur_mode")
15
16 elif brush.image_tool == 'MASK':
17diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c
18index 324fd5d3075..8b181640b7d 100644
19--- a/source/blender/editors/sculpt_paint/paint_image.c
20+++ b/source/blender/editors/sculpt_paint/paint_image.c
21@@ -196,7 +196,7 @@ BlurKernel *paint_new_blur_kernel(Brush *br, bool proj)
22 int side;
23 eBlurKernelType type = br->blur_mode;
24
25- if (proj) {
26+ if (false) {
27 radius = 0.5f;
28
29 side = kernel->side = 2;

So, this does not really look like a bug to me (instead like a known limitation).
I would like a module dev opinion though if it would be wiser to expose the kernel radius to the UI with minimum default and let the user dial this up if their machine is beefy enough?

Philipp Oeser (lichtwerk) renamed this task from Insufficient Soften treshold in: 3D Viewport \ Texture Paint ! to ProjectionPaint: Insufficient Soften treshold or blur kernel radius hardcoded.Jan 18 2021, 4:23 PM

Even such, if the lag is too large, the issue stays . Probably altering the algorithm is required to fix this .