Jun 23, 2022
Introduction to Enhanced Ray Aiming and Ray Aiming Wizard
Ray Aiming is a function in OpticStudio that allows users to trace rays accurately for their optical system (see How to use Ray Aiming). With Ray Aiming turned on, OpticStudio can easily find the correct rays in object space with a given incident angle or object height (Hx, Hy) and given coordinate (Px, Py) on the Stop surface
Ray Aiming is important for systems with a 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 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 the 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.
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.
This blog introduces two new features to OpticStudio, Enhanced Ray Aiming, and the Ray Aiming Wizard. Enhanced Ray Aiming provides a significantly improved algorithm that allows users to have a faster and more stable way of designing systems with a wider angle of view. The Ray Aiming Wizard is designed to help users choose the most suitable Ray Aiming options for their system.
Enhanced Ray Aiming
In OpticStudio 22.1, users can now see a set of new options under System Explorer…Ray Aiming as shown in Figure 1.
Figure 1: New options for Enhanced Ray Aiming.
Recognizing issues with Robust Ray Aiming
Sometimes, the standard Ray Aiming algorithm can encounter difficulties in finding the correct rays to launch through the Stop. These issues can present themselves in a couple of 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 coordinates, 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 a 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 settingsBelow, explanations are given for each setting for the new algorithm. Later in this post, 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 Enhanced Ray AimingThe Enhanced Ray Aiming released in OpticStudio 22.2 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, Entrance Pupil Diameter, or Image Space F/#. 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 WizardAlong with Enhanced Ray Aiming 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
The Ray Aiming Wizard can be run from System Explorer…Ray Aiming as shown in Figure 5.
Figure 5: 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 6.
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 6: 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 7.
Figure 7: Ray Aiming Wizard cannot make a recommendation if Enhanced Ray Aiming is not supported for the system.
To learn more, read the full Knowledgebase Article.
Try Zemax optical design capabilities for yourself, request a free trial today!