# How to create b3dm models and render on Cesium globe

**URL:** <https://community.cesium.com/t/how-to-create-b3dm-models-and-render-on-cesium-globe/3228>\
**Category:** CesiumJS\
**Created:** [October 27, 2015, 8:49am UTC](https://community.cesium.com/t/how-to-create-b3dm-models-and-render-on-cesium-globe/3228 "2015-10-27T08:49:13Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![Parthesh](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/parthesh/32/6572_2.png) [@Parthesh](https://community.cesium.com/u/Parthesh)\
**Post date:** [October 27, 2015, 8:49am UTC](https://community.cesium.com/t/how-to-create-b3dm-models-and-render-on-cesium-globe/3228/1 "2015-10-27T08:49:13Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![patrick](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/patrick/32/2045_2.png) [@patrick](https://community.cesium.com/u/patrick)\
**Post date:** [October 28, 2015, 11:46am UTC](https://community.cesium.com/t/how-to-create-b3dm-models-and-render-on-cesium-globe/3228/2 "2015-10-28T11:46:09Z")

</div>

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](https://groups.google.com/forum/#!topic/cesium-dev/tCCooBxpZFU) for the latest news.

Patrick

---

<div class="post-metadata">

**Author:** ![jbo023](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/jbo023/32/2777_2.png) [@jbo023](https://community.cesium.com/u/jbo023)\
**Post date:** [October 28, 2015, 1:00pm UTC](https://community.cesium.com/t/how-to-create-b3dm-models-and-render-on-cesium-globe/3228/3 "2015-10-28T13:00:17Z")

</div>

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](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](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](http://hosting.virtualcitysystems.de/demos/intergeo/berlin/berlin_untextured/output/15/35156/6836.b3dm)

Jannes

---

<div class="post-metadata">

**Author:** ![Parthesh](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/parthesh/32/6572_2.png) [@Parthesh](https://community.cesium.com/u/Parthesh)\
**Post date:** [October 29, 2015, 7:13am UTC](https://community.cesium.com/t/how-to-create-b3dm-models-and-render-on-cesium-globe/3228/4 "2015-10-29T07:13:04Z")

</div>

Thank you very much Jannes, I’ll try.

---

<div class="post-metadata">

**Author:** ![Gergely\_Padanyi-Guly](https://avatars.discourse-cdn.com/v4/letter/g/cab0a1/32.png) [@Gergely\_Padanyi-Guly](https://community.cesium.com/u/Gergely_Padanyi-Guly)\
**Post date:** [November 17, 2015, 1:26pm UTC](https://community.cesium.com/t/how-to-create-b3dm-models-and-render-on-cesium-globe/3228/5 "2015-11-17T13:26:44Z")

</div>

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](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

 ![b3dm.jpg](https://global.discourse-cdn.com/cesium/original/2X/f/f0b8af7298ef6771cdad686928fa1f1efb00bb2f.jpeg)

---

<div class="post-metadata">

**Author:** ![jbo023](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/jbo023/32/2777_2.png) [@jbo023](https://community.cesium.com/u/jbo023)\
**Post date:** [November 17, 2015, 8:02pm UTC](https://community.cesium.com/t/how-to-create-b3dm-models-and-render-on-cesium-globe/3228/6 "2015-11-17T20:02:44Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Gergely\_Padanyi-Guly](https://avatars.discourse-cdn.com/v4/letter/g/cab0a1/32.png) [@Gergely\_Padanyi-Guly](https://community.cesium.com/u/Gergely_Padanyi-Guly)\
**Post date:** [November 17, 2015, 9:42pm UTC](https://community.cesium.com/t/how-to-create-b3dm-models-and-render-on-cesium-globe/3228/7 "2015-11-17T21:42:25Z")

</div>

Hello Jannes,

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

Best,  
Gergely

---

<div class="post-metadata">

**Author:** ![jbo023](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/jbo023/32/2777_2.png) [@jbo023](https://community.cesium.com/u/jbo023)\
**Post date:** [November 24, 2015, 2:58pm UTC](https://community.cesium.com/t/how-to-create-b3dm-models-and-render-on-cesium-globe/3228/8 "2015-11-24T14:58:28Z")

</div>

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](http://hosting.virtualcitysystems.de/demos/release/data/buildings/berlin_notex_toplevel/tiles.json)

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

Best,

Jannes

---

<div class="post-metadata">

**Author:** ![Gergely\_Padanyi-Guly](https://avatars.discourse-cdn.com/v4/letter/g/cab0a1/32.png) [@Gergely\_Padanyi-Guly](https://community.cesium.com/u/Gergely_Padanyi-Guly)\
**Post date:** [November 25, 2015, 8:29am UTC](https://community.cesium.com/t/how-to-create-b3dm-models-and-render-on-cesium-globe/3228/9 "2015-11-25T08:29:17Z")

</div>

Hello Jannes,

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

Best,

Gergely

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

---

<div class="post-metadata">

**Author:** ![Gergely\_Padanyi-Guly](https://avatars.discourse-cdn.com/v4/letter/g/cab0a1/32.png) [@Gergely\_Padanyi-Guly](https://community.cesium.com/u/Gergely_Padanyi-Guly)\
**Post date:** [November 25, 2015, 8:54am UTC](https://community.cesium.com/t/how-to-create-b3dm-models-and-render-on-cesium-globe/3228/10 "2015-11-25T08:54:28Z")

</div>

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](http://assets.agi.com/stk-terrain/world)") it seems to be covering most of the buildings.

Best,

Gergely

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

---

<div class="post-metadata">

**Author:** ![Parthesh](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/parthesh/32/6572_2.png) [@Parthesh](https://community.cesium.com/u/Parthesh)\
**Post date:** [November 25, 2015, 9:35am UTC](https://community.cesium.com/t/how-to-create-b3dm-models-and-render-on-cesium-globe/3228/11 "2015-11-25T09:35:29Z")

</div>

Hey Gergely,

Can you kindly show the link for the 3D tiles working branch, because this link ([https://github.com/AnalyticalGraphicsInc/3d-tiles](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

---

<div class="post-metadata">

**Author:** ![Gergely\_Padanyi-Guly](https://avatars.discourse-cdn.com/v4/letter/g/cab0a1/32.png) [@Gergely\_Padanyi-Guly](https://community.cesium.com/u/Gergely_Padanyi-Guly)\
**Post date:** [November 25, 2015, 9:46am UTC](https://community.cesium.com/t/how-to-create-b3dm-models-and-render-on-cesium-globe/3228/12 "2015-11-25T09:46:30Z")

</div>

There is no 3d-tiles repository. It is a branch in the official cesium repository.  
Go to [https://github.com/AnalyticalGraphicsInc/cesium](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:

```auto
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](mailto:partheshbulbule@gmail.com) ezt írta (időpont: 2015. nov. 25., Sze, 10:35):

---

<div class="post-metadata">

**Author:** ![shrikant1](https://avatars.discourse-cdn.com/v4/letter/s/eb8c5e/32.png) [@shrikant1](https://community.cesium.com/u/shrikant1)\
**Post date:** [November 17, 2016, 7:22am UTC](https://community.cesium.com/t/how-to-create-b3dm-models-and-render-on-cesium-globe/3228/13 "2016-11-17T07:22:46Z")

</div>

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({  
&nbsp;&nbsp;&nbsp;&nbsp;url : url  
}));

---

<div class="post-metadata">

**Author:** ![Gergely\_Padanyi-Guly](https://avatars.discourse-cdn.com/v4/letter/g/cab0a1/32.png) [@Gergely\_Padanyi-Guly](https://community.cesium.com/u/Gergely_Padanyi-Guly)\
**Post date:** [November 17, 2016, 4:49pm UTC](https://community.cesium.com/t/how-to-create-b3dm-models-and-render-on-cesium-globe/3228/14 "2016-11-17T16:49:53Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![liangsheng4](https://avatars.discourse-cdn.com/v4/letter/l/e56c9b/32.png) [@liangsheng4](https://community.cesium.com/u/liangsheng4)\
**Post date:** [December 22, 2016, 2:11am UTC](https://community.cesium.com/t/how-to-create-b3dm-models-and-render-on-cesium-globe/3228/15 "2016-12-22T02:11:19Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Lucas\_Silvestre](https://avatars.discourse-cdn.com/v4/letter/l/3e96dc/32.png) [@Lucas\_Silvestre](https://community.cesium.com/u/Lucas_Silvestre)\
**Post date:** [March 21, 2017, 3:05pm UTC](https://community.cesium.com/t/how-to-create-b3dm-models-and-render-on-cesium-globe/3228/16 "2017-03-21T15:05:41Z")

</div>

I can't get it working either.

Am I missing something?

---

<div class="post-metadata">

**Author:** ![sean\_lilley](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/sean_lilley/32/2083_2.png) [@sean\_lilley](https://community.cesium.com/u/sean_lilley)\
**Post date:** [April 4, 2017, 12:25am UTC](https://community.cesium.com/t/how-to-create-b3dm-models-and-render-on-cesium-globe/3228/17 "2017-04-04T00:25:21Z")

</div>

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](https://cesiumjs.org/NewYork/3DTiles).

The Berlin tileset linked above is down.

---

<div class="post-metadata">

**Author:** ![Arup\_Roy](https://avatars.discourse-cdn.com/v4/letter/a/dc4da7/32.png) [@Arup\_Roy](https://community.cesium.com/u/Arup_Roy)\
**Post date:** [June 15, 2018, 7:35am UTC](https://community.cesium.com/t/how-to-create-b3dm-models-and-render-on-cesium-globe/3228/18 "2018-06-15T07:35:18Z")

</div>

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.
