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 )
- Original Source File: GEOTIFF (EPSG:25832) with an elevation parameter (test.tif)
- Export to LAS format
- Import LAS file in CloudCompare
- Mesh creation with the Delaunay algorithm
- Export to OBJ format
- Convert OBJ file to GLTF with the online converter
- 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,
test.tif (801 KB)
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.
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,
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.
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.