This article introduces two new features to OpticStudio 22.1, Enhanced Ray Aiming and Ray Aiming Wizard. Enhanced Ray Aiming provides a significantly improved algorithm which allows users to have faster and more stability way in designing systems with a wider angle of view. Ray Aiming Wizard, on the other hand, is designed to help users determine the most suitable combination of Ray Aiming options for their system. The operating conditions for these tools will be discussed.
Authored by Michael Cheng
Ray Aiming is a function in OpticStudio that allows users to trace rays accurately for any given coordinate on the Stop surface (see How to use Ray Aiming). With Ray Aiming turned on, OpticStudio can easily find the correct rays in object space with given incident angle or object height (Hx, Hy) and given coordinate (Px, Py) on the Stop surface (See section “Normalized Field Coordinates” and “Normalized Pupil Coordinates” in Help File).
Ray Aiming is important for systems with large field of view (FOV) and any system that is far from paraxial assumptions. Many optical designers rely on this function for their daily work. In certain systems like machine vision, surveillance cameras on drones, cameras for autonomous vehicles, and cell phone camera lenses, it is common for designers to push the system’s FOV to its physical limit during their design process. However, when optimizing these systems, it can become difficult for the software to find the correct rays to launch through the Stop. The new Enhanced Ray Aiming algorithm offers a path for users to successfully design these modern optical systems with speed and stability.
At the same, since the new Enhanced Ray Aiming algorithm includes several new options, a Ray Aiming Wizard has also been added to help users determine the correct Ray Aiming settings for each system.
Enhanced Ray Aiming
Starting from OpticStudio 22.1, users can now see a set of new options under System Explorer > Ray Aiming as shown in Figure 1. They are also shown in OpticStudio 21.3 as an experimental feature, but now are a formal feature in OpticStudio 22.1.
Figure 1: New options for Enhanced Ray Aiming.
Recognizing issues with Robust Ray Aiming
Ray Aiming issues can present themselves in a couple ways. Figures 2 and 3 show two common cases. In Figure 2, there are spikes in the Field Curvature/Distortion plot. These spikes are artifacts caused by the Ray Aiming algorithm, typically when tracing rays through wrong paths in the system.
If the Ray Aiming algorithm cannot find any valid ray path for the specified field angle and pupil coordinate, it results in an error “Cannot determine object coordinates” as shown in Figure 3. A similar error message, "Cannot launch ray," pops up when the Merit Function cannot update. Note that the two error messages shown in Figure 3 do not necessarily mean there is a Ray Aiming issue. In most cases, they only mean it’s not physically possible to find a ray path with specified field angle and pupil coordinate.
Figure 2: Spikes in Field Curvature/Distortion analysis
Figure 3: Error messages that may indicate a Ray Aiming issue
Enhanced Ray Aiming settings
Below, explanations are given for each setting for the new algorithm. Note that users don’t necessarily need to test each option by themselves. In a later part of this article, a tool called Ray Aiming Wizard is introduced to help users determine which option(s) to use.
- Use Enhanced Ray Aiming turns on the new algorithm.
- The Use Advanced Convergence option was designed to handle cases with substantial rotations around the z-axis, though it may be useful for other cases.
- Use Fallback Search During Cache Setup was originally implemented to fix certain off axis or aspherical systems. We recommend keeping it off unless there are problems.
- Number of Steps sets the number of steps during the cache setup. We recommend using the default value, unless there are problems, in which case you can try increasing the value as a possible fix. In general, higher values will be more stable but slower.
Operating rules for OpticStudio 22.1
The first version of Enhanced Ray Aiming released in OpticStudio 22.1 has some limitations which may be updated with future development.
- The traditional Robust Ray Aiming and Enhanced Ray Aiming are mutually exclusive. We suggest to always use Enhanced Ray Aiming first and only try Robust Ray Aiming when it doesn’t work. In our testing, Enhanced Ray Aiming works in any system where Robust Ray Aiming works.
- The System Aperture must be Float By Stop Size. If other types of apertures are selected, users can still use Enhanced Ray Aiming but a warning message is shown as in Figure 4.
- The Field Type and object distance must be as follows. If other combinations are selected, users can still use Enhanced Ray Aiming but a warning message is shown as in Figure 4.
- Infinite Object Distance + Angle
- Infinite Object Distance + Theodolite Angle
- Finite Object Distance + Object Height with ray angles less than 90 degrees.
Figure 4: Warning displayed when Enhanced Ray Aiming is used outside of the verified conditions
Example for demonstration
A simple way to show the ability of Enhanced Ray Aiming is by using a built-in sample file.
- Open “Wide angle lens 200 degree field.zos”.
- Increase the largest field by 5 degrees. It shows the error “Cannot determine object coordinates!” Usually this means there is no physical way for a chief ray that has an angle of 105 degrees in object space to reach the center of the Stop. However, a real chief ray does exist for this system but the Robust Ray Aiming failed to find it.
- Uncheck “Robust Ray Aiming” and check “Enhanced Ray Aiming”. Update the system, and it looks like we solved the problem.
- However, if you check “Use Advanced Convergence”, we see that many rays were missing. In this system, we need to check both “Use Enhanced Ray Aiming” and “Use Advanced Convergence” for best results.
Ray Aiming Wizard
Along with Enhanced Ray Aiming, in OpticStudio 22.1, a Ray Aiming Wizard is provided to users to help determine what Ray Aiming settings should be enabled for the system. The following options can be recommended by the wizard.
- Ray Aiming method: None, Paraxial, Real
- Use Enhanced Ray Aiming: On, Off
- Use Fall Back Search: On, Off
- Use Advanced Convergence: On, Off
- Number of Steps: 10, 50, 250
Using the Ray Aiming Wizard
The Ray Aiming Wizard is still an experimental feature in OpticStudio 22.1 and needs to be turned on through the option in Help > Feature Experiments, as shown in Figure 5. After the experimental feature flag is turned on, the Ray Aiming Wizard can be accessed from the System Explorer as shown in Figure 6.
Figure 5: Turning on Ray Aiming Wizard in Feature Experiments.
Figure 6: Ray Aiming Wizard in System Explorer
Read the Ray Aiming Wizard report
After running the Ray Aiming Wizard, a text report is generated. There are four main sections in the report as shown in Figure 7.
- Basic system information.
- Recommended settings for Ray Aiming, if available. Note that the wizard does not always find recommended settings if no combination of Ray Aiming settings will resolve the system behavior.
- How the wizard tested the system and found the recommended settings.
- The raw data used in each decision showed in the previous block. Complete settings used are recorded when making each setting decision.
Figure 7: Text report generated by Ray Aiming Wizard
Operating rules for OpticStudio 22.1
In OpticStudio 22.1, the Enhanced Ray Aiming algorithm doesn’t support all types of system apertures and fields. It is possible for the Ray Aiming Wizard to find that Enhanced Ray Aiming would improve the system behavior for system conditions that are not formally supported by Enhanced Ray Aiming. In this case, the report displays the error message “Cannot issue a recommendation because results using Enhanced Ray Aiming may be incorrect” as shown in Figure 8.
Figure 8: Ray Aiming Wizard cannot make a recommendation if Enhanced Ray Aiming is not supported for the system
To share your feedback on these tools with Zemax, please add your comments in the Zemax User Community.
This article summarizes the two new features Enhanced Ray Aiming and Ray Aiming Wizard in OpticStudio 22.1. Enhanced Ray Aiming helps users to design more sophisticated systems by improving the algorithm to be faster and more stable. Ray Aiming Wizard helps users to determine how to set up Ray Aiming options for their system.