Terrain Generation query

Hi its me again from the world of gotha. I have been playing about with caesium and I wanted to create some low resolution test terrain to see if I can “high jack” the program into using our own terrain data instead of earths.

But im having issues understanding Cesiums terrain division format since there is no graphic explanation on how the tiles are divided. I but I think its more or less like celestia that uses an equirectangular texture divided in 4 tiles for its first resolution level, which they themselves are subdivided into 4 to create level 2 and so on.
Is this correst? If so im assuming polar abstracts are a feature in Ceasium (but that’s cool).

I also seem to gather that Ceasium cannot actively generate textures as we zoom in, that’s a shame though but I can make do with making my own to a few levels of resolution. And of course no vegetation.

I know how absurd this sounds, but is there a practical possibility of caesium ever having foliage and procedural texturing capabilities like proland? Im sure since its open source yes but from my very limited experience I can assume that an ENOURMOUS task.

Can someone please enlighten me on terrain tile creation in caesium to see if I can have something testable (im becoming more and more engrossed in this)

Thank you and I hope someone can assist me.

Polar artifacts i mean

Hi sorry again, is it possible to see the file structure I need to have on my server to keep the tiles in and what if any additional code files I need to add (include in my server). for your native terrain data set up.

I assume any jpg image or bmp re-extentined .terrain would do the trick right? Or is there a conversion tool in existence?

Hi Brando,

The .terrain format expected by CesiumTerrainProvider is documented here:

https://github.com/AnalyticalGraphicsInc/cesium/wiki/Cesium-Terrain-Server

You can also implement the interface specified by TerrainProvider (http://cesium.agi.com/Cesium/Build/Documentation/TerrainProvider.html?classFilter=&show=js) to access terrain data in some other format.

Cesium can work directly with terrain in the geographic (equirectangular) or web mercator (the one used by Google Maps, Bing Maps, etc.) projections. Support for other projections can be added in principle, but expect some difficulties.

Textures can be generated as you zoom in. For an example, see TileCoordinatesImageryProvider (http://cesium.agi.com/Cesium/Build/Documentation/TileCoordinatesImageryProvider.html?classFilter=&show=js). Similar to TerrainProvider, you can implement the interface defined by ImageryProvider (http://cesium.agi.com/Cesium/Build/Documentation/ImageryProvider.html) to provide imagery from a custom source. One thing that is currently not well-supported is imagery that changes with time.

There is nothing technical preventing Cesium from rendering foliage. Someone just has to do it. I don’t know if I’d call it an enormous task (in the grand scheme of Cesium), but it’s not trivial.

I hope this helps!

Kevin

Thank you Kevin, it does help alot. it seems quite workable. i think for now we will be content to implement a textured terrain of Gotha. then borders and then river in time.

I will keep investigating and try to make a test. some other things like the TileCoordinatesImageryProvider i dont understand how it can generate procedural grass, stones, sand and so on. would be glad if someone could explain it to me.

if so thank you so much for your help.

p.s, wow so its you who wrote the procedural globe book, i bought it a while now, very informative! nice to have had feedback from the author.

Hey Brando,

I didn’t mean to imply that TileCoordinatesImageryProvider can actually procedurally generate grass, stones, etc. But it is an example of an ImageryProvider that generates tile textures on-the-fly. You could potentially use a similar technique (drawing to a Canvas on demand) to do what you want to do. Check out the source code for it here: https://github.com/AnalyticalGraphicsInc/cesium/blob/master/Source/Scene/TileCoordinatesImageryProvider.js

Glad to hear you’re enjoying our virtual globe book! As you may know, Patrick Cozzi, the other author of the book, is also the founder of Cesium.

If you’re looking to do shader-based procedural textures as described in the book, it will require some more extensive changes to CentralBodyFS.glsl and CentralBodySurface.js. We’ve talked about allowing imagery tiles to be materials in the Fabric system (https://github.com/AnalyticalGraphicsInc/cesium/wiki/Fabric), which I think would let you do what you’re aiming for very elegantly. It would be a very cool feature, but it might be awhile before we get there.

Kevin