Custom terrain server questions

My previous experience with tiling comes from celestia, i made custom virtual textures for a few projects, creating a tree of levels, each (file) containing appropriately named raster tiles for height maps and color maps, the process was easy enough really.

I have created a very large set of custom data, a fictional planet that id like to make explorable in cesium, and I can export the data into tiles and rename them ofcourse. but im not too sure how i should name them and if i can keep the raster .png extension or it has to be converted?.

Under my logic a TMS format would be:

level 1:

-1.0 / 0.0

Bump. Please help.

Hi,

You can use TMS PNG files for imagery out of the box. TileMapServiceImageryProvider reads tiles organized as described here.

Terrain is a little tougher. CesiumTerrainProvider supports both heightmap and mesh-based terrain tile formats, described here (these are the .terrain files):

http://cesiumjs.org/data-and-assets/terrain/formats/heightmap-1.0.html

http://cesiumjs.org/data-and-assets/terrain/formats/quantized-mesh-1.0.html

There are other terrain providers available as well. Check out the Terrain tutorial.

We don’t generally load terrain from PNG files because PNG only supports 8 bits per pixel component, which is insufficient for Earth terrains. It’s possible to encode heights across multiple components (ie, use all three channels, RGB) but that’s awkward, doesn’t really lead to images that compress very well, and is slower to work with in the web browser.

That said, if you already have a bunch of PNG terrain tiles that you’re happy with, in a TMS-ish layout, it’s probably pretty straightforward to write a custom TerrainProvider to read it.

We’d definitely be interested in adding your game to the showcase!

Kevin

Well I have the ability to export heighfield as .ter (used by terragen or leveller) which i gather is the same as .terrain from what I can find online, so i can easily rename the extensions, It is stated to be a 16Bit + export

here is the file structure:

Normally I use PNG as I am a visual person that prefers to see what im working with but I can deal with it.

And my projection is equirectangular (Sphere wrap) not Mercator (Hate to work with Mercator) so I hope that wont be an Issue, or will it?

regarding the terrain provider, I suppose I could "Hijack" an existing one by replacing the server links to my server, and Image wise I can name them as this (tx_0,0.ter or tx_0_0.ter or even 0,0.ter), if i can have access to a terrain provider file im sure I might be able to pop it into notepad++ and replace the links I need to replace.

Hi,

Sorry not to hijack the discussion, but which format (quantized-mesh vs heightmap) is generally more efficient in terms of storage space?

Thanks,

Ryan

Hello,

.ter doesn’t look like the same format as Cesium’s .terrain to me. The content is similar, but the structure is different.

Hi,

Sorry not to hijack the discussion, but which format (quantized-mesh vs heightmap) is generally more efficient in terms of storage space?

Thanks,

Ryan

Hi Ryan,

It’s hard to compare exactly, but they’re both in the same ballpark going over the wire. The mesh terrain takes less memory on the client, renders faster, and is better able to guarantee accurate rendering of the terrain.

Kevin

Thank you, I will in that case being exporting all my data (a 3 levels to test) and will try to set up a custom terrain provider as you mentioned, might be easier than I imagine from what I see, Maybe I will be able to disable the 2D and Columbus view (but can live with them). and of course try to customize the stars and moon (since we have textures for that) and possibly add a ring since our planet is ringed (I will do it using the polygon facility).

Will have to explore the source code since I dont know which specific file points to the data server.

Hope you don't mind if I pick your brains (Figuratively)in the future, and it would be awesome and cool if you did include our world as a showcase, it is complete fiction but highlight a slightly niche use for cesium.

The URL of the server is specified as a parameter to the constructor of the terrain provider, so you don’t need to change code just to point to a different server. But the source for CesiumTerrainProvider is here:
https://github.com/AnalyticalGraphicsInc/cesium/blob/master/Source/Core/CesiumTerrainProvider.js

Other terrain providers are in the same directory.

When you have something you’d like to show, send us a writeup and some pictures, videos, or a link to a working demo and we’ll add it to the showcase page.

Kevin

Good to know, thanks. Are there any tools available to generate tiles from source elevation data in quantized-mesh format?

Yes, STK Terrain Server.

Great, thanks.