Cesium terrain for unreal

Hey,

I’m trying to get terrains from the cesium api and find the supported formats for terrains for “cesium for unreal” plugin in unreal engine.

By calling: https://api.cesium.com/v1/assets/3956/endpoint
I get a 200 OK, with type “TERRAIN” and the accesstoken and new url to call.

When I call this url I get an error saying the specified key is not found, which is what I’m wondering about.

response from first call
image

the second call:
image

response from second link:
image

What are the supported formats for cesium terrains by custom URL?

Is this API call to cesium supposed to fail because of tiers or something, or am I doing something wrong?

Thanks for any help :slight_smile:

Hi @cozycabin,

Could you share a little more about what you’re trying to do? You don’t need the REST API for accessing tilesets in Unreal - you can use in-engine actors, or C++. Is there a specific reason you’re using the API?

-Alex

Hi :slight_smile:

The reason why I am trying to get the link from the cesium API is because I am originally trying to get a terrain from another API that hosts a dataset I bought. Therefore I wanted to see what format the cesium ion API returns for terrains.

The original API I am trying to get terrain data from returns a .terrain format as such, I am afraid this is not supported, right? Is there a way I can change this .terrain to a supported format such as .terraindb for instance?

Thanks :smiley:

Hi @cozycabin,

.terrain actually should be supported. Have you tried using that terrain data on a Cesium3DTileset actor in Unreal yet? I’m not sure if you want to include the .terrain extension in the URL or not, I’d suggest trying both.

Thanks for the response.

Yes I have tried using it on a cesium 3d tileset actor, and unreal crashes if I do so :frowning:

The link is: https://www.webatlas.no/wms-hoyde/tms/cesium_qmesh/14/16950/13876.terrain?v=1.0.0
If you would like to try :smiley:

Would you also happend to have a .terrain example dataset I can try? Would be great so I can compare the formats, as it seems like either .terrain won’t work or the API is returning something else than .terrain :smiley:

Hi @cozycabin,

It looks like there’s a few things going on here.

The correct URL to use this tileset would be https://www.webatlas.no/wms-hoyde/tms/cesium_qmesh/layer.json. You want to point it to the layer.json file. However, that tileset isn’t displaying properly, most likely because it’s using an older mechanism that is not supported by Cesium for Unreal. You can read more about this issue here - Support terrain tile availability in layer.json · Issue #292 · CesiumGS/cesium-native · GitHub
We’re hoping to have a chance to address that issue soon, so ideally Cesium for Unreal will be able to accommodate tilesets like this in a few releases.

The easiest way around it for now is probably to upload your tileset to Cesium ion, which can process it into the correct format.

As for the crash, I’m not sure why that’s happening, but I was able to reproduce it. Even if it’s a bad URL, it shouldn’t be crashing like that. I made an issue to track it here - Immediate crash when attempting to load terrain from certain URL · Issue #476 · CesiumGS/cesium-native · GitHub

Any additional information you’re able to provide about your tileset might be helpful in narrowing down that issue!

-Alex

Hello, Agallegos

Colleague of cozycabin here. The dataset we’re trying to import to Unreal is of the entire country of Norway, and it’s self-hosted by our data provider. Is there a way for them to run through their dataset and update it, in order to make it compatible with the current version of the Unreal plugin?

Hi,

There may be a way to update the tileset, but I’m not familiar with the workflow. As I understand it, supported terrain tilesets use the quantized-mesh metadata extension to provide tile availability, and the unsupported older tilesets put all the tile availability in the layer.json file. So the the available metadata from the tileset.json file would need to be moved to the quantized-mesh metadata extension.

You can find a more in-depth explanation, an example, and other links that may be helpful in this comment.

-Alex

Alright, thank you for the insight.

Hi @cozycabin and @Arkwiz,

Thank you for your patience. As of the 1.13.0 release of Cesium for Unreal, support has been added for older quantized-mesh terrain tilesets such as yours. The release should be live on the Epic Marketplace soon, but if you want to download it earlier, you can download 1.13.0 from GitHub.

Please let me know if your tileset works after updating the plugin - if not, we can continue troubleshooting.

-Alex