Hello,
I have been using jMonkey for few days now, and I like it very much so far, but I cannot get smooth terrain from it.
I have tried to create terrain with this tutorial https://jmonkeyengine.github.io/wiki/jme3/beginner/hello_terrain.html
but you can even see small steps in the picture used in the tutorial.
I don’t thing there is a problem in my heightmap because I have used different ones(created in different resolutions of power of 2, in different image editors, all in 16-bit greyscale, blurred and shaded, in PNG), even tried downloaded ones
even simple smooth gradient makes small steps same as here Jagged terrain?
I have read that I should use heightMap.smooth(float ); but the method just isn’t there (I am using SDK v3.1-stable)
But when I use HillHeightMap instead of ImageBasedHeightMap the terrain looks as it should.
This is my terrain when I use smoothest gradient I can
btw I use gimp and blender to create heightmaps bcause Build-in terrain editor isn’t working
It says OpenGl context not started, I have tried to check UseHeavyWheightCanvas option but than cannot run SDK at all so I leaved it unchecked
When do you get this exception? When loading the terrain? When opening the scene? Hmm, it’s weird because the terrain editor is working for me, it always worked…
My last info is that jme does not support 16bit grayscale images loaded from a png. AFAIK it is a AWT limitation that the image gets downsampled to 8bits. Might be outdated, but it was that way
As was mentioned this is caused by getting reduced to 8bits. You can get better looking maps if you use gimp to convert the original 16bit png image to .dds format. The loader will read it in as 16bit then.
OK got it.
heghtMap.smooth() did the trick, (I’m not sure why I didn’t saw the method before)
and I changed my graphics drivers so I can now play scene composer which makes terrain smooth as well.
Thank you for replies and sorry for grammar.