GLTFLoader: Alpha mode should default to Blend when material color has transparency
See original GitHub issueDescription of the problem
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.
Suggested solution
When alpha < 1.0, if no alphaMode
is specified, default to BLEND
rather than OPAQUE
.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6
Top Results From Across the Web
Using threeGLTFLoader load gltf get transparency problem
I think your glTF model probably has materials that are marked "alphaMode": "BLEND" . In most realtime 3D rendering systems, including ThreeJS, ...
Read more >GLTF Parser Hooks - Questions - Babylon.js Forum
OPAQUE; } } else { // Default: Base Color Alpha Blending material.AlphaMode = AlphaMode.BLEND; } }. That setup up alpha mode for the...
Read more >Material#blending – three.js docs
Sets the alpha value to be used when running an alpha test. The material will not be rendered if the opacity is lower...
Read more >Blending - LearnOpenGL
The amount of transparency of an object is defined by its color's alpha value. ... Now that we've enabled blending we need to...
Read more >Journey of Learning Three.js (Day 4) | by James Min | Medium
Then I change the blend mode in Setting from Opaque to Alpha Hashed which makes my globe transparent: All I need to do...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.