3d tiles dataset examples not working

hi all

i appreciate 3d tiles is still work in progress but i cant seem to get the demo data sets to work.

i did the following

1.cloned 3d tile branch

2.build branch

3.deployed the following

var viewer = new Cesium.Viewer(‘cesiumContainer’);

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

//url: ‘http://hosting.virtualcitysystems.de/demos/release/data/buildings/berlin_notex_toplevel/tiles.json’,

url: ‘Data/Cesium3DTiles/Tilesets/Tileset/tileset.json’,

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)

});

``

i tried using

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

``

and

Data/Cesium3DTiles/Tilesets/Tileset/tileset.json

``

but i just see a green field.

what am i expecting to see?

there are no 404s from data set.

any help appreciated.

-lp

Hello,

Please take a look at the 3D Tiles Sandcastle example. Particularly, this code shows you how to add one of the sample data sets: https://github.com/AnalyticalGraphicsInc/cesium/blob/3d-tiles/Apps/Sandcastle/gallery/3D%20Tiles.html#L40-L53

Best,

Hannah

hi hannah

thanks for your response.

Please take a look at the 3D Tiles Sandcastle example. Particularly, this code shows you how to add one of the sample data sets: https://github.com/AnalyticalGraphicsInc/cesium/blob/3d-tiles/Apps/Sandcastle/gallery/3D%20Tiles.html#L40-L53

i tried that sandcastle sample first up but nothing showed either.

i cut and paste the code from the sandcastle and still nothing is displayed besides a green field.

i can see the parent.3dbm being loaded in the network log but nothing is displayed.

is there some obvious that i have missed?

var viewer = new Cesium.Viewer(‘cesiumContainer’, {

scene3DOnly : true

});

var scene = viewer.scene;

var tilesetUrl = ‘Data/Cesium3DTiles/Tilesets/Tileset/’;

var batchedUrl = ‘…/…/…/Specs/Data/Cesium3DTiles/Batched/BatchedWithBatchTable/’;

var instancedUrl = ‘…/…/…/Specs/Data/Cesium3DTiles/Instanced/InstancedWithBatchTable/’;

var compositeUrl = ‘…/…/…/Specs/Data/Cesium3DTiles/Composite/Composite/’;

var pointsUrl = ‘…/…/…/Specs/Data/Cesium3DTiles/Points/Points/’;

//url: ‘http://hosting.virtualcitysystems.de/demos/release/data/buildings/berlin_notex_toplevel/tiles.json’,

var tileset;

{

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

   url : tilesetUrl,

          show: true

}));

console.log( “ready!” );

Cesium.when(tileset.readyPromise,function(tileset) {

   var boundingBox = tileset._root._boundingVolume;

   var center = Cesium.Rectangle.center(boundingBox.rectangle);

   var height = boundingBox.maximumHeight + 500.0;

   viewer.camera.setView({

       destination : Cesium.Cartes

``

any help appreciated

-lucio

ok it seems the ‘tile sets’ are broken on ‘cesium-3d-tiles’ branch.

i rebuild branch again.

and ran sandcastle.

i only got the ‘batched’ and ‘instanceid’ types to display,

everything else in the 3d tiles doesnt display.

anyone have version that does work for points and tilesets?

thanks

-lp

ok something weird is going on.

the results of the 3d tiles is very intermittent. some times the sandcastle displays then it doesnt.
sometimes my simple 3d tiles displays sometimes not.

is there some timing issues going on?

it never seems to work in firefox. but occasionally in chrome.

any any ideas are most welcome.

regards

Lucio PIccoli

SOLVED:

there are multiple issues that i discovered when using my own http server rather than the server.js supplied.

  1. the encoding type for the b3dm and pnt files need to be ‘gzip’

otherwise nothing is displayed and no error… very very painful.

  1. the example code throws when any bounding geometry is NOT a rectangle. i got no idea how the sandcastle point cloud sphere example actually displays correctly… but it does

hope this helps others.

-lp

Hi Lucio,

I’m glad you figured it out, thanks for sharing what you learned.

The 3d-tiles branch is under heavy development. To stay up-to-date with changes, follow this thread. For example, it mentions that the sample data is gzipped:

“Note that the tile payloads in the repo (e.g., *.b3dm, *.i3dm, etc.) are gzipped.”

There’s also some discussion in #61 on if tiles would always be gzipped (looking like probably not). Feel free to chime in.

Patrick