Skip to content
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

Some glTF aren't being displayed #1777

Closed
ricardoekm opened this issue Aug 9, 2023 · 1 comment
Closed

Some glTF aren't being displayed #1777

ricardoekm opened this issue Aug 9, 2023 · 1 comment

Comments

@ricardoekm
Copy link

We're investigating an issue where some glTFs aren't being displayed. Additional info:

  • The glTF is actually rendered, but it's "invisible". It seems some issue with the materials or colors.
  • Depending on the user interaction it shows up, but we can't reproduce. It seems some state change inside luma makes it render correctly,
  • These glTFs render fine in other webgl tools (e.g. glTF viewer or Three.JS)

When we managed to make it render correctly (by random interactions) we noticed the following differences in luma.gl logs:

Not working

"pbr_uUnlit": {
  "SOLID.176-primitive-0 uniforms": "N/A",
  "Uniform Type": "NOT PROVIDED"
},
"u_BaseColorFactor": {
  "SOLID.176-primitive-0 uniforms": "N/A",
  "Uniform Type": "NOT PROVIDED"
},

Working

"pbr_uUnlit": {
  "SOLID.176-primitive-0 uniforms": "false",
  "Uniform Type": false
},
"u_BaseColorFactor": {
  "SOLID.176-primitive-0 uniforms": "[0.72, 0.72, 0.72, 1.]",
  "Uniform Type": [
    0.7176470160484314,
    0.7176470160484314,
    0.7176470160484314,
    1
  ]
},

We're rendering it by using the scenegraph layer from deck.gl. A codepen reproducing the issue is available below:
https://codepen.io/dfvlzcdq-the-flexboxer/pen/WNYBZON

Any help is appreciated. Thanks!

@donmccurdy
Copy link
Collaborator

The first problem seems to be that the background and the model are both solid white. After changing the color of document.body you'll see this instead:

3d model view showing white unshaded structure on green background

The default lighting is flat (also "ambient" or "diffuse"), and so you won't see the soft shadows that would otherwise differentiate this model from its solid white background. Stronger directed lighting should fix that.

I'll also note (as FYI) that the model does not contain any materials. Technically that's fine, the glTF format specifies a default PBR material to be used when no other material is specified. But if it doesn't appear as you expect, that might be something to look closer into.

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

No branches or pull requests

2 participants