Principled BSDF base color alpha value is not reflected in viewport with alpha blend #62794

Closed
opened 2019-03-20 23:27:54 +01:00 by Dan Sinni · 18 comments

System Information
Operating system: Windows-10-10.0.17134 64 Bits
Graphics card: GeForce GTX 860M/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 398.36

Blender Version
Broken: version: 2.80 (sub 51), branch: master, commit date: 2019-03-20 16:33, hash: b6d1946c2e
Worked: (optional)

Short description of error
When using the Principled BSDF shader with a Base Color Alpha value less than 1.0, in conjunction with setting the material's Blend Mode to Alpha Blend, the Alpha value is not reflected in the viewport. It seems to display at a fixed semi-transparent value, regardless of what is set.

The Alpha is set to 0.010, which is almost wholly transparent:
image.png

This is what shows in viewport:
image.png

Note that the cube shows at approximately 0.5 alpha (gauged by eye), regardless of set value, and that the plane is not at all visible through the cube.

As it is now, this is the workflow for exporting transparency to glTF, so I believe it to be considerably important to be able to preview the transparency based on its value before exporting.

Exact steps for others to reproduce the error

  • Add a cube or any mesh
  • Add default material using Principled BSDF shader
  • Set Base Color and set Alpha to less than 1.0
  • Set material's Blend Mode to Alpha Blend
  • Adjust Base Color Alpha value and see no adjustments in viewport

Blend file
AlphaBlendIssue.blend

**System Information** Operating system: Windows-10-10.0.17134 64 Bits Graphics card: GeForce GTX 860M/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 398.36 **Blender Version** Broken: version: 2.80 (sub 51), branch: master, commit date: 2019-03-20 16:33, hash: `b6d1946c2e` Worked: (optional) **Short description of error** When using the `Principled BSDF` shader with a `Base Color` `Alpha` value less than `1.0`, in conjunction with setting the material's `Blend Mode` to `Alpha Blend`, the `Alpha` value is not reflected in the viewport. It seems to display at a fixed semi-transparent value, regardless of what is set. The `Alpha` is set to `0.010`, which is almost wholly transparent: ![image.png](https://archive.blender.org/developer/F6857613/image.png) This is what shows in viewport: ![image.png](https://archive.blender.org/developer/F6857617/image.png) Note that the cube shows at approximately `0.5` alpha (gauged by eye), regardless of set value, and that the plane is not at all visible through the cube. As it is now, this is the workflow for exporting transparency to `glTF`, so I believe it to be considerably important to be able to preview the transparency based on its value before exporting. **Exact steps for others to reproduce the error** - Add a cube or any mesh - Add default material using `Principled BSDF` shader - Set `Base Color` and set `Alpha` to less than `1.0` - Set material's `Blend Mode` to `Alpha Blend` - Adjust `Base Color` `Alpha` value and see no adjustments in viewport **Blend file** [AlphaBlendIssue.blend](https://archive.blender.org/developer/F6857665/AlphaBlendIssue.blend)
Author

Added subscriber: @DanSinni

Added subscriber: @DanSinni

#67327 was marked as duplicate of this issue

#67327 was marked as duplicate of this issue

#58281 was marked as duplicate of this issue

#58281 was marked as duplicate of this issue

Added subscribers: @Ajkad, @brecht

Added subscribers: @Ajkad, @brecht

Color sockets in Cycles and Eevee do not actually have an alpha value, this is a leftover from old Blender Internal code. This needs to be cleaned up in the UI still. For transparency you should mix with the Transparent BSDF.

Color sockets in Cycles and Eevee do not actually have an alpha value, this is a leftover from old Blender Internal code. This needs to be cleaned up in the UI still. For transparency you should mix with the Transparent BSDF.
Brecht Van Lommel changed title from `Principled BSDF` shader `Base Color` `Alpha` value is not reflected in viewport with `Alpha Blend` to Principled BSDF base color alpha value is not reflected in viewport with alpha blend 2019-03-20 23:38:41 +01:00
Author

Appreciate the feedback, Brecht. However, I don't believe the glTF exporter currently supports the Transparent BSDF shader; it relies on Alpha from either the Base Color or from a texture linked through the Base Color node of the Principled BSDF, Background, and possibly Emission shaders.

Note that the Alpha value does work as expected when linked through something like the Background shader (which is currently used to export unlit materials in glTF) or the Emission shader:
image.png

image.png

Appreciate the feedback, Brecht. However, I don't believe the glTF exporter currently supports the Transparent BSDF shader; it relies on Alpha from either the Base Color or from a texture linked through the Base Color node of the Principled BSDF, Background, and possibly Emission shaders. Note that the Alpha value *does* work as expected when linked through something like the Background shader (which is currently used to export unlit materials in glTF) or the Emission shader: ![image.png](https://archive.blender.org/developer/F6857811/image.png) ![image.png](https://archive.blender.org/developer/F6857816/image.png)

Added subscriber: @donmccurdy

Added subscriber: @donmccurdy

Thanks Brecht – you mentioned earlier that you'd like to add opacity to the Principled BSDF node. I realize opacity and alpha are not the same thing, so just to clarify – do you still think there should eventually be an opacity socket on the Principled node? Or is mixing with the Transparent BSDF likely to be the long-term answer?

The glTF exporter can be made to support either one, but we'd like to have a future-proof way of representing opacity that feels natural in Blender, so we don't train our users to do something that's going to break in the near future. I misunderstood your earlier comment about opacity as meaning that you wanted to support an alpha channel on the basecolor socket, which is why the exporter is requiring that now, and if it's just a UI glitch that is going away then we should change that in the exporter. In general mixed nodes are hard for us to export reliably, part of the reason for our excitement about Principled BSDF, but I suppose an exception could be made for Transparent BSDF here.

Thanks Brecht – you [mentioned earlier](https://devtalk.blender.org/t/alpha-opacity-displacement-parallax-and-ao-input-for-the-principled-shader/3096/5?u=donmccurdy) that you'd like to add opacity to the Principled BSDF node. I realize opacity and alpha are not the same thing, so just to clarify – do you still think there should eventually be an opacity socket on the Principled node? Or is mixing with the Transparent BSDF likely to be the long-term answer? The glTF exporter can be made to support either one, but we'd like to have a future-proof way of representing opacity that feels natural in Blender, so we don't train our users to do something that's going to break in the near future. I misunderstood your earlier comment about opacity as meaning that you wanted to support an alpha channel on the basecolor socket, which is why the exporter is requiring that now, and if it's just a UI glitch that is going away then we should change that in the exporter. In general mixed nodes are hard for us to export reliably, part of the reason for our excitement about Principled BSDF, but I suppose an exception could be made for Transparent BSDF here.
Member

Added subscriber: @elm19087

Added subscriber: @elm19087

Added subscriber: @christian

Added subscriber: @christian

This comment was removed by @christian

*This comment was removed by @christian*

Added subscriber: @GaiaClary

Added subscriber: @GaiaClary

Added subscriber: @fclem

Added subscriber: @fclem

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Clément Foucault self-assigned this 2020-01-17 20:21:36 +01:00

Alpha handling is now consistent with cycles due to the blend mode refactor done for 2.81.

I don't know about the glTF addon but I would expect that since the time, they would have fixed it.

Alpha handling is now consistent with cycles due to the blend mode refactor done for 2.81. I don't know about the glTF addon but I would expect that since the time, they would have fixed it.

The glTF addon uses the new 'alpha' socket on the Principled BSDF node, which works correctly in the viewport too. So yes, I think this is resolved. Thanks!

The glTF addon uses the new 'alpha' socket on the Principled BSDF node, which works correctly in the viewport too. So yes, I think this is resolved. Thanks!
Member

Is the Alpha value of the Base color in the Principled BSDF Shader still used anywhere?

Is the Alpha value of the Base color in the Principled BSDF Shader still used anywhere?

The alpha values of the base color (or any color socket in shading nodes) should not be used.

We still have to remove it from the user interface.

The alpha values of the base color (or any color socket in shading nodes) should not be used. We still have to remove it from the user interface.
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
8 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#62794
No description provided.