Alpha Channel Darkens the Colors #72677

Closed
opened 2019-12-24 16:29:40 +01:00 by Selman · 14 comments

Blender Version

 I now have this problem in all Blender applications. 2.79, 2.80, 2.81, 2.81alpha

Short description of error
I want to use a map with colors and alpha channel in the Blender. But I want to use only the Colors(RGB) of this map.
But for some reason, RGB colors are always premultiplied by Alpha. Making the image dark when alpha is less than 1.0

PTeZkeB.png

In the picture you can see:
On the left - mesh with the material using the texture but not using alpha.
In the UV/Image editor - How the RGB and Alpha channel are.
In the Node Editor - The nodes of the Mesh material.

Here is the result in Eevee when alpha channel is used (problem "solved"):
ft11hC2.png

Exact steps for others to reproduce the error
Open file:
Alpha Bug_Blender 2.81.blend

  • Do tests on Eevee and Cycles and check the result.
**Blender Version** ``` I now have this problem in all Blender applications. 2.79, 2.80, 2.81, 2.81alpha ``` **Short description of error** I want to use a map with colors and alpha channel in the Blender. But I want to use only the Colors(RGB) of this map. But for some reason, RGB colors are always premultiplied by Alpha. Making the image dark when alpha is less than 1.0 ![PTeZkeB.png](https://archive.blender.org/developer/F8245096/PTeZkeB.png) In the picture you can see: On the left - mesh with the material using the texture but not using alpha. In the UV/Image editor - How the RGB and Alpha channel are. In the Node Editor - The nodes of the Mesh material. Here is the result in Eevee when alpha channel is used (problem "solved"): ![ft11hC2.png](https://archive.blender.org/developer/F8245099/ft11hC2.png) **Exact steps for others to reproduce the error** Open file: [Alpha Bug_Blender 2.81.blend](https://archive.blender.org/developer/F8242592/Alpha_Bug_Blender_2.81.blend) - Do tests on Eevee and Cycles and check the result.
Author

Added subscriber: @TSelman61

Added subscriber: @TSelman61
Member

Added subscriber: @DanielBystedt

Added subscriber: @DanielBystedt
Member

I get the same issue. Good find! See attached image for clarification

System Information
Operating system: Windows-10-10.0.17763-SP0 64 Bits
Graphics card: GeForce GTX 1080/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 432.00

Blender Version
Broken: version: 2.82 (sub 6), branch: master, commit date: 2019-12-24 16:58, hash: 33eabb8220

alpha issue in shading.jpg

I get the same issue. Good find! See attached image for clarification **System Information** Operating system: Windows-10-10.0.17763-SP0 64 Bits Graphics card: GeForce GTX 1080/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 432.00 **Blender Version** Broken: version: 2.82 (sub 6), branch: master, commit date: 2019-12-24 16:58, hash: `33eabb8220` ![alpha issue in shading.jpg](https://archive.blender.org/developer/F8244573/alpha_issue_in_shading.jpg)
Author

alpha issue in shading.jpg

It wasn't just me. 🤔A general problem?
I have two different computers, one desktop and one laptop, but both get the same error.

System Information for laptop

 Operating System: Windows 10 Home Single Language 64-bit (10.0, Build 18362) (18362.19h1_release.190318-1202)
 Processor: Intel(R) Core(TM) i5-3230M CPU @ 2.60GHz (4 CPUs), ~2.6GHz
 Memory: 8192MB RAM
 Card name: Intel(R) HD Graphics 4000
 Card name: NVIDIA GeForce GT 740M
 Dedicated Memory: 2009 MB

Like I said, it's weird. Because the same problem began to appear in versions of the old blender. So this isn't just the current Blender's problem.

Could it be from updates? So after the updates of Nvidia or Microsoft. (I updated all the drivers.)

Regarding the picture you show ...

  • Yes, linking the alpha channel to any shaders eliminates this problem.
    Jsut eevee.png
  • The good thing is, if I remove the alpha link, it works as if it were okay.
    Like this.png
  • But what you already said doesn't work in the Cycles engine. Nothing at all.
    Cycles engine.jpg
> ![alpha issue in shading.jpg](https://archive.blender.org/developer/F8244573/alpha_issue_in_shading.jpg) It wasn't just me. 🤔A general problem? I have two different computers, one *desktop* and one *laptop*, but both get the same error. **System Information for laptop** ``` Operating System: Windows 10 Home Single Language 64-bit (10.0, Build 18362) (18362.19h1_release.190318-1202) Processor: Intel(R) Core(TM) i5-3230M CPU @ 2.60GHz (4 CPUs), ~2.6GHz Memory: 8192MB RAM Card name: Intel(R) HD Graphics 4000 Card name: NVIDIA GeForce GT 740M Dedicated Memory: 2009 MB ``` Like I said, it's weird. Because the same problem began to appear in versions of the old blender. So this isn't just the current Blender's problem. Could it be from updates? So after the updates of Nvidia or Microsoft. (I updated all the drivers.) **Regarding the picture you show ...** * Yes, linking the alpha channel to any shaders eliminates this problem. ![Jsut eevee.png](https://archive.blender.org/developer/F8245078/Jsut_eevee.png) * The good thing is, if I remove the alpha link, it works as if it were okay. ![Like this.png](https://archive.blender.org/developer/F8245080/Like_this.png) * But what you already said doesn't work in the Cycles engine. Nothing at all. ![Cycles engine.jpg](https://archive.blender.org/developer/F8245083/Cycles_engine.jpg)

Added subscriber: @mano-wii

Added subscriber: @mano-wii

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

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

The manual says:

the color is premultiplied with alpha if the alpha output is used

But at Eevee it seems the opposite. The image is premultiplied by alpha if this is not being used.
In cycles the image is always premultiplied.

I can confirm that the behavior in cycles was the same in 2.79.

The [manual ](https://docs.blender.org/manual/en/dev/render/shader_nodes/textures/image.html#outputs) says: > the color is premultiplied with alpha if the alpha output is used But at Eevee it seems the opposite. The image is premultiplied by alpha if this is **not** being used. In cycles the image is **always** premultiplied. I can confirm that the behavior in cycles was the same in 2.79.
Author

I am in a few confusion about this. I am not sure that there may be a lack of information as well. Blender 2.7x and blender 2.8x are slightly different from each other.

But there are inconsistencies in some issues.
Obi_Clothes.jpg I use Color and Alpha. As if there was no problem. As if the problem is solved. (This texture Alpha channel is actually on a specular map. But I don't want to separate them into two different textures.)

But I can't say the same for hair.
Obi_hair.jpg
The black parts are still where they are. There was no change.

Just color.jpg In Blender 2.7x, they were more stable.
This time I will use only color. But as you ca n see, there are still black parts. As I said first.

No alpha.jpg But there is an option to use the alpha map. You no longer see the alpha channel. (The downside is that the alpha map is completely disabled. So now he acts as if there is no alpha channel. )
But I don't think Blender 2.8x will have such an option. At least I couldn't find it. Is there an option like not using the alpha map like this?

I am in a few confusion about this. I am not sure that there may be a lack of information as well. Blender 2.7x and blender 2.8x are slightly different from each other. But there are inconsistencies in some issues. ![Obi_Clothes.jpg](https://archive.blender.org/developer/F8303219/Obi_Clothes.jpg) I use Color and Alpha. As if there was no problem. As if the problem is solved. (This texture Alpha channel is actually on a specular map. But I don't want to separate them into two different textures.) But I can't say the same for hair. ![Obi_hair.jpg](https://archive.blender.org/developer/F8303217/Obi_hair.jpg) The black parts are still where they are. There was no change. ![Just color.jpg](https://archive.blender.org/developer/F8303238/Just_color.jpg) In Blender 2.7x, they were more stable. This time I will use only color. But as you ca n see, there are still black parts. As I said first. ![No alpha.jpg](https://archive.blender.org/developer/F8303244/No_alpha.jpg) But there is an option to use the alpha map. You no longer see the alpha channel. (The downside is that the alpha map is completely disabled. So now he acts as if there is no alpha channel. ) But I don't think Blender 2.8x will have such an option. At least I couldn't find it. Is there an option like not using the alpha map like this?
Member

Added subscriber: @EAW

Added subscriber: @EAW
Member

I want to use a map with colors and alpha channel in the Blender. But I want to use only the Colors(RGB) of this map.
But for some reason, RGB colors are always premultiplied by Alpha. Making the image dark when alpha is less than 1.0

So you want to use the R,G,B channels for color and the Alpha channel as a specular map, right?

You have to set the alpha channel to channel packed.

In the node editor, select the Image Texture node. Then open the side panel by pressing N. In the Item tab change the alpha to channel packed.

@TSelman61 Does that solve your issue?

This option was added May 18th 2019 in 7aaa7aa9dd, so any blender build after that will have it. 909b0ac16c fixed an issue on May 26th with how Cycles handles this new feature.


channel_packed.jpg
Channel packed alpha as specular


channel_packed_no_alpha.jpg
Channel packed, alpha not connected


cycles_channel_packed.jpg

Channel packed, alpha as specular and clearcoat using Cycles. I increased the size of the light to 1.0 in order to better show the different specular reflections in each section.


@mano-wii it appears that section of the manual has not been updated since 2.79.
@mont29 Is this a bug or just a case of the documentation never being updated?
@Blendify Something to add to the Undocumented changes list?

>I want to use a map with colors and alpha channel in the Blender. But I want to use only the Colors(RGB) of this map. >But for some reason, RGB colors are always premultiplied by Alpha. Making the image dark when alpha is less than 1.0 So you want to use the R,G,B channels for color and the Alpha channel as a specular map, right? You have to set the alpha channel to `channel packed`. In the node editor, select the `Image Texture` node. Then open the side panel by pressing `N`. In the `Item` tab change the alpha to `channel packed.` @TSelman61 Does that solve your issue? This option was added May 18th 2019 in 7aaa7aa9dd, so any blender build after that will have it. 909b0ac16c fixed an issue on May 26th with how Cycles handles this new feature. --- ![channel_packed.jpg](https://archive.blender.org/developer/F8303835/channel_packed.jpg) Channel packed alpha as specular --- ![channel_packed_no_alpha.jpg](https://archive.blender.org/developer/F8303836/channel_packed_no_alpha.jpg) Channel packed, alpha not connected --- ![cycles_channel_packed.jpg](https://archive.blender.org/developer/F8303838/cycles_channel_packed.jpg) Channel packed, alpha as specular and clearcoat using Cycles. I increased the size of the light to `1.0` in order to better show the different specular reflections in each section. --- @mano-wii it appears that section of the manual has not been updated since 2.79. @mont29 Is this a bug or just a case of the documentation never being updated? @Blendify Something to add to the `Undocumented changes` list?
Member

Added subscribers: @Blendify, @mont29

Added subscribers: @Blendify, @mont29
Author

@EAW
How stupid I am. I was just expecting a button, as in 2.79. My fault.

This is really good. It separates the color and alpha and I can use the two separately.
I tried it on the models I had problems with, it works perfectly. I think that's what I wanted.
Thanks everyone. 😀

@EAW How stupid I am. I was just expecting a button, as in 2.79. My fault. This is really good. It separates the color and alpha and I can use the two separately. I tried it on the models I had problems with, it works perfectly. I think that's what I wanted. Thanks everyone. 😀
Member

I believe this is a case where the documentation just needs to be updated, I created blender/documentation#73436 to keep track of this.

I believe this is a case where the documentation just needs to be updated, I created blender/documentation#73436 to keep track of this.
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Aaron Carlisle self-assigned this 2020-02-10 19:08:27 +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
5 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#72677
No description provided.