Suggestion: Exclusion volume for Google 3DTiles

Dear CESIUM team,

we are now using Google 3DTiles for our flight simulator, and it works really well, you did an awesome job!

As usual, praise like this is followed by a request. :smiley:

There are lots of artifacts in the 3D data, have a look at e.g. Munich Airport EDDM:

We already reported fragments like this to the Google team, but I guess they are just swamped and no fixes will result for a long time.

How about adding exclusion volumes? I guess the simplest solution (well, hopefully simple for an ace developer like @Kevin_Ring, I wouldn’t dare to touch the plugin myself) would be to let us define a basic shape like a cube that encloses fragments like this. So I would e.g. just create a cube StaticMeshActor with an added CesiumGlobeAnchor component and scale and place it in the world so it covers the fragments.

Then I add this cube actor to the Cesium3DTileset like a CartographicPolygon to the RasterOverlay, and evrything inside of the cube exclusion volume would not be rendered. Well, and of course the cube wouldn’t be rendered either.

Don’t know about the performance though, if it would drag it down too much with all the checks before rendering.

Best
Andreas

Hi @Lildreas,

Check out the CesiumTileExcluder interface, which lets you implement custom exclusion logic in Blueprints and / or C++. You can find an example of this in Level 13 of the Cesium for Unreal Samples. Let us know how it goes!

Hi @janine ,

thanks for the fast answer!

I look at the sample level 13 and I fear it is not a solution for the usecase we are describing. We need to exclude parts of tiles, not complete tiles. Just some random polygons that need to be removed based on an exclusion volume (e.g. a cube).

And this only makes sense if there can be an array of exclusion volumes, because there are many instances of this problem, where these faulty mesh parts need to be removed.

Maybe @Kevin_Ring can have a look at this? I guess he can give a first feedback if this is possible at all.

One more thing: When I tested the demo level the behavior was very strange, It all started well, see first screen:

Then I just moved the level using the [D] hotkey, and soon it looked like this:

Just test for yourself.

Best
Andreas

The solution Janine described is the best and only one available currently. You may not even need the tile excluder portion, just a custom material that cuts out the volumes you don’t want using an opacity mask.

By the way, Janine is a core member of the Cesium for Unreal development team and every bit as authoritative on this kind of question as I am.

1 Like

Hi @Kevin_Ring , @janine ,

I’m sorry if my comment sounded offensive, that was the least of my intentions! I just couldn’t understand how the CesiumTileExcluder interface would be able to help us, as

  • the example seems broken as shown in the screenshots
  • there is almost no documentation for this usecase
  • the name “…TileExluder” describes something that we don’t want to do, namely exclude tiles, we want to keep the tiles and just exclude some polygons in user-defined volumes
  • the effort to look at the sourcecode and reverse-engineer from this a clear understanding of the principles involved would be huge
  • from the answer it was not clear if putting that much effort into this would be worth it, as there is no understanding if the desired result can be achieved this way

So as you always gave me very good feedback from the beginning of the development of the plugin (that started quite a few years ago after I communicated to Patrick Cozzi and some EPIC Games Unreal developers that I know that I needed a way to render 3DTiles in UE, and then I brought CESIUM & EPIC together at the I/ITSEC December 2019 and it all started…) I just thought that I would value your input for this problem.

And no, from the available documentation and examples I fear I cannot just add a custom material that would cut out the volumes. And I guess this would only be a solution for the vision, the polygons would still be there and cause a collision.

So, again, no offense meant, just seeking more information,
best
Andreas

I’ve also seen errant polygons in Google P3D Tiles. When viewing the NYC skyline from the statue of Liberty, for example.

Would be really cool to just select these polygons in the editor, then click some option to automatically create exclusion volumes.

Feel free to add feature requests in our repo…

Thanks @Brian_Langevin ,
I added it to the issues as a feature request. And I found the issue I mentioned above with the Excluder example (that tiles disappear) already reported there three weeks ago, by @Kevin_Ring (just mentioning this for others who stumbled across this problem, too).
Best
Andreas

Hi @Lildreas,

There’s no bad blood here :slight_smile: don’t worry about it. I could only go off of your question about “adding exclusion volumes” and preventing fragments inside from rendering. CesiumTileExcluder is the most immediate answer that we have available. To be fair, it is meant for the exclusion of tiles and larger regions, and does not the granularity needed for per-mesh exclusion. Still, the concept of defining a volume, then clipping fragments inside of it, is applicable. As Kevin mentioned, you can do this with a custom material.

If you want the volume to affect the collision of the mesh, however, that’s a different story. It would require the plugin to modify meshes as they are loaded into the scene. Each mesh would have to check against this volume, and prune vertices that are inside of it. And if we’re not careful with the algorithm, it could lead to malformed meshes depending on the placement of the volume. So it would take a larger effort that, while valuable, is not on our current roadmap. It’s correct to make this a feature request on Github, which I see you’ve already done. I will followup with ideas / implementation details there.

Lastly, we are aware of the bug you described, and just opened a Github PR to address it.

Best regards,
Janine

1 Like

Hi @janine ,
thanks for the detailed answer. And yes, I think the process you are describing would be the best option, to remove the vertices after loading the glTF data. And push this task to another CPU core ideally, for having the least impact possible on the streaming pipeline.
I see no other possibility right now than to use a CartographicPolygon at these locations and fix the resulting holes in the terrain below the fragments manually with a textured mesh. But that’s a painfull process. So, I would love to see this feature on the roadmap. The more users move to Google P3DTiles the more of these issues will pop up all over the landscape.
All the best & hope you have a successful I/ITSEC,
Andreas