3D tileset rendering and positioning problems

Hello Cesium team,

i have been using Cesium for a while now, and 2 days ago i decided it was time to move toward 3D tiles with the desire to gain more flexibility and fastness.

However, i am experiencing two main problems when rendering my tileset.json using cesium 3d tiles, and before jumping right into the problem, let me explain the process i did here:

-i converted both my .dae and .gml to Cesium 3D tiles using FME 2017.1. I wanted to give FME a try in order to have a working tileset quickly and easy. Well, that is what i thought in the first place ;).

-Now that i had 2 tileset.json for both my dae and gml files, i pushed those files over my node server in order to render them on Cesium. If you wonder why i used both .dae and .gml, it is because I wanted to try the conversion from 2 different data format.

-Once rendered, I got some warnings in the chrome console about using an old gltf version, so i used the 3d-tileset-tools to update my embed gltf files inside my .b3dm, which removed most of the warnings i had inside the console.

So here are my problems:

1- The buildings geometry are deformed. For example, instead of having squared geometries, mine are more of diamond shape. Which is wierd, because my original building geometries are fine and are not deformed.

2- My buildings are currently positioned in Antartica, however… as you know it doesn’t make sense ;).

I did some math and found out my latitude and longitude are inversed. I do not know why, the coordinates of my original dataset (.dae and/or .gml) look fine.

Here is a dropbox link containing all my data (including tileset.json for both my .dae and .gml files, and the original .dae and gml files) and screenshots showing the problems.

https://www.dropbox.com/sh/2rjvkzebidgccd2/AADhFDl25-jDqv9uWa4feOtxa?dl=0

I would appreciate a hand with this, i already spend alot of time trying to understand and figure out what is going here.

Any tips or help is welcome!

2. A minimal code example. If you’ve found a bug, this helps us reproduce and repair it.

From cesium samples. The url points to my data located on the node.js server. Nothing special here.

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

shadows : true

});

viewer.extend(Cesium.viewerCesium3DTilesInspectorMixin);

var inspectorViewModel = viewer.cesium3DTilesInspector.viewModel;

var scene = viewer.scene;

scene.fog.enabled = false;

var annotations = scene.primitives.add(new Cesium.LabelCollection());

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

url : ‘data’

}));

tileset.readyPromise.then(function(tileset) {

viewer.camera.viewBoundingSphere(tileset.boundingSphere, new Cesium.HeadingPitchRange(0, -0.5, 0));

viewer.camera.lookAtTransform(Cesium.Matrix4.IDENTITY);

});

console.log(tileset);

3. Context. Why do you need to do this? We might know a better way to accomplish your goal.

I wish to render my buildings on the web using Cesium and Cesium 3d tiles, a classic need ;).

4. The Cesium version you’re using, your operating system and browser.

Cesium 1.39, Windows 10 64-bit and Chrome (Version 62.0.3202.94 (Official Build) (64-bit))

Thank alot in advance,

waiting to hearing from you asap.

Fred

Hi Fred

We were able to convert your CityGML data. The models look pretty good.

I’ve attached the zip file with the 3D Tileset.

The CityGML models have a base elevation associated. So they don’t seem to be sitting on the ellipsoid as is. This is the “Tileset-0”.

I added a second tileset (“Tileset-1”), where the base elevation was forced to 0 and these will be on the ellipsoid.

Let me how it works out for you.

-Shehzan

FredLafrance.zip (1.56 MB)