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

GLTFExporter: Support KHR_materials_unlit. #13566

Merged
merged 2 commits into from
Mar 13, 2018

Conversation

donmccurdy
Copy link
Collaborator

// @QUESTION Should we avoid including any attribute that has the default value?
var gltfMaterial = {

pbrMetallicRoughness: {}

};

if ( material instanceof THREE.MeshBasicMaterial ) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Off topic:

@mrdoob If I'm right, Three.js recommends to use object.is* rather than instanceof for Three.js object, correct? If so, I'm gonna make PR to replace them because bunch of instanceof are used in GLTFExporter,

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated 👍

} else if ( material instanceof THREE.MeshBasicMaterial ) {

gltfMaterial.pbrMetallicRoughness.metallicFactor = 0.0;
gltfMaterial.pbrMetallicRoughness.roughnessFactor = 0.9;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where are these numbers 0.0 and 0.9 from?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fernandojsg
Copy link
Collaborator

@donmccurdy looking good! 🎉 🎉🎉🎉🎉 this is something I needed for apainter hehe

@mrdoob mrdoob added this to the r91 milestone Mar 13, 2018
@mrdoob mrdoob merged commit 6d5e6fc into mrdoob:dev Mar 13, 2018
@mrdoob
Copy link
Owner

mrdoob commented Mar 13, 2018

Thanks!

@donmccurdy donmccurdy deleted the feat-gltfexporter-unlit branch July 9, 2021 19:31
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.

4 participants