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

T60890: 2.8 GLTF/GLB Vertex Colors incorrect #261

Closed
julienduroure opened this issue Jan 29, 2019 · 10 comments
Closed

T60890: 2.8 GLTF/GLB Vertex Colors incorrect #261

julienduroure opened this issue Jan 29, 2019 · 10 comments
Labels
bug Something isn't working importer This involves or affects the import process

Comments

@julienduroure
Copy link
Collaborator

On blender issue tracker: https://developer.blender.org/T60890

I asked some example files

@julienduroure julienduroure added bug Something isn't working exporter This involves or affects the export process labels Jan 29, 2019
@julienduroure
Copy link
Collaborator Author

Linked to #127 ?

@julienduroure
Copy link
Collaborator Author

The user added a test file and some details on blender issue tracker

@donmccurdy
Copy link
Contributor

Posted an update on https://developer.blender.org/T60890 – I think the importer may need to convert, similarly to this PR: https://github.com/KhronosGroup/glTF-Blender-Exporter/pull/209/files. I can't reproduce an issue in the exporter, but only tested 2.80 so far. It's also possible that Godot is not handling vertex colors quite correctly; we should encourage users to compare at least one of the online viewers as well.

@donmccurdy
Copy link
Contributor

colorTest.gltf.zip

@julienduroure julienduroure added importer This involves or affects the import process and removed exporter This involves or affects the export process labels Feb 1, 2019
@julienduroure
Copy link
Collaborator Author

@donmccurdy Fixed it in branch import_vertexcolor_linear2sRGB

Can you please test it on your side? 4 eyes are better than 2 for color issues :)

@capnm
Copy link
Contributor

capnm commented Feb 2, 2019

I'm only looking at the for import-export-import-... increased computing effort and precision lost.

I wonder if glTF should not support a proper color management as usual in the professional printing industry (ie ICC profiles)?

@donmccurdy
Copy link
Contributor

donmccurdy commented Feb 4, 2019

@julienduroure this looks very, very close. On a roundtrip import/export the color becomes slightly darker, though – I've left a comment with what I think is the cause 08987ef.

I wonder if glTF should not support a proper color management as usual in the professional printing industry (ie ICC profiles)?

glTF is deliberately specific about how its colors must be managed, and exporters must convert data to that. glTF does not allow arbitrary color profiles to be used inside the file – while that makes sense when the final output is a printed product, the data passed to a realtime engine needs to match what engines support.

@julienduroure
Copy link
Collaborator Author

You're right, I miss-read the formula. Will fix it asap

@julienduroure
Copy link
Collaborator Author

@donmccurdy I just pushed a fix :)

@donmccurdy
Copy link
Contributor

@julienduroure the fix looks correct now, thanks! roundtrip import/export is giving the same vertex colors for me. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working importer This involves or affects the import process
Projects
None yet
Development

No branches or pull requests

3 participants