Alpha coming from compositor effects not saved properly in final image ( whatever the format, png, tga or exr, is ) #88199

Closed
opened 2021-05-11 15:26:28 +02:00 by CJ L · 7 comments

System Information
Operating system: Windows-7-6.1.7601-SP1 64 Bits
Graphics card: GeForce GT 610/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 391.35

Blender Version
Broken: version: 2.92.0, branch: master, commit date: 2021-02-24 16:25, hash: 02948a2cab
Worked: IDK

Short description of error
Alpha halo around mesh are not saved properly when background is transparent.

Exact steps for others to reproduce the error
Hit F12 or CTRL+F12
Look at final render; this is what i want to be saved.
open the saved file in gimp.
Add a layer mask transfering alpha.
show layer mask.
Note the blue hazy glow place is pure black ( alpha =0 )
This is unexpected behaviour.

Here's the blend:
lightning2.blend
regards :)

**System Information** Operating system: Windows-7-6.1.7601-SP1 64 Bits Graphics card: GeForce GT 610/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 391.35 **Blender Version** Broken: version: 2.92.0, branch: master, commit date: 2021-02-24 16:25, hash: `02948a2cab` Worked: IDK **Short description of error** Alpha halo around mesh are not saved properly when background is transparent. **Exact steps for others to reproduce the error** Hit F12 or CTRL+F12 Look at final render; this is what i want to be saved. open the saved file in gimp. Add a layer mask transfering alpha. show layer mask. Note the blue hazy glow place is pure black ( alpha =0 ) This is unexpected behaviour. Here's the blend: [lightning2.blend](https://archive.blender.org/developer/F10078979/lightning2.blend) regards :)
Author

Added subscriber: @pitibonom

Added subscriber: @pitibonom

Added subscriber: @iss

Added subscriber: @iss

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

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

Issue here is, that you don't specify alpha, glow you see is purely emissive.
You can plug RGB color into alpha socket which will produce image with alpha channel as you expect. You may need to apply some processing to get desired result.
Depending on what you want to do in GIMP, you could save render as EXR, as GIMP should be able to handle emissive colors.

This isn't a bug though, so I will close this report.

Issue here is, that you don't specify alpha, glow you see is purely emissive. You can plug RGB color into alpha socket which will produce image with alpha channel as you expect. You may need to apply some processing to get desired result. Depending on what you want to do in GIMP, you could save render as EXR, as GIMP should be able to handle emissive colors. This isn't a bug though, so I will close this report.

Added subscriber: @tobiasBora

Added subscriber: @tobiasBora

I'm having the same "bug", however plugging RGB colors into alpha sockets does not produce really the good png. Here is what I get without any background in blender:
image.png

Here is what I get if I add a black background in blender:
image.png

Here is what I get if I plug the RGB colors to the alpha socket inside blender (at least it's what I understood from your comment)

image.png

Here is what I get if I save this last image in a .png, load into krita, and add a black background:

image.png

Which is very different from what blender shows me. If I use .EXR, the result is again different from what I get from blender (much brighter), but it is definitely better than the .png:
image.png
Actually, I'm realizing that this seems to match exactly the blender version if blender is configured to use "Standard view transform" instead of the default filmic view (which flattens a lot the colors, no idea why it is default):
image.png

But unfortunetely, .EXR takes much more space than png (26MB instead of 2MB...), cannot be converted reliably to .png (so no way to save space), and are not really nice to work with: for instance in Krita if I copy the EXR layer into another png file, I lose again most of the alpha channel. Moreover, results are not consistent between different softwares. For instance, if I do exactly the same operation in GIMP (i.e. just add a black background to the .EXR file), I get a very different result from what I get from blender and Krita (I guess GIMP is wrong here?).
image.png
Moreover, I can't use .EXR files in LaTeX.

So I've 2 questions:

  1. why saving .png could not also take into account emissive colors?
  2. how could I "fake" that properly in blender and/or via an external conversion program?
  3. any reason why Gimp gives a very different results for the same .EXR file opened with Krita?
I'm having the same "bug", however plugging RGB colors into alpha sockets does not produce really the good png. Here is what I get without any background in blender: ![image.png](https://archive.blender.org/developer/F10117368/image.png) Here is what I get if I add a black background in blender: ![image.png](https://archive.blender.org/developer/F10117361/image.png) Here is what I get if I plug the RGB colors to the alpha socket inside blender (at least it's what I understood from your comment) ![image.png](https://archive.blender.org/developer/F10117378/image.png) Here is what I get if I save this last image in a `.png`, load into krita, and add a black background: ![image.png](https://archive.blender.org/developer/F10117391/image.png) Which is very different from what blender shows me. If I use `.EXR`, the result is again different from what I get from blender (much brighter), but it is definitely better than the `.png`: ![image.png](https://archive.blender.org/developer/F10117407/image.png) Actually, I'm realizing that this seems to match exactly the blender version if blender is configured to use "Standard view transform" instead of the default filmic view (which flattens a lot the colors, no idea why it is default): ![image.png](https://archive.blender.org/developer/F10117470/image.png) But unfortunetely, .EXR takes much more space than png (26MB instead of 2MB...), cannot be converted reliably to .png (so no way to save space), and are not really nice to work with: for instance in Krita if I copy the EXR layer into another png file, I lose again most of the alpha channel. Moreover, results are not consistent between different softwares. For instance, if I do exactly the same operation in GIMP (i.e. just add a black background to the .EXR file), I get a very different result from what I get from blender and Krita (I guess GIMP is wrong here?). ![image.png](https://archive.blender.org/developer/F10117423/image.png) Moreover, I can't use .EXR files in LaTeX. So I've 2 questions: 1. why saving .png could not also take into account emissive colors? 2. how could I "fake" that properly in blender and/or via an external conversion program? 3. any reason why Gimp gives a very different results for the same .EXR file opened with Krita?

For references, this answer explains very clearly why the solution proposed by Richard is not that simple. So I do think that Blender should provide more tools to properly handle the alpha channel when saving PNG files, for instance by providing a node "scene- to display-referred data in the compositor" as proposed in the aforementioned answer.

For references, [this answer ](https://blender.stackexchange.com/questions/222837/blender-does-not-set-the-alpha-channel-correctly/222893#222893) explains very clearly why the solution proposed by Richard is not that simple. So I do think that Blender should provide more tools to properly handle the alpha channel when saving PNG files, for instance by providing a node "scene- to display-referred data in the compositor" as proposed in the aforementioned answer.
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
3 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#88199
No description provided.