-
Notifications
You must be signed in to change notification settings - Fork 189
Implement KHR_materials_unlit #160
Implement KHR_materials_unlit #160
Conversation
On second thought maybe there should not be an |
@donmccurdy +1 for using the |
Ok thanks, updated. 👍 |
@@ -2561,87 +2564,29 @@ def generate_materials(operator, | |||
else: | |||
alphaMode = 'BLEND' | |||
|
|||
common['diffuseFactor'] = [blender_material.diffuse_color[0] * blender_material.diffuse_intensity, | |||
pbrMetallicRoughness['baseColorFactor'] = [blender_material.diffuse_color[0] * blender_material.diffuse_intensity, |
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.
what about adding default fallback PBR parameters? metallicFactor: 0, roughnessFactor: 0.5
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.
Good point; I think roughnessFactor >= 0.5
is the key thing, so subjectively something like ~0.9 would be about right..
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.
👍
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.
In any case it should be consistent with the material_unlit extension where the recommended value for roughness is 0.5, so you could probabliy specify there >=0.5 or set directly 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.
I don't think we're recommending 0.5 anywhere in the extension... it says just:
roughnessFactor
is greater than0.5
.
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.
Ah you're right I just misread that part :)
Cooool! 👍 |
Based on KhronosGroup/glTF#1163.
Example: unlit_monkey.gltf.zip
Demo viewer with unlit support: https://khr-materials-unlit-ooddguuati.now.sh/