Vertex colors not loaded in Gltf models
See original GitHub issueModels coloured through vertex colours are not properly rendered in the application; various attempts in altering the formats and materials have resulted in null results. If a material isn’t specified, the model is wholly white. Using the lighting material, even with “UseVertexColor” it’s wholly black without details.
The following code is without utilizing any material, but it may be altered to set the ‘Lighting.j3md’ material. “UseVertexColor” does not appear to function as intended.
Light directionalLight = new DirectionalLight(new Vector3f(-10, -5, -10));
Light ambientLight = new AmbientLight();
Material material = new Material(assetManager, "Common/MatDefs/Light/Lighting.j3md");
material.setBoolean("UseVertexColor", true);
Spatial playerModel = assetManager.loadModel("models/TestGirl.glb");
playerModel.setLocalScale(0.5f);
playerModel.setLocalTranslation(new Vector3f(-4,-7.1f,0));
rootNode.attachChild(playerModel);
rootNode.addLight(directionalLight);
rootNode.addLight(ambientLight);
The model file is available here, for testing: TestModel.zip
Issue Analytics
- State:
- Created 10 months ago
- Comments:11 (10 by maintainers)
Top Results From Across the Web
Vertex Colours from gltf not loading · Issue #1702 - GitHub
I just found out this is broken. Some models in our engine come in as completely black when the vertex colors are wrong....
Read more >THREE.js glTF loader (binary) does not display vertex colors?
I have a model with precomputed vertex colors.
Read more >gltf vertex color - MSFS - FSDeveloper
Hi Arno! When importing a gltf model to MCX the vertex color information gets lost. Is it possible to keep it somehow?
Read more >GLTFLoader – three.js docs
A loader for glTF 2.0 resources. glTF (GL Transmission Format) is an open format specification for efficient delivery and loading of 3D content....
Read more >glTF 2.0 — Blender Manual
Discontinuous UVs and flat-shaded edges may result in moderately higher vertex counts in glTF compared to Blender, as such vertices are separated for...
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
Thank you @Abstrusle for taking the time to report this. GLTF pipeline is very important and as such I’d say this bug is high priority level.
I got this fixed, I’ll submit a PR shortly.