Create HeightMap from array

I’m creating a software which loads GIS data and simulate it in 3D. I have already loaded elevation data to an array.



Is there a way to create a HeightMap from the array, in JME 3 ?



Please Help… :expressionless:

An array is a heightmap? If you want to create terrain with it, look at the terrain tests and the wiki entries about terrain.

thanx… but all the codes I have found are for the JME2… also I cannot create TerrainBlock classes as exampled in wiki…

I’m using JME 3 alpha 3…

I really need a workaround… please help…

https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:beginner:hello_terrain

https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:advanced:terrain

Both of these pages are also available in the F1 help menu :roll:

thanx again… I have already tried that too… It seems that that there is no class called “TerrainBlock” JME3… :frowning:

Now thinking about saving the array into a grayscale BMP file and then load it again as a texture…

Please read the pages I linked, there is no TerrainBlock used in these examples and they are written for jME3.

Checkout the javadoc for AbstractHeightMap

Thanx everyone… I have finally managed to create a heightmap and successfully rendered it… :D:D:D

Hi @all,



i’m also thinking about using something like a heightmap for my program. I have a lot of nodes appearing in the scene. Now i’m looking for a mechanism to generate a height map below these nodes. The nodes should stand up on the hill tops. Is there any class which can interpolate the heights if i maybe just add the special points (like hill tops and ground values)?



Thanks for the answers once before :wink:



Regards Moe

Yeah, the Terrain class can do that, look at TerrainTest.java for the usage.

All the links on these pages are broken. Very frustrating. A lot of people will be asking the same questions all over again. Can anything be done about this ?

Which pages? The pages of this six year old thread? Or?

All the links on all the pages that I’ve tried just go to a page that says the topic is not found or is private. I’m sure the answer to most of my questions is somewhere but I can’t find them.

I’ve solved this question anyway, but searching this forum is no useful if the question has been solved before but the links are broken.

The wiki was moved so old links like these don’t work. If you read the links though you will figure it out usually.
https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:beginner:hello_terrain

It says its in the wiki under beginner, hello_terrain

https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:advanced:terrain

It says its in the wiki under advanced, terrain.

The wiki link is at the top of this forum.