question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

GLTF Vertex Color / Texture discrepancy

See original GitHub issue

The rendering of meshes with color information stored in vertex colors or albedo textures is different. From my understanding, they should be the same?

To reproduce, load GLBs from VertexColor and Texture into your viewer.

There has been a lot of discussion about how to properly apply gamma to threejs and it seems that setting renderer.gammaoutput = true; is the recommended path for GLTF. This seems to not work for non-textured GLTF models though.

(The texture is created with Substance Designer Baker with the Color-From-Mesh option to bake vertex colors to a texture. The texture is sRGB.) -> basecolor texture

-> Something doesn’t really add up with how gamma is handled. On a sidenote, setting renderer.gammaInput = true; for the textured version makes a visual difference and looks more correct (more contrast) - which it shouldn’t because if everything would work correctly, the texture.encoding set to sRGB in the GLTFLoader would be enough?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
zellskicommented, May 7, 2018

Hey, sorry for missing this. I am unable to find anything, so far, about FBX being able to store metadata on how RGB tuples should be interpreted. I’m pessimistic but holding out hope that there’s rhyme and reason here, and not just amorphous semi-consensus between different generators.

0reactions
donmccurdycommented, May 7, 2018

Thanks! Yeah, I was afraid that might be the case.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Exporting blender model to glb/gltf changes texture color ...
Your model has a vertex color layer that is black everywhere but the hands. In glTF the first vertex color layer is always...
Read more >
Exported gltf looks odd in other programs? - three.js forum
The lambert one appears to have the correct colors for the texture, but the vertex colors look washed out on both exports. The...
Read more >
Ugly rendering of GLTF with vertex colors - Stack Overflow
Using vertex colors is limited by the triangle density of your geometry, whereas a texture could give you much higher resolution. – Marquizzo....
Read more >
functions | glTF-Transform - Don McCurdy
The glTF format requires vertex colors to be stored as linear values, and this function provides a way to correct vertex colors that...
Read more >
Can you animate at the vertex level and export it from 3ds Max ...
GLTF - Can you animate at the vertex level using no bones/skin and ... Alternatively, you can use Vertex Animation Textures as shown...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found