-
-
Notifications
You must be signed in to change notification settings - Fork 35.4k
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
Conversation
// @QUESTION Should we avoid including any attribute that has the default value? | ||
var gltfMaterial = { | ||
|
||
pbrMetallicRoughness: {} | ||
|
||
}; | ||
|
||
if ( material instanceof THREE.MeshBasicMaterial ) { |
There was a problem hiding this comment.
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
,
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@donmccurdy looking good! 🎉 🎉🎉🎉🎉 this is something I needed for apainter hehe |
Thanks! |
/cc @takahirox @fernandojsg