Performance of loading large 3d tiles model

1. A concise explanation of the problem you’re experiencing.
Hi all, Now I need to load a big 3dtiles file(200g+). There are 1,000+ tileset json files and 1,000,000+ b3dm files.
When I open it in browser, the memory increases gradually, fps is very low, and the webpage crashes at last. So I wonder
(1) Are there any problems in the creation of these tiles probably and obviously? It is not my job… But it is better to give me some ideas.
(2) Although we could optimizate these tiles and make them smaller, we will use larger data in the future. Except for maximumScreenSpaceError and maximumMemoryUsage, are there any other helpful params or ways to render faster and stably?

directory of data
dir

another smaller data of the same type , a lot of commands?

2. A minimal code example. If you’ve found a bug, this helps us reproduce and repair it.

var tileset = viewer.scene.primitives.add(
        new Cesium.Cesium3DTileset({
          url, // big b3dm data, a commercial project, upload prohibited
          maximumScreenSpaceError: 256, // set a big number for test, faster but rough
          maximumMemoryUsage: 4096,
          skipLevelOfDetail: true,
          preferLeaves: true,
        })
)

3. Context. Why do you need to do this? We might know a better way to accomplish your goal.
We need to show our big b3dm model after massive photos reconstruction.

4. The Cesium version you’re using, your operating system and browser.
1.71, windows 10, Chrome 92.0.45

Thanks all for any help given~ :grinning_face_with_smiling_eyes:

@helloFriday

Welcome to the community! Thank you for providing so many details in your first post :rocket: :grinning:

You are clearly working with a significant amount of data! Just so I am clear, are you currently using Cesium ion to tile and stream your data? If so, how exactly are you uploading this data to Cesium ion?

maxiumumScreenSpaceError and maxiumumMemoryUsage are often the best tools to use when optimizing render speed and general stability. The code that you shared looks fine. The parameters that you are using for maxiumumScreenSpaceError and maxiumumMemoryUsage seem reasonable. Have you experimented with changing preferLeaves?

Let me know if you have any other questions or concerns. I am looking forward to learning more!

-Sam

I have the same problem. Have you solved it now

1 Like

Not yet…I am still in trouble. Do u have any good idea

Hi Sam,
Thanks for the reply! :grinning_face_with_smiling_eyes: I don’t use Cesium ion. It is a local model on my computer. PreferLeaves could help me show the model faster.

In fact, high memory consumption is my biggest problem. I couldn’t show this large model successfully because of js heap out of memory error.
I wanna know how could I reduce memory consumption of Cesium?

For example, in Chrome memory panel, a variable called Cesium3DTile is too big. its length equals the total number of my b3dm files. I know it may help to search for nodes. But when the page tries to load the 200g+ model, js memory runs out easily and the page crashes.

p.s. It is a electron project.

another smaller data of the same type

@heyFriday

Thank you for the update. To be candid, I have never encountered this issue before. 200g models are extremely large and may have limited support across platforms even if you can optimize them for computer web browsers. Have you tried uploading your data to Cesium ion and streaming it to CesiumJS? I recommend giving this a try. If it does not resolve your issue, it will still allow us to see how exactly your data is being processed. This information can help us find a robust solution moving forward. In the meantime, input from the community would be welcomed! It’s possible that other community members have dealt with similar issues in the past.

-Sam

@heyFriday
How did you create the 3d tiles?
Two potential problems spring to mind:

  • The tileset.json file is not set up correclt. It looks to me like CesiumJS is loading ALL the 3d tiles at once which is not right.
  • You don’t have proper LODs created, and all the b3dm files get loaded at the root level of the tileset.json

Can you share just the `tileset.json’ file on this forum? We might be able to figure out more if we see that file.

Correct me if I’m wrong @sam.rothstein but with a correcly set up ‘tileset.json’ CesiumJS should only load a few tiles when you’re zoomed out. The tiles at the highest LOD level, which are not very big.

1 Like

@Adrian_Onsen

Thank you for adding this here! Your suggestions/questions are perfect. @heyFriday I am looking forward to hearing your thoughts.

-Sam

Thanks a lot~ :smiley_cat:

What you said makes sense. It is our work direction too. On the one hand, we viewed the source code of CeisumJS, and my colleagues are trying to optimize the tileset.json files. The model has a lot of tileset.json files. Actually in our project, CesiumJS doesn’t load all 3d tiles at once but creates all Cesium3dTile objects. This is our problem. Now optimization work continues. No results yet. I will update soon if there are any developments. And I will upload the files if needed.

On the other hand, for frontend, I upgrade our Electron (it is too old…). V8 engine 8.0 reduces heap greatly, so the memory reduces. At the same time I use --max-old-space-size=xxx to increase the memory limit for Node.js. Now it can load the model successfully at least.

1 Like

Hello, I have the same problem, how do you solve it? :grinning_face_with_smiling_eyes:

@chenwwsdo

This seems to an important component of the solution.

Please read the entirety of this thread for more details. Let me know if you have any other question or comments!

-Sam

New Progress: :grinning:
We didn’t upgrade our Electron finally. Because we find that V8 8.0 puts a 4GB maximum on the heap size.

New Progress: :grinning:
The most important work is model simplification.
e.g. Faster and Smaller 3D Tiles with WebP Image Compression – Cesium

@helloFriday have you considered converting the texture of the b3dm models to KTX 2.0 image format?

The main advantage is that the textures remain compressed while in GPU memory. meaning more tiles can be loaded with the same amount of memory.