Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alpha Map is automatically used as Base Color #2435

Open
milanwulf opened this issue Dec 10, 2024 · 4 comments · May be fixed by #2438
Open

Alpha Map is automatically used as Base Color #2435

milanwulf opened this issue Dec 10, 2024 · 4 comments · May be fixed by #2438
Labels
bug Something isn't working

Comments

@milanwulf
Copy link

Describe the bug
If the Base Color slot of the Principled BSDF node is not connected to anything and only a Alpha Map is connected to the Alpha slot, the exported glb file will use the Alpha Map as input for the Base Color slot.

Expected behavior
The Base Color slot should not be connected to anything when importing the glb file.

Screenshots
Before Export
BeforeExport

After Export
AfterExport

Version

  • OS: Windows 11
  • Blender Version 4.3.0
@scurest
Copy link
Contributor

scurest commented Dec 10, 2024

The Base Color slot should not be connected to anything when importing the glb file.

That isn't possible, the base color and alpha map are always packed together in glTF. If there is an alpha map, there must also be a base color map.

So looking at your "After Export" image, it looks like it will be correct as long as the exporter has made the RGB channels of the _COLOR texture completely white. Has it?

@julienduroure
Copy link
Collaborator

I confirm the analysis on Scurest

@julienduroure julienduroure added the question Further information is requested label Dec 10, 2024
@milanwulf
Copy link
Author

The Base Color slot should not be connected to anything when importing the glb file.

That isn't possible, the base color and alpha map are always packed together in glTF. If there is an alpha map, there must also be a base color map.

So looking at your "After Export" image, it looks like it will be correct as long as the exporter has made the RGB channels of the _COLOR texture completely white. Has it?

Sorry, maybe I expressed myself a bit wrong and used the wrong term, it is not an alpha map in this case (white/black) but the alpha channel of an albedo/diffuse texture. But as you can see, the color output of the Abledo/Diffuse map is not connected to the base color input of the Principles BSDF node before the export. If GLTF always packs base color and alpha together into one texture, then in this case the color output should not contain any color information and should be white as you say, right? Unfortunately, this is not the case here and the original color information remains in the texture. After reading your comment, I assume that alpha channels are not automatically converted to alpha maps?

@scurest
Copy link
Contributor

scurest commented Dec 11, 2024

Unfortunately, this is not the case here and the original color information remains in the texture.

Can confirm. Here is a .blend test case.

AlphaMapTest.zip

Comparison

Node setup

@julienduroure julienduroure added bug Something isn't working and removed question Further information is requested labels Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants