Skip to content
This repository has been archived by the owner on Mar 28, 2019. It is now read-only.

Implement KHR_materials_unlit #160

Merged
merged 3 commits into from
Mar 3, 2018
Merged

Implement KHR_materials_unlit #160

merged 3 commits into from
Mar 3, 2018

Conversation

donmccurdy
Copy link
Contributor

@donmccurdy donmccurdy commented Feb 19, 2018

@donmccurdy
Copy link
Contributor Author

On second thought maybe there should not be an Export KHR_materials_unlit option in the UI, we can just infer automatically if the "Shadeless" checkbox on the material is enabled in Blender?

@fernandojsg
Copy link

@donmccurdy +1 for using the shadedless option

@donmccurdy
Copy link
Contributor Author

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,
Copy link

@fernandojsg fernandojsg Feb 24, 2018

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

Copy link
Contributor Author

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..

Choose a reason for hiding this comment

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

👍

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

Copy link
Contributor Author

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 than 0.5.

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 :)

@donmccurdy donmccurdy merged commit 5fee7bf into KhronosGroup:master Mar 3, 2018
@fernandojsg
Copy link

Cooool! 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants