# Loading B3DM file

**URL:** <https://community.cesium.com/t/loading-b3dm-file/4211>\
**Category:** CesiumJS\
**Created:** [June 8, 2016, 10:36am UTC](https://community.cesium.com/t/loading-b3dm-file/4211 "2016-06-08T10:36:07Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![kredik](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/kredik/32/14000_2.png) [@kredik](https://community.cesium.com/u/kredik)\
**Post date:** [June 8, 2016, 10:36am UTC](https://community.cesium.com/t/loading-b3dm-file/4211/1 "2016-06-08T10:36:07Z")

</div>

Hi,

I did some progresses generating 3D models in GLTF/GLB :I can generate and load .gltf files (with external .bin file) and .glb files (with/without batch ids).

Now I have a first implementation of B3DM format and I would like to test loading tiles directly (ie. not via a Tileset definition) in Cesium.

It seems that’s not possible to load a such file using something like :

var model = scene.primitives.add(Cesium.Model.fromGltf({

url : ‘data/hanoi\_ext.b3dm’

}));

How can I load a B3DM files into Cesium ?

Should I use another branch than the trunk one ?

Kr,

Fred.

---

<div class="post-metadata">

**Author:** ![hannah](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/hannah/32/4509_2.png) [@hannah](https://community.cesium.com/u/hannah)\
**Post date:** [June 8, 2016, 1:43pm UTC](https://community.cesium.com/t/loading-b3dm-file/4211/2 "2016-06-08T13:43:58Z")

</div>

Hello,

3D Tiles is still being implemented in a branch: [https://github.com/AnalyticalGraphicsInc/cesium/tree/3d-tiles](https://github.com/AnalyticalGraphicsInc/cesium/tree/3d-tiles)

If you haven’t seen it already, take a look at this forum post for more information about 3D tiles: [https://groups.google.com/forum/?hl=en#!searchin/cesium-dev/3D$20tiles/cesium-dev/tCCooBxpZFU/7hxT\_E4pGgAJ](https://groups.google.com/forum/?hl=en#!searchin/cesium-dev/3D%2420tiles/cesium-dev/tCCooBxpZFU/7hxT_E4pGgAJ)

Best,

Hannah

---

<div class="post-metadata">

**Author:** ![kredik](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/kredik/32/14000_2.png) [@kredik](https://community.cesium.com/u/kredik)\
**Post date:** [June 8, 2016, 3:09pm UTC](https://community.cesium.com/t/loading-b3dm-file/4211/3 "2016-06-08T15:09:29Z")

</div>

Hi Hannah,

thanks, I’ll try this branch.

Do you know if it is possible to load a B3DM file directly, or a Tileset is needed ?

Kr,

Fred.

---

<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:** [June 13, 2016, 1:05pm UTC](https://community.cesium.com/t/loading-b3dm-file/4211/4 "2016-06-13T13:05:22Z")

</div>

Hi Frédéric,

The public Cesium API in the 3d-tiles branch does not expose a way to load just a .b3dm file.

Instead, create a small tileset.json file that points to the .b3dm file as its root tile.

For simple examples, see [https://github.com/AnalyticalGraphicsInc/cesium/tree/3d-tiles/Specs/Data/Cesium3DTiles](https://github.com/AnalyticalGraphicsInc/cesium/tree/3d-tiles/Specs/Data/Cesium3DTiles)

Patrick

---

<div class="post-metadata">

**Author:** ![kredik](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/kredik/32/14000_2.png) [@kredik](https://community.cesium.com/u/kredik)\
**Post date:** [June 14, 2016, 1:21pm UTC](https://community.cesium.com/t/loading-b3dm-file/4211/5 "2016-06-14T13:21:31Z")

</div>

Hi Patrick,  
thanks for your response.

I succeeded to create a Tileset for the whole geodatabase I’m use for test.

I use a kind of adaptive quad tree; node is splitted based on the number of output vertices (superior or not to a user specified max).

Currently, only terminal nodes has attached B3DM.

I’m now thinking to attach data to intermediate nodes (for example selecting tallest/largest buildings of the tile) and then use additive refinement to complete the tile with children content.

What is not clear is the geometric error to use for this intermediate nodes.

Any hints ?

Kr,

Fred.

---

<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:** [June 14, 2016, 1:59pm UTC](https://community.cesium.com/t/loading-b3dm-file/4211/6 "2016-06-14T13:59:48Z")

</div>

Fred - see [this thread](https://groups.google.com/forum/#!searchin/cesium-dev/geometric%2420error/cesium-dev/vu4wFG1vt9k/dEsm766NEQAJ).

Patrick

---

<div class="post-metadata">

**Author:** ![sakina.qureshi11](https://avatars.discourse-cdn.com/v4/letter/s/bcef8e/32.png) [@sakina.qureshi11](https://community.cesium.com/u/sakina.qureshi11)\
**Post date:** [September 21, 2018, 9:41am UTC](https://community.cesium.com/t/loading-b3dm-file/4211/7 "2018-09-21T09:41:24Z")

</div>

Hi Patrick,

I was unable to view the sample examples [https://github.com/AnalyticalGraphicsInc/cesium/tree/3d-tiles/Specs/Data/Cesium3DTiles](https://github.com/AnalyticalGraphicsInc/cesium/tree/3d-tiles/Specs/Data/Cesium3DTiles)

can you help me with the examples if you know any other?

KR,  
Sakina

---

<div class="post-metadata">

**Author:** ![omar](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/omar/32/1999_2.png) [@omar](https://community.cesium.com/u/omar)\
**Post date:** [September 21, 2018, 7:04pm UTC](https://community.cesium.com/t/loading-b3dm-file/4211/8 "2018-09-21T19:04:31Z")

</div>

This should be the new link:

> **[CesiumGS/cesium](https://github.com/CesiumGS/cesium/tree/master/Specs/Data/Cesium3DTiles)**
>
> An open-source JavaScript library for world-class 3D globes and maps :earth\_americas: - CesiumGS/cesium
