3Dtile is at the wrong place

Hello,

I’ve made a custom 3DTile from an obj file with Obj2Tiles but when placed on the globe, the mesh is actually thousands of kilometers away from the origin.

How the tileset appears on the scene view :

Position of an object created nearby the mesh :
mesh_position

It seems to be caused by a difference between the CRS used for the obj file and the one used by Cesium.
Is there any other CRS supported by Cesium on Unity other than ECEF ?

Hi @ThomasBILLAUD, welcome to the community!

Cesium for Unity is based on the WGS84 ellipsoid and supports long / lat / height coordinates with respect to it. This is of course in addition to ECEF. I’m not personally familiar with Obj2Tiles—what CRS are they using? Perhaps there is a way to convert between the two.

I should mention that Cesium ion allows you to upload OBJ files and convert them to 3D Tiles. You could try to tile your model using Cesium ion, then geolocate it on the globe using Adjust Tileset Location. Then you can stream it into Unity from Cesium ion. I’d recommend trying this so we can confirm if it’s a matter of the input data being off, or the Unity scene setup resulting in this misalignment.

Either way, let us know and we can work from there.

Hi,
After a lot of research, it appeared that my problem wasn’t Cesium related. The vertices coordinates I got from my obj file were all wrong, this is why Obj2Tiles was creating a tileset this far away from everything else.

But now, I have another problem. The mesh can appear properly in Cesium Ion but doesn’t in Unity :

image
Picture of my mesh appearing correctly in Cesium Ion


Same place in Unity but the mesh is not visible

When loading the mesh in Unity, I get this error :

[error] [ErrorList.h:72] Errors when loading tileset:
- Error when parsing tileset JSON, error code 3 at byte offset 0

What is happening and how can I fix it ?

That sounds strange. Did you change your workflow when loading the model into Unity?

In your original post, you seemed to have this working without error (other than it being at the wrong position)