Image Editor "Erase Alpha" brush erases all channels of float images #86868

Open
opened 2021-03-24 01:15:55 +01:00 by Sam Brubaker · 21 comments

System Information
Linux 64-bit

Blender Version
Broken: 2.92
Note: In versions 2.83 and earlier, Alpha was not premultiplied (this started in 4212b6528a, unsure if this should be the case if we are only looking at the Color without Alpha?).

Short description of error
Erasing the alpha on float images erase the RGB channels as well.
erase_alpha_bug.mp4

Exact steps for others to reproduce the error

  • Open the attached file. (Left image is a Non-float while right image is Float, both have Alpha channel. We are seeing only the RGB channels).
  • Use the brush "Erase Alpha" to erase part of the non-floating-point image (on the left).
  • Use shift-click to sample the pixel-values of this image. The RGB channels have NOT actually been affected and the image only appears to have been premultiplied.
  • Use the brush "Erase Alpha" on the floating-point image (on the right).

Use shift-click to sample the pixel-values of this image. ALL channels were erased!

It may look like the same bug as #86866 but it isn't! The brush works as expected; it's the RGB display that's wrong.
image editor bug.blend

**System Information** Linux 64-bit **Blender Version** Broken: 2.92 Note: In versions 2.83 and earlier, Alpha was not premultiplied (this started in 4212b6528a, unsure if this should be the case if we are only looking at the Color without Alpha?). **Short description of error** Erasing the alpha on float images erase the RGB channels as well. [erase_alpha_bug.mp4](https://archive.blender.org/developer/F12885725/erase_alpha_bug.mp4) **Exact steps for others to reproduce the error** - Open the attached file. (Left image is a Non-float while right image is Float, both have Alpha channel. We are seeing only the RGB channels). - Use the brush "Erase Alpha" to erase part of the non-floating-point image (on the left). - Use shift-click to sample the pixel-values of this image. The RGB channels have **NOT** actually been affected and the image only appears to have been premultiplied. - Use the brush "Erase Alpha" on the floating-point image (on the right). # Use shift-click to sample the pixel-values of this image. **ALL** channels were erased! It may look like the same bug as #86866 but it isn't! The brush works as expected; it's the RGB display that's wrong. [image editor bug.blend](https://archive.blender.org/developer/F9906271/image_editor_bug.blend)
Author

Added subscriber: @rocketman

Added subscriber: @rocketman

#91207 was marked as duplicate of this issue

#91207 was marked as duplicate of this issue

#86866 was marked as duplicate of this issue

#86866 was marked as duplicate of this issue

Added subscriber: @mano-wii

Added subscriber: @mano-wii

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

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

Thanks for the report, I can confirm the problem.

I don't know what the industry standard is but I think the other channels shouldn't be erased when you use an "Erase Alpha" brush.
In any case, this should be consistent across different image formats.

For the number of related reports I dare to set this bug as a high priority (for now).


(Personally, I think the pre-multiplication should be optional).
(I also mentioned about this on #86764).

Thanks for the report, I can confirm the problem. I don't know what the industry standard is but I think the other channels shouldn't be erased when you use an "Erase Alpha" brush. In any case, this should be consistent across different image formats. For the number of related reports I dare to set this bug as a high priority (for now). --- (Personally, I think the pre-multiplication should be optional). (I also mentioned about this on #86764).

@rocketman, with the edits I made, I would say that this report was even more similar to the #86866 (sorry about that).
But the idea of the pre-multiplied alpha has already been described in other reports.
So I'll merge then.

@rocketman, with the edits I made, I would say that this report was even more similar to the #86866 (sorry about that). But the idea of the pre-multiplied alpha has already been described in other reports. So I'll merge then.
Germano Cavalcante changed title from Image Editor appears to multiply the RGB channels by the Alpha channels when non-float images are displayed in RGB to Image Editor "Erase Alpha" brush erases all channels 2021-03-26 17:22:50 +01:00
Author

It's a funny issue because the behavior of the Erase Alpha brush appears to be ONE bug when in fact there are two different bugs. And now I don't know which bug report is which! This is exactly what I was afraid would happen, lol

It's a funny issue because the behavior of the Erase Alpha brush appears to be ONE bug when in fact there are two different bugs. And now I don't know which bug report is which! This is exactly what I was afraid would happen, lol

Added subscriber: @hzuika

Added subscriber: @hzuika
Member

Added subscribers: @CoderTiger, @lichtwerk

Added subscribers: @CoderTiger, @lichtwerk

Added subscriber: @fatboyzzfatboyzz

Added subscriber: @fatboyzzfatboyzz

I have submitted a patch to fix this problem.
However, I don't know if this is a bug or the default behavior.
For your information, this brush function seems to have been implemented in 8f9150871c.

I have submitted a patch to fix this problem. However, I don't know if this is a bug or the default behavior. For your information, this brush function seems to have been implemented in 8f9150871c.
Member

Added subscriber: @EAW

Added subscriber: @EAW
Member

Added subscriber: @Jeroen-Bakker

Added subscriber: @Jeroen-Bakker
Member
CC @Jeroen-Bakker
Member

This requires a design. For images I think it should do what it says erase alpha. This means for premultiplied images it should only effect the alpha channel.
Currently it does not. There has been some discussions lately about this brush and would like the Sculpt, paint, texturing project to determine what should be done.

The image editor didn't change this behavior it only made it visible. Will remove the eevee/viewport from this issue as it isn't related to that module.

This requires a design. For images I think it should do what it says erase alpha. This means for premultiplied images it should only effect the alpha channel. Currently it does not. There has been some discussions lately about this brush and would like the Sculpt, paint, texturing project to determine what should be done. The image editor didn't change this behavior it only made it visible. Will remove the eevee/viewport from this issue as it isn't related to that module.

Added subscriber: @brecht

Added subscriber: @brecht

This is a result of float images always being associated alpha by convention. I think that given that convention, the erase brush affecting all channels is correct. If you make it affect just alpha it will be more consistent when looking at just the RGB channels, but less consistent when looking at the full RGBA channels.

It would be good to support unassociated alpha for float images, but I don't think we should change the behavior for associated alpha images.

This is a result of float images always being associated alpha by convention. I think that given that convention, the erase brush affecting all channels is correct. If you make it affect just alpha it will be more consistent when looking at just the RGB channels, but less consistent when looking at the full RGBA channels. It would be good to support unassociated alpha for float images, but I don't think we should change the behavior for associated alpha images.
Author

In #86868#1356811, @brecht wrote:
If you make it affect just alpha it will be more consistent when looking at just the RGB channels, but less consistent when looking at the full RGBA channels.

I disagree; there are numerous cases where I am editing an image with associated alpha and would still like only to affect the alpha channel. What brush would I use then, besides "Erase Alpha"?

> In #86868#1356811, @brecht wrote: >If you make it affect just alpha it will be more consistent when looking at just the RGB channels, but less consistent when looking at the full RGBA channels. I disagree; there are numerous cases where I am editing an image with associated alpha and would still like *only* to affect the alpha channel. What brush would I use then, besides "Erase Alpha"?
Member

Added subscriber: @JulienKaspar

Added subscriber: @JulienKaspar
Member

We agreed to lower the priority since this doesn't need urged fixing and has been high priority for a long time. But discussion on the issue and working towards a fix can continue.

We agreed to lower the priority since this doesn't need urged fixing and has been high priority for a long time. But discussion on the issue and working towards a fix can continue.
Evan Wilson changed title from Image Editor "Erase Alpha" brush erases all channels to Image Editor "Erase Alpha" brush erases all channels of float images 2022-05-20 07:05:44 +02:00
Philipp Oeser removed the
Interest
Sculpt, Paint & Texture
label 2023-02-10 09:12:00 +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
10 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#86868
No description provided.