I created a very large scene in RealityCapture, then used a script to split them into many small pieces and exported each block as a separate 3dtiles. How should I load them all in cesiumJs and restore the scene. Does loading separately affect performance? I used the tool to merge the json files of these blocks, and it was no longer able to load successfully in cesiumjs.
Anyone has the same experience,please give me some advice
There are several engineering questions involved here. These include (but are not limited to) how large the full data set is, how many ‘small pieces’ you created (and how large each of these pieces is), what the level-of-detail structure of each tileset is, and how you intended to combine them at runtime. (Further, more detailed technical questions might depend on the answers to the first ones).
But as an attempt to get an idea here:
When you have a single tileset, and load this single tileset in CesiumJS, then there is usually the assumption that the tileset is structured in a way that allows streaming the data, and supporting hierarchical level of detail. Some details about the technical aspects are explained in the 3D Tiles Reference Card. A rough summary: CesiumJS will usually first load the ‘root tile’ of that tileset. This root tile will contain a very coarse (simplified) representation of the geometry data. Depending on the available memory and user interaction, CesiumJS will then load the child tiles of the root. And these child tiles will contain more detailed geometry. And it will keep loading additional data and refining the geometry, until a certain stopping criterion is met.
Now, this works fine when you have one tileset, and the root tile of this tileset contains maybe 5 MB of geometry data (the coarse, simplified one).
But when you say that you broke a large scene into ‘many small pieces’, then it’s not clear what that means. When you now have, say 1000 tilesets, and each of them contains 5 MB geometry data in its root node, and you try to load them all at once, then this would mean that you’d have to load 5 GB of data to even see the first, coarse geometry…
Properly structuring large data sets for efficient streaming is not entirely trivial. So just to get a better idea, can you give a few rough numbers, about how many tilesets you merged, and how large each of them is?
(BTW: I assume that you merged the JSON files with the 3d-tiles-tools
, namely the merge
or mergeJson
functions - is that correct? And I’m also curious how you did split the original data into pieces. Cesium ion should be able to process pretty large models, so maybe some of the trouble could be avoided by uploading the data to Cesium ion and rely on its capabilities to create a good, efficient, well-structured tileset to begin with)
Hello, Marco13
In Reality Capture, I recreate a real-life scene using photos taken by a drone. However, due to the large size of this scenario, the program will crash due to lack of memory during the rebuild process. So I used a scripting tool to break it down into a lot of chunks, and you can refer to https://www.youtube.com/watch?v=utvCIyQs44M&t=352s about the use of this tool.
Each block is exported as a separate 3dtileset, which contains a root JSON file and some sub-JSON files. But there are 60 such 3dtilesets, so I need to merge them into a single root json file, like assembling branches on a stump to form a new big tree. I achieved this by using 3d-tiles-tools, GitHub - CesiumGS/3d-tiles-tools
In the end, I was able to adjust 'maximumScreenSpaceError: 'to achieve the desired effect
Does this mean that the issue itself is resolved now?
What the 3d-tiles-tools
merge
function is doing is very simple: It is just taking the given tilesets and creates a new top-level tileset JSON. And creating a top-level tileset JSON that has 60 (!) child nodes could already cause trouble: When trying to load this, then CesiumJS will have to request all these 60 tilesets at once, and load (at least) the root node of all these tilesets at once. It might still be OK, but probably not ideal.
Beyond that, there are many degrees of freedom, even in this simple step (but the details would already depend on the exact tilesets and their structure)