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

Closed
opened 4 years ago by DanSinni · 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)
Poster

Added subscriber: @DanSinni

Added subscriber: @DanSinni
Collaborator

#67327 was marked as duplicate of this issue

#67327 was marked as duplicate of this issue
Collaborator

#58281 was marked as duplicate of this issue

#58281 was marked as duplicate of this issue
brecht commented 4 years ago
Owner

Added subscribers: @Ajkad, @brecht

Added subscribers: @Ajkad, @brecht
brecht commented 4 years ago
Owner

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 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 4 years ago
Poster

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.

Added subscriber: @elm19087

Added subscriber: @elm19087

Added subscriber: @christian

Added subscriber: @christian

This comment was removed by @christian

*This comment was removed by @christian*
brecht commented 4 years ago
Owner

Added subscriber: @GaiaClary

Added subscriber: @GaiaClary
fclem commented 3 years ago
Collaborator

Added subscriber: @fclem

Added subscriber: @fclem
fclem commented 3 years ago
Collaborator

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
fclem closed this issue 3 years ago
fclem self-assigned this 3 years ago
fclem commented 3 years ago
Collaborator

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!
Collaborator

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?
brecht commented 3 years ago
Owner

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/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/Modeling
Interest/Modifiers
Interest/Motion Tracking
Interest/Nodes & Physics
Interest/Overrides
Interest/Performance
Interest/Performance
Interest/Physics
Interest/Pipeline, Assets & I/O
Interest/Platforms, Builds, Tests & Devices
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
legacy module/Animation & Rigging
legacy module/Core
legacy module/Development Management
legacy module/Eevee & Viewport
legacy module/Grease Pencil
legacy module/Modeling
legacy module/Nodes & Physics
legacy module/Pipeline, Assets & IO
legacy module/Platforms, Builds, Tests & Devices
legacy module/Python API
legacy module/Rendering & Cycles
legacy module/Sculpt, Paint & Texture
legacy module/Triaging
legacy module/User Interface
legacy module/VFX & Video
legacy project/1.0.0-beta.2
legacy project/Asset Browser (Archived)
legacy project/BF Blender: 2.8
legacy project/BF Blender: After Release
legacy project/BF Blender: Next
legacy project/BF Blender: Regressions
legacy project/BF Blender: Unconfirmed
legacy project/Blender 2.70
legacy project/Code Quest
legacy project/Datablocks and Libraries
legacy project/Eevee
legacy project/Game Animation
legacy project/Game Audio
legacy project/Game Data Conversion
legacy project/Game Engine
legacy project/Game Logic
legacy project/Game Physics
legacy project/Game Python
legacy project/Game Rendering
legacy project/Game UI
legacy project/GPU / Viewport
legacy project/GSoC
legacy project/Infrastructure: Websites
legacy project/LibOverrides - Usability and UX
legacy project/Milestone 1: Basic, Local Asset Browser
legacy project/Nodes
legacy project/OpenGL Error
legacy project/Papercut
legacy project/Pose Library Basics
legacy project/Retrospective
legacy project/Tracker Curfew
legacy project/Wintab High Frequency
Meta/Good First Issue
Meta/Papercut
migration/requires-manual-verification
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 & Devices
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 Information 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

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#62794
Loading…
There is no content yet.