Gltf from Geotiff wrong orientation and position

282 views
Skip to first unread message

Michele Andreolli

unread,
Jun 21, 2018, 12:08:55 PM6/21/18
to cesium-dev
Hi everyone,

I'm facing some issues in the visualization of a GLTF model generated from a raster image.

This is my generation process and in attachment the results of each step: (if there is a better way to do this, pls drop me a line :-) )
  1. Original Source File: GEOTIFF (EPSG:25832) with an elevation parameter (test.tif)
  2. Export to LAS format
  3. Import LAS file in CloudCompare
  4. Mesh creation with the Delaunay algorithm
  5. Export to OBJ format
  6. Convert OBJ file to GLTF with the online converter
  7. Load the GLTF file into Cesium
The file loads without any errors and it is also visibile, but the rotation is wrong and it is positioned  in the middle of nowhere in the space.

I'm not so expert with GLTF generation, could the problem be derived from the coordinate system of the source file?

Thank you for any suggestion,
Michele






test.tif

Michele Andreolli

unread,
Jun 22, 2018, 2:25:44 AM6/22/18
to cesium-dev

Sean Lilley

unread,
Jun 23, 2018, 2:13:36 PM6/23/18
to cesium-dev
I'm seeing the same thing as you. It most likely is a coordinate system issue, but it's hard to tell for sure.

Terrain processing is built in to Cesium ion, so I gave it a go. Check out the attached screenshot (which looks correct to me). This might be a good alternative to the conversion steps you're doing now.
terrain.PNG

Michele Andreolli

unread,
Jun 26, 2018, 9:43:56 AM6/26/18
to cesium-dev
Hi Sean,

thank you for your feddback and for had a look to my generation process.

I'll try to explain a little bit more in detail what I'm trying to accomplish within this conversion.

The raster image (geotiff) rappresents the simulation of the water height of a river during an flood event. The differents heights inside the image, produced by a dedicated external engineering software, are related to the conformity of the terrain tacking into account buildings, roads and other factors.

The idea is to rappresent this object above the terrain, in order to visualize it together with the terrain and the 3D buildings of the city (3D tiles format).

This is the reason why I tried to convert the geotiff to GLTF model.

Do you have any suggestion to accomplish this?

Thank you for the support,
Michele

Sean Lilley

unread,
Jun 28, 2018, 8:50:45 PM6/28/18
to cesium-dev
Hi Michele, thanks for the background info. I can't say for sure what stage is at fault in the geotiff to glTF process. I'm curious if you tried to convert it to terrain, which seemed to work well for me.

Michele Andreolli

unread,
Jul 2, 2018, 9:40:25 AM7/2/18
to cesium-dev
Hi Sean,

I tested the Cesium.ion terrain processing and everything works well, as you described.
So, I did other tests and I discovered that the problem was related to the position of the pivot odf the mesh inside the obj file. It was keeping the position, in meters, related to the original EPSG coming from the GeoTIFF raster. 

I imported the obj model in 3d Studio Max and reset the model position to the origin of the axes. Now the visualization in Cesium, seems to be fine.

I have to perform other tests on different dataset sources, but, for now, I solved the problem in this way.

Thanks,
Michele
Reply all
Reply to author
Forward
0 new messages