Take the 2-minute tour ×  I'm searching for a nice and easy way
to generate a mask for an island map with C#.  Basically I'm
using with a random heightmap generated with perlin noise, where
the terrain is NOT surrounded by water.  enter image description
here  The next step would be to generate a mask, to ensure the
corners and borders are just water.  enter image description
here  Then I can just subtract the mask from the perlin noise
image to get an island.  enter image description here  and
playing around with the contrast..  enter image description here
and the gradient curve, I can get an island heightmap just like
I want it..  enter image description here  (these are just
examples of course)  so as you can see, the "edges" of the
island are just cut off, which is not a big problem if the
colour value is not too white, because I will just divide the
grayscale into 4 layers (water, sand, grass and rock).  My
question is, how can I generate a good looking mask like in the
second image?   I've found this