Hosting Cesium 3D Tiles in node.js server

I have model in cesium 3d tiles format which I want to host on node.js server for viewing in web browser. I currently have cesium 1.32. How do I go about this?

You can use the server.js in 3d-tiles-samples as an example: https://github.com/AnalyticalGraphicsInc/3d-tiles-samples. Cesium’s built-in server.js can also serve 3d tiles files.

Hi there,

First of all, to use 3D Tiles, since our support has not yet been merged into Cesium, you’ll need to use the 3D Tiles branch from the Cesium repository, available here: https://github.com/AnalyticalGraphicsInc/cesium/tree/3d-tiles

To build that branch from source, you can follow our build guide: https://github.com/AnalyticalGraphicsInc/cesium/tree/master/Documentation/Contributors/BuildGuide

Alternatively, you can download a zip of the latest 3D-tiles build. Here is the head of 3d-tiles as of right now: http://cesium-dev.s3-website-us-east-1.amazonaws.com/cesium/3d-tiles/Cesium-1.32.1-3d-tiles21211.zip This is the exact same zip as a real release, just made from the branch.

Once you’re running that version of Cesium and you have your tiles hosted at some/url/tileset.json, adding your tileset to the scene should be as easy as:

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

url : ‘some/url/tileset.json'

}));

Unfortunately, we don’t yet have a really simple 3d-tiles Sandcastle example, but you can take a look at this one for reference: http://cesium-dev.s3-website-us-east-1.amazonaws.com/cesium/3d-tiles/Apps/Sandcastle/index.html?src=3D%20Tiles.html&label=Showcases

Hope that helps!

  • Rachel