GLTF / GLB files with vertex colours are not rendered.
See original GitHub issueHi,
I just found your project from Hacker News, it’s really awesome - thanks for creating this!
I’m having issues loading GLTF files which use vertex colours, they do not render at all.
For example, the code below should render the cherry model in the attached image - however all I see is a black screen and no errors. I’m wondering if the standard fragment shader does not support vertex colours?
Please find attached a zip file of the model attached.
I’d love to use your library on a project I’m working on, however all of the art assets use vertex colours. 😦
Any assistance you might provide would be most appreciated - I love what you’ve done here!
Cheers, -R
`let app = new PIXI.Application({ backgroundColor: 0x000000, resizeTo: window, antialias: true }); document.body.appendChild(app.view); // Using a self executing function just to make the different methods more comparable.
(async function load() {
let gltf = await PIXI.Assets.load("cherry.gltf")
setup(gltf)
})()
function setup(gltf) {
let mesh2 = app.stage.addChild(PIXI3D.Model.from(gltf));
mesh2.scale.set(1);
app.ticker.add(() => {
rotation=rotation+0.1
mesh2.rotationQuaternion.setEulerAngles(0, rotation,0 )
scale = scale + ds
if (scale > 16){
ds=-ds
scale=scale+ds
}
if (scale < 0.01){
ds=-ds
scale=scale+ds
}
// mesh2.scale.set(-scale)
// light.intensity=scale
})
}
//let mesh = app.stage.addChild(PIXI3D.Mesh3D.createCube());
let light = new PIXI3D.Light()
light.position.set(0,0,50)
light.range=100
light.intensity=100
PIXI3D.LightingEnvironment.main.lights.push(light)
//mesh.position.y=-1
let rotation = 0
let scale = 1
let ds = 0.01
//let control = new CameraOrbitControl(app.view);
//app.ticker.add(() => {
//mesh.rotationQuaternion.setEulerAngles(rotation, rotation++,0 )
//})`
Issue Analytics
- State:
- Created 9 months ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Vertex color exported by gltf/glb is darker - Blender Artists
This is why glTF stores linear vertex colors: engines can render the file more efficiently. When the engine is finished with its lighting ......
Read more >GLTF Vertex Color / Texture discrepancy #90 - GitHub
The rendering of meshes with color information stored in vertex colors or albedo textures is different. From my understanding, they should ...
Read more >THREE.js glTF loader (binary) does not display vertex colors?
If I generate glTF file and load it using THREE.GLTFLoader, I can call scene.overrideMaterial = new THREE.MeshBasicMaterial({vertexColors: THREE ...
Read more >Exporting blender model to glb/gltf changes texture color ...
I'm saying delete the vertex color layer itself (ie. in the Properties editor) before you export. Not the nodes.
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 >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
Works perfectly! Thank you very much!
Yes - no problem! Sent from my iPhoneOn 22 Dec 2022, at 9:09 PM, Jens Malmborg @.***> wrote: Would it be ok with you if I use this model in automatic tests to make sure this issue won’t come back?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>