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.
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!
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:
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.
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
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
Thereâs no bad blood here 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.
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