public void updateHeightmap(BufferedImage hmap) {
		for (int i = 0; i < hmap.getWidth(); i++) {
			for (int j = 0; j < hmap.getHeight(); j++) {
				float color = new Color(hmap.getRGB(j, i)).getRed();
				color /= 255f;
				color -= 0.5f;

				color *= 16;

				terrain.setHeight(j, i, color);
			}
		}
	}