You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bad render results for KHR_materials_unlit Khronos test model #374
The visible surface ... should appear as a uniform color, so much so that the 3D effect is intentionally lost.
And offers the following as examples of good and bad render results:
Good
Bad
Here are examples of how <model-viewer> renders this model w/ various settings, all if which seem incorrect (possibly for different reasons):
model only
HDR background-image
experimental-pmrem
I also tested to see how Filament's gltf_viewer handles this case. It seems to handle the model correctly (presumably it supports the KHT_materials_unlit extension).
changed the title [-]Bad render results KHR_materials_unlit Khronos test model[/-][+]Bad render results for KHR_materials_unlit Khronos test model[/+]on Feb 18, 2019
The viewer will need to avoid setting .envMap on MeshBasicMaterial - that material type is not subject to all the limits of the glTF unlit material, and adding the envMap will “break” it. Not sure what’s going on in the “model only” case though.
The viewer will need to avoid setting .envMap on MeshBasicMaterial - that material type is not subject to all the limits of the glTF unlit material, and adding the envMap will “break” it. Not sure what’s going on in the “model only” case though.
A "default" env map is created in that case, leading to the "lit" appearance there. For PMREM, this is all black since an unlit material doesn't know what to do with a PMREM environment map
Activity
[-]Bad render results KHR_materials_unlit Khronos test model[/-][+]Bad render results for KHR_materials_unlit Khronos test model[/+]donmccurdy commentedon Feb 19, 2019
The viewer will need to avoid setting .envMap on MeshBasicMaterial - that material type is not subject to all the limits of the glTF unlit material, and adding the envMap will “break” it. Not sure what’s going on in the “model only” case though.
jsantell commentedon Feb 19, 2019
A "default" env map is created in that case, leading to the "lit" appearance there. For PMREM, this is all black since an unlit material doesn't know what to do with a PMREM environment map
Do not apply environment maps to unlit models. Fixes #374
Do not apply environment maps to unlit models. Fixes #374
Do not apply environment maps to unlit models. Fixes #374
Do not apply environment maps to unlit models. Fixes #374
Do not apply environment maps to unlit models (Fixes #374). Also fixes
Do not apply environment maps to unlit models (Fixes google#374). Als…
Do not apply environment maps to unlit models (Fixes google#374). Als…