Attaching multiple raster tiles causes the program to crash.
Add an image layer (CesiumTileMapServiceRasterOverlay) under Cesium3DTileset, and then set the corresponding layer name and URL:
CesiumIonRasterOverlay → Overlay0
CesiumTileMapServiceRasterOverlay → Overlay1
After setting it up, the program crashes:
Assertion failed: textureCoordinateID >= 0 && textureCoordinateID < primData.overlayTextureCoordinateIDToUVIndex.size()
0x00007ffcc487e39d UnrealEditor-CesiumRuntime.dll!UCesiumGltfComponent::AttachRasterTile'::2’::<lambda_1>::operator()()
I don’t know for sure if it will help, but I think it’s worth trying an upgrade to the latest version (v2.21.0).
It’s also worth a try to revert to the default material and see if it still crashes. That’s not a fix, of course, but it might help narrow down the problem.
When I upgraded the plugin to version 2.19.1, the crash issue seemed to be resolved, but a new problem arose: Terrain clipping works correctly during PIE.
However, after packaging, unloaded terrain tiles appear outside the clipping area.
There are no related logs, and the same problem occurred after upgrading to v2.21.0. Everything was normal during PIE, but this exception occurred after packaging.
Hi @sjf2046, I’m having a little trouble following exactly what’s working and what’s not…
You originally reported an exception. Actually, it’s an assertion failure, which is interesting because those should only appear in Debug builds of the plugin. Does that mean you’ve built the plugin yourself from source?
Next, I believe you said that the error went away after upgrading to v2.19.1. Is that correct? And then perhaps it came back after upgrading to v2.21.1? Or do you just mean that the missing tiles continue to be a problem in the latest version (but not the assertion failure)?
If you’re only having problems with missing tiles now, have you tried the suggestion in my previous message to use the default material instead of the custom one with UDS? Does it help at all?
@Kevin_Ring Hello, I’m using the version downloaded from the store, and I still have the missing tile issue. It appears after packaging. I did use UDS, but I don’t think it’s the cause, because PIE works perfectly. I’ve also tried removing UDS.
The bug persists even after I updated the plugin to the latest version (2.22.1). I created a blueprint that can reproduce the problem.
@Kevin_Ring Hello, was the example I provided helpful? I hope the Cesium team can schedule time to resolve this issue as soon as possible, as it has been bothering me for a long time. Thank you.
Hi @sjf2046, sorry for the delay. I tried to load your Blueprints, but I see a bunch of compile errors that I’m not sure how to resolve. Perhaps rather than sharing Blueprints, could you provide instructions for recreating the problem, preferably starting with the Cesium for Unreal Samples project? It’s generally easier for us to follow step-by-step reproduction steps rather than trying to import assets from other projects.
There are some errors in the blueprint. The Web Map is an object reference of the Cesium Tile Map Service Raster Overlay, but you keep using it as an object reference of Cesium Raster Overlay. Yet this is just a minor issue, and I’ve fixed it.
The real cause of the crash is the URL configuration of the CesiumTileMapServiceRasterOverlay component in BP_Cesium3DTileset. The system crashes when this URL is set to an invalid value or the TMS service link cannot be retrieved in a timely manner. Even though you have set the “Server” Mode initially, it will still attempt to load immediately on startup. This won’t happen if you initially leave the URL empty.
I’ve run further tests and concluded that this should be a bug@Kevin. It has nothing to do with sjf2046’s project or blueprints. I am using UE 5.6 and Cesium for Unreal v2.23.0.
1. If three RasterOverlays are overlayed on a Cesium3DTileset in the following way, a crash is guaranteed. One layer is a CesiumTileMapServiceRasterOverlay with an invalid URL, One layer is a CesiumIonRasterOverlay with the correct Asset ID 2, then add an additional layer of CesiumPolygonRasterOverlay. The system will crash under this combination even when playing in the Editor.
2. To avoid a crash in the above scenario, the URL of the CesiumTileMapServiceRasterOverlay need to be empty. I guess (I’m not familiar with the source code) that the source code of Cesium Tile Map Service Raster Overlay has the null value protection, which prevents it from attempting to load imagery when the URL is empty.
3. Under other scenario, for example, two TMS Raster Overlays with invalid URLs plus a CesiumPolygonRasterOverlay, the system will not crash, it will only log an error message.
I ran your BP_Cesium3DTileset in UE5.6 with Cesium for Unreal V2.23.0. The Origin of CesiumGeoreference in my program is most likely different from yours,yet this shouldn’t matter.
The clipping of CesiumPolygonRasterOverlay works normally, no other tiles are clipped. The image below shows the result after packaging. Except for this area, there are no other clipped regions.
Hi @pjiang9 , I ran in UE5.5 with Cesium for Unreal V2.22.1, The origin used is Latitude: 39.868547, Longitude: 115.795983.
everything works fine when I run it in the PIE environment, but after packaging and running it, tiles are missing.
I tried the Origin you provided and ran it after packaging as well. It still works fine . I can’t reproduce the issue you mentioned. And I don’t have UE5.5 installed. You might try upgrading Cesium for Unreal to version 2.23.0 and see if that helps. Also, make sure there are no other interfering Actors in your level. My level only has BP_Cesium3DTileset,CesiumSunSky, and DynamicPawn.
@pjiang9 ,
I’m using UDS for the skybox, and I’ve added nodes to the terrain material. However, I don’t think this will affect terrain clipping, because I encountered the same problem when I removed the material nodes. I think the key issue is that I’m creating the culling region only at runtime.
Below are the modified materials; they are in the CesiumForUnreal\Content\Materials\UDS directory (requires the UDS plugin).
I am unable to download the file you provided.The link is broken. Tests I ran indicate that this “unexpected clipping” issue is unrelated to “creating the culling(Clipping) region only at runtime”, since I have not modified any code in the EventGraph of your BP_Cesium3DTileset, which is responsible for “creating the clipping region at runtime”.