Skip to content

Bad render results for KHR_materials_unlit Khronos test model #374

Closed

Description

@cdata

The Khronos Unlit Test sample model README says that for the test model using this extension:

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

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

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

Filament gltf_viewer
image

Activity

  1. 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
  2. donmccurdy commented on Feb 19, 2019

    @donmccurdy
    Contributor

    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.

  3. jsantell commented on Feb 19, 2019

    @jsantell
    Contributor

    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

  4. self-assigned this
    on Feb 19, 2019
  5. added 4 commits that reference this issue on Feb 19, 2019
    61c4dea
    8d62451
    c5a7883
    ab4fe71
  6. added a commit that references this issue on Mar 4, 2019
    de0a15d
  7. added a commit that references this issue on Feb 4, 2020
    cbeaf6f
  8. added a commit that references this issue on Jun 27, 2025
    c4dac10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions