Display warning when exporting RGBA using PNG. #93030

Open
opened 2021-11-12 08:39:40 +01:00 by Jeroen Bakker · 13 comments
Member

Related to #81390.

When exporting a render to RGBA PNG the alpha isn't correct. The issue is related to the different color spaces and PNG (sRGB) not supporting pure emissive colors. We currently don't show a message to the user explaining that it could result into artifacts.

This task would be to add a message when user selects this combination. in the export panel. Or when saving an image that isn't sRGB encoded, using these settings.

Message still needs to be approved:
Saving/Exporting non sRGB but transparent images to PNG creates alpha differences. With a warning icon.

Related to #81390. When exporting a render to RGBA PNG the alpha isn't correct. The issue is related to the different color spaces and PNG (sRGB) not supporting pure emissive colors. We currently don't show a message to the user explaining that it could result into artifacts. This task would be to add a message when user selects this combination. in the export panel. Or when saving an image that isn't sRGB encoded, using these settings. Message still needs to be approved: `Saving/Exporting non sRGB but transparent images to PNG creates alpha differences.` With a warning icon.
Author
Member

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

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

Added subscriber: @Jeroen-Bakker

Added subscriber: @Jeroen-Bakker

Added subscriber: @brecht

Added subscriber: @brecht

I'm not sure if this is actually helpful to users. At a minimum it would need to be specific to the case where you are exporting pixels with zero alpha and non-zero RGB, since it works fine in most cases. But even then what is the user supposed to do with this information?

I'm not sure if this is actually helpful to users. At a minimum it would need to be specific to the case where you are exporting pixels with zero alpha and non-zero RGB, since it works fine in most cases. But even then what is the user supposed to do with this information?
Member

Added subscriber: @Blendify

Added subscriber: @Blendify
Member

I would suggest to include a recommended file format that won't exhibit the issue in the message.

I would suggest to include a recommended file format that won't exhibit the issue in the message.

The problem is that this is not really about the file format, there isn't an alternative file format that you can use for the same purpose. The one that works correctly is OpenEXR, but the point of saving as PNG is to be able to use the image for the web or some other image or video editing app that works with unassociated alpha and can't handle this type of emissive image content well.

What you really want is to save the image as unassociated alpha, but with some heuristic to preserve the colors as well as possible even if it can't be perfect. Not to switch to another file format.

The problem is that this is not really about the file format, there isn't an alternative file format that you can use for the same purpose. The one that works correctly is OpenEXR, but the point of saving as PNG is to be able to use the image for the web or some other image or video editing app that works with unassociated alpha and can't handle this type of emissive image content well. What you really want is to save the image as unassociated alpha, but with some heuristic to preserve the colors as well as possible even if it can't be perfect. Not to switch to another file format.

Added subscriber: @GeorgiaPacific

Added subscriber: @GeorgiaPacific

Added subscriber: @ksar

Added subscriber: @ksar

Hi there, I’m pretty new to this community, but I'd like to try this one.

Hi there, I’m pretty new to this community, but I'd like to try this one.

Oh, I didn't see the Good First Issue is removed. I will try another issue.

Oh, I didn't see the Good First Issue is removed. I will try another issue.

Added subscriber: @jenkm

Added subscriber: @jenkm

I don't think any special message is needed here, you just need to use "Export" instead of "Save As" for formats that do not fully support the current image.

It might be useful to have some kind of "straight alpha preview" toggle. You convert the image to unassociated alpha and compose with a checkerboard, so that the user will see what he gets outside of Blender. It's also possible to highlight problematic (zero alpha and non-zero RGB) areas.

I've seen your attempts to add some alpha while converting, but you also need to adjust the color itself, and you can do it for areas with zero alpha, but where the emissive colors is overlaid on a translucent object it seems nothing can be done. Or, for example, on the edge with anti-aliasing.

Any conversion attempts with artifacts will still look like a bug. Or it will even be worse if the user does not immediately notice these artifacts and uses this image somewhere.

I don't think any special message is needed here, you just need to use "Export" instead of "Save As" for formats that do not fully support the current image. It might be useful to have some kind of "straight alpha preview" toggle. You convert the image to unassociated alpha and compose with a checkerboard, so that the user will see what he gets outside of Blender. It's also possible to highlight problematic (zero alpha and non-zero RGB) areas. I've seen your attempts to add some alpha while converting, but you also need to adjust the color itself, and you can do it for areas with zero alpha, but where the emissive colors is overlaid on a translucent object it seems nothing can be done. Or, for example, on the edge with anti-aliasing. Any conversion attempts with artifacts will still look like a bug. Or it will even be worse if the user does not immediately notice these artifacts and uses this image somewhere.
Philipp Oeser removed the
Interest
Core
label 2023-02-09 14:42:53 +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
6 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#93030
No description provided.