Large size 3dtieset

how to upload large size 3d tileset file. When I upload my model to Cesium, I found it was very slow, so is there some methods that can speed up this procedure??

Edited: I may have mixed up the Forum section - not sure why my answer here mentioned Cesium For Unreal - sorry about that

Hello,

If you arelady have the data in the 3D Tiles format as a local file, then you can also access this local file directly with Cesium for Unreal. In order to do this, you can create a Cesium3DTileset to your scene, and in the Cesium section of the Details panel, enter the Url that points to your local file. When your tileset file is

C:\Data\tileset.json

then the Url will have to be

file:///C:/Data/tileset.json

A dedicated Tutorial for this will be available soon.

If you want to upload the tileset to Cesium ion in order to host it and share it with others, and want to know more about the upload in general, then it could make sense to move this question into the Cesium ion section of the forum.

Hello,
I know how to use Cesium3DTileset function. but the problem is : I have a tileset, in the file there several tilesets, the tileset.json like this one :

{
  "asset": {
    "version": "0.0",
    "tilesetVersion": "1.0.0"
  },
  "geometricError": 500,
  "root": {
    "transform": [
      -0.23047541461948556,
      0.9730781485862151,
      0,
      0,
      -0.7721481280024505,
      -0.18288475618076933,
      0.6085560240265573,
      0,
      0.5921725691707507,
      0.14025720195670643,
      0.7935109108392827,
      0,
      3784960.0890795914,
      896475.0129434585,
      5037891.544647394,
      1
    ],
    "boundingVolume": {
      "box": [-3, 8, 41.5, 1020, 0, 0, 0, 950, 0, 0, 0, 43.5]
    },
    "refine": "ADD",
    "geometricError": 500,
    "children": [
      {
        "boundingVolume": {
          "box": [-624, -740, 17, 315, 0, 0, 0, 125, 0, 0, 0, 15]
        },
        "geometricError": 200,
        "refine": "ADD",
        "content": {
          "url": "Batched3850_5818/tileset.json"
        }
      },
      {
        "boundingVolume": {
          "box": [203, -148, 37.5, 575, 0, 0, 0, 550, 0, 0, 0, 38.5]
        },
        "geometricError": 200,
        "refine": "ADD",
        "content": {
          "url": "Batched3860_5819/tileset.json"
        }
      },
      {
        "boundingVolume": {
          "box": [180, -780, 27.5, 525, 0, 0, 0, 200, 0, 0, 0, 26.5]
        },
        "geometricError": 200,
        "refine": "ADD",
        "content": {
          "url": "Batched3860_5818/tileset.json"
        }
      },
      {
        "boundingVolume": {
          "box": [-660, -130, 41, 375, 0, 0, 0, 525, 0, 0, 0, 41]
        },
        "geometricError": 200,
        "refine": "ADD",
        "content": {
          "url": "Batched3850_5819/tileset.json"
        }
      },
      {
        "boundingVolume": {
          "box": [-650, 635, 26, 325, 0, 0, 0, 275, 0, 0, 0, 25]
        },
        "geometricError": 200,
        "refine": "ADD",
        "content": {
          "url": "Batched3850_5820/tileset.json"
        }
      },
      {
        "boundingVolume": {
          "box": [138, 617, 23.5, 525, 0, 0, 0, 300, 0, 0, 0, 23.5]
        },
        "geometricError": 200,
        "refine": "ADD",
        "content": {
          "url": "Batched3860_5820/tileset.json"
        }
      },
      {
        "boundingVolume": {
          "box": [810, 661, 21.5, 220, 0, 0, 0, 295, 0, 0, 0, 20.5]
        },
        "geometricError": 200,
        "refine": "ADD",
        "content": {
          "url": "Batched3870_5820/tileset.json"
        }
      },
      {
        "boundingVolume": {
          "box": [825, -720, 10, 165, 0, 0, 0, 125, 0, 0, 0, 8]
        },
        "geometricError": 200,
        "refine": "ADD",
        "content": {
          "url": "Batched3870_5818/tileset.json"
        }
      },
      {
        "boundingVolume": {
          "box": [825, -100, 33, 200, 0, 0, 0, 525, 0, 0, 0, 31]
        },
        "geometricError": 200,
        "refine": "ADD",
        "content": {
          "url": "Batched3870_5819/tileset.json"
        }
      },
      {
        "boundingVolume": {
          "box": [-3, 8, 41.5, 1020, 0, 0, 0, 950, 0, 0, 0, 43.5]
        },
        "geometricError": 200,
        "refine": "ADD",
        "content": {
          "url": "whole/Batchedwhole/tileset.json"
        }
      }
    ]
  }
}

so when I load this file, it is very slow.
How could I solve this problem? thanks

Sorry, maybe as a clarification: You mentioned

When I upload my model to Cesium, I found it was very slow, so is there some methods that can speed up this procedure??

and I thought that referred to the upload.

When you say that “it is very slow”, do you mean that it takes long to load the tileset into Unreal? Or that is is rendering slowly (i.e. that it has a low frame rate?)

A further question might be: How large is the asset (in terms of the total file size)? If it has a size that can be downloaded reasonably, would it be possible to share this asset, so that others can analyze the performance problem?

Hi @Macro13,

I am also facing same issue, I have two 3d tilesets (1st has size 119mb, 2nd has 946mb). When I am using first one, The performance( is rendering slowly in cesiumjs application) is very down graded. When i am using second one larger(946mb large tileset) then it is showing error (3d tile failed to load). I am new in cesiumjs, I do not know what should be correct size for a 3d tile to use it in cesiumjs. Can you tell me If i want to load 20000 buildings as one tileset in cesiumjs application, how can i do it so performance will not be slow. Also what should be size of tileset?
Your guidance will be great help to me.

Thanks

One of the goals of 3D Tiles in general is to ensure good performance for rendering regardless of the overall size of the tileset. But of course, there are different factors that will affect the actual performance. Just roughly, to give the idea: If that 119MB tileset consists of a single tile that contains all the geometry at once, then this will cause a bad performance. The structure of the tileset must be right in order to achieve a good performance.

It is not clear what the structure of your tileset is (beyond that it is a “Tileset Of Tilesets”), or what could be the reason for the low performance. Can you share further information about how this tileset was created? (Or more specifically: Do you also see the low performance when the data is uploaded and tiled with Cesium ion?)

1 Like

Thank you @Marco13,

My team is using FME to create 3d tileset. I had uploaded 3d tileset in cesium ion and performance was’nt much better. For your reference, i am uploading my tileset file here, so you can check the structure and let me know if there is any way to make it better and will help me to improve my application performance using this 3d tileset.

Thank you
tileset.geojson (133.9 KB)

Here I have changed file format from json to geojson because i was’nt able to upload json file.

It’s hard to tell what might be causing the poor performance here, by just looking at the JSON file. (For example, it might be that the B3DM files contain “too much” data).

A first guess: When you create a Cesium3DTileset, then it has a property maximumScreenSpaceError with a default value of 16. Do you see a noticable difference when increasing this value? (You could try a “very large” value, like 512 to almost certainly see a difference, and then see whether you can achieve a reasonable performance with a value of 32 or so…)

1 Like

Thank you @Macro13,

I have changed the maximumScreenSpaceError value up to 512 and memory Usage up to 8192. But still, I am facing the same issue. Also I increased maximumScreenSpaceError up to 2048 then Buildings are loading but when I am zooming in a bigger building it is giving failed to load error.

Again, without being able to actually test this, there is some guesswork involved, so sorry for the list of questions:

When you say that it causes a "failed to load" error, then I wonder whether there is a problem with the validity of the asset in general. Can you provide further details about the error, e.g. the exact error message that is shown at the console?

You mentioned that you converted the model with FME, and uploaded the result to Cesium ion (and that this didn’t make a difference). Depending on what type of input data you are using: An you try uploading the input data to Cesium ion, and let Cesium ion generate the tileset?

Also, just to get a better idea: The tileset.json seems to refer to B3DM files. Can you give a rough estimate about the size of these files? Basically: What is the maximum and average size of the .b3dm files in the data folder? Just to have a ballpark estimate. If some of them are ~50MB large, then this could be one reason for the problem.

(Finally, I might have to ask questions about the process for generating the tileset with FME. For example, what the configuration options are for generating the data. But at that point, it could make more sense to ask about hints for optimizations of this process in the FME forum/community…)

Thank you @Marco13,
As per your suggestion, I checked the data folder and found there are many b3dm files, those are having max size between 20-30mb. Also, there was a b3dm file that was eating all the gpu memory. I removed that b3dm file and the buildings are getting loaded on map. but When I am rotating buildings or zoom in at max level then getting error

TypeError: Failed to execute ‘shaderSource’ on ‘WebGLRenderingContext’:
parameter 1 is not of type ‘WebGLShader’.

Please let me know, why is this error happening?

Thank you

Removing a certain B3DM file will cause an error when it tries to load this file, but that error should be recoverable (and probably unrelated to the error that you described).

Now, I think that 20-30MB per B3DM is large. Looking at some sandcastle example, one can see that the B3DMs there are usually much smaller than 500KB (!). Are there any configuration options in FME that could allow you to control the maximum size of a tile (in terms of the amount of geometry that is stored in one B3DM?).


Regarding the error that you mentioned: I don’t know the exact reason. There seems to be Failed to execute 'shaderSource' on 'WebGLRenderingContext' · Issue #9825 · CesiumGS/cesium · GitHub that mentions the same error, but apparently, it has not yet been analyzed further. Maybe we can first try to find a solution for the performance issue, and analyze the other one separately.

1 Like

Thank you so much @Macro13,

Our team is working on optimization technique using FME. I hope your suggestions will help them to create desired tileset.

Thanks a lot again

Thank you @Marco13!

@basant1431: FME versions prior 2022.1 do not create multi-leveled tilesets. This issue creates large B3DM files that are rendered poorly. In version 2022.1, the 3d tiles writer is updated, so it creates multi-levels. It has also a slider which let you choose the amount of faces in a seperate tile. Few faces per tile results in many tiles with small sizes (but a larger total dataset), many faces per tile reduces the size of the overall data, but creates tiles over 10 mb.

Example, My original created dataset had an overall size of 450 mb, with 200 tiles (some were over 20 mb). With the default settings of the new writer I have got a dataset of 1.7GB with 8000 tiles (the highest tiles was 300kb).

So upgrading to this new FME version could solve these problems.

@tlonnee , Thank you so much for your valuable reply.