Cesium Cartographic Polygon in True Origin Georeference EPSG27700

Hello Cesium team,

I’m trying to have a tileset in EPSG 27700, and with a offset in X and Y and rotation in Z= -90 in the tileset to be in the center 0,0,0. I want to use the Cartographic Polygon to cut out parts of the tiles so I can add my own 3D, but it’s not working properly.

What have you tried, and in what way is it not working properly?

I tried to use the cartographic polygon as a child of the tileset to see if the polygon cutout the tiles.
But it doesn’t cut out the tileset

The Cartographic Polygon system - and raster overlays in general - are meant to be draped on ECEF-aligned tilesets. If yours has a local origin instead, it’s going to cause problems. Raster overlays work by projecting polygon points down (or up) onto the globe surface along the ellipsoid surface normal. But for a tileset with a local origin, this operation doesn’t make any sense until the tileset is placed on the globe. And then if the object moves (which is often the reason to use a local origin in the first place), the raster overlays would need to be recomputed.

So, my advice is to take your EPSG 27700 model and unproject it to ECEF before tiling it. This will be both easier and more accurate than trying to display a projected model on a true 3D globe.

Hello Kevin,
We do not want to change the model and it need to be in local coordinates space.
There’s some solution or some suggestions to use the Cartographic Polygon in this case?

No, sorry. But you could create a custom material that does the clipping manually, perhaps.

How can I do a custom material to clip the tiles?

It’s not something I can walk you through, since it has little to do with Cesium. But the general idea is to set the “Opacity Mask” material output to 0 when you’re shading the part of the material that you want to clip. You can use the world position node in the material, plus some math that will be dependent on the exact shape you want to clip, to determine whether you’re inside that part of the model or not.

Can you give me some examples or a guide?