Terrain generation with pre-defined height data

Hallo everybody,

I am now under way to create the terrain for my game but have the following two problems:

1.) I am using a HillHeightMap to generate the terrain but sometimes I am getting a curios white block and not a terrain (is happening only every 10 times of generation)

2.) I have an array of Vector3f Points. With this array I want manipulate the generated terrain (Height information). Is this possible with heightMap.setHeightAtPoint() ? The pre-defined data is real GPS data which I want to integrate into my terrain.

HillHeightMap heightMap = new HillHeightMap(129, 2000, 5.0f, 80.0f,
        (byte) 2);
        heightMap.setHeightAtPoint(250, 100, 100);
        Vector3f terrainScale = new Vector3f(10, 1, 10);
        terrain = new TerrainPage("Terrain", 33, heightMap.getSize(), terrainScale,
        terrain.setDetailTexture(1, 16);

I am getting closer and closer to understand the JME System and how to use it properly with your help.

Thank you allot for your help !

best regards,

I'm not sure if I have seen #1 (the white blocks). Might be a video card issue? Can try upgrading your drivers. Does it happen randomly with the same height dataset?

For #2 I modify my terrain after it has been generated using

TerrainPage.addHeightMapValue(heightMapY, heightMapX, height);


I have to call TerrainPage.fixNormals() sometimes too, but usually only once I am finished modifying the terrain.

But you should be able to set the height value of the heightmap first then generate the terrain as you have in your code there.

Thank your for your answer. I will try to it out.

But I have one more question: Is the height value always between 0 to 250 (Real GPS data have height values from 0 to 4000 meters (7000 ft)) ?

thank you!