Blender 2.91.0 Alpha - Blender cannot export proper image when containing smooth gradient of Alpha #81390
Open
opened 2020-10-02 19:21:47 +02:00 by Ivaylo Gogov
·
34 comments
No Branch/Tag Specified
main
asset-browser-frontend-split
blender-v3.6-release
temp-sculpt-dyntopo
temp-sculpt-dyntopo-hive-alloc
node-group-operators
brush-assets-project
asset-shelf
tmp-usd-python-mtl
blender-v2.93-release
blender-v3.3-release
universal-scene-description
temp-sculpt-attr-api
blender-v3.5-release
realtime-clock
sculpt-dev
gpencil-next
bevelv2
microfacet_hair
blender-projects-basics
principled-v2
v3.3.7
v2.93.18
v3.5.1
v3.3.6
v2.93.17
v3.5.0
v2.93.16
v3.3.5
v3.3.4
v2.93.15
v2.93.14
v3.3.3
v2.93.13
v2.93.12
v3.4.1
v3.3.2
v3.4.0
v3.3.1
v2.93.11
v3.3.0
v3.2.2
v2.93.10
v3.2.1
v3.2.0
v2.83.20
v2.93.9
v3.1.2
v3.1.1
v3.1.0
v2.83.19
v2.93.8
v3.0.1
v2.93.7
v3.0.0
v2.93.6
v2.93.5
v2.83.18
v2.93.4
v2.93.3
v2.83.17
v2.93.2
v2.93.1
v2.83.16
v2.93.0
v2.83.15
v2.83.14
v2.83.13
v2.92.0
v2.83.12
v2.91.2
v2.83.10
v2.91.0
v2.83.9
v2.83.8
v2.83.7
v2.90.1
v2.83.6.1
v2.83.6
v2.90.0
v2.83.5
v2.83.4
v2.83.3
v2.83.2
v2.83.1
v2.83
v2.82a
v2.82
v2.81a
v2.81
v2.80
v2.80-rc3
v2.80-rc2
v2.80-rc1
v2.79b
v2.79a
v2.79
v2.79-rc2
v2.79-rc1
v2.78c
v2.78b
v2.78a
v2.78
v2.78-rc2
v2.78-rc1
v2.77a
v2.77
v2.77-rc2
v2.77-rc1
v2.76b
v2.76a
v2.76
v2.76-rc3
v2.76-rc2
v2.76-rc1
v2.75a
v2.75
v2.75-rc2
v2.75-rc1
v2.74
v2.74-rc4
v2.74-rc3
v2.74-rc2
v2.74-rc1
v2.73a
v2.73
v2.73-rc1
v2.72b
2.72b
v2.72a
v2.72
v2.72-rc1
v2.71
v2.71-rc2
v2.71-rc1
v2.70a
v2.70
v2.70-rc2
v2.70-rc
v2.69
v2.68a
v2.68
v2.67b
v2.67a
v2.67
v2.66a
v2.66
v2.65a
v2.65
v2.64a
v2.64
v2.63a
v2.63
v2.61
v2.60a
v2.60
v2.59
v2.58a
v2.58
v2.57b
v2.57a
v2.57
v2.56a
v2.56
v2.55
v2.54
v2.53
v2.52
v2.51
v2.50
v2.49b
v2.49a
v2.49
v2.48a
v2.48
v2.47
v2.46
v2.45
v2.44
v2.43
v2.42a
v2.42
v2.41
v2.40
v2.37a
v2.37
v2.36
v2.35a
v2.35
v2.34
v2.33a
v2.33
v2.32
v2.31a
v2.31
v2.30
v2.28c
v2.28a
v2.28
v2.27
v2.26
v2.25
Labels
Clear labels
Issues relating to security: https://wiki.blender.org/wiki/Process/Vulnerability_Reports
Apply labels
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
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
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
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
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
Issues relating to security: https://wiki.blender.org/wiki/Process/Vulnerability_Reports
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 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
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
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
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
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
Milestone
Set milestone
Clear milestone
No items
No Milestone
Projects
Set Project
Clear projects
No project
Assignees
Assign users
Clear assignees
No Assignees
11 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#81390
Reference in New Issue
There is no content yet.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
System Information
Operating system: Windows-10-10.0.18362-SP0 64 Bits
Graphics card: GeForce GTX 1050 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 456.38
Blender Version
Broken: version: 2.91.0 Alpha, branch: master, commit date: 2020-09-25 20:54, hash:
83dc97ccc0
Worked: (newest version of Blender that worked as expected)
Short description of error
ISSUE is appearing when you try to save-as and export an RGBA image as .PNG etc, out of Blender result looks completely different by color, different brightness, etc. (3), not only in Photoshop but also in Windows Viewer.
Exact steps for others to reproduce the error
Open the attached blend file
Press render
Save-as RGBA ... .PNG file format, etc. save on your local device
Open the outputted image in any program or viewer and compare again vs blend file to see the difference
By the way .EXR format looks correct, but not the PNG. Once I render the.EXR needs to convert all the sequences to.PNGs once again
ISSUE-RENDERING.blend
Added subscriber: @IvayloGogov
Added subscriber: @jenkm
I can see a big difference between 2.83.6 and 2.91.0.
The problem is how the file is displayed in Image Editor.
@jenkm they fix The Image Editor issue in Blender 2.91 there is no issue, you can see my image above. Check here: https://developer.blender.org/T52680
So the BUG you are showing is fixed already. But..
The problem is coming now about the output of this. When you save as such image as RGBA -png, exr.. etc the result out of Blender looks really, really different.
I test via Window Image Preview, Photoshop, AE same.. result..
Quick Update,
I tried the same with.EXR and TIFF - and working but not completely fine.
.PNG is not working at all. Now all sequences and render passes from EXR need to be converted to .PNG, and it is really time-consuming and annoying process.
I would like to properly render many sequences as PNG's from Blender.
I created a similar image in "photoshop" and passed it through the Compositor, and re-saved it in PNG, the result is identical to the original PNG. This is why I don't see a problem in import/export. Though, I don't insist on it, just a quick test.
Added subscriber: @mano-wii
This is the same problem as described in #81101 (Saving image with Alpha (like bloom) not saving correctly)
In short, emission + transparency does not do well in some image formats.
Added subscribers: @Jeroen-Bakker, @lichtwerk
I think @Jeroen-Bakker already worked on this? #81199 (Some effects [bloom, smoke, fire, ..] still don't save in PNG with transparent background (occlusion vs. emission)) D9033: #81199: Store Emissive Colors when writing to sRGB 3 channel files
This not related to "emission + transparency", this also happens with normal 8bit png images,
it looks different in the Image Editor (2.91.0) than in photoshop or in the 2.83.6.
@Jeroen-Bakker You can use the file I attached, you can see there is no difference between viewport rendering and image editor, once is get rendered. The problem is coming when you want to Save as the output. Please check, simply following the steps above.
When comparing you should add the comparison with the whole 3d pipeline. The bug was that the alpha of rendered image in the image editor was off from the 3d viewport, The 3d viewport was correct.
The reason was that the image editor (2.90 and earlier) used to be doing the alpha blending in display space and not in scene reference space.
Alpha blending should be done in scene reference space (follow the color management settings and ocio configuration).
PNG images and other file formats do alpha blending in display space (srgb), the issue of alpha differences is now moved towards Image IO.
NOTE: that the same problem exists when importing a PNG file with transparencies and use it the transparency in a material or compositor. The image editor shows the effect that it has.
Keeping this in mind you see that a solution will always have limitations. For now if transparency is important use a file format that is flexible in color management for best results. I believe that the best option for usability is to decode and encode the alpha channel to get close to expected results. Not sure if OCIO can help in this case.
@Jeroen-Bakker I completely agree with your comments.
My observations after many hours of comparison and analyzes are the same.
I would like to recommend you for fixing the issue, counting the complete process and pipeline of render production.
Based on my latest observation RESULT compared between 3D view-port and Image Editor --- THERE IS NO DIFFERENCE. The difference is coming when I want to Save As the product out of it.
So here, my thoughts are dividing by 2 possible projections. You tell me, which one is correct, and it can be used.
1/ Projection of thought:
In this way as an output of rendered image we have result of that buffers combinations merged based on Zdistance, space-AO,GI, REFLECTIONS, EMISSIONS etc.
So the first logic calculating and merging the data -by- transferring it on ImageEditor Screen, and based on transfere here, alpha it cannot be calculated properly because is not stored properly, or it is not projected properly compare the life 3D-viewport-screen.
2/. Projection of thought
Probably the HIGH dynamic range images as you mentioned will look more accurate on look, but again it will not be exactly based on the present. Additional alpha adjustment will be always required.
Some questions:
Thank you, Respect for you work and huge effort!
Regards,
Ivaylo
Added subscriber: @gurlaldeep
I am having the same problem.
unfortunately, I can't share the blend file but I have attached a screenshot, and is there any workaround for this?
I am working on a really imported project.
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.38
Blender Version
Broken: version: 2.91.0 Beta, branch: master, commit date: 2020-10-26 17:29, hash:
edf4378c44
Thank you,
Regards,
Gurlaldeep
If alpha is important, please don't use PNG they aren't capable of handling pure emissive colors. Use other file formats that store in linear space with premultiplied alpha. OpenEXR is a good example.
Changed status from 'Needs Triage' to: 'Confirmed'
I am setting as confirmed, since it was classified as a
Known Issue
.I tried open EXR and keeps the alpha but not glow\bloom
Added subscriber: @fclem
Hello @fclem
Same here, I see a big difference between what people are trying to mention and what the reality is.
Real example:
I'm using a blender to showcase and develop assets using alpha and smooth gradient effects.After this confirmed, I'm moving this production to the development stage from which we need to collect the data from Blender. The standard format for 95% of the real-time render engines we used is PNGs. Not because we want it, but because the support of Open .exr's and others are not compatible with the render engines for embedded systems in Automotive Industries, where I work and develop using Blender.
!!! Converting the data once again, after is been ready in Blender is something that I really struggle with since I found such a defect exists.
All capabilities of Blender exporter are not in sync when this related to > **an image with alpha-transparent - smooth-gradient, especially when we save out of Blender to any format.
I still cannot understand what is so difficult for that fix?
Tell me please, where is the blocker?
The program it is been in serious development for years, and I'm really thankful for that.
However, we have been part of it also, and we have been supporting the process all the time. Now, I see something which I'm told cannot be resolved for more than 1 year ..?
@Jeroen-Bakker I'm giving you an example that, your suggestion won't work properly
Even you won't do any post-production. The image will be completely different when you convert it from 32bit to 16bit.
How does this work for you? I don't know :) Still wondering ...
@IvayloGogov
I'm not sure I understand the issue. I've edited the original file to include some 3D solid color planes to check if blending is
the same in other applications. Of course it only works if said application uses the same colorspace. Here this works because Scenere Refered colorspace is the same as Display Linear space (using the Standard view transform).
ISSUE-RENDERING.blend
What I can say is this: exporting the render as .png and opening it in Gimp shows wrong alpha blending with the alpha checker / background color, BUT it does blend correctly if I put a layer with same color below it.
To me this looks like blending in the wrong color space. Maybe there is an issue with this in photoshop as well? I know there is an option to enable linear blending. https://blog.prototypr.io/psa-on-mischievous-opacity-72bb355e6069
If this isn't the issue please post an image of what you get when you open the render with photoshop.
Added subscriber: @srfall
I was about to create a new bug report when I found this task.

I am using 2.93.5 and still have the same problem as described in the original report: When saving a PNG with smooth alpha transparency, the colors get completely messed up.
I tried correcting the color space using ImageMagick but no success.
Is there any solution available to fix this?
(And no I can't just use exr. I need a png with correct alpha transparency)
After reading the lengthy discussion here: https://developer.blender.org/T52680 I just want to summarize to see if I have gotten the correct points.
To which I reply: Even if PNG transparency is broken, since it is a widely used format, Blender should adapt and try its best to store it in a WYSIWYG manner.
For anyone having a similar issue and trying to get at least a somewhat accurate result: I was able to get an improved result by exporting the image as RGB PNG, then exporting the Alpha channel as separate grey scale PNG and then use ImageMagick to apply the transparency following this answer:
https://stackoverflow.com/questions/55376263/set-alpha-according-to-gradient-with-imagemagick/55377377
Also, since this appears to be a well known (and accepted ?) issue, how about a warning note in the export settings? This still seems to me like a major bug, but when the current position is: "Don't fix" then at least a heads up for the users would be nice.
Your points seems to be correct. Note that the described work-a-round can still introduce incorrect alpha blending as when apply-ing the transparency on a different color space than it was generated.
Adding an warning note in the export setting is a good idea.
Thanks for the quick answer.
Yeah, maybe I should have said it more clearly, the work-around doesn't give you a perfect result, but in my situation (where I need the png and care more about the overall look than perfect accurate blending) it gets me about 80% of the way, which is something I can work with.
*Sidenote: I guess an additional option in Blender to save it directly in a way similar to this hack may already be an improvement for many people
@srfall yes indeed. yes indeed. I was talking about this issue for a long time, but looks like was neglected, due to other urgent priorities on the road map, and squeezed schedule.
I think is a significant misalignment (bug) when we talk for high fidelity production, which is being there for years. There is no way to export a correct alpha from blender at the moment, doesn't matter if you use blender compositor e or other file type. At the end you always have to composite 2 flat images (once used as an alpha) the other as color, out of Blender to have an accurate look. Unfortunately, this is been for a long, long time.
Added subscriber: @jorditorres
Same bug happening to me. This is not a minor thing. There is any progress on this?
Added subscriber: @capnm
Added subscriber: @Bradley_G