OBJ -> 3D Tiles Centering Algorithm

I’m using the REST API to upload OBJ models for tiling to 3D Tiles. The OBJ models, that I’m using, are not centered in local coordinates around (0,0,0). From what I can tell, when Cesium Ion tiles the OBJ models, it first centers the model and then places it at the desired location specified in the API call to create the 3D tiles.

I need to find the translation from the source models origin to the new origin generated via the API. Which algorithm, does the Ion API use to center the models?


Hi @jdb,

The tiler will compute a bounding box around the actual geometry, trying to fit it as tightly as possible. It will then place the origin in the bottom center of the bounding box.

We’ve received requests to change this behavior in the past, such that the tileset origin matches the origin of the source data. I’ll add your use case to that ticket, since I believe it would solve your problem.

Are you a user of the on-premises 3D Tiling Pipeline, by any chance? The on-premises Model Tiler gives you the ability to pass in the desired longitude, latitude, and height and have the data positioned such that the origin of the source data is placed at that location. That’s one reason why we want to change the ion behavior: so that it aligns with the on-premises version.

Also, roughly how far is your data from the origin? Is it on the order of a few meters, or is it kilometers or even farther? Is it in a local coordinate system or some projected system?