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

3D Model stopped rendering after upgrading to v1.75 #9270

Closed
dzungpng opened this issue Dec 7, 2020 · 6 comments
Closed

3D Model stopped rendering after upgrading to v1.75 #9270

dzungpng opened this issue Dec 7, 2020 · 6 comments

Comments

@dzungpng
Copy link
Contributor

dzungpng commented Dec 7, 2020

Sandcastle example: link.

Browser: Chrome

Operating System: Windows 10

What the model supposed to look like:
image

What it looks like with v1.75:
image

The breaking commit is #9173 (@lilleyse).

This is a .glb model.

@lilleyse
Copy link
Contributor

lilleyse commented Dec 8, 2020

I think there's a bug in the glTF model itself that is being exposed by the change in #9173.

This is one of the attribute accessors from the source .glb

{
  "bufferView":7,
  "componentType":5125,
  "count":2145,
  "type":"SCALAR",
  "min":[4],
  "max":[4]
}

which isn't isn't valid according to the glTF spec:

"gltf_detailedDescription": "The datatype of components in the attribute. All valid values correspond to WebGL enums. The corresponding typed arrays are Int8Array, Uint8Array, Int16Array, Uint16Array, Uint32Array, and Float32Array, respectively. 5125 (UNSIGNED_INT) is only allowed when the accessor contains indices, i.e., the accessor is only referenced by primitive.indices.",

The glTF validator doesn't seem to catch this and I may need to open a bug report.

One workaround is for the user is to delete the _MaxHandle vertex attribute from the "attributes" object in the glTF and then re-upload to ion.

The reason this breaks now is that #9173 allowed unused attributes to be added to the vertex array because an unused attribute at time of vertex array creation might be used when a material is applied. But now a faulty attribute is slipping through and failing on the gl.vertexAttribPointer command because 5125 is not a valid type.

@emackey
Copy link
Contributor

emackey commented Dec 8, 2020

The glTF validator doesn't seem to catch this and I may need to open a bug report.

Are there any glTF extensions in use here? If not please file an issue, thanks!

@lilleyse
Copy link
Contributor

lilleyse commented Dec 8, 2020

@emackey no extensions. Just opened the issue: KhronosGroup/glTF-Validator#154

@emackey
Copy link
Contributor

emackey commented Dec 8, 2020

Awesome thanks!

@emackey
Copy link
Contributor

emackey commented Dec 14, 2020

From my perspective, this is an invalid glTF file, not a bug in Cesium. It should be corrected in the model itself.

@hpinkos
Copy link
Contributor

hpinkos commented Dec 14, 2020

Agreed. @dzungpng could you pass this information along to the person that reported the issue?

@hpinkos hpinkos closed this as completed Dec 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants