3D Tiles rotated in wrong way

1. A concise explanation of the problem you’re experiencing.


I am trying to convert shp(EPSG:4326) to 3d tiles.

It is my process.

  1. extract the coordinates from shp file.

  2. convert the coordinates(EPSG:4326 - longitude, latitude, height) to cartesian coordinates(x, y, z) with geotools(java).

  3. write the cartesian coordinates to the v(vertex).

  4. write the f(face) with the indice of the vertice.

  5. write the obj file with the vertices and the faces.

  6. convert obj to 3d tiles with the library(obj2b3dm).

link: https://github.com/PrincessGod/objTo3d-tiles

  1. add the 3d tiles to cesium viewer.

The picture is the result of above.

As you can see, the b3dm model is rotated in wrong way.

Did I miss something?

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

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

I would like to make 3d tiles from 2D layer in GeoServer with Springboot and Node Server.

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

Cesium 1.58

Windows 7

Chrome 76.0.3809.100

Have you tried uploading your OBJ files https://cesium.com/ion ? You could use the 3D Tiles location adjuster to rotate it if it needs to have its position or orientation configured.