A computer-implemented method for generating an optical model of a structure to be measured on a semiconductor wafer, comprising: selecting first values and one or more second values of process parameters for one or more process steps used to form the structure on the wafer; simulating one or more characteristics of an expected shape of the structure that would be formed on the wafer using the first values; generating an initial model of the shape of the structure based on results of said simulating; simulating the one or more characteristics of the structure that would be formed on the wafer using the one or more second values as input to the initial model; providing results of both of the simulating steps into the optical model of the structure; determining a parameterization of the optical model based on how the one or more characteristics of the structure vary between at least two of the first values and the one or more second values, wherein the selecting step, both simulating steps, the generating step, the providing step, and the determining step are performed without using images of the structure as formed on a wafer and before the structure is formed on any wafers, and wherein the selecting step, both simulating steps, the generating step, the providing results step, and the determining step are performed by a computer system; and simulating results of optical measurements of the structure that would be formed on the wafer using the first values and the one or more second values and determining which parameters of the optical measurements are more sensitive to changes in values of the process parameters than other parameters of the optical measurements. selecting first values and one or more second values of process parameters for one or more process steps used to form the structure on the wafer; simulating one or more characteristics of an expected shape of the structure that would be formed on the wafer using the first values; generating an initial model of the shape of the structure based on results of said simulating; simulating the one or more characteristics of the structure that would be formed on the wafer using the one or more second values as input to the initial model; providing results of both of the simulating steps into the optical model of the structure; determining a parameterization of the optical model based on how the one or more characteristics of the structure vary between at least two of the first values and the one or more second values, wherein the selecting step, both simulating steps, the generating step, the providing step, and the determining step are performed without using images of the structure as formed on a wafer and before the structure is formed on any wafers, and wherein the selecting step, both simulating steps, the generating step, the providing results step, and the determining step are performed by a computer system; and simulating results of optical measurements of the structure that would be formed on the wafer using the first values and the one or more second values and determining which parameters of the optical measurements are more sensitive to changes in values of the process parameters than other parameters of the optical measurements.