Issue Loading Custom Elevation Tiles in Unreal Engine 5 with Cesium Plugin

Hello everyone,

I have generated elevation and texture tiles using Cesium Terrain Builder. However, when I try to load the elevation tiles into Unreal Engine 5 using the Cesium plugin (offline), I encounter an error. The error message states that there is a format issue in the tileset.json, but it does not provide further details.

We have verified that Unreal Engine is reading the tileset.json file and that it is correctly locating the /0/0/0.terrain file. Despite this, the tiles fail to load properly.

Could you clarify the correct procedure for loading custom elevation tiles in Unreal Engine 5 with the Cesium plugin in an offline setup? Are there any specific format requirements or configurations that we might be missing?

Thank you for your help!

Best regards,
Paloma

Hi @Paloma_Manzano, welcome to the community!

Despite the trademark violation, Cesium Terrain Builder is not a Cesium product. Our solution for terrain tiling is Cesium ion.

Please share the exact error message you’re getting. It’s useful to know the version of Cesium for Unreal you’re using as well. It’s unusual that you have a tileset.json and also .terrain files. Usually, .terrain files are paired with a layer.json file, while a tileset.json would refer to .b3dm or .glb files.

It may be useful to try loading this tileset in CesiumJS as well. If you can’t get it to load there, that would be a strong indication that there is something wrong with Cesium Terrain Builder’s output.

Hi Kevin,

First of all, I’d like to apologize for using a product that is not officially part of Cesium. I wasn’t aware of that, and my only goal is to find a way to load elevation tiles offline in Unreal Engine 5.

I need a solution where the tiles are stored locally on the machine where they are used, without requiring Kubernetes or any other external infrastructure. The tiles must be generated in a controlled manner and loaded directly from local storage. If Cesium ion provides a way to achieve this, could you explain how it works?

Additionally, do you have any offline tools or resources for testing terrain tiles? Online solutions are not a viable test option for my use case.

Regarding my setup, while my file is named tileset.json, I am serving it locally via a port, so the filename itself shouldn’t be an issue. What truly matters is the correct structure of the dataset. Where can I find documentation on how to properly structure terrain tiles for use with the Cesium plugin in Unreal Engine?

For reference, the error message I see in the console is:

javascript

CopyEdit

LogCesium: Loading tileset from URL http://localhost:8070/tileset.json  
LogCesium: Loading tileset from URL http://localhost:8070/tileset.json done  
LogCesium: Error: [2025-02-11 14:00:08.240] [error] [TilesetJsonLoader.cpp:735] Error when parsing tileset JSON, error code Invalid value. at byte offset 0  

I want to clarify that the issue is not with reading the JSON file itself. When we intentionally introduce errors into the JSON, we receive a different error message, indicating that the file is being read correctly.

Thank you for your time and assistance!

Best regards,
Paloma

First of all, I’d like to apologize for using a product that is not officially part of Cesium.

No need to apologize, and we’re happy for you to use whatever tools work for you. But we can’t provide support for third-party products.

I need a solution where the tiles are stored locally on the machine where they are used, without requiring Kubernetes or any other external infrastructure. The tiles must be generated in a controlled manner and loaded directly from local storage. If Cesium ion provides a way to achieve this, could you explain how it works?

Cesium ion Self Hosted can create tilesets for offline use without requiring Kubernetes. See here:

Additionally, do you have any offline tools or resources for testing terrain tiles? Online solutions are not a viable test option for my use case.

I’m not sure what you mean exactly. Is this in reference to my suggestion to test the output with CesiumJS? If so, you can build and run CesiumJS locally and try loading your data in the Sandcastle application. There’s no need for internet access for this (once you’ve obtained the CesiumJS download, of course).

Where can I find documentation on how to properly structure terrain tiles for use with the Cesium plugin in Unreal Engine?

You can find a JSON Schema file for the layer.json that usually accompanies .terrain files here:

The quantized-mesh format used for each .terrain file is documented here:

Error when parsing tileset JSON, error code Invalid value. at byte offset 0

Are you perhaps using a very old version of Cesium for Unreal? This used to be a common problem because some tools would produce gzipped tileset.json and other files. If the web server wasn’t configure to provide the correct response header to indicate the files are gzipped, they wouldn’t get decompressed, and instead we’d try to interpret some compressed binary data as JSON, which wouldn’t work.

In recent version of Cesium for Unreal, though, we automatically detect a gzipped file and decompress it, no matter what the HTTP response headers say. I think your version would have to be older than v1.28.0 (released July 2023) for this to be an issue, though.