Skip to main content

Hello,

I am experiencing the problem during exporting to cesium 3d tiles format. On input I have OBJ meshed model, which I want to tile and then store as a Cesium 3D Tile b3dm.

After my conversion I have tileset.json and only 1 data0.b3dm file. Cesium does not load it.

No experience with Cesium 3D Tiles yet (unfortunately), but I'd love to get my hands dirty.

 

Care to share a bit more? For example, the resulting tileset.json and your input OBJ? Or the workspace?

 


No experience with Cesium 3D Tiles yet (unfortunately), but I'd love to get my hands dirty.

 

Care to share a bit more? For example, the resulting tileset.json and your input OBJ? Or the workspace?

 

Sure, my workspace is enough simple to explain by word. Input - .obj file. Output-Cesium 3D tiles. I am only using one transformer - Reprojector(from 5514 to 4326).

 

Obj file is here https://send.firefox.com/download/11c4588e86/#_MEQiCw08H4Yb3a7rRgtcA

 

 

 

Thanks

 


Hi Michael,

OBJ files never have a spatial reference, unless there is an auxiliary file (e.g. a .wld or .prj file for example). Your file also doesn't seem to have a coordinate system and the coordinates of the OBJ geometry are far outside the valid range for EPSG:5514. So what you should do, is offset your OBJ to the right location (e.g. using an Offsetter transformer) if you know the point of origin, provided the OBJ's unit is metric and that it's not rotated. Use a CoordinateSystemSetter and set it to EPSG:5514. Then, write it to Cesium 3D Tiles (and set the Output Coordinate System on the writer to EPSG:4326). FME will take care of the reprojection. Not sure though how it deals with the z scale. If your OBJ seems way too high, use a CsmapReprojector instead and set the Vertical Handling to "Heights are relative to the ellipsoid(s) or geocentric".

Hope this will produce usable tiles! Can't test myself unfortunately (en route without laptop).


Hi Michael,

OBJ files never have a spatial reference, unless there is an auxiliary file (e.g. a .wld or .prj file for example). Your file also doesn't seem to have a coordinate system and the coordinates of the OBJ geometry are far outside the valid range for EPSG:5514. So what you should do, is offset your OBJ to the right location (e.g. using an Offsetter transformer) if you know the point of origin, provided the OBJ's unit is metric and that it's not rotated. Use a CoordinateSystemSetter and set it to EPSG:5514. Then, write it to Cesium 3D Tiles (and set the Output Coordinate System on the writer to EPSG:4326). FME will take care of the reprojection. Not sure though how it deals with the z scale. If your OBJ seems way too high, use a CsmapReprojector instead and set the Vertical Handling to "Heights are relative to the ellipsoid(s) or geocentric".

Hope this will produce usable tiles! Can't test myself unfortunately (en route without laptop).

Thanks for the answer. Now this part is clear to me.

 

 

But I would like to know about the part of 3D Tiles producing, I mean the settings of the tiles itself (e.g. the height, width of the tiles etc.).
Thanks for the answer. Now this part is clear to me.

 

 

But I would like to know about the part of 3D Tiles producing, I mean the settings of the tiles itself (e.g. the height, width of the tiles etc.).
That I don't know, as I don't have FME at the moment and the Cesium 3D Tiles documentation is lacking a bit. But I didn't know you were struggling with the writer settings, so I assumed the reprojection issue was messing things up...

 


That I don't know, as I don't have FME at the moment and the Cesium 3D Tiles documentation is lacking a bit. But I didn't know you were struggling with the writer settings, so I assumed the reprojection issue was messing things up...

 

Reprojection was also the problem. I appreciate your help there.

 

 

Now I have problem with writing proper 3D Tiles.
Reprojection was also the problem. I appreciate your help there.

 

 

Now I have problem with writing proper 3D Tiles.
Although this is more written towards developers, the Cesium 3D Tile spec might provide some insight for you, perhaps?

Hi again @michaelknave,

I took a look at the Cesium 3D tile writer and it seems to me that it simply doesn't chop up single features. There's nothing you can set, except the maximum amount of features per tile.

I already deleted the file (and I can no longer download it), but your OBJ only consists of 1 3D mesh, right? So that's just 1 feature. The writer is designed for situations where you have a large amount of features, e.g. 1 million 3D buildings within a city. With a (default) of 300 features per tile, that should produce around 3300 tiles.

The only thing you could do, is chop the building into multiple parts yourself. However, creating 3D tiled meshes in FME is a royal pain. I have created a PythonCaller script once though that can do it, but it's quite slow and it doesn't create straight tile edges but jagged edges instead, as it merely checks if a triangle/face is inside a tile or not...

Sander


Hi again @michaelknave,

I took a look at the Cesium 3D tile writer and it seems to me that it simply doesn't chop up single features. There's nothing you can set, except the maximum amount of features per tile.

I already deleted the file (and I can no longer download it), but your OBJ only consists of 1 3D mesh, right? So that's just 1 feature. The writer is designed for situations where you have a large amount of features, e.g. 1 million 3D buildings within a city. With a (default) of 300 features per tile, that should produce around 3300 tiles.

The only thing you could do, is chop the building into multiple parts yourself. However, creating 3D tiled meshes in FME is a royal pain. I have created a PythonCaller script once though that can do it, but it's quite slow and it doesn't create straight tile edges but jagged edges instead, as it merely checks if a triangle/face is inside a tile or not...

Sander

Thank You very much. This explanation helped me a lot.
Thank You very much. This explanation helped me a lot.
Glad I could help! However, if you truly want some inside information about the internal workings of the Cesium 3D tile writer, please contact Safe.

 


Reply