question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Animation support in Cesium3DTileStyle

See original GitHub issue

Currently you can implement animations in Cesium3DTileStyle only by modifying style in each frame, which causes a recompilation of shader. To prevent this we need a uniform containing the current time.

I see two possible implementation strategies we could use:

  • Add a variable ${TIME} which is a core variable like ${POSITION}.
  • Add interface to Cesium3DTileStyle to user defined uniforms.

Option 1: Implementing ${TIME} should be easy - but there are some difficult questions: Which is the start time of ${TIME}? Is 0 start of UNIX time or is 0 time of first frame of this shader? If you want be sure animation starts by 0 you need time of first frame. But if you store time of first frame and you have multiple styles it is hard to synchronize animations. So we could in my opinion we don’t should provide this option, if we implement option 2.

Option 2: With adding support of user defined uniforms implementation of animations needs some more lines to user, but you can implement all variables like you want and you have a little better performance (e.g. you can process ${TIME} % 100 once on CPU side instead on GPU side for each vertex). And of course you can use this uniforms for other variables, too 😉.

What do you think about it? It could be we need this in near future, so maybe (if I have time and it has enough priority for us) I will implement it.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
katSchmidcommented, Dec 9, 2022

Looking into it unfortunately might not be my decision if the code is public in the end

1reaction
ggetzcommented, Dec 6, 2022

@katSchmid Some initial work was done in https://github.com/CesiumGS/cesium/pull/5380, but more work would need to be done to get this feature in. Let us know if you have interest in contributing. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Animation support in Cesium3DTileStyle · Issue #5343 - GitHub
Currently you can implement animations in Cesium3DTileStyle only by modifying style in each frame, which causes a recompilation of shader.
Read more >
Cesium3DTileStyle - Cesium Documentation
Gets or sets the StyleExpression object used to evaluate the style's anchorLineColor property. Alternatively a string or object defining a color style can ......
Read more >
Cesium3DTileStyle - Cesium Documentation
A style that is applied to a Cesium3DTileset . Evaluates an expression defined using the 3D Tiles Styling language. Name, Type, Description. style ......
Read more >
Does 3d-tiles support models with animation? - Google Groups
Hi everyone,. I wonder if the models in 3d-tiles support animation? I know the glTF format support animation, and the dynamic effect can...
Read more >
FeatureDetection - Cesium Documentation - Agi
A set of functions to detect whether the current browser supports various features. Methods. static Cesium.FeatureDetection.supportsFullscreen() → Boolean.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found