normally jmaonkey giving us terrains ,power of 2.is there are any way of making rectangular terrain
and can we use 2d arrays for height maps directly
robin said:
and can we use 2d arrays for height maps directly
Im not sure if rectangular terrain works, but you can pass an heightmap as an array of float values.
If your 2D array has height value for a (x,y) point at heightmap[x][y]; make it a 1D array with that value at heightmap[x+y*width] and pass it to TerrainQuad constructor.
1 Like
thank you,i got it 2d to 1d
iām trying to make rectangular terrain,actually they have given me rectangular array