How do you resize the terrain propperly?

I have my terrain loaded and it looks like the heightmap! (well kind of)



Here is what I see, notice the grainy bits in front of the hill.







Those grainy bits are all supposed to be the same height, they are all the same shade in the heightmap. Why are they there?



Also, it’s ever so small. I tried scaling up the terrain using;


      // Scale the data
      Vector3f terrainScale = new Vector3f(0.01f, 0.005f, 0.01f);
      tb = new TerrainBlock("Terrain", heightMap.getSize(), terrainScale,
            heightMap.getHeightMap(), new Vector3f(0, 0, 0));



But this just scaled up the heightmap and I ended up with just a portion of the map but it still remained the same size as in the image above. The rest of it extended beyond the gray square and therefore wasn't there. (the gray square remains the same size regardless of the scale)

How do I scale up the whole thing?

Also, could someone please tell me what is happening when the terrain is being made. Does it automatically produce a terrain consisting of the same ammount of verts as there are pixels in the heightmap?

Do I need to scale the textures as well? because I set the textures to be the heightmap, which is why it is gray, but the hills aren't white?! So I assume the textures are scaled larger than the model.

Basically how do I scale everything to the same size?

Thanks

Neilos

lol.



My SkyBox was set to 10,10,10 and when I scaled the terrain up it was hidden behind the skybox!



I saw it in a moment of inspiration!



I have spent ages going through the API and over my code to check scaling issues and to see if I was culling anything inordinately.



Phew.



Also the grainy bits were in the heightmap, I was being dumb lol



Here is an improved pic  :lol:







Just a trivial point for now but it’ll matter in the long run. The gradient of the slope is steppy I think Iknow the reason for it but I don’t fully understand why it is there.



Basically the heightmap is going up by one shade of grayscale for instance



30-31-32



and it is being rendered at (i think) more verts per pixel (which is weird cos I thought it got its size from the heightmap?!?!? see below) anyway it is being rendered like



30-30-30-30-31-31-31-31-32-32-32-32



I would of thought though that the terrain is rendered in 16bit so it would calculate a nice smooth gradient. How do I accomplish this?



or am I wrong and it is just a badly drawn heightmap?



Here is the code where I believe the TerrainPage should be one vert per pixel;


       tp = new TerrainPage("Terrain", 33, heightMap.getSize(), terrainScale,
                                        heightMap.getHeightMap());



Thanks

Neilos