Get Heightmap from created Terrain

Hey there,

young monkey here.

So I was wondering if it was possible to get the generated heightmap from my newly created terrain?



You can find out a lot about what you can do with terrain, or any class, by hitting ctrl+space after “terrain.”. That will show you all of the methods available on terrain. One of those methods is getHeightMap()

Indeed, Netbeans is a wonderful thing

Oh sorry, I mean as file - basically like the alphamaps

getHeightMap gives you the float array, it is up to you to persist it to whatever file format you need.

okay thanks, wasn’t sure if it could be found anywhere as file already :wink:

Ya it isn’t stored as a file, just as raw height data in the terrain itself.