How to limit tiles within a certain radius?

I would like to simply load in a specific location from a set of coordinates and a radius (e.g. 2 km), and then have Cesium load only the tiles within that radius. Currently it loads way more tiles than I need and this unnecessarily adds performance costs and rapidly fills up the quota.

I’ve previously answered this here:

It’s in the context of Cesium for Unreal, but the same answer applies in Unity.

Thanks for the response and explanation. I agree that it makes a lot of sense in most cases and those optimizations do give me more confidence. However for my use case I only want to give a preview for specific building sites for placement with the ARCore Geospatial API. A radius of 300-500m will be more than enough in most cases. Of course you would then see the edges, for which I plan to do a radial fade out with a custom material (thanks for that option btw :slight_smile: ).
I looked at the amount of meshes for a sample area with a radius of 300m, which would require 300-400 Meshes. This is significantly less than the 2600 meshes that are currently loaded.
I also don’t want to use the frustrum culling for smoother experience, which would also benefit much from less meshes in the scene. Essentially I don’t mind it not being a fully immersed world. Just a top down preview of the site is what I am looking for.
This use case considered, plus the requests from the other people, I hope that you reconsider implementing a feature like this.

Are you already using the CesiumTileExcluder interface? I couldn’t tell from your answer if you had tried it, so I thought to mention it just in case.

CesiumTileExcluder can be implemented to exclude tiles with custom rules, e.g., excluding tiles that fall outside a specified bounding volume. There’s an example in the PR description here.

1 Like

Hi Janine,

Thanks! I was unaware of this functionality. I will try it out

  • I just read the conversation in the PR and I think this is exactly what I’m looking for :slight_smile:
1 Like

The CesiumTileExcluder works like a charm, thank you!

If I could ask one follow up question: I also followed the instructions in the PR on how to create a clipping material, but when I apply this to the Opaque material field it all becomes black. Even when I simply drag in the CesiumDefaultTilesetMaterial straight from the Package folder.

Opaque Material = None

Opague Material = CesiumDefaultTilesetMaterial (from package folder)

Opaque Material = CesiumDefaultTilesetMaterial + Generate Smooth Normal = TRUE

Anything I should be doing differently?

Sidenote: also receiving a lot of these errors when assigning Opaque Material:

If you’re using Google Photorealistic 3D Tiles, you’ll have to use the unlit version of the material instead. Otherwise, you’re trying to use a lit shader on a tileset without normals, which will cause rendering issues.

The latter is a known bug, but we can’t reliably replicate it so it’s hard to figure out where the issue is coming from. Apologies for the console noise :confused:

1 Like

The unlit version works, thanks!