CesiumGS / CesiumGS/cesium

Skinned glTF models with armature scaling don't work well

Open
#8,759 0 comments 0 reactions 0 assignees View on GitHub
category - model/gltf type - bug
Dominant language
JavaScript
Stars
15.8k
Forks
3.9k
Avg merge
4d 6h
Merged PRs (30d)
34

Description

Two example models are `char.glb` from #8175, and `bee.glb` from #8285.

In both cases, the optional property `skeleton` was omitted, causing a crash in versions of Cesium up until now. The crash is fixed in PR #8756.

Also in both cases, the root node has an applied scaling factor of about `0.01`. This causes the model to remain invisible (even after the crash is fixed).

It looks like possibly the bounding sphere calculations are incorrect, or a mismatch for what the root scaling is doing to the bones and rigging. In this sample model, the above mentioned `char.glb` has been modified, such that the root scale has changed from `0.01` to `0.5`:

[char_halfScale.zip](https://github.com/CesiumGS/cesium/files/4483695/char_halfScale.zip)

Loading this model into the Sandcastle 3D Models demo, it looks like the camera focuses on a spot above the character's head. The bounding sphere is apparently not centered on the model, and likely not sized correctly.

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue with char.glb and bee.glb in the Sandcastle 3D Models demo, including the modified char_halfScale model. Read the changes in PR #8756 first, then investigate the bounding sphere and root scaling behavior for skinned models. Done means the models load without a crash, remain visible, and the camera focuses on a correctly centered and sized bounding sphere.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
computer-graphics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.