In non-sequential ZEMAX, 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 the 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:

NSC Editor - Inserting Sphere Object

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:

NSC Editor - Parameters of the Sphere Object

NSC 3D Layout

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

Object Properties Dialog - Do Not Draw Object

NSC 3D Layout

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:

NSC Editor - Inside Of flag

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.

NSC 3D Layout