Unreal crash when I add a CesiumTMSRasterOverlay to a Cesium3DTileset

Hello,

Each time I try to add a CesiumTileMapServiceRasterOverlay to a Cesium3DTileset (containing my buildings), it makes Unreal crash:

LoginId:af9bf8a7402b93df47e4cdbf9d0063fc
EpicAccountId:

Unhandled Exception: 0xe06d7363

KERNELBASE
VCRUNTIME140
UnrealEditor_CesiumRuntime!CesiumGeometry::Plane::Plane()
UnrealEditor_CesiumRuntime!CesiumGeometry::Plane::Plane()
UnrealEditor_CesiumRuntime!CesiumGeospatial::BoundingRegion::_computeBoundingBox()
UnrealEditor_CesiumRuntime!CesiumGeospatial::BoundingRegion::BoundingRegion()
UnrealEditor_CesiumRuntime!std::vector<Cesium3DTilesSelection::RasterMappedTo3DTile,std::allocator<Cesium3DTilesSelection::RasterMappedTo3DTile> >::clear()
UnrealEditor_CesiumRuntime!Cesium3DTilesSelection::TilesetContentManager::updateDoneState()
UnrealEditor_CesiumRuntime!Cesium3DTilesSelection::TilesetContentManager::updateTileContent()
UnrealEditor_CesiumRuntime!Cesium3DTilesSelection::Tileset::_visitTileIfNeeded()
UnrealEditor_CesiumRuntime!Cesium3DTilesSelection::Tileset::_visitTile()
UnrealEditor_CesiumRuntime!Cesium3DTilesSelection::Tileset::_visitTileIfNeeded()
UnrealEditor_CesiumRuntime!Cesium3DTilesSelection::Tileset::_visitTile()
UnrealEditor_CesiumRuntime!Cesium3DTilesSelection::Tileset::_visitTileIfNeeded()
UnrealEditor_CesiumRuntime!Cesium3DTilesSelection::Tileset::_visitTile()
UnrealEditor_CesiumRuntime!Cesium3DTilesSelection::Tileset::_visitTileIfNeeded()
UnrealEditor_CesiumRuntime!Cesium3DTilesSelection::Tileset::_visitTile()
UnrealEditor_CesiumRuntime!Cesium3DTilesSelection::Tileset::_visitTileIfNeeded()
UnrealEditor_CesiumRuntime!Cesium3DTilesSelection::Tileset::_visitTile()
UnrealEditor_CesiumRuntime!Cesium3DTilesSelection::Tileset::_visitTileIfNeeded()
UnrealEditor_CesiumRuntime!Cesium3DTilesSelection::Tileset::updateView()
UnrealEditor_CesiumRuntime!ACesium3DTileset::Tick() [D:\build\U5M-Marketplace\Sync\LocalBuilds\PluginTemp\HostProject\Plugins\CesiumForUnreal\Source\CesiumRuntime\Private\Cesium3DTileset.cpp:1911]
UnrealEditor_Engine
UnrealEditor_Engine
UnrealEditor_Engine
UnrealEditor_Engine
UnrealEditor_Core
UnrealEditor_Core
UnrealEditor_Core
UnrealEditor_Engine
UnrealEditor_Engine
UnrealEditor_Engine
UnrealEditor_Engine
UnrealEditor_UnrealEd
UnrealEditor_UnrealEd
UnrealEditor
UnrealEditor
UnrealEditor
UnrealEditor
UnrealEditor
UnrealEditor
kernel32
ntdll

Hi @0x974,

My guess is that your tileset has some buildings or tiles with invalid coordinates, such that they’re very close to the center of the Earth. Computing a bounding box for such tiles might fail like that. Beyond that, we’d probably have to do some debugging with your tileset and see what is happening. Can you provide your tileset or another one that has the same problem?

Just to be sure, are you running the latest version of Cesium for Unreal (v1.18.0)? Check the Plugins page in the Editor.

Kevin

Hello @Kevin_Ring, sure I can, I can reproduce it with the asset 1377780 (and others). Should I send it to you by email or is the Ion ID sufficient?

Btw, if this is a coordinate issue, shouldn’t it be handled by Ion (warned/ignored/repaired)? And shouldn’t it be handled more gracefully by Cesium for Unreal (should not crash at least)?

At your disposal!

And yes, I am using the 1.18.0. Thanks for your help!

Btw, if I use the same raster overlay for multiple (let’s say 20+) actors, are they sharing the same cache? Thanks.

Should I send it to you by email or is the Ion ID sufficient?

Can you please send me a private message with an access token for it as well? And just reconfirm that we have your permission to access your tileset for debugging purposes.

Btw, if this is a coordinate issue, shouldn’t it be handled by Ion (warned/ignored/repaired)? And shouldn’t it be handled more gracefully by Cesium for Unreal (should not crash at least)?

Yeah, for sure. We aim to handle bad data gracefully throughout the system, but it doesn’t always go perfectly. :slight_smile:

Btw, if I use the same raster overlay for multiple (let’s say 20+) actors, are they sharing the same cache? Thanks.

They will share a common request cache, so at least the tiles won’t need to be downloaded multiple times. But currently textures will be created independently for each Actor. Can you tell me a little more about your use-case? I don’t think I’ve heard of someone creating many Actors with the same overlay before.

Kevin

1 Like

Can you please send me a private message with an access token for it as well?

Of course, done!

Can you tell me a little more about your use-case? I don’t think I’ve heard of someone creating many Actors with the same overlay before.

Sure:

I would like to render 500k buildings. I have no problem at all with untextured buildings. But I have three issues with textured buildings (simple cubes using a pool of ~10 facade textures, and individual roof textures extracted from the imagery):

  1. I tried to upload my CityGML files to Cesium Ion but I think it did timeout after a while (Something went wrong with the asset 1383263; already contacted the mentioned address). So now I have broke my dataset into 24 CityGML files (one per city) and try to upload each one individually to Ion (it works better).

  2. Even if the above works, I still have performance issues, even for a small portion of my dataset (cf. Texture loading optimization for buildings? - #5 by 0x974). The first one is a Texture streaming pool over budget warning as soon as I run the simulation, because of the textures (even if the LOD is well built by Ion).

  3. The second one is that FPS drastically drop each time the camera sudently move as 3dtiles load/unload (even if I try to disable frustum culling, which seems to have no effect).

To try to tackle these 3 problems, my idea is to not include roof textures in my CityGML dataset (only facade textures), and instead use a CesiumTileMapServiceRasterOverlay to texture roofs. Ideally, I would do it for only one Cesium3DTileset if I can upload it to Ion.

But I don’t know if it will really help performances. Hence my question about the cache.

Thanks @0x974, I’ve just opened a PR to fix the raster overlay crash:

We should be able to include it in this week’s release.

I tried to upload my CityGML files to Cesium Ion but I think it did timeout after a while

I think it would be worthwhile to post about this to the Cesium ion community forum to help get the right eyes on it:

Even if the above works, I still have performance issues, even for a small portion of my dataset

I think the problem here is the lack of

CesiumJS handles this much better, so it’s worth trying out your tileset there too. If it works ok in CesiumJS but not Cesium for Unreal, that would reinforce that we need to implement texture sharing across tiles in Cesium for Unreal.

The second one is that FPS drastically drop each time the camera sudently move as 3dtiles load/unload

This week’s release should make this situation much better, as we did some major work to smooth out frame rate spikes:

But the fundamental problem is probably that it’s loading the same (large?) texture repeatedly.

Kevin

Wow @Kevin_Ring, that was quick, thanks so much! Can’t wait to try it!

Regarding the external images caching, you’re correct. I do confirm that it works way better with CesiumJS. I know there is no expected time frame for that, I’ll be patient and wait for this feature to come to Cesium for Unreal!