Imprecise 3D Tile rendering coordinates

Hello,

I am developing an application in which I need to render 3Dtiles according to the position of a vehicle in real time.
I converted the tifs from EPSG:4326 to tifs ESPG:3857 with GDAL wrap, converted the tifs to .obj with blender and blender-gis and checked that the pivot is in the center. With GDAL, I checked the geographic center of each tif and then placed each asset / tile in its respective location. However, as you can see in the image, they are superimposed.

I am using Cesium ION to save the tiles and I tried in different ways to render them:

1st I adjusted the position (lat, lon) in Cesium ION. It did not work.
2nd I did not adjust the location in the ION and defined it in real time from a JSON. It did not work.
3rd I used the center of the first rendered tile as a reference, and calculated the position of the others in relation to this one (adding the width or length to the point respectively). It did not work.

I leave attached a print with a demonstration of the error happening.
I checked and the coordinates given to each tile are 3768.08 m apart, which should be the value to be side by side and not overlap. The error is about 30%.

Can someone help me solve this problem?

Code example

What does your TIFF represent? Is it terrain or a digital surface model? Is this surface itself supposed to move along with a vehicle?

I added toggle buttons to each tileset to make it easier to see in your Sandcastle example.

Is the goal just to have these two tilesets side by side with no overlap?

Hi, thanks for answering.

They are tifs of the bottom of the sea with bathymetry which I converted to .obj in blender. I tried to do the rendering with terrain files instead but because they are underwater (and the vehicle) I was not able to, so I’m using obj instead.

I have the lat/lon coordinates of the center where the obj pivot is supposed to be (It looks like it on cesium ion) and use this to render the tiles. In the example I gave they are meant to be side by side without overlap. I calculated the distances between centers and there should be no overlap.

This are the files I used in the example.

Thanks for sharing the files @anaezes. I believe the issue you’re running into here is that Cesium ion will renormalize the model geometry when tiling. This is described here: https://github.com/CesiumGS/cesium-ion-community/issues/282.

Once that is fixed your approach should work. In the meantime, I think the only way to do this correctly would be to use the REST API to pass in a longitude, latitude while uploading, so that the model origin is correctly placed there.

Other than that, I am curious to hear why the underwater terrain files didn’t work. Did you try uploading a GeoTIFF version of these to Cesium ion? If so, do you have the asset IDs for that? I can take a look at that - that may be an easier way to get it to work.