code to generate random heightmaps and blendmaps