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

Animated model optimized with gltfpack crashes / won't render #12162

Open
nikiosna opened this issue Aug 28, 2024 · 3 comments
Open

Animated model optimized with gltfpack crashes / won't render #12162

nikiosna opened this issue Aug 28, 2024 · 3 comments
Labels
needs feedback On hold until additional info is supplied needs triage type - bug

Comments

@nikiosna
Copy link

nikiosna commented Aug 28, 2024

What happened?

This animated model works fine in cesium 1.120 windturbin.glb.zip

But after investigating the optimization of a model import pipeline I notice that it won't work anymore after applying the
gltfpack meshoptimizer. In my setup It just is missing the rotating blades but in the sandcastle I once saw an error too. But this don't seem to happen every time.

Optimized model using gltfpack -noq -i windturbin.glb -o windturbin_optimized.glb
windturbin_optimized.glb.zip

I believe its a bug in cesium because the optimized model still works fine in threejs and gltf validator shows no errors.

One thing to note is that if I import the optimized model to blender and export it again the result works again in cesium.

You can't open the sandcastle out of the box unfortunally because I used a localhost url to provide the glb files.

Reproduction steps

  1. Copy the cesium sandcastle
  2. Adjust the localhost urls from the windturbin and windturbin_optimized
  3. Open the sandcastle with the optimized windturbin model
    ...

Sandcastle example

https://sandcastle.cesium.com/#c=vVRdb9MwFP0rVp8yKTjp2n0QuokxkECiYqwTPBCE3OS2sXDsyHbajqn/nes4adMyIfFCXmrfj3Puufe6mZLGkhWHNWhyRSSsyS0YXpf0S2ML0kHW3G+VtIxL0OkgJE+pJITLhXqjNglZMGEgdCYDAjLLlfwgc54xq/SBt2C5WpuEWF13FlWL/EbyklnY2bcnr1KZykUtGyySaUD3VOUgglqLkBTAl4U98WX42ilIyy0HQzWUagU3QgQehpCs0Vgpwxu4q07hLdMWT0yO6EKr8i0sNYAJXAohL4anIxpfjMfnw5ehN43HND6LRxfxeWvwdbizo+qICmA5l8s9z5TZglp1j2YmTTAcnfXDK26zAoPjnk0rIY5MRXU0n/ee5s6l32N80PKGHjFsQPpESnNsEjvswYPGkhZKl4YWR4Cfa+y6lhjetqTrYKe+0p30PUkzhkfEPx4Ly/PgySdKVuKw3SQPcZNjhl7FSf/Suku3EQlpUQki8j4sBnDcrLq84xsQM/4LSYenl3sv2zjvLGMCPacxfq1v2/xuffNaIVaz7Cfk7zp9XihGbJ38tsOVq86g95vLbAuzsLEJSQdfucxtredc4hNqBUr/YvCVdMsenOwF9Re/sxFEKqytkigSCksvlLHJJdYeGdecLGq6YqL1jo0uxXzH6L64O3qBO73hX4tu1JXYxfz/lv9jx/svQr43WzljMs+YsQLc/j0oJeZMT0HWQTsqlzgIBxNjHwVcd3CveVkpbd0uBZRGFspKoBITzWvcAUszYzrGSdRPneR8RXh+9cyfJskEMwY9i1o0y5gOricRxv+RKlTzDj+tQAv26MKK4fVHb6SUTiK8Pp9pvcAj5N8

Environment

Browser: Firefox
CesiumJS Version: at least 1.118.2 up to 1.120 (latest)
Operating System: MacOS

@ggetz
Copy link
Contributor

ggetz commented Aug 28, 2024

Thanks for the report @nikiosna.

but in the sandcastle I once saw an error too

Would you be able to copy the error here?

@ggetz ggetz added the needs feedback On hold until additional info is supplied label Aug 28, 2024
@nikiosna
Copy link
Author

This is the error, but it isn't shown every time and is maybe just related to the viewer.trackedEntity.

An error occurred while rendering.  Rendering has stopped.
DeveloperError: cartesian has a NaN component
DeveloperError@https://sandcastle.cesium.com/CesiumUnminified/Cesium.js:9817:13
Ellipsoid.prototype.geodeticSurfaceNormal@https://sandcastle.cesium.com/CesiumUnminified/Cesium.js:18318:13
Ellipsoid.prototype.cartesianToCartographic@https://sandcastle.cesium.com/CesiumUnminified/Cesium.js:18369:20
updateMembers@https://sandcastle.cesium.com/CesiumUnminified/Cesium.js:192362:69
Camera.prototype._setTransform@https://sandcastle.cesium.com/CesiumUnminified/Cesium.js:192729:18
updateTransform@https://sandcastle.cesium.com/CesiumUnminified/Cesium.js:159502:14
EntityView.prototype.update@https://sandcastle.cesium.com/CesiumUnminified/Cesium.js:159591:20
Viewer.prototype._onTick@https://sandcastle.cesium.com/CesiumUnminified/Cesium.js:255300:20
Event.prototype.raiseEvent@https://sandcastle.cesium.com/CesiumUnminified/Cesium.js:20103:22
Clock.prototype.tick@https://sandcastle.cesium.com/CesiumUnminified/Cesium.js:137631:17
CesiumWidget.prototype.render@https://sandcastle.cesium.com/CesiumUnminified/Cesium.js:242328:39
render2@https://sandcastle.cesium.com/CesiumUnminified/Cesium.js:241749:20

@github-staff github-staff deleted a comment from ViniciusSCG Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs feedback On hold until additional info is supplied needs triage type - bug
Projects
None yet
Development

No branches or pull requests

3 participants
@ggetz @nikiosna and others