Some software exports GLTFs without setting alpha mode, even in materials with transparency. Blender correctly renders these materials as transparent, but the GLTFLoader defaults to opaque even when an alpha < 1.0 is specified in the material.
When alpha < 1.0, if no alphaMode is specified, default to BLEND rather than OPAQUE.
The glTF specification is pretty specific that when alphaMode=OPAQUE, any transparency in the baseColorTexture or baseColorFactor must be ignored by implementations. I think it would be necessary to report bugs to software exporting alpha < 1, without setting alpha mode. Do you have an example?
Yes, OnShape does not appear to be setting the flag when exporting.
When alpha < 1.0, if no alphaMode is specified, default to BLEND rather than OPAQUE.
According to glTF spec 2.0, the alphaMode property specifies how alpha is interpreted -- not the other way around.
Also, alphaMode is not required, and defaults to OPAQUE.
Thanks. Sounds like the implementation in the loader conforms to the spec then. I fail to see the logic behind defaulting to opaque when a material is clearly transparent, but that is a question for a different forum.
I fail to see the logic behind defaulting to opaque when a material is clearly transparent
It is not always so clear. Transparency can be set in the alpha channel of the texture. The loader is not expected to discern that.
Yes, good point.
Most helpful comment
It is not always so clear. Transparency can be set in the alpha channel of the texture. The loader is not expected to discern that.