Tms offline with local server

dear cesium team,
i have a tms map folder, and a local server
i dont want a terrain i just want the map to be published on cesium for unreal
i used a 3dtileset and changed the source to url and its value is http://localhost:5555/home/me/Desktop/myMap/tilemapresource.xml
and i also added a component TMS and gave it the same url.
in logCesium: loading tileset from url is done
but its not requesting any tile
and nothing is shown on the globe.
my xml file is correct.
what i am missing?

i have 7 actors:
cesium3dTileset
cesiumcameraManager
cesiumCreditSystemBP
cesiumGeoreference
cesiumSunSky
PlayerStart
PostProcessVolume.

i am using UE4.27 and 1.24 cesium

this is my xml

<?xml version="1.0" encoding="utf-8"?>
<TileMap version="1.0.0">
  <Title>XYZ-Compatible TMS</Title>
  <SRS>EPSG:3857</SRS>
  <BoundingBox 
    minx="-20037508.342789" 
    miny="-20037508.342789" 
    maxx="20037508.342789" 
    maxy="20037508.342789" />
  <Origin x="-20037508.342789" y="-20037508.342789" />
  <TileFormat width="256" height="256" mime-type="image/jpeg" extension="jpg" />
  <TileSets profile="global-mercator">
    <TileSet href="1" units-per-pixel="156543.0339280410" order="1" />
    <TileSet href="2" units-per-pixel="78271.5169640205" order="2" />
    <TileSet href="3" units-per-pixel="39135.7584820102" order="3" />
    <TileSet href="4" units-per-pixel="19567.8792410051" order="4" />
    <TileSet href="5" units-per-pixel="9783.9396205026" order="5" />
    <TileSet href="6" units-per-pixel="4891.9698102513" order="6" />
    <TileSet href="7" units-per-pixel="2445.9849051256" order="7" />
    <TileSet href="8" units-per-pixel="1222.9924525628" order="8" />
    <TileSet href="9" units-per-pixel="611.4962262814" order="9" />
    <TileSet href="10" units-per-pixel="305.7481131407" order="10" />
    <TileSet href="11" units-per-pixel="152.8740565704" order="11" />
    <TileSet href="12" units-per-pixel="76.4370282852" order="12" />
    <TileSet href="13" units-per-pixel="38.2185141426" order="13" />
    <TileSet href="14" units-per-pixel="19.1092570713" order="14" />
    <TileSet href="15" units-per-pixel="9.5546285356" order="15" />
    <TileSet href="16" units-per-pixel="4.7773142678" order="16" />
    <TileSet href="17" units-per-pixel="2.3886571339" order="17" />
    <TileSet href="18" units-per-pixel="1.1943285670" order="18" />
    <TileSet href="19" units-per-pixel="0.5971642835" order="19" />
  </TileSets>
</TileMap>

@annalamita To use a Raster Overlay, you’ll need to have some terrain to overlay it on. I think what you’re looking for is, instead of setting the URL to the tilemapresource.xml on the Cesium3DTileset, you’ll want to select the “From Ellipsoid” option under “Tileset Source.” This will provide you with a globe for your TMS overlay to appear on.

Actually, I notice you’re using Cesium 1.24. This version is over two years old, so it won’t have the ellipsoid tileset source option as this was added in 2.11. Is there a reason you need to stick with Unreal 4.27?

thank you for your answer.
i have the .terrain data which are the height map.
i changed the url to the layer.json file for the terrain.
and let the tms url in the tmsRasteroverlay but nothing happened.

if it can be done on the unreal 4.27 with the cesium 1.24 it will save a lot of efforts for me.
so if you can tell me how to do it with this version i will appreciate it.
thanks in advance.

Your terrain URL goes in the cesium3dtiles actor. In details panel change source to URL. It can be done in two ways

  • Now either you can create local http server. go to directory where your tileset is present.
python -m http.server 8000

and add http://localhost:8000/layer.json in source field.

or

  • Directly paste the absoulate path of your layer.json file to serve terrain tiles.

For example, if the file is at

C:\Users\username\MyProject\Data\Tileset\layer.json

would become

file:///C:/Users/username/MyProject/Data/Tileset/layer.json

Paste your edited path in the Url field on the tileset. Avoid any spaces in path if possible and if you can’t then add %20 in place of space in final path.

and

for imagery you need to add the TileMapServiceRasterOverlay component to cesium3dtiles actor and there you need to paste the url in TMSrasteroverlay component.
again follow the same as above just change the port if you are going to serve it using python.

If you are using geoserver or any other gis software to serve TMSimagery then you can publish the service there and use that url.

now click on the cesium3dtileset actor and click refresh tileset in details panel

@annalamita If you are providing quantized mesh terrain, Unreal should be loading it. If you can share the logs from Unreal, that might help us track down why it’s not being loaded.

As for the Ellipsoid tileset, unfortunately there’s not much you can do to use it in a years out-of-date version of Cesium for Unreal. You could try backporting it yourself to the older version, I suppose, but I think it would be much less work to upgrade to the latest version of Unreal.

@azrogers i understand that if i provide quantized mesh terrain in 3dtileset with tms imagery layer as a component. the terrain and the imagery should be visible to me right?
thank you for you reply :slight_smile:

@Aankit_K i did this right now and i see that the UE is requesting terrain and imagery tiles and i am returning them using my local server. but on UE there is nothing shown nor the terrain and or the imagery tiles. but i a returning them from the local host? why i cannot see anything loaded??
the tiles that are requested are exactly what should be requested based on the lat lon location in my cesiumGeoreference.
can you help me here?

@annalamita its difficult for me to debug the problem that you are facing from your reply if somehow you can share your screen I will be able to guide you.

Hi @annalamita,

There’s a couple variables here that are making it hard to diagnose this issue, notably:

  • The old (and no longer supported) versions of Unreal Engine + Cesium for Unreal
  • Our lack of access to the data in question

Of course, we understand and respect that not all data can be shared publicly. But that does make it difficult to see what errors could be occurring.

Some things that would help us narrow down this issue are:

  • Checking the Unreal console for any logs or error messages in the “LogCesium” category.
  • Sharing screenshots of your Cesium3DTileset settings, as well as the Cesium Tile Map Service Raster Overlay.
  • Testing if the data loads in a later version of Cesium for Unreal.
  • Sharing the data itself, or other sample data that also fails to load on your setup.

Thanks for your patience and understanding. :pray:

dear @janine, thank you for you reply :slight_smile:
to eliminate the option of the not working data, can you give me a very small data terrain and tms that are working so i can try it? like this we will save time and lots of replies if the problem is about data. but i dont think it is from data. because the data without the terrain was working when i was working online. but when i go to my class where there is no internet, the data did not work. after searching i realized that in this version of UE and cesium i have to add terrain data. and this what happened.
you should know that my terrain data is generated from the ctb script and its working on CesiumJS.
i am a teacher and my purpose is to teach the students on cesium and unreal, but i want it to run it offline in my class because there is no internet in the class.

Hi @annalamita, sorry for the delayed response.

can you give me a very small data terrain and tms that are working so i can try it?

I don’t think we have a small terrain file on-hand, but CesiumJS provides a small TMS layer here:

This is a layer that gets used in some of our Sandcastles, like this one.

because the data without the terrain was working when i was working online. but when i go to my class where there is no internet, the data did not work. after searching i realized that in this version of UE and cesium i have to add terrain data. and this what happened.

Let me take a step back – so you can see the data in Cesium for Unreal as long as you’re online? Can you confirm this is what you meant? This wasn’t mentioned in the previous posts, but it implies different things.

If you’re able to view your terrain and TMS layer in CesiumJS, then please also confirm that you’re able to see the data offline in CesiumJS as well.

As for Unreal, we definitely supported offline use in v1.24.0, and I know this for certain because we previously made an offline test application on this version that still holds up today. It’s not impossible that there’s a bug, but I have a hard time understanding what could be causing the difference between online and offline behavior.

Sometimes servers will behave differently if you use http versus https in the URL, but it sounds like your requests are going through anyway, so that’s probably not the culprit. I hate to be a broken record, but really the only things that would give us more information at this stage are sharing any errors being printed to the Unreal console, or trying out the plugin in the latest version.

Yes online i saw the TMS data on unreal.
when i took my laptop to the class where i am offline there. nothing is shown.
azrogers told me that i have to add terrain when i am offline so i can see my TMS because i am using old version.
so i tried to put Terrain that was working on CesiumJS in offline mode.
but also, nothing is shown on the cesium for unreal.
althought UE is requesting the Terrain and the TMS and when camera changes in cesium for unreal the requests change also. i am serving all the data with my local servers and i am seeing the logs (request and response)
in the unreal console there is no errors at all.