private void createTerrain(Node rootNode, AssetManager assetManager) {
                Material matRock = new Material(assetManager,
                        "Common/MatDefs/Terrain/TerrainLighting.j3md");
                matRock.setBoolean("useTriPlanarMapping", false);
                matRock.setBoolean("WardIso", true);
                matRock.setTexture("AlphaMap", assetManager.loadTexture("Textures/Terrain/splat/alphamap.png"));
                Texture heightMapImage = assetManager.loadTexture("Textures/Terrain/splat/mountains512.png");
                Texture grass = assetManager.loadTexture("Textures/Terrain/splat/grass.jpg");
                grass.setWrap(WrapMode.Repeat);
                matRock.setTexture("DiffuseMap", grass);
                matRock.setFloat("DiffuseMap_0_scale", 64);
                Texture dirt = assetManager.loadTexture("Textures/Terrain/splat/dirt.jpg");
                dirt.setWrap(WrapMode.Repeat);
                matRock.setTexture("DiffuseMap_1", dirt);
                matRock.setFloat("DiffuseMap_1_scale", 16);
                Texture rock = assetManager.loadTexture("Textures/Terrain/splat/road.jpg");
                rock.setWrap(WrapMode.Repeat);
                matRock.setTexture("DiffuseMap_2", rock);
                matRock.setFloat("DiffuseMap_2_scale", 128);
                Texture normalMap0 = assetManager.loadTexture("Textures/Terrain/splat/grass_normal.jpg");
                normalMap0.setWrap(WrapMode.Repeat);
                Texture normalMap1 = assetManager.loadTexture("Textures/Terrain/splat/dirt_normal.png");
                normalMap1.setWrap(WrapMode.Repeat);
                Texture normalMap2 = assetManager.loadTexture("Textures/Terrain/splat/road_normal.png");
                normalMap2.setWrap(WrapMode.Repeat);
                matRock.setTexture("NormalMap", normalMap0);
                matRock.setTexture("NormalMap_1", normalMap1);
                matRock.setTexture("NormalMap_2", normalMap2);

                AbstractHeightMap heightmap = new ImageBasedHeightMap(heightMapImage.getImage(), 0.25f);
                heightmap.load();

                TerrainQuad terrain
                        = new TerrainQuad("terrain", 65, 513, heightmap.getHeightMap());
                terrain.setMaterial(matRock);
                terrain.setLocalScale(new Vector3f(5, 5, 5));
                terrain.setLocalTranslation(new Vector3f(0, -30, 0));
                terrain.setLocked(false); // unlock it so we can edit the height

                terrain.setShadowMode(ShadowMode.Receive);
                rootNode.attachChild(terrain);
            }
This test creates a scene with a terrain and post process water filter.
jme3-screenshot-tests/src/test/java/org/jmonkeyengine/screenshottests/water/TestPostWater.java