We discuss a method to control the coating thickness deposited onto large and strongly curved optics by ion beam sputtering. The technique uses an original design of the mask used to screen part of the sputtered materials. A first multielement mask is calculated from the measured two-dimensional coating thickness distribution. Then, by means of an iterative process, the final mask is designed. By using such a technique, it has been possible to deposit layers of tantalum pentoxide having a high thickness gradient onto a curved substrate 500 mm in diameter. Residual errors in the coating thickness profile are below 0.7%.