Fading Mask

Is there any trick to make a mask so that the edges of it get more and more transparent besides making a gradient of the backround? Say if that backround was too complicated to make a gradient.