Did you make sure while creating the Terrain Mask that you used RGB colors respectively? They must be at their extreme, or else it won't work. For example, the Red on the map must have the color code R: 255, G:0 B:0. You may also only use the colors Red, Green, and Blue to mark out terrain.