Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vertex Colour space is distorted by 3dsmax babylonjs glb/gltf exporter. #1119

Open
RuneMod opened this issue Sep 28, 2024 · 3 comments
Open
Milestone

Comments

@RuneMod
Copy link

RuneMod commented Sep 28, 2024

Regarding vertex colors, I believe there is a wrong or missing color conversion somewhere in the export process.

See image comparison of fbx and glb from babylonjs exporter.

vertex colorspace issue

@RuneMod RuneMod changed the title Vertex Colour space ends up being wrong in exported glb/gltf. Vertex Colour space is distorted by 3dsmax babylonjs glb/gltf exporter. Sep 28, 2024
@bghgary
Copy link
Contributor

bghgary commented Oct 3, 2024

Can you provide a repro? This repo is currently no longer under development, but if anyone wants to try to fix it, we will still review PRs.

@thomlucc thomlucc added this to the Future milestone Oct 3, 2024
@FrogsInSpace
Copy link
Contributor

FrogsInSpace commented Oct 30, 2024

After some research/investigation, i am 100% sure its not a babylon exporter problem
Internally Blender seems to use sRGB for vertex colors, and i guess the glb/gltf importer is missing the conversion step to convert from linear RGB (gltf ) to their sRGB space.

Also i verified that the color values written out by the babylon exporter are exactly the same as the values stored in the FBX

Here's a test using sketchfab upload of the 3ds Max exported fbx and glb ( by babylon) and sketchfab produces the exact same output for both

GLB (Babylon ) upload
https://sketchfab.com/3d-models/vtx-col-glb-babylon-exporter-9209df94313d40cba944838a991ee53f

FBX upload
https://sketchfab.com/3d-models/vtx-col-fbx-b7f8803b57764208b3c1c84d342d3b8a

regarding the blender sRGB usage for vertex colors, see here
https://blender.stackexchange.com/questions/87576/vertex-colors-loose-color-data/87583#87583

@RuneMod
Copy link
Author

RuneMod commented Oct 30, 2024

Interesting. Its hard to believe believe blender is at fault, but your explanation sounds very plausible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants