Why is my jme lagging?

hi guys,

so i played around with jme a bit and i created a 513x513 heightmap that i loaded into jme with a “smallest grid size” of 17. however if i for example move around the camera quickly, my fps drop to like 5.

i dont think my computer is the reason as its pretty new.

id like to create huge landscapes but its kinda impossible if it already laggs on such a small map. is there anything i have to take care of in particular to fix this problem?



thx in advance



ps: any1 else got the problem that the alphamap has to be reverted x/y-axis wise to fit the heightmap?

You do not want a small terrain patch size of 17 keep it at 33 or 65 as you will have fewer meshes then.But I doubt that is your problem.

Remember that 512x512 terrain is 500k polygons. So your computer might just be too slow. What video card do you have?

Also try scaling your terrain on x and z axis to make it larger.



The images get flipped when loading, do this with the TextureKey when you load in the heightmap:

TextureKey myHeightmap = new TextureKe(“url”, true);

load it with your asset manager.

1 Like

im playing on a laptop with an nvidia geforce 310m which only has 128mb but it uses 1.6GB from my systems ram.

but i dunno, it looks edgy already as it is, if i higher the terrain patch size, it looks even more unrealisitic. maybe i got some setting wrong that could possibly smoothen out the whole landscape?



/edit nvm it looked edgy coz i failed smoothening my heightmap :smiley: so i can higher the values without any problems, thanks a lot :slight_smile: