Texture Paint Fill Tool is broken with partial strength on Float/Linear Textures #82518

Open
opened 2020-11-08 23:59:39 +01:00 by tom k · 4 comments

System Information
Operating system: Linux-4.15.0-55-generic-x86_64-with-debian-stretch-sid 64 Bits
Graphics card: GeForce GTX 750 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 384.130

Blender Version
Broken: version: 2.92.0 Alpha, branch: master, commit date: 2020-11-07 16:22, hash: 7be47dadea
also 2.79, 2.80, 2.81, 2.83.5, 2.90.1
Worked: probably never?

Short description of error
Texture Paint Fill Tool behaves strangely with partial strength (0-1 exclusive) when painting on float/linear textures. It appears as though strength were ignored when filling over a black image, but doing so over a non-black image shows some weird interaction.

Note that the Texture Paint Draw Tool behaves correctly, so I guess the fix is for fill to just do what draw does.

(minor note: working with colour spaces is difficult and I figured there's a chance the problem is just me not understanding it/doing it wrong, but I think the fact that the draw tool does work as expected has me covered.)

Video demonstration:
(I've fast-forwarded unimportant parts)

0:14 - Non-float image. Draw tool with strength=1.0, then 0.1, then fill tool with strength=0.1. Behaves as expected.
0:43 - float image. Same test. Draw behaviour with low strength appears correct. Fill behaviour is incorrect.

BlenderFloatFillBug.mp4

Exact steps for others to reproduce the error
From default startup:

  1. enter texture paint workspace
  2. properties editor -> tool settings, set texture slots mode to single image, make new image with 32 bit float.
  3. set tool to fill, set strength to any value below 1, except 0.
  4. click cube to fill black texture with white paint. Expected: some shade of grey. Result: full-bright white.

Results of tests with various shades/strengths:

  • all performed in 3d viewport
  • each test performed on empty black image
  • input/output are HSV values
  • 0.7354 being middle grey
  • output value is sampled from viewport with eyedropper
  • fill 2nd click is result after two clicks of fill
in strength draw output fill output fill 2nd click
0.01 0.01 0.0001 0.01 0.0199
0.1 0.001 0.01 0.019
0.5 0.005 0.01 0.015
0.1 0.01 0.001294 0.099998 0.15143
0.1 0.012949 0.099998 0.14752
0.5 0.061102 0.099998 0.128549
0.5 0.01 0.027639 0.49997 0.684261
0.1 0.157658 0.49997 0.670251
0.5 0.36078 0.49997 0.602086
0.7354 0.01 0.060985 0.735162 0.998114
0.1 0.247814 0.735162 0.97771
0.5 0.537175 0.735162 0.880889
0.99 0.01 0.098344 0.99001 0.999924
0.1 0.345314 0.99001 0.999924
0.5 0.727916 0.99001 0.999924
1 0.01 0.099802 0.999924 0.999924
0.1 0.349084 0.999924 0.999924
0.5 0.735271 0.999924 0.999924

Notice:

  • the first click of the fill tool always gives the same result regardless of strength.
  • the second click makes the image brighter than the colour we're filling with, which doesn't make sense.
  • the second click gives lower values for higher strengths, when you'd expect the opposite.

Another demonstration:

  • left: black texture painted with grey values 0.1 .. 1.0.
  • right: then filled with middle grey 0.7354 with strength 0.5.

blenderFloatFillBug.png

Notice:

  • every shade becomes brighter (or remains ~1.0), even those greater than 0.7354 that should darken (move towards middle grey).
**System Information** Operating system: Linux-4.15.0-55-generic-x86_64-with-debian-stretch-sid 64 Bits Graphics card: GeForce GTX 750 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 384.130 **Blender Version** Broken: version: 2.92.0 Alpha, branch: master, commit date: 2020-11-07 16:22, hash: `7be47dadea` also 2.79, 2.80, 2.81, 2.83.5, 2.90.1 Worked: probably never? **Short description of error** Texture Paint Fill Tool behaves strangely with partial strength (0-1 exclusive) when painting on float/linear textures. It appears as though strength were ignored when filling over a black image, but doing so over a non-black image shows some weird interaction. Note that the Texture Paint Draw Tool behaves correctly, so I guess the fix is for fill to just do what draw does. (minor note: working with colour spaces is difficult and I figured there's a chance the problem is just me not understanding it/doing it wrong, but I think the fact that the draw tool does work as expected has me covered.) **Video demonstration:** (I've fast-forwarded unimportant parts) 0:14 - Non-float image. Draw tool with strength=1.0, then 0.1, then fill tool with strength=0.1. Behaves as expected. 0:43 - float image. Same test. Draw behaviour with low strength appears correct. Fill behaviour is incorrect. [BlenderFloatFillBug.mp4](https://archive.blender.org/developer/F9240465/BlenderFloatFillBug.mp4) **Exact steps for others to reproduce the error** From default startup: 1. enter texture paint workspace 2. properties editor -> tool settings, set texture slots mode to single image, make new image with 32 bit float. 3. set tool to fill, set strength to any value below 1, except 0. 4. click cube to fill black texture with white paint. Expected: some shade of grey. Result: full-bright white. **Results of tests with various shades/strengths**: - all performed in 3d viewport - each test performed on empty black image - input/output are HSV values - 0.7354 being middle grey - output value is sampled from viewport with eyedropper - fill 2nd click is result after two clicks of fill | in | strength | draw output | fill output | fill 2nd click | -- | -- | -- | -- | -- | | 0.01 | 0.01 | 0.0001 | 0.01 | 0.0199 | || 0.1 | 0.001 | 0.01 | 0.019 | || 0.5 | 0.005 | 0.01 | 0.015 | | 0.1 | 0.01 | 0.001294 | 0.099998 | 0.15143 | || 0.1 | 0.012949 | 0.099998 | 0.14752 | || 0.5 | 0.061102 | 0.099998 | 0.128549 | | 0.5 | 0.01 | 0.027639 | 0.49997 | 0.684261 | || 0.1 | 0.157658 | 0.49997 | 0.670251 | || 0.5 | 0.36078 | 0.49997 | 0.602086 | | 0.7354 | 0.01 | 0.060985 | 0.735162 | 0.998114 | || 0.1 | 0.247814 | 0.735162 | 0.97771 | || 0.5 | 0.537175 | 0.735162 | 0.880889 | | 0.99 | 0.01 | 0.098344 | 0.99001 | 0.999924 | || 0.1 | 0.345314 | 0.99001 | 0.999924 | || 0.5 | 0.727916 | 0.99001 | 0.999924 | | 1 | 0.01 | 0.099802 | 0.999924 | 0.999924 | || 0.1 | 0.349084 | 0.999924 | 0.999924 | || 0.5 | 0.735271 | 0.999924 | 0.999924 | Notice: - the first click of the fill tool always gives the same result regardless of strength. - the second click makes the image brighter than the colour we're filling with, which doesn't make sense. - the second click gives lower values for higher strengths, when you'd expect the opposite. **Another demonstration:** - left: black texture painted with grey values 0.1 .. 1.0. - right: then filled with middle grey 0.7354 with strength 0.5. ![blenderFloatFillBug.png](https://archive.blender.org/developer/F9241241/blenderFloatFillBug.png) Notice: - every shade becomes brighter (or remains ~1.0), even those greater than 0.7354 that should darken (move towards middle grey).
Author

Added subscriber: @tomjk

Added subscriber: @tomjk
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

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

Changed status from 'Needs Triage' to: 'Confirmed'
Philipp Oeser self-assigned this 2020-11-09 12:25:20 +01:00
Member

This indeed looks wrong, will check

This indeed looks wrong, will check
Philipp Oeser removed their assignment 2020-11-17 14:13:08 +01:00
Philipp Oeser removed the
Interest
Sculpt, Paint & Texture
label 2023-02-10 09:12:14 +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
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#82518
No description provided.