Cesium: Bear glTF 2.0 model is not displayed in Cesium.js v1.40 or later

Created on 3 Apr 2018  路  18Comments  路  Source: CesiumGS/cesium

I tried to display the bear glTF model that was in sketchfab with the latest version of Cesium.js.
https://sketchfab.com/models/f2f13a8630004b1c82730d8b9ffa0e1f

However, in Cesium.js v1.40 and later, an error is displayed and it seems that it is not displayed correctly.

Cesium.js v1.39 + Bear glTF model result:
image

Cesium.js v1.44 + Bear glTF model result:

Cesium.js:532 
An error occurred while rendering.  Rendering has stopped.
undefined
TypeError: i.clampTime is not a function
TypeError: i.clampTime is not a function
    at Array.<anonymous> (https://cdn.rawgit.com/cx20/gltf-test/279cba56/libs/cesium/1.44/Cesium.js:497:22244)
    at h (https://cdn.rawgit.com/cx20/gltf-test/279cba56/libs/cesium/1.44/Cesium.js:496:19348)
    at c.update (https://cdn.rawgit.com/cx20/gltf-test/279cba56/libs/cesium/1.44/Cesium.js:496:21384)
    at Ae.update (https://cdn.rawgit.com/cx20/gltf-test/279cba56/libs/cesium/1.44/Cesium.js:498:20408)
    at a.update (https://cdn.rawgit.com/cx20/gltf-test/279cba56/libs/cesium/1.44/Cesium.js:492:8011)
    at tt (https://cdn.rawgit.com/cx20/gltf-test/279cba56/libs/cesium/1.44/Cesium.js:525:21935)
    at Ke (https://cdn.rawgit.com/cx20/gltf-test/279cba56/libs/cesium/1.44/Cesium.js:525:19739)
    at Qe (https://cdn.rawgit.com/cx20/gltf-test/279cba56/libs/cesium/1.44/Cesium.js:525:17745)
    at lt (https://cdn.rawgit.com/cx20/gltf-test/279cba56/libs/cesium/1.44/Cesium.js:525:25765)
    at ut (https://cdn.rawgit.com/cx20/gltf-test/279cba56/libs/cesium/1.44/Cesium.js:525:25933)
category - gltf type - bug

Most helpful comment

@cx20 There was a change there, add shouldAnimate: true to the Cesium.Viewer constructor options. The default behavior starts in pause now.

All 18 comments

I opened a fix in #6422

Although it may be another problem, in Cesium.js v1.42 or later, it seems that animation-enabled models are not animated. BoxAnimated, CesiumMan, Monster, etc..

@cx20 There was a change there, add shouldAnimate: true to the Cesium.Viewer constructor options. The default behavior starts in pause now.

@emackey Thank you for telling me that the options have changed. I modified the sample and confirmed that the above model was animated.

@cx20 @emackey thanks for reporting all these glTF issues! OK to close this one?

@pjcozzi The related PR #6422 didn't get merged yet. @lilleyse is it being held up by the lack of a test model?

This auto-closed because I merged the animation fix. I think I'm still seeing an issue where the bear renders inside-out when viewed from the back. Not sure what that's about...

Well since @mramato reopened this, I decided to bisect it. This was a slightly more involved bisect than usual since I had to retroactively apply the ConstantSpline patch to each bisection point along the history since 1.44 in order to see this new rendering error, that only presents itself when the bear's animations are enabled.

Anyway, git bisect says: 417c3f9b61b (ironically named "fixed some artifacts")

Sure enough, this commit was introduced with Log Depth, #5851. That makes sense since 1.44 (plus the ConstantSpline patch applied retroactively) did not have this problem. This is a "new since 1.44" bug.

/cc @lilleyse @bagnell

The side view just shows some slicing through the balloons. The rear view is so bad it looks like you're seeing the front of the bear.

brokenbearonballoons

@emackey do you think this is fixed by #6513

do you think this is fixed by #6513

Sadly no. I just merged master into that branch, but the artifacts look the same.

I've run through a bunch of other models, and haven't found any other than the bear that display this particular problem. Also, the problem only appears when animations are enabled. So... some bad interaction between something animated and the diffs in 417c3f9, it would seem.

It might be https://github.com/AnalyticalGraphicsInc/cesium/issues/6447.

We never figured out why log depth and skinned meshes don't play well together. The current workaround is an improvement but sometimes reveals artifacts like this.

Yes, that's the issue. If you remove the workaround, this model works fine. I'm looking into it.

@emackey Did we check to see if this model has the same normalized bone weights problem as Cesium Man?

It looks unlikely that we will get to this for the 1.45 release today and just want to make sure the issue is model specific or at least not the sign of a larger problem.

No, the Bear model has the opposite problem, it is being damaged by a workaround that's in place for the sake of the broken Cesium Man model.

Let's not hold the release for this.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jony89 picture jony89  路  4Comments

hanbollar picture hanbollar  路  4Comments

OmarShehata picture OmarShehata  路  4Comments

thw0rted picture thw0rted  路  4Comments

mcenirm picture mcenirm  路  4Comments