Add heightmap optimization algo