Turning off the automatic generation of irregularities in a terrain

Hello all,

I got this

when I generated terrain from a perfectly smooth gray scale gradient. This is really zoomed in but you can see it’s not smooth.

I think I read somewhere that jME3 automatically generated some irregularity in the terrain to make it look better.

How do I turn it off?

Here is the code for the terrain

[java]Texture heightMapImage = assetManager.loadTexture(ASSET_PATH.BASE.relativePath


    heightmap = new ImageBasedHeightMap(heightMapImage.getImage());


    TerrainQuad terrain = new TerrainQuad(TERRAIN_NAME, PATCH_SIZE, MAP_SIZE + 1, heightmap.getHeightMap());[/java]

    The heigh map:

No it is not generating irregularities to make it look better. Try a different material (such as Unshaded.j3md) and upgrade your video card drivers. This is a material/driver issue.

I might mislead you since in the snapshot I’m using custom shaders.

This terrain also has some litttle bumps and it’s heighmap has none.

I’ll leave one that is taken by just substituting the height map and removing all the normal textures from the advanced terrain example.

I’m having some problems with compatibility between ubuntu distro and video card drivers.

If you are sure it’s drivers problems I’ll find a solution.

Well if it is a custom shader, it is really hard to tell if it is that or the drivers. Often when I see the bright and odd colors like that it means the driver is busted.

Those bumps there are on the actual geometry, not generated in the shader, and will be coming from your heightmap. Terrain doesn’t automatically add bumps or anything, it directly reads your heightmap.

Since I’m reading from image maybe it’s from compression of format then.

Thanks again. :slight_smile:

Its due to precision, your heightmap is 8-bit which is too low for terrain. Use .raw files instead and load them via RawHeightMap class.