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
image

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?

Hey Kevin, I’d like to explain why this is useful for our use case as well. We translated and rotated our Cesium tiles such that when we import our content using our own coordinate space, it aligns with the model. The alternative would be use aligning every import to the model as opposed to aligning the tile set once. I haven’t tested it, but I’m sure offsetting the Raster Polygon by the same offset of the Cesium Tileset would work, but do you have any idea on how to do the math on what the translation would be to account of the Cesium Tileset being rotated?

Furthermore, the Polygon should have access to the Tileset node (and the rotation, transform parameters) ,so I feel as if this could be an easy adjustment for the dev team. Let me know your thoughts!

@Mtrainotti if I’m following you correctly… you want to be able to translate/rotate/scale a Cesium3DTileset and have a CesiumCartographicPolygon map to it correctly? The bad news is that doesn’t work well in the current version of Cesium for Unreal, but the good news is we’re working on major improvements to transforming tilesets, and this is one of the things we fixed in the process.

These improvements will ship in our v2.0 release, which is tentatively scheduled for October. But you can try them out today by using this branch:

On that page, click Checks, then “Cesium for Unreal on: push”, then find the appropriate file for your UE version in the “Artifacts” list. The files that don’t mention a platform will work on all supported platforms. Uninstall Cesium for Unreal using the Epic Launcher, and then extract the ZIP you downloaded to C:\Program Files\Epic Games\UE_5.2\Engine\Plugins\Marketplace or equivalent.

1 Like

Be sure you have a backup copy of your project first, because backward compatibility with prerelease versions like this is not guaranteed.