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

GLTF vertex colors from Blender 2.91 broken #957

Closed
SilverfishVR opened this issue Jan 8, 2021 · 3 comments · Fixed by #1123
Closed

GLTF vertex colors from Blender 2.91 broken #957

SilverfishVR opened this issue Jan 8, 2021 · 3 comments · Fixed by #1123
Assignees
Labels
confirmed The bug has been successfully reproduced. renderer Touches or changes rendering Severity: Medium Important functionality is affected, but a workaround exists standards-alignment

Comments

@SilverfishVR
Copy link
Contributor

glb vertex colors

In blender 2.91 the GLTF exporter was updated from "Khronos glTF Blender I/O v1.0.5" to "Khronos glTF Blender I/O v1.4.40" wich changes how vertex colors are defined.
The models look right and validate with babylonjs.com

The specifics of the problem eludes me but it seems, the fine folks over at Godot had the same issue, and fixed it 😄 so that may be a good reference:

The issue: godotengine/godot#44744
The PR: godotengine/godot#44746
The "normalized" property: GLTF spec
The models for testing: vertexColorPanels Or load the json for all of them as in picture panels json

@Aitolda
Copy link
Collaborator

Aitolda commented Jan 8, 2021

Ah... Thanks for digging into that. All I knew was I couldn't combine diffuse with vertex color in this version,, and have reverted to 2.83 as needed.

@Aitolda Aitolda added confirmed The bug has been successfully reproduced. renderer Touches or changes rendering labels Jan 8, 2021
@SilverfishVR
Copy link
Contributor Author

Also not that, assuming fbx is correct, then the colors on GLTF (pre 2.91) where wrong, dark colors are darker than expected. It could be related to the "normalized" property but I always thought the colorspace was wrong, as in interpreting it as sRGB instead of linear and thus expanding the dark colors, I believe GLTF is always linear for vertex colors.

@daleglass daleglass added the Severity: Medium Important functionality is affected, but a workaround exists label Jan 9, 2021
@ctrlaltdavid
Copy link
Collaborator

See also: #302

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed The bug has been successfully reproduced. renderer Touches or changes rendering Severity: Medium Important functionality is affected, but a workaround exists standards-alignment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants