How to create tilesets.json

2,428 views
Skip to first unread message

hell...@gmail.com

unread,
Jun 9, 2017, 3:21:26 PM6/9/17
to cesium-dev
Do we have to create the tilesets.json manually by ourselves or is there any tool or templates can help to generate this file?

I am currently exploring on the Miami city sample data from CyberCity3D. I downloaded the Collada data and convert it to .glb, then convert it to .b3dm by 3d-tiles-tools. Now I have the .b3dm data, how can I use it?

Is there any recommended 3d building data sources which are already satisfied Cesium 3d requirements? Maybe some data source already has the tileset.json and b3dm files.

Does Cesium 3d tiles currently only support tilesets.json and .b3dm files data structure now? Or is there any other data format I can use in Cesium 3d tiles? Or I have always to find .dea or .obj data sources then convert them to .glb then .b3dm and manually write the tilesets.json file?

Thanks!

Sean Lilley

unread,
Jun 9, 2017, 8:18:34 PM6/9/17
to cesium-dev, hell...@gmail.com
For just showing a single tile like the Miama sample data you can grab one of the tilesets in the cesium repo, like this one: https://github.com/AnalyticalGraphicsInc/cesium/blob/3d-tiles/Specs/Data/Cesium3DTiles/Batched/BatchedWithTransformSphere/tileset.json.

You will need to adjust the transform to have it centered at Miami. In Cesium you can do this with the following code, just replace longitude, latitude, and height to the desired values.

tileset._root.transform = Cesium.Transforms.headingPitchRollToFixedFrame(Cesium.Cartesian3.fromRadians(longitude, latitude, height), new Cesium.HeadingPitchRoll());

To answer your other question, the 3D Tiles "model" format will continue to be just b3dm with the glb embedded. Until more tools are available manually creating the tileset.json file is how it needs to be done.
Message has been deleted
Message has been deleted
Message has been deleted

hell...@gmail.com

unread,
Jun 12, 2017, 10:05:04 AM6/12/17
to cesium-dev, hell...@gmail.com
Hi Sean,
I used the tileset.json file you recommended and changed the .b3dm url in that json file to my b3md file. But when I tried to do the "transform" function, I got an error said "Cannot set property 'transform' of undefined". Any idea?
BTW, why I cannot do something like this:

tileset.readyPromise.then(function(tileset) {
viewer.camera.viewBoundingSphere(tileset.boundingSphere, new Cesium.HeadingPitchRange(0, -0.5, 0));
viewer.camera.lookAtTransform(Cesium.Matrix4.IDENTITY);
});

This piece of code works well for data in 3d-tiles-samples data and the NYC data, but not for the Miami data.

Sean Lilley

unread,
Jun 12, 2017, 6:55:52 PM6/12/17
to cesium-dev, hell...@gmail.com
Oh I see where this might cause problems. So instead, delete the transform property from the tileset.json, and set the tileset's modelMatrix instead. Something like:

tileset.readyPromise.then(function(tileset) {
    tileset
.modelMatrix = Cesium.Transforms.headingPitchRollToFixedFrame(Cesium.Cartesian3.fromRadians(longitude, latitude, height), new Cesium.HeadingPitchRoll());

    viewer
.camera.viewBoundingSphere(tileset.boundingSphere, new Cesium.HeadingPitchRange(0, -0.5, 0));
    viewer
.camera.lookAtTransform(Cesium.Matrix4.IDENTITY);
});

hell...@gmail.com

unread,
Jun 13, 2017, 3:18:13 PM6/13/17
to cesium-dev, hell...@gmail.com
It works. Thanks!

Angarika Das

unread,
Jun 6, 2018, 6:13:47 AM6/6/18
to cesium-dev
hello zxue!
could you kindly tell me the steps to convert collada data to .b3dm? or to convert .glb data to .b3dm
it would be of great help!
thanking you,

with regards,
angarika das 

Zhaokun Xue

unread,
Jun 6, 2018, 10:51:26 AM6/6/18
to cesiu...@googlegroups.com

--
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/CLHWskikADQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cesium-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Best,
Zhaokun

Angarika Das

unread,
Jun 7, 2018, 12:09:33 AM6/7/18
to cesiu...@googlegroups.com
Thank you!
Also, could u help me in this?

Actually, I am trying to create a 3d city using the 3d tiles just like the new york 3d city example given in cesium. Could you please tell me what to do in order to create the 3d tiles for the 3d city in cesium.

looking forward to your reply!
here is the demo link of what i am trying to create- http://cesiumjs.org/NewYork

with regards,
Angarika Das


To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Best,
Zhaokun

--
You received this message because you are subscribed to the Google Groups "cesium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages