I am trying to load a tileset (.TERRAIN via URL). This was created from a geoTIFF to .Terrain tileset via CTB. It contains a layer.json file.
When i try to load that in UE4, i get the following:
LogCesium: Loading tileset from URL http://127.0.0.1:8088/layer.json
LogCesium: Loading tileset from URL http://127.0.0.1:8088/layer.json done
LogCesium: Warning: [2022-02-28 12:00:39.163] [warning] [TileContentFactory.cpp:77] No loader registered for tile with content type ‘application/octet-stream’ and magic value '?
LogCesium: Warning: [2022-02-28 12:00:39.163] [warning] [TileContentFactory.cpp:77] No loader registered for tile with content type ‘application/octet-stream’ and magic value '?
Similar issue reported here:
I have found the following post:
which describes that i might be missing a .metadata file, which describes the tileset availability?
I was able to load that same terrain (geoTIFF) file form Cesium ION.
I guess my question going forward is, it what Kevin describes wrt to the .metadata file @Kevin_Ring the case? how do we generate this? Please suggest?
Does anyone have a terrain tileset, that they are able to load locally without being connected to the internet? that i can learn from?
You may very well run into an availability problem next, but the immediate problem here is different. Quantized-mesh tiles (.terrain files) must be served with a response header of Content-Type: application/vnd.quantized-mesh. Your web server is instead serving Content-Type: application/octet-stream. You should be able to modify the configuration for the web server running on 127.0.0.1:8088 to return the correct content type.
If that’s inconvenient, we recently merged a change that also allows cesium-native to identify quantized-mesh tiles by their file extension (.terrain). That change should also solve your problem, and it will be in the March release of Cesium for Unreal that will be available this week.
The availability/metadata problem is harder to solve. One solution is to use Cesium ion instead of CTB! Another option is to extend CTB to use the metadata extension instead of availability in layer.json. And the last possibility is to implement cesium-native#292. This issue is on our list to be implemented, but I can’t commit to a time frame.
Sorry for the late response. I did not get any notifs about posts on my email…
for the issue with Terrain Models, i just switched over to CesiumLab to generate the mesh types, but i am serving up the files through a python local HTTP server. with a modified response header. Please see attached code for how i did that.
Not sure if you are cool with setting up a python solution but its what i did.
Are you running the local server on linux? I am on a windows local server here, will try that and see.
Curiously enough, I was able to download the terrain.zip file you referenced up above (from another user) and was able to serve and load that into unreal and it displays fine. When I try to do the same thing with my generated mesh, however, I got the ‘unable to parse error’ - it says I’m trying to load extensions=octvertexnormals
I’ve managed to get your python script running and I can see that it’s serving the data correctly, but I am still getting this log error Did you have to modify the layers.json file at all?
Yes, the .terrain files generated by CTB are compressed. I had to reconfigure the local server to identify the terrain files as gzip (I forget the actual details, there were notes I followed from another thread on here I think)
Ehm, I totally hacked my local server config files and I couldn’t even tell you how it worked, but this was the article I found the answer from:
The key is that CTB generated data is actually gzipped but that information isn’t passed along in the url, so you basically have to retarget any server requests for .terrain files with Header set Content-Encoding: gzip, in order for the system to know how to properly handle the data. Once this is set up, you just call the Tileset using the ‘FromURL’ function and then a local server path similar to this: http://192.168.1.208/Cesium_Dev/Victoria/terrain/layer.json
Having said all that, I am able to get local data into the system but I have not had a fully successful build out of CTB yet. It works but there are patches missing, incorrect bboxes, etc. I’m curious how CesiumLab might handle things, is there an English build of it?
I think that was the other part I forgot to mention. The mimetype also has to be set to octet stream instead of octvertexnormals, as well as the gzip encoding notification. Hope it makes sense, not an IT pro here