How to use glass substitution to optimize the glasses in your optical design

The traditional glass choice methods like Conrady d-D and the use of model glasses are limited when choosing the best glass materials for your optical system. This article explains how to use the glass substitution method for direct glass optimization, and how to further restrict glass choice to include factors like glass availability, cost, climate resistance etc.

Authored By Nam-Hyong Kim


Glass substitution is the most effective method for choosing glasses in OpticStudio. The glass substitution directly alters the glass types, and then reoptimizes the system to see if the new glasses yield a better solution.

OpticStudio automates this procedure by allowing glasses to have a "substitute" status associated with them. If a glass is marked as a substitute glass, then the global optimization algorithms (Hammer and Global Search) automatically perform iterative substitution of similar glass types during optimization. This allows OpticStudio to optimize the system without resorting to idealizing the material dispersion. This article will provide an example of this method. 

Glass Substitution

Optimization of glasses is handled somewhat differently than other data in OpticStudio. Optimizing the glass choice directly is a difficult and unpredictable process because glasses exist only with discrete properties.

The traditional method for handling glass choice is to use some kind of model glass. The model glass method is to idealize the glass dispersion using a few numerical parameters, and then optimize these parameters while constraining either the parameter values or the computed index values to be similar to available glasses. In the visible region the method can be simplified further by using Conrady d-D methods, in which only a few rays of different wavelengths are traced, scaled and their differences driven to zero by the optimizer.

If a glass is made into a "model" glass described by the index, Abbe, and partial dispersion deviation, then the parameters to the model may be made variable and optimized just like any other numerical parameters. However, the model glass method has one serious drawback. After a good solution is found using model glasses, a conversion must be made back from the model glass to a real glass. The design must then be reoptimized using the new glass selection. Unfortunately, for many systems the newly optimized design will perform worse than the model glass design. Even more frustrating is that the optimal design using real glasses may have a different form than that found using the model glass.

To avoid the headache of the above process, OpticStudio provides a glass substitution tool. The glass substitution method uses real glasses from the glass catalog to replace the glasses in the Lens Data Editor during optimization.

To see the glass substitution in action, we will optimize the glasses in the sample Doublet.zmx file located in {Zemax}/Samples/Sequential/Objectives/Doublet.zmx.

Open the sample file and set the substitute status on the two glasses in the Lens Data Editor, by opening the solve dialog box (double or left click on the glass parameter) and setting the solve type to “Substitute”.


The letter “S” will appear next to the glasses, indicating that theses glasses have the substitute status.


Build the RMS wavefront default merit function using the default merit function tool in the merit function window.


Click Ok and the Merit Function Editor will show:

Merit Function Editor


Since each time the glass is substituted during optimization the merit function value makes a discontinuous jump, glass substitution requires the use of global optimization algorithms such as Global Search or Hammer, instead of the local optimization.

The glasses selected for substitution are chosen from the current materials catalogs for the system, listed under System Explorer...Material Catalogs...Catalogs To Use, which in this case is the Schott catalog.

Schott catalog

Open the OPD fan plot to note the performance of the system before optimization. The OPD scale is 0.5 waves.


Perform the Hammer optimization by clicking Optimize...Hammer Current. Check the “Auto Update” option to see the changes in the Lens Data Editor and the OPD fan plot during optimization.

Click “Hammer” to optimize


You will see the glasses being substituted during optimization and see the changes in the OPD fan window.

The Result

Stop the optimization after a minute or so. The glasses in the Lens Data Editor might be as following:

Lens Data Editor

Set the OPD fan scale to 0.5 for easy comparison to the pre-optimization performance.  It is obvious that the performance has greatly improved.


All glasses listed under System Explorer...Materials Catalogs...Catalogs To Use will be considered for substitution. If you want to limit the substitution to subset of catalogs for a specific glass, you can type the name of the catalog(s) in the solve window. For example, if you have both Hoya and Schott listed in the General window:


but you want to use only Hoya glasses for surface #1, all you need to do is to type “Hoya” in the solve window of that glass.

Lens Data Editor_2

Now only Hoya glasses will be chosen.

The Glass Substitution Template

You can further restrict the substitution within the catalogs by using the glass substitution template, under Libraries...Glass Substitution Template. Make sure to check the “Use Glass Substitution Template” box; if you do not, then all glasses in the catalog will be considered for substitution, as in the previous exercise.

Use Glass Substitution Template

The substitution template uses data in the glass catalog such as “relative cost” and “status” to filter the glasses. For example, it if often advantageous to check the “Preferred” option, since Preferred glasses are usually frequently melted glasses, and more likely to be available upon demand.

To see the data or status for a particular glass, open the materials catalog window by clicking Libraries...Materials Catalog.


The materials catalog gives the glass status, which can be Standard, Preferred, Special, Obsolete or Melt. Unless you really need to choose otherwise, always select 'Preferred' glasses only, as these are the lowest cost, most chemically stable, most commonly used, etc. glasses.

The materials catalog also lists relative cost (price per unit weight compared to N-BK7), climate resistance, stain resistance, acid resistance, alkali resistance and phosphate resistance. By using the Glass Substitution Template, you can ensure that the glasses chosen meet other important criteria rather than just optical criteria.


Was this article helpful?
16 out of 16 found this helpful



Please sign in to leave a comment.