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

Support glTF animations in 3D Tiles payloads #8962

Closed
bertt opened this issue Jun 16, 2020 · 4 comments · Fixed by #8983
Closed

Support glTF animations in 3D Tiles payloads #8962

bertt opened this issue Jun 16, 2020 · 4 comments · Fixed by #8983

Comments

@bertt
Copy link

bertt commented Jun 16, 2020

Hi, is there somewhere a sample/documention of playing glTF animation from b3dm tile(s) in Cesium? Is it supported? I see my tiles are rendered in Cesium but the animation is not playing :-(

@mramato
Copy link
Contributor

mramato commented Jun 16, 2020

This has come up before but I don't believe we have an issue so thanks for writing one up. I'll update the issue title to make it clear this is a general feature request.

The 3D Tiles implementation does not currently activate and/or update animations contained within individual payloads. I'm not sure of how difficult this would be to expose as an option to the end-user API. I would imagine it would be similar to how Model works and then the tileset would have to cycle through all visible tiles each frame and updating the model animations. Depending on the number of animations, scalability could be an issue, both because of additional draw calls and also because of the time it takes to animate each tile.

When he has time, perhaps @lilleyse can chime in with his thoughts.

@mramato mramato changed the title b3dm with glTF 2.0 animations? Support glTF animations in 3D Tiles payloads Jun 16, 2020
@lilleyse
Copy link
Contributor

First thing I would check is if the glTF animates by itself. b3dm contains a Model instance which has a ModelAnimationCollection that uses frameState.time. I would expect animation to work out of the box. @bertt are you able to share your tileset ?

@bertt
Copy link
Author

bertt commented Jun 16, 2020

yes sure,

live demo: https://bertt.github.io/cesium_3dtiles_samples/samples/animations/

code: https:/bertt/cesium_3dtiles_samples/tree/master/samples/animations

I've unpacked the 1.b3dm to 1.glb and gltf: https:/bertt/cesium_3dtiles_samples/blob/master/samples/animations/tiles/1.gltf

When inspecting the glb in Gestaltor it displays an animation with name 'track1':

animation

it also animates something when playing in Gestaltor.

@lilleyse
Copy link
Contributor

Thanks @bertt, can confirm that animations don't play for the 3D Tiles on my end either.

Looks like the thing that's missing from the 3D Tiles code is a call to add the animations, like what ModelVisualizer does for glTF's in CZML:

model.activeAnimations.addAll({
    loop: ModelAnimationLoop.REPEAT
});

This could be added pretty easily to Batched3DModel3DTileContent and Instanced3DModel3DTileContent.

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

Successfully merging a pull request may close this issue.

4 participants