protected float calculateHeight(float red, float green, float blue) {
        return (float) (0.299 * red + 0.587 * green + 0.114 * blue);
    }
Get the grayscale value, or override in your own sub-classes
jme3-terrain/src/main/java/com/jme3/terrain/heightmap/ImageBasedHeightMap.java