A bug of Paint transparent layers #82770

Closed
opened 2020-11-17 05:19:44 +01:00 by zhouxiang · 11 comments

System Information
Operating system: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: GeForce GTX 1060 6GB/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 456.71

Blender Version
Broken: version: 2.91.0 Beta, branch: master, commit date: 2020-11-16 21:13, hash: 906ff7b8fe
Worked: 2.90.1
Caused by b17cca6966

Short description of error
This is a new bug in 2.91, where every stroke of a transparent map leaves a black edge, but this did not happen in 2.90.
If you click "Save all Images", save this project and revert, the problem will disappear.
If you create a new transparent texture, this will happen again.
image.png

Exact steps for others to reproduce the error
Create a white background layer, then create a transparent layer, mix the two layers, connect the alpha of the transparent layer to the Mix node fac. then paint the color on the transparent layer.

#82770.blend

**System Information** Operating system: Windows-10-10.0.19041-SP0 64 Bits Graphics card: GeForce GTX 1060 6GB/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 456.71 **Blender Version** Broken: version: 2.91.0 Beta, branch: master, commit date: 2020-11-16 21:13, hash: `906ff7b8fe` Worked: 2.90.1 Caused by b17cca6966 **Short description of error** This is a new bug in 2.91, where every stroke of a transparent map leaves a black edge, but this did not happen in 2.90. If you click "Save all Images", save this project and revert, the problem will disappear. If you create a new transparent texture, this will happen again. ![image.png](https://archive.blender.org/developer/F9307740/image.png) **Exact steps for others to reproduce the error** Create a white background layer, then create a transparent layer, mix the two layers, connect the alpha of the transparent layer to the Mix node fac. then paint the color on the transparent layer. [#82770.blend](https://archive.blender.org/developer/F9309424/T82770.blend)
Author

Added subscriber: @zhouxiang

Added subscriber: @zhouxiang
Author

image.png
Save all images and revert this project.

![image.png](https://archive.blender.org/developer/F9308893/image.png) Save all images and revert this project.
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

Can confirm, checking.

Can confirm, checking.
Member

Caused by b17cca6966

Caused by b17cca6966
Jeroen Bakker was assigned by Philipp Oeser 2020-11-17 09:50:17 +01:00
Member

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

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

First impression is that the back edges originates when colors are converted twice from straight alpha to pre-multiplied alpha.

First impression is that the back edges originates when colors are converted twice from straight alpha to pre-multiplied alpha.
Member

In #82770#1056099, @Jeroen-Bakker wrote:
First impression is that the back edges originates when colors are converted twice from straight alpha to pre-multiplied alpha.

Dumb question: is there a way to prevent this with Generated images?

> In #82770#1056099, @Jeroen-Bakker wrote: > First impression is that the back edges originates when colors are converted twice from straight alpha to pre-multiplied alpha. Dumb question: is there a way to prevent this with `Generated` images?
Member

Ignore my previous investigation. And something like dumb questions do not exist :-)

The root issue is a precision issue when non float sRGB images are used. Non float buffers aren't precise enough to store the pre-multiplied alpha. You can see that when you change the transparent image to a float image.

202011_T82770.mp4

Solution would be to store force 4 channel byte images to be stored in a more precise GPU buffer RGBA_16(F).

Ignore my previous investigation. And something like dumb questions do not exist :-) The root issue is a precision issue when non float sRGB images are used. Non float buffers aren't precise enough to store the pre-multiplied alpha. You can see that when you change the transparent image to a float image. [202011_T82770.mp4](https://archive.blender.org/developer/F9310440/202011_T82770.mp4) Solution would be to store force 4 channel byte images to be stored in a more precise GPU buffer RGBA_16(F).

This issue was referenced by d73130cc28

This issue was referenced by d73130cc287690539a0509a44abd4c85ffb30188
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Thomas Dinges added this to the 2.91 milestone 2023-02-08 16:20:08 +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
4 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#82770
No description provided.