3D tiles testing

Hi Cesium team,

I’ve been used Cesium for a while and really love it. Though I do have one question for quite sometime: how to present 3D data (in quad-tree dae formats) on Cesium with LOD ?

Is 3D tiles could be best for the task or Quadtree Primitives could do the job ? As a web developer, I have quite limited knowledge on 3D, so I would really appreciate if someone could kindly elaborate with simple examples.

I’ve tried the Cesium/3d-tiles branch but didn’t see any 3d tiles examples.

Understood 3D tiles is in developing so unstable is ok for us.



The 3D Tiles tiles specification and implementation will eventually supersede the QuadTreePrimitive, but that probably won’t happen for a while. Both can be used for quad-tree LOD visualization.

Cesium doesn’t support dae files directly for a variety of reasons and instead uses glTF, which is the new Khronos standard for runtime model formats (particularly on the web). So you’ll need to convert your data either way.

QuadTreePrimitive is marked private and is not officially supported as part of the public API. It will eventually change or go away in the future. That being said, many users have had success using it in their application (search the forum for more info). Any approach using the QuadTreePrimitive will have involve converting your individual models to glTF and loading them whenever they tile they are in is needed. Depending on the size and complexity of your model as well as the number of models per tile, this may or may not perform well for you.

3D Tiles are in heavy development, the NYC demo (http://cesiumjs.org/NewYork/) links to sample data which you can serve locally. There is a Cities Sandcastle example that can be used to load it in the 3D-Tiles branch. Because of the nature of 3D tiles, performance will be much better than the QuadTreePrimitive approach, but you’ll need to write code to create the tiles yourself since no public pipeline is yet available.

If you want something that “just works” your best bet is to wait for 3D tiles to be ready. However, if you want something sooner, you may want to try and create your own 3D Tiles from your dae files and use the branch. This will be more future-proof than building on QuadTreePrimitive. See this blog post for more info on the tiles spec: http://cesiumjs.org/2015/08/10/Introducing-3D-Tiles/

Hi Matthew,

Thank you for such a clear explanation.

QuadTreePrimitive : I have no problem to convert dae to glTF as I used glTF in cesium. But even I’ve search through forums, I still don’t get how to “loading them whenever they tile they are in is needed.” Assume a simple building model with 4 glTF tiles at LOD 1, and 16 glTF tiles at LOD 2 (in fact, we get quadtree dae files from acute3D with some LOD meta info), how to use QuadTreePrimitive to achieve LOD ?

3D Tiles: I’ve read the articles and download the branch. I understand the concepts, like metadata and b3dm. But is there any tool can build the b3dm? I saw examples on the 3d-tiles repo but they are concepts and tiles.json files only.

I got the overall concepts but a bit lost when in actual implementation. Really appreciate if you could provide a bit more guide.



Sorry, but I personally don’t have much more info for you.

Using the QuadTreePrimitive at this point involves reading the code and doc starting at https://github.com/AnalyticalGraphicsInc/cesium/blob/master/Source/Scene/QuadtreePrimitive.js, we don’t have any good explanations or examples because it’s not part of the official API. Perhaps others that have used it can chime in with examples or help.

3D Tiles don’t have any public tools for creating b3dm yet, you would have to write a tool to do it yourself from the spec. I believe some people on the forum have done this, but I don’t remember who. Perhaps they can chime in if they read this.

Doing what you want right now is not for the faint of heart and for most people it’s probably a good idea to juts wait for 3D tiles to be closer to end-user ready.

Thanks anyway, I'll go try and maybe comeback with more specific question.

Hello Narco,

perhaps you can take a look at the following solution.

we created a json file like this, with links to the tiled bgltf files.


We then implemented a webworker to decide which gltf to load or unload.

This is an implementation from the time, when we first started with cesium and it is just a proof of concept, but maybe you can use it.

But you should checkout the 3D-Tiles Specification and the 3D-Tiles Cesium branch. We are getting really good results with visualizing whole city models with it.


Hi Jannes,

Thank you very much for the help! I’ll check it out.



Is it just me, or are there no 3D tiles showing up in your demo link? Everything looks rather flat.


Hi Sai Asuka,

i just tested the link with chrome and it is working. The demo will only start loading buildings if you move the camera.

Also its just our first test with cesium and we are now using 3D tiles which work much better.

Hi Jannes,

I get the overall idea of the streaming demo. I’ve learnt many and it’s really cool.

In my case, we have less tiles but with 3 LOD levels to load. Am I right to say, “scene.globe._surface._tilesToRender” can be used to determine the level of the model to render ?

I’m actually working on the 3D tiles but kinda struggling building the b3dm file. Can I ask 2 questions regard it :

  1. I can create the bglTF using the online converter. But when I use your offline converter (which I appreciate a lot), i encountered "Cannot get property ‘parentFile’ on null object" when at 1%, do u have any idea ?

  2. When I try to build the b3dm file, what is the “vertex” refers to in the “BatchTable” section, and how should I add the bglTF to it ? ( just append ? ) if I have just 1 model for this b3dm, do I still need “BatchTable” section ?

Thank you so much for the help.



Hello Narco,

I am not sure what you mean at your point 1.) which tool did you try to use ?

And for B3DM, i don’t think it’s that easy. We did the following steps to create a B3DM Dataset.

  • extend the gltf json code to also include a batchID attribute, where you have a batchId for each vertex. You assign the same batchID to the same object. So if you have two buildings in one b3dm tile, all vertexes of the first building get the batchID “0” and all vertexes of the second building get the batchID “1”.

  • create a bgltf file for this gltf

  • add a b3dm wrapper around the bgltf and create a batchTable as described here: https://github.com/AnalyticalGraphicsInc/3d-tiles/blob/master/b3dm/README.md

you can checkout the following finished b3dm tile. You can extract the gltf json code at the start and end of the file.


Hi Jannes,

For my previous point 1, I’m using colladaToBglTFConverter on Windows, but it fails to convert the dae with error : "Cannot get property ‘parentFile’ on null object" when at 1% progress.

For B3DM, I understand the “Batch Table” in the b3dm wrapper, but a bit lost on how to add “batchID” to each vertex as I didn’t see “vertex” attribute in my gltf file. (cos in our case, we have few models 5-50, but each are with 10000+ vertices). Could you kindly elaborate a bit more, maybe with 1 simple example ? Or is it possible to share one gltf (before and after extend) you used in the 6820.b3dm ?

Sorry I’m asking so many as I’m not very familiar with 3D. Thank you so much for your kind help.



  • show quoted text -

Hi! I face similar problems as Narco, as I have converted my 3-D models to .bgltf files and what I want to do is create a tileset with three levels of detail (I have 3 files (LOD1,2,3) bgltf for each building). Since, as Narco says, changing attributes in the .bgltf files will be very complicated, I was thinking that in my case I may use a B3DM file with only batchSize=1, and thus can hopefully avoid changes in .bgltf files. Do you think this is possible? It would be even better if I could completely avoid B3DM in my case (e.g. use directly the .bgltf file), but as I see this is not possible at this stage.

Then, I also thought about using one single bbox for each building and have LOD1 file to replace by LOD2 file and then by LOD3 file depending on the "geometric error" (which I guess I can try to adjust arbitrarily). Do you think that this will work? (maybe somebody can suggest a sample structure for this in "tiles.json")?

Last but not least: Is the "time dimension" somehow supported in 3-D tiles(currently or in the future)? (e.g. as the "availability" field in CZML?)


FYI - I encountered that exact error when using a relative paths for i/o params (linux).
Absolute paths got me on to my next hurdle :slight_smile:


Matthew, you wrote earlier: “3D Tiles are in heavy development, the NYC demo (http://cesiumjs.org/NewYork/) links to sample data which you can serve locally.”

The NYC demo is indeed working amazingly (oh my, dat speed!), but I cannot find any sample data linked where I could download the b3dm files. It would be nice to download the whole folder structure, without that I don’t think I could serve it locally.

Moreover, if I paste the tiles.json url used there directly in the browser, an error message is received:


"code": "InvalidCredentials",
"message": "No authorization token was found"




  1. október 30., péntek 4:55:15 UTC+1 időpontban daniel...@gmail.com a következőt írta:

Hi Gergley, along the bottom of the screen, as part of the credits, there is a link titles “Download this 3D Tiles tileset” which leads to a zip file of the full data set.

The dataset actually needs to be updated again due to recent changes in the 3D Tiles branch, so I’m not sure if it works at HEAD but you can give it a try. Updating to the latest 3D Tiles features is on my to-do list, probably sometime in Dec.

Hello Matthew,

Thanks for the info. I managed to download the dataset with no problem. However, the content of tiles.json seems gibberish to me. Could you please check whether the tiles.json is valid or not?

Thanks a lot!



Hi Jannes,

did you create the json files manually (by adding the path field in the original json file that was obtained after the conversion of the citygml files to collada/kml format using the importer-exporter tool ), or did you implement a tool that converts the original .kml files to the JSON format?
I have now the bglTF files but I didn't understand how to create the Json files that maps them to their coordinates.

Best regards