CesiumGS / 3d-tiles-tools

Apache License 2.0
315 stars 47 forks source link

The issue after merging 3dtiles #91

Closed KiktMa closed 9 months ago

KiktMa commented 10 months ago

Hello, I would like to ask how to solve the problem of merging two 3DTiles data and loading them in Cesium. However, there is clearly a gap in the merged 3DTiles. Have you ever encountered this problem? image

npx 3d-tiles-tools merge -i C:\Users\xxj\Desktop\newobj\obj\test_obj1\tileset.json -i C:\Users\xxj\Desktop\newobj\obj\test_obj2\tileset.json -o C:\Users\xxj\Desktop\newobj\obj\3dtiles

I use this command to merge

javagl commented 10 months ago

The merge command of the tools does not affect or modify the input tilesets. It only generates a new tileset that refers to the input. When there is a difference (gap) in the input tilesets, it will be visible in the merged tileset. Depending on the nature and structure of the input tilesets, there might be workarounds for that. But very likely, no trivial (or even "simple") ones....

EDIT: What you could try: You could manually adjust the transform of the nodes in the generated tileset that refer to the other tilesets. In the best case, this might just be a translation that compensates for the gap. But this will not be applicable automatically, and might be difficult when there are more than 2 tilesets.

javagl commented 9 months ago

Considering that the merge command does not affect or depend on the geometry of the input tilesets, it is safe to say that the gap is caused by the input.

You could try to adjust the tileset locations (i.e the root node transforms) either in the inputs, or in the merged tileset. But for the tools, there is not really any actionable item here, so I assume that it is OK to close this.