I am using jMonkey’s ImageBasedHeightMap class to load a Heightmap, and I am then creating a new TerrainQuad from this heightmap:
Texture heightMapImage = manager.loadTexture(file); heightmap = new ImageBasedHeightMap(heightMapImage.getImage()); heightmap.setHeightScale(2); heightmap.load(); int patchSize = 256; terrain = new TerrainQuad("Map", patchSize, 513, heightmap.getHeightMap());
The problem is that the terrain has far too many vertices. As I am loading 12 * 12 (144) chunks in total, this is amounting to be quite a lot of vertices.
The vertex count there is far, far, too high. That same terrain could easily be approximated without much visual loss with less than a quarter of the vertices shown in that picture.
I understand that the terrain is split up into x vertices no matter if it is flat, hilly, or whatever. This is not what I’m asking for - I’m asking how I can just flat-out reduce the vertex count in the terrain for everything.
(Even my powerful PC can’t cope with 10 million vertices)
I am aware that I could export smaller heightmaps, load smaller terrain quads, and then scale them up. Unfortunately, this is not possible due to quirks of the world generator that I use, and JME does not let heightmaps be larger than the TerrainQuads, and the setSize() method on the ImageBasedHeightMap class seems to be useless for this purpose.
Yes, I do have LOD on the terrain, but it doesn’t seem to help much.
(Note: I managed to duplicate the same terrain in Java & LWJGL with just 512 vertices per chunk, and it still looked fine. No LOD algorithms either)