GLTFLoader: Vertex color alpha support
See original GitHub issueIs your feature request related to a problem? Please describe.
Now that we support vertex colors with alpha (#20975, #21530) how should GLTFLoader
handle it?
Describe the solution you’d like
I can see that it’s supposed to be supported:
https://github.com/KhronosGroup/glTF/tree/master/specification/2.0
But should the loader automatically set transparent: true
in the material when we find a VEC4
attribute?
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:5 (3 by maintainers)
Top Results From Across the Web
gltfLoader vertexColors issue - three.js - Stack Overflow
GLTFLoader. I am using vertex colors and passing them this way. My pipeline looks like: Create Glb -> gltfpack -> load to THREE...
Read more >Add opacity attribute to vertices #20846 - mrdoob/three.js
The easiest way to do this seems to be adding an opacity attribute to the vertic... ... Feature: Add vertex color alpha channel...
Read more >WebGLRenderer#alpha – three.js docs
An object containing details about the capabilities of the current RenderingContext. - floatFragmentTextures: whether the context supports the OES_texture_float ...
Read more >Vertex Colors - Sketchfab Help Center
Vertex colors are RGBA color values applied directly to vertices in meshes (as opposed to material definitions and/or textures).
Read more >Verge3D 4.0 for Maya and Ultimate - Soft8Soft
Upgraded glTF loader that now supports more glTF extensions. ... We supported vertex colors via the aiUserDataColor node.
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
And we don’t hardcode accessor type for vertex color attribute but we refer to accessor.type to determine the type (vec3, vec4, or so on) so vec4 vertex color attribute should already be supported.
So, my understanding is vertex color alpha + glTF loader should be workable even without any change in the loader if Three.js core supports it, shouldn’t it?
That’s exciting! 😃
No, the logic for setting
transparent: true
can remain as it is now. The <kbd>A</kbd> component should have no effect if the glTF material does not use one ofalphaMode: BLEND
oralphaMode: MASK
.