Hi! First off, Im in love with cesium and what it has to offer, a real arcgis killer in my opinion and I’m close to using it for a commercial project.
However right now cesium does not really have much to show for the XR/VR users in terms of ‘tabletop’, a cutout visible map which is pan- and moveable. I know we can limit the visible area with the Cesium Cartographic Polygon Component (which works great) however getting those functionalities in is not straight forward (or I’m too stupid).
Let’s tackle zooming perhaps, what I’ve tried is making a limit area visible with the Cesium Cartographic Polygon, have a Polygon Raster and inverse that so only that specific area is visible, great.
Now to the zooming, usually those tabletop views work while keeping the viewable physical area the same size, so the polygon shape should not increase/decrease but the actual content inside should zoom in/out.
I tried achieving this effect by scaling the actual 3DTileSet (world) and refreshing that tileset. This ‘kinda’ works but the actual size of the visible area sadly changes slighlty, it’s not ideal.
I also tried messing with the entire Cesium Georeference global scale by changing it and at the same time adjusting the Cesium Cartographic Polygon scale, sadly I could not find a good conversion to make that work.
Any clues/hint? I couldnt find any working examples online, only failed attempts.
I highly suggest creating a new example which includes this type of scene as it’s a huge market!
Thanks a lot! Appreciate any help and looking forward.
Yes, the comments in that PR are a pretty good example for how you can do this sort of thing in Cesium for Unity. Let us know how you go!
We happen to have a level in the Cesium for Unreal Samples project that demonstrates how to do a tabletop-like visualization, but we haven’t added one to the Cesium for Unity Samples project yet. If you get something working that you’re happy with and can share with the community, we would definitely welcome a pull request to add it to the Samples!
just a quick update. I’ve managed to pretty much implement everything I’ve mentioned. All that is left to do is tidy it up
I was wondering one thing for visual improvements: Is it possible to somewhat make the terrain have “thickness” which ‘fills’ empty spaces? This would mean the entire ‘tabletop’ view has some thickness to it downwards, being flat at the bottom. Not sure if I explained that correctly what I’m trying to achieve, or atleast wonder.
Hey Janik, Id be interested to see your approach to this if you dont mind sharing.
When it comes to the “thickness” as you call it I have not been able to find a suitable solution. Havent had much time to investigate though. Playing around with shaders is probably a way to do this.
Zooming works by changing the georeference scale. I’m also setting the georeference height to the highest altitude found in the tiles.
To achieve a nice looking tabletop view with clean edges I’m modifying the default “CesiumDefaultTilesetMaterial" by passing in a bounds vector and a center position vector. This way my entire ‘tabletop’ visualisation can be moved freely in world space while remaining the same geographic picture.
One issue I have at the moment is that evertime the tabletop visualisation is moved, the map reloads due to the material property changing which reloads the tiles. This can be fixed by applying the custom material directory via code to the children meshrenderer, just didn’t got around to it yet.
Thanks for sharing. Not sure how you use the CesiumTileExcluder for scaling. Cant you just use the Scale property of a Cesium Georeference component?
As for panning and clipping I chose the same appraoch as you.
What happens when you pan the terrain and a new highest point in the tileset appears? My solution is rather choppy because I apply the sampled height in update and I only sample the center point of the table. So if there is a building suddenly sampled due to panning the height changes abruptly. Would probably be smoother if one would sample multiple points and sets the avarage height