Analysis Features

How to use the Black Box Lens feature in OpticStudio?

Relating to: Black Boxes

Zemax Black Box is an encrypted file that contains design prescription data, including surface radius of curvature, thickness, glass materials, etc. The encrypted data appears as a “black box” in the Lens Data Editor. Rays go in, and the rays come out, exactly as if the original surfaces and design data were present in the Lens Data Editor. However, the detailed data is hidden so user cannot review or modify. This feature allows vendor to share design with customer without divulging details of the design to help protect their intellectual property.

The procedures to create Black Box lens ZBB file or to load up ZBB file from vendor are straightforward. You can find it described in the help file at The File Tab > Export Group > Zemax Black Box. Occasionally user may encounter error while using black box lens and the error message reads “The black box file xxx.ZBB cannot be loaded”.

This error usually occurs when OpticStudio cannot locate the quoted black box file xxx.ZBB in the designated folder. The default folder location where OpticStudio looks for the ZBB file is the master Zemax data folder “\Documents\Zemax\BlackBoxes”, when Project Directory is not used. When using Project Directory, the folder to store ZBB file becomes “\Project path\BlackBoxes”. One place to check the master data folder location is under the Setup tab\Project Preferences\Folders. This helps you confirm the correct folder path for loading ZBB files on your machine.  

 

 

Below is an example to show you how to use a Black Box lens ZBB file after receiving it from vendor. To load up the Black box lens, you need to first place the ZBB file in the correct folder. In this example Project Directory is not used, so the ZBB file needs to be placed in the master data folder “\Documents\Zemax\BlackBoxes”, as indicated in the Project Preferences under the Setup tab. After that you can insert a surface type Black Box Lens in the Lens Data Editor, then enter the black box file name into the Comment column of the Black Box surface, (the name should include the .ZBB extension). After that you’ll see the black box being displayed in the Layout window, as shown below.

 

 

That said, the best way to exchange lens files containing a Black Box ZBB file is to use the archived ZAR format. When vendor creates the archived ZAR file, the ZBB file will be included. After user receives the ZAR file, they just need to load up the ZAR file and OpticStudio will automatically unpack and restore the ZBB file to the proper folder for use.

In general it’s pretty easy to use Black Box lens, but there are some restrictions one needs to be aware of. You can find this info in the help file at The File Tab > Export Group > Zemax Black Box.