Hello,
I don’t remember I got this problem on Jme1.
Here is the screenshot that shows a 128x128 .RAW (8bits) heightmap made in photoshop
And the result with Jme2:
http://www.iimmgg.com/image/a7bbdc6694e222d2bfb791a30ebb5c91
As you can see, the relief appears 2 times on the TerrainBlock.
I spent lot of time reading through the forum to get an answer and tune the few lines of codes as much as I could.
Anything stupid here ?
RawHeightMap heightMap = new RawHeightMap(Main.class.getClassLoader().getResource(
"Data/TERRAIN1.raw").getFile(), 128,
RawHeightMap.FORMAT_16BITLE, false);
Vector3f terrainScale = new Vector3f(1F, 0.0001F, 1F);
heightMap.setHeightScale(0.01f);
System.out.print("heightMap.getSize(): "+heightMap.getSize());
TerrainBlock terrainBock = new TerrainBlock("terrainBock", heightMap.getSize(),
terrainScale, heightMap.getHeightMap(), new Vector3f(0, 0, 0));
terrainBock.setDetailTexture(1, 1);
terrainBock.setModelBound(new BoundingBox());
terrainBock.updateModelBound();
terrainBock.setLocalTranslation(new Vector3f(0,0,0));
terrainBock.updateRenderState();
Thanks a bunch for help
PS: dont pay attention to the green curves as it's just here to represent the intersection btw the terrain and a plane.