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

ColladaExporter: Convert vertex, material colors to sRGB before export #23400

Merged
merged 2 commits into from
Jan 31, 2022

Conversation

gkjohnson
Copy link
Collaborator

@gkjohnson gkjohnson commented Jan 31, 2022

Related issue: #23283

Description

Converts material colors (diffuse, emissive, specular color) and vertex colors to sRGB before exporting as a Collada file. It looks like vertex color export wasn't actually working correctly so this fixes that up, too, by correctly declaring vertex color accessors as R, G, B, and always writing colors as float values.

Tested by exporting the vertex-colored teapot from the exporter and loading it in the Collada loader example. Relatedly the ColladaLoader doesn't looks like it actually sets material.vertexColors = true anywhere so that needs to be set manually on load to test.

@mrdoob mrdoob added this to the r138 milestone Jan 31, 2022
@mrdoob mrdoob merged commit 9db14dd into mrdoob:dev Jan 31, 2022
@mrdoob
Copy link
Owner

mrdoob commented Jan 31, 2022

Thanks!

@gkjohnson gkjohnson deleted the collada-exporter-srgb branch January 31, 2022 21:51
donmccurdy pushed a commit to donmccurdy/three.js that referenced this pull request Mar 10, 2022
mrdoob#23400)

* ColladaExporter: Convert vertex, material colors to sRGB before export

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

Successfully merging this pull request may close these issues.

2 participants