Grayscale lithography is an extension of the conventional binary lithographic process for realization of arbitrary three-dimensional features in photoresist materials, with applications especially in micro-optics fabrication. The grayscale photomask possesses a spatially varying transmission that modulates the exposure dose received in the photoresist. By using a low contrast photoresist, such as those based on diazonaphthoquinone (DNQ), the material is only partially removed during development in proportion to the local exposure dose received. In this way, an arbitrary surface topography can be sculpted in the photoresist material. It is common practice in grayscale lithography to encode the transmission levels of the photomask by using the photoresist contrast curve to determine the exposure dose required for a given photoresist thickness at each lateral point in the pattern. This technique is adequate when the surface topography is slowly varying and the photoresist film is thin. However, it is inaccurate when these conditions are not met, because the technique essentially represents a one-dimensional approximation to the lithographic process where the isotropy of the development and the diffractive imaging of the photomask are neglected. Currently we are applying grayscale lithography to the fabrication of a fiber-to-waveguide coupler based on the parabolic reflector, where the efficiency of the device is quite sensitive to fabrication errors in the coupler geometry. In this case the thin photoresist and slowly varying topography conditions are not met, and we turn to more comprehensive process models to determine the appropriate transmission levels to encode in the photomask. We demonstrate that the photomask can be optimized, based on simulation of the lithography process, to produce the required three-dimensional photoresist pattern.