cesium-native icon indicating copy to clipboard operation
cesium-native copied to clipboard

Add i3dm support

Open nithinp7 opened this issue 4 years ago • 16 comments

Adds support for the Instanced 3D Model format. We transcode each i3dm tile into a gltf with the EXT_mesh_gpu_instancing extension.

Main Changes:

  • Added the auto-generated Gltf reader/writer classes for the EXT_mesh_gpu_instancing gltf extension.
  • Added Instanced3DModelContent to transcode i3dm into EXT_mesh_gpu_instancing.
  • Changed TileContentLoader interface to take an AsyncSystem, IAssetAccessor, and request headers in addition to the TileContentLoadInput. Tile content loading can now happen asynchronously, so the loaders now return a Future<unique_ptr<TileContentLoadResult>>.
  • Made significant rearrangements in Tile to allow the content loading to happen asynchronously, this rearrangement should be checked for multi-threading-correctness.

TODO:

  • Transcode scale buffer as well.
  • Transcode quantized positions/normals, non-uniform scaling, and any other possibilities in i3dm.
  • Determine if EXT_mesh_gpu_instancing is sufficient to represent i3dm while still being compliant.
  • Remove RTC_CENTER from the gltf.extras by factoring it into the top level node transforms in the gltf (as is being discussed here: https://github.com/CesiumGS/cesium-native/issues/289).

nithinp7 avatar Jul 22 '21 05:07 nithinp7

Copied from Slack: @lilleyse brought up that i3dm and the EXT_mesh_gpu_instancing have slightly conflicting transform orders, particularly: I3DM: tileTransform * instanceTransforms[i] * nodeTransform * vertexPosition EXT_mesh_gpu_instancing:
tileTransform * nodeTransform * instanceTransforms[i] * vertexPosition

This comes from the fact that the extension attaches to the node and expects the node's mesh to be the thing that's instanced. Since i3dm instances the entire gltf model, I was hoping I could just give each node the same instance attributes through the extension and it would work. But since the extension defines a conflicting transformation order, I think it would be noncompliant to use it for i3dm. Has anyone here thought about what other gltf extensions could correspond to i3dm, might it be reasonable to write a new similar extension that attaches to the gltf model instead of the node?

nithinp7 avatar Jul 22 '21 22:07 nithinp7

Also from Slack:

might be weird but could you bake everything into the instance matrix? -@lilleyse

If there was just a single node that might work, multiplying the node transform into instance transforms and then setting the node transforms to identity. But the instance transforms may need to be used across several nodes, each with its own transform right?

nithinp7 avatar Jul 22 '21 22:07 nithinp7

Thanks again for your contribution @nithinp7!

No one has commented on this pull request in 30 days. Maintainers, can you review, merge or close to keep things tidy?

I'm going to re-bump this in 30 days. If you'd like me to stop, just comment with @cesium-concierge stop. If you want me to start again, just delete the comment.

cesium-concierge avatar Aug 23 '21 02:08 cesium-concierge

Thanks again for your contribution @nithinp7!

No one has commented on this pull request in 30 days. Maintainers, can you review, merge or close to keep things tidy?

I'm going to re-bump this in 30 days. If you'd like me to stop, just comment with @cesium-concierge stop. If you want me to start again, just delete the comment.

cesium-concierge avatar Sep 22 '21 02:09 cesium-concierge

Thanks again for your contribution @nithinp7!

No one has commented on this pull request in 30 days. Maintainers, can you review, merge or close to keep things tidy?

I'm going to re-bump this in 30 days. If you'd like me to stop, just comment with @cesium-concierge stop. If you want me to start again, just delete the comment.

cesium-concierge avatar Oct 22 '21 02:10 cesium-concierge

Thanks again for your contribution @nithinp7!

No one has commented on this pull request in 30 days. Maintainers, can you review, merge or close to keep things tidy?

I'm going to re-bump this in 30 days. If you'd like me to stop, just comment with @cesium-concierge stop. If you want me to start again, just delete the comment.

cesium-concierge avatar Nov 21 '21 03:11 cesium-concierge

Thanks again for your contribution @nithinp7!

No one has commented on this pull request in 30 days. Maintainers, can you review, merge or close to keep things tidy?

I'm going to re-bump this in 30 days. If you'd like me to stop, just comment with @cesium-concierge stop. If you want me to start again, just delete the comment.

cesium-concierge avatar Dec 21 '21 03:12 cesium-concierge

Thanks again for your contribution @nithinp7!

No one has commented on this pull request in 30 days. Maintainers, can you review, merge or close to keep things tidy?

I'm going to re-bump this in 30 days. If you'd like me to stop, just comment with @cesium-concierge stop. If you want me to start again, just delete the comment.

cesium-concierge avatar Jan 20 '22 03:01 cesium-concierge

Thanks again for your contribution @nithinp7!

No one has commented on this pull request in 30 days. Maintainers, can you review, merge or close to keep things tidy?

I'm going to re-bump this in 30 days. If you'd like me to stop, just comment with @cesium-concierge stop. If you want me to start again, just delete the comment.

cesium-concierge avatar Feb 19 '22 03:02 cesium-concierge

Thanks again for your contribution @nithinp7!

No one has commented on this pull request in 30 days. Maintainers, can you review, merge or close to keep things tidy?

I'm going to re-bump this in 30 days. If you'd like me to stop, just comment with @cesium-concierge stop. If you want me to start again, just delete the comment.

cesium-concierge avatar Mar 21 '22 02:03 cesium-concierge

https://github.com/CesiumGS/cesium/pull/10302 has a diagram showing the difference in transformation order between i3dm and EXT_mesh_gpu_instancing.

kring avatar Apr 19 '22 00:04 kring

Thanks again for your contribution @nithinp7!

No one has commented on this pull request in 30 days. Maintainers, can you review, merge or close to keep things tidy?

I'm going to re-bump this in 30 days. If you'd like me to stop, just comment with @cesium-concierge stop. If you want me to start again, just delete the comment.

cesium-concierge avatar May 19 '22 02:05 cesium-concierge

Thanks again for your contribution @nithinp7!

No one has commented on this pull request in 30 days. Maintainers, can you review, merge or close to keep things tidy?

I'm going to re-bump this in 30 days. If you'd like me to stop, just comment with @cesium-concierge stop. If you want me to start again, just delete the comment.

cesium-concierge avatar Jun 18 '22 02:06 cesium-concierge

Thanks again for your contribution @nithinp7!

No one has commented on this pull request in 30 days. Maintainers, can you review, merge or close to keep things tidy?

I'm going to re-bump this in 30 days. If you'd like me to stop, just comment with @cesium-concierge stop. If you want me to start again, just delete the comment.

cesium-concierge avatar Jul 18 '22 02:07 cesium-concierge

Thanks again for your contribution @nithinp7!

No one has commented on this pull request in 30 days. Maintainers, can you review, merge or close to keep things tidy?

I'm going to re-bump this in 30 days. If you'd like me to stop, just comment with @cesium-concierge stop. If you want me to start again, just delete the comment.

cesium-concierge avatar Aug 17 '22 02:08 cesium-concierge

Thanks again for your contribution @nithinp7!

No one has commented on this pull request in 30 days. Maintainers, can you review, merge or close to keep things tidy?

I'm going to re-bump this in 30 days. If you'd like me to stop, just comment with @cesium-concierge stop. If you want me to start again, just delete the comment.

cesium-concierge avatar Sep 16 '22 02:09 cesium-concierge

Thanks again for your contribution @nithinp7!

No one has commented on this pull request in 30 days. Maintainers, can you review, merge or close to keep things tidy?

I'm going to re-bump this in 30 days. If you'd like me to stop, just comment with @cesium-concierge stop. If you want me to start again, just delete the comment.

cesium-concierge avatar Oct 16 '22 02:10 cesium-concierge

Thanks again for your contribution @nithinp7!

No one has commented on this pull request in 30 days. Maintainers, can you review, merge or close to keep things tidy?

I'm going to re-bump this in 30 days. If you'd like me to stop, just comment with @cesium-concierge stop. If you want me to start again, just delete the comment.

cesium-concierge avatar Nov 15 '22 03:11 cesium-concierge

Thanks again for your contribution @nithinp7!

No one has commented on this pull request in 30 days. Maintainers, can you review, merge or close to keep things tidy?

I'm going to re-bump this in 30 days. If you'd like me to stop, just comment with @cesium-concierge stop. If you want me to start again, just delete the comment.

cesium-concierge avatar Dec 15 '22 03:12 cesium-concierge

Thanks again for your contribution @nithinp7!

No one has commented on this pull request in 30 days. Maintainers, can you review, merge or close to keep things tidy?

I'm going to re-bump this in 30 days. If you'd like me to stop, just comment with @cesium-concierge stop. If you want me to start again, just delete the comment.

cesium-concierge avatar Jan 14 '23 03:01 cesium-concierge

Thanks again for your contribution @nithinp7!

No one has commented on this pull request in 30 days. Maintainers, can you review, merge or close to keep things tidy?

I'm going to re-bump this in 30 days. If you'd like me to stop, just comment with @cesium-concierge stop. If you want me to start again, just delete the comment.

cesium-concierge avatar Feb 13 '23 03:02 cesium-concierge

Thanks again for your contribution @nithinp7!

No one has commented on this pull request in 30 days. Maintainers, can you review, merge or close to keep things tidy?

I'm going to re-bump this in 30 days. If you'd like me to stop, just comment with @cesium-concierge stop. If you want me to start again, just delete the comment.

cesium-concierge avatar Mar 15 '23 02:03 cesium-concierge

I'm going to close this PR (but keep the branch) because it looks like this PR is using the old content architecture, and a lot has changed since then. We'll try to revisit this in the future.

j9liu avatar Mar 24 '23 15:03 j9liu