Soon, we will launch a new and updated customer portal, which is an important step toward providing our customers with one place to learn, interact, and get help.
Learn more.

Can I Define a Background Material Other Than Air?

This article outlines the procedure for creating a background material other than air for a NSC group. 
Dan Hill
Freqently Asked Questions
Non Sequential Ray Tracing

Defining Background Medium in Pure NS Mode

In non-sequential mode, the background material is always assumed to be air. However, since the nesting of materials is supported, it is extremely easy to define a background material out of a volume object which encloses the entire optical assembly.

For example, imagine that you wanted to immerse your entire design in water. Using the “Even Asphere.ZMX” sample file (located in Zemax\Samples\Non-Sequential\Miscellaneous directory) for demonstration, a Sphere object (or any desired volumetric object, for that matter) could be inserted as Object 1:

nsce 1

By setting the Material to WATER, the Radius to 100, and the Is Volume? flag to 1, a volumetric sphere of water is created which encloses all other optical components:

nsce 2

3d layout 1

As the scale of the plot becomes skewed due to the size of the sphere, the sphere may be ignored for drawing purposes:

sphere properties
3d layout 2

To finalize the procedure for imbedding a design in a desired background material, it is important to flag sources as being inside of the volume if they truly exist inside it in 3D space. In the present example, both Source Ellipses exist within the sphere of water, thus the Inside Of flag should be set to 1 for both source objects:

nsce 3

As a result, the refraction of the ray at the front and back face of the lens changes drastically, as the interfaces now describe a separation between water and BK7 instead of air and BK7.

3d layout 3

Defining Background Media for an NSC Group in a Mixed Mode System

In a mixed mode file, the background material for an entire NSC group may be defined by the Material column for the non-sequential component in the Lens Data Editor:


Note, however, that because the entry and exit ports serves as an interface between the sequential surfaces and the NSC group, these ports can have refractive power if a non-air material is applied to the Non-Sequential Component surface in the Lens Data Editor

If this is not a desired solution, yet a “background” material is still desired, then the same solution which is described for a pure NSC system can be used in the NSCE of a mixed mode design.



This article has outlined the procedure for creating a background material other than air for a NSC group. In a pure NSC system, this is accomplished by enclosing the desired elements in a larger volume of a non-air material. Considering the nesting rule, the enclosing volume should be listed prior to the elements which will be imbedded in it. 

For mixed mode systems, the background material for an NSC group is defined by the Material definition in the LDE for the specified Non-Sequential Component Surface.


Zemax OpticStudio Help files, Zemax LLC