How to create b3dm models and render on Cesium globe

Hello everyone,

        I have started working recently on visualization of 3D city models on Cesium and it is painful that we still don't have a working method to do so. Now I know that people at AGI are working really hard towards developing 3D tiles, but it would be great to know that how in the NewYork example ([http://cesiumjs.org/NewYork/](http://cesiumjs.org/NewYork/)) they were able to create b3dm models and render them on the globe. Although this link ([https://github.com/AnalyticalGraphicsInc/3d-tiles/tree/master/b3dm](https://github.com/AnalyticalGraphicsInc/3d-tiles/tree/master/b3dm))tries to explain but people like me would still be puzzled about what's going on. If someone could simplify it a bit down then it would be quite beneficial to find other ways also for tiling schemes and model rendering.

Thanks
Parthesh B.

Hi Parthesh,

As of now, that link is the best information available. As 3D Tiles progress, more details will come out. We’re still planning to finalize this in the spring. Watch this thread for the latest news.

Patrick

Hi Parthesh,

we can provide another demo dataset from berlin, maybe this will help you.

http://hosting.virtualcitysystems.de/demos/intergeo/berlin/berlin_untextured/output/tiles.json

The buildings are from the Berlin 3D open dataset see http://www.businesslocationcenter.de/en/downloadportal

If you check out single B3DM Files and see the plain text json at the end and start of the file you can maybe arrive at an solution.

http://hosting.virtualcitysystems.de/demos/intergeo/berlin/berlin_untextured/output/15/35156/6836.b3dm

Jannes

Thank you very much Jannes, I’ll try.

I tried what Jannes adviced, managed to load the tiles.json by specifying the url as “http://hosting.virtualcitysystems.de/demos/intergeo/berlin/berlin_untextured/output”.

I zoom to a specific model (15/35208/6832.b3dm) by setting a rectangle to its extent. In the browser I can see the 6832.b3dm file, it is downloaded correctly. But I still can’t see the model itself.

What was I missing? Here is my code:

var viewer = new Cesium.Viewer('cesiumContainer');

var tileset = viewer.scene.primitives.add(new Cesium.Cesium3DTileset({

    url: 'http://hosting.virtualcitysystems.de/demos/intergeo/berlin/berlin_untextured/output',

    show: true

}));

var redRectangle = viewer.entities.add({

    name : 'Red translucent rectangle with outline',

    rectangle : {

        coordinates : Cesium.Rectangle.fromDegrees(13.40483721, 52.46717907, 13.404882244, 52.46724347),

        material : Cesium.Color.RED.withAlpha(0.0),

        outline : true,

        outlineColor : Cesium.Color.RED

    }

});



viewer.flyTo(redRectangle, {

    offset : new Cesium.HeadingPitchRange(Math.PI / 2, -Math.PI / 4, 20)

});

Thanks in advance

Gergely

Hello Gergely,

the dataset does not work with the current Version of the 3d-tiles branch because of some changes in the 3d-tiles Spezifikation.

You can either use an old Version of the branch or wait for some days, we will put an updated version of the dataset online soon.

Best regards
Jannes

Hello Jannes,

Thank you for the information. Can’t wait to try the updated dataset! Keep up the good work.

Best,
Gergely

Hello Gergely,

if you are still interested in an b3dm dataset, we just updated our berlin dataset.

http://hosting.virtualcitysystems.de/demos/release/data/buildings/berlin_notex_toplevel/tiles.json

It should work with the current 3d-Tiles branch.

Best,

Jannes

Hello Jannes,

Thank you so much for the new tiles url. This works like a charm!

Best,

Gergely

jbo023 jbo023@googlemail.com ezt írta (időpont: 2015. nov. 24., K, 15:58):

Hello Jannes,

Just one more question.

What terrainProvider should I use for the Berlin dataset?

If I use the “official” cesium terrainprovider ("//assets.agi.com/stk-terrain/world") it seems to be covering most of the buildings.

Best,

Gergely

jbo023 jbo023@googlemail.com ezt írta (időpont: 2015. nov. 24., K, 15:58):

Hey Gergely,

Can you kindly show the link for the 3D tiles working branch, because this link (https://github.com/AnalyticalGraphicsInc/3d-tiles) has only figures, ppts and json files but no javascript files. I get the error “Cesium.Cesium3DTileset is not a function”.

Thanks
Parthesh

There is no 3d-tiles repository. It is a branch in the official cesium repository.
Go to https://github.com/AnalyticalGraphicsInc/cesium, change the branch to “3d-tiles” that is what you need.

If you wish to clone the repo, this is how you can do it from the command line:

git clone [https://github.com/AnalyticalGraphicsInc/cesium](https://github.com/AnalyticalGraphicsInc/cesium) --branch 3d-tiles --single-branch

Good luck!

Gergely

Parthesh Bulbule partheshbulbule@gmail.com ezt írta (időpont: 2015. nov. 25., Sze, 10:35):

I am trying to implement the 3D output but getting following error

TypeError: Cesium.Cesium3DTileset is not a constructor

I am using Build 1.27. Here is my sample code

var viewer = new Cesium.Viewer('cesiumContainer');

var url = 'output/tileset.json';

var tileset = viewer.scene.primitives.add(new Cesium.Cesium3DTileset({
    url : url
}));

Are you sure you cloned the correct branch? I played around with 3D Tiles quite a while ago, but at the time there was a branch called 3d-tiles. You should clone and build that one instead of the master branch.

Hope that helps.

Fegyi

Does this dataset still work? I can't get it to show anything on the current 3d-tiles branch.

I can't get it working either.

Am I missing something?

The New York tileset was updated somewhat recently and I just tested that it works fine on the 3d-tiles branch. The tileset can be loaded with the url https://cesiumjs.org/NewYork/3DTiles.

The Berlin tileset linked above is down.

please anyone tell me how to create a B3DM file only for particular region ?

like in the gltf we can make a objects(buildings) using sketchup tool .

like a same way how can I make this objects and create a b3dm file of the particular region .

please help.