This article presents a comprehensive workflow for analyzing the optical performance of a pancake lens system within a 3D environment using Ansys Speos. The pancake lens system is designed in Ansys Zemax OpticStudio, while polarized elements are developed in Ansys Lumerical. The workflow focuses on the use of the Optical Data Exchange (ODX) format, which enables precise and seamless data transfer of the lens design from Zemax OpticStudio into Speos. To model sub-wavelength surface features—critical for polarization control in the pancake lens system—the Lumerical Sub-Wavelength Model (LSWM) plugin surface optical property in Speos is used. This multi-scale approach allows users to perform system-level analyses while accounting for sub-wavelength surface optical properties, enabling validation of pancake lens designs in virtual environments.
Authored By Alborz Ehteshami and Mina Nazari
Prerequisites
- Zemax Optic Studio 2025 R2 or higher
- Speos 2025 R2 or higher
Overview
Understand the simulation workflow and key results
Pancake lenses are a class of folded optics used primarily in virtual reality (VR) headsets and head-mounted displays (HMDs). Unlike traditional Fresnel lens architectures, which require significant spacing between the display and the lens, pancake lens systems fold the optical path using polarization-dependent components such as reflective polarizers, quarter-wave plates, and partial beam splitters. This folded light path dramatically reduces the overall thickness of the optical module, enabling compact, lightweight headset form factors that are more comfortable for extended use.
Because pancake lenses avoid the concentric ring structures inherent to Fresnel lens designs, they also eliminate ring-type artifacts and reduce stray light sensitivity, resulting in higher image quality. The combination of compactness, reduced weight, and improved visual performance makes pancake optics a preferred choice for next-generation VR products such as the Meta Quest Pro, Apple Vision Pro, and other premium headsets.
However, the design and validation of pancake lens systems pose unique challenges. The polarizing elements serve as the core functional components, and their performance—across angle of incidence and wavelength—is critical to system efficiency and ghost image suppression. Because the light traverses the same surfaces multiple times through polarization-selective reflections, validating the design at the lens level alone is insufficient. Full simulation must be performed at the system level—within a realistic 3D environment that accounts for the actual device geometry, ambient lighting conditions, and the user's visual experience. Ansys Speos provides this capability, enabling engineers to evaluate the complete pancake lens system under representative operating scenarios: assessing image quality and uniformity across the eye box, identifying ghost images and polarization leakage artifacts, analyzing the impact of external ambient light entering the system, and validating the visual experience from the human eye position under varying illumination conditions such as bright outdoor sunlight or indoor lighting.
This article covers the system-level analysis of a VR pancake lens system in Ansys Speos (Step 3 of the workflow). The lens design in Zemax OpticStudio (Step 1) and the polarized element characterization in Lumerical (Step 2) are prerequisites but are not covered here. The focus is on importing the lens design via ODX, applying the LSWM-based polarizer surface properties, and running simulations to evaluate image quality and ghost artifacts across the eye box under realistic conditions.
Step 1 – Design and Import the Lens System from Ansys Zemax OpticStudio
The Optical Data Exchange format (.odx) is a file format designed for transferring complete optical system data between Ansys Zemax OpticStudio and Ansys Speos. The ODX file carries lens surface geometries, material properties including chromatic dispersion and absorption, coating definitions, aperture information, and the imager position and orientation — ensuring no optical data is lost in the transfer. This capability is referred to as Optical Design Exchange (ODX) throughout this article.
The pancake lens system is designed and optimized in Ansys Zemax OpticStudio using sequential ray tracing. The design includes the projection optics along with the polarization-dependent folding surfaces (reflective polarizer, quarter-wave plate, 50/50 beam splitter). In the sequential Zemax model, the multi-pass light path is represented by duplicating optical surfaces with appropriate mirror definitions to simulate the folded optical path. The primary optimization metric is typically RMS wavefront error or MTF across the field of view, subject to constraints on total track length, distortion, and chromatic aberration.
Step 2 - Develop and Export Polarized Elements from Ansys Lumerical
The polarized elements in the pancake lens system—particularly the circular polarizer—are designed and characterized using Ansys Lumerical. The Stack solver (or RCWA, depending on the structure complexity) is used to model the thin-film stack or sub-wavelength periodic structure that forms the polarizing component. Design considerations include: the refractive index and thickness of each layer, the target spectral bandwidth, and the polarization extinction ratio as a function of angle of incidence. The sub-wavelength polarized structure is simulated in Lumerical, and the results are exported as a JSON file that fully characterizes the surface optical property—including transmission, reflection, and polarization conversion—for all angles of incidence and wavelengths relevant to the system.
This JSON file serves as the input for the LSWM plugin in Speos, enabling system-level analysis with accurate polarization handling. For more details on the LSWM data generation workflow, refer to the Lumerical Sub-Wavelength Model plugin: Introduction and Data Generation article. An example of importing the results can be found in the article: Lumerical Sub-Wavelength Model plugin: Usage in Speos – Ansys Optics
Step 3 - System-Level Analysis in Ansys Speos:
This is the primary focus of this article. In Speos, the lens design from Zemax OpticStudio is imported via the ODX format, the polarized surface properties from Lumerical are applied via the LSWM plugin, and the complete system is analyzed using non-sequential ray tracing with full polarization support. This is followed by system-level analysis using light expert, human eye sensor and eye roll effect under external illumination.
Run and Results
Instructions for running the model and discussion of key results.
This section walks through three main tasks: importing the lens design into Speos via ODX, applying the polarized surface properties exported from Lumerical, and running four simulation configurations to evaluate image quality, stray light, and system performance under ambient lighting conditions.
-
Before exporting the ODX file for Speos, the repeated/duplicated surfaces used in the sequential model to represent the multi-pass folding must be removed.
- This is necessary because Speos handles the folding through actual polarization-dependent surface properties applied within the 3D environment, not through duplicated sequential surfaces. This preparatory step has already been performed for the data provided with this example.
Step 1 - Import the Lens System from Ansys Zemax OpticStudio to Speos
The goal of this step is to import the pre-designed lens system from Zemax OpticStudio into the Speos environment. The lens design itself is not covered in this article — here we focus only on the export and import process.
-
In Zemax OpticStudio, navigate to the File tab and click “Export Optical Design to Speos.” The .odx file is automatically saved to the same folder as the active lens file. Set the image plane as the Global Coordinate Reference before export to ensure proper alignment in Speos.
- Note : The ODX file for this example is included in the provided input folder. The export step above is described for reference — users following the example can proceed directly to the import step in Speos.
-
Open the Model: In Ansys Speos, open your existing project or assembly file.
-
Initialize ODX Import: Navigate to the Light Simulation tab. In the Components group, select the Optical Design Exchange button.
-
Define Orientation: Set the coordinates and axes for the ODX object by clicking the coordinate axes icon in the CAD window. Select the appropriate coordinate origin from the structure tree to align the lens correctly within the system.
-
Select the Component: In the ODX object settings, under Optical Component, browse for and select the .odx file previously exported from your lens design software.
-
Finalize Import: Click the Run button to generate the geometry and complete the ODX import process.
Step 2 - Export and apply Polarized Elements from Ansys Lumerical
A pancake lens design is based on folding the optical path using polarization-dependent components such as quarter-wave plates and polarizers. In the original Zemax OpticStudio sequential design, the folding is represented using duplicated mirror surfaces for multi-pass propagation. After importing the ODX, the surfaces responsible for the optical folding need new material assignments within Speos to correctly model the polarization-dependent behavior in the non-sequential environment. As mentioned the generation of these files are not covered in this article, refer to Lumerical Sub-Wavelength Model plugin: Introduction and Data Generation – Ansys Optics .
Four surfaces need to be updated to handle the folding correctly. The following polarization components must be applied:
For each surface listed in the table, follow the procedure below. The workflow is the same for all five components — only the surface selection, origin position, .sop file, and .json parameter file differ.
Task 1: Create and apply the UV Map
-
In the Simulation tab, create a new UV Map and name it LCP
-
Click on the new UV Map in simulation tab
-
Click on the select objects for geometries and assign it assign the appropriate origin position for that surface.
- Next, create a new Origin in each respective surface and assign it to the UV Map to define the local coordinate frame for that surface.
-
Each surface require its own origin point to ensure the polarization orientation is properly aligned with the folded optical path.
Task 2: Create the Material with Face Properties
-
In the Simulation tab, create a new Material.
-
Set the Type to Face Properties .
-
Under the material definition, change Texture from False to True .
Task3: Apply the Surface Optical Property via the Plugin
-
In the Simulation tab, under your newly created material, click on Surface Layer #1 . Set the Surface Properties Type to Plugin . For File, select the appropriate .sop file from the Speos input folder (each component has its own .sop file). For Parameters, select the corresponding .json file containing the polarization data for that component.
Repeat Steps 1–3 for all five surfaces in the table.
| Material | File | Parameter | UV Mapping | Surface | Diagram |
| Polarization Dependent Beam Splitter | lumerical-sub-wavelength-2024R1-GPU.sop | ODS_PBS.json | PBS | Optical Design Exchange//Lens_5-6.Face:1934 |
|
| Quarter Wave Plate | lumerical-sub-wavelength-2024R1-GPU.sop | ODS_QWP.json | QWP | Optical Design Exchange/Lens_6-7.Face:1970 |
|
| Left Circular Polarizer | lumerical-sub-wavelength-2024R1-GPU.sop | left_circular_polarizer.json | LCP | Optical Design Exchange/Lens_10-11.Face:2042 |
|
| Non-Polarizing Beam splitter | NA | NA | NPBS | Optical Design Exchange/Lens_8-9.Face:2006 |
|
| Linear Y axis Polarizer | lumerical-sub-wavelength-2024R1-GPU.sop | linear_y_polarizer.json | Polarizer | Optical Design Exchange/Lens_2-3.Face:1860 |
|
Before generating the ODX file, these repeated surfaces were removed (this step has already been taken in the provided data).
Step 3 - System-Level Analysis in Ansys Speos
Adding the Optical Design Exchange to Simulations
With all materials and the lens stack imported and configured, the Optical Design Exchange geometry must be adde d to eachsimulation before running. For each simulation in the project:
-
In the Simulation tab, click on the relevant simulation. In the main window, click Select and choose Object for Selection — Geometries. Hold Ctrl and click on the Optical Design Exchange component to add the lens geometry to the simulation. Run the simulation.
This step must be repeated for all existing simulations in the project.
Simulation Types and Results
This example includes four simulation configurations, each serving a different purpose in the design validation process:
Interactive Ray Trace provides a real-time visualization of rays propagating through the pancake lens system. This is useful in early design stages and for demonstration purposes — engineers can visually confirm that the folded optical path is behaving as intended and quickly identify any obvious misalignment or polarization leakage before committing to a full simulation run.
Direct Irradiance Simulation computes the illumination contribution after each surface in the lens stack. This is a troubleshooting and diagnostic tool — by examining the irradiance layer by layer, engineers can pinpoint which surface is introducing losses, unwanted reflections, or polarization artifacts, and understand how light distributes through the folded path.
Inverse Human Eye Simulation uses inverse ray tracing to project rays from the sensor back through the system. In this configuration, a display source (projector) sends an image — in this example, an Ansys logo grid — which the pancake lens system projects onto the user's eye. The projected image is captured using two sensors: a human eye sensor and a radiance sensor. This simulation is the primary tool for evaluating image quality, including stray light and signal-to-noise ratio, image distortion, and ghost artifacts from polarization leakage.
Eye Roll Simulation adds an environment light source on top of the projector source to qualify whether the projected image remains sufficiently visible under realistic room lighting conditions. To stress-test the system across the eye box, 14 different eye sensor positions are used, mimicking different gaze directions and interpupillary positions. This simulation verifies that adequate image signal is maintained at varying room illumination levels and viewing angles — a critical validation step for ensuring the VR display performs well in real-world usage, not just in ideal on-axis conditions.
Important Model Settings
Description of important objects and settings used in this model
The ODX lens stack is imported with a default mesh that is generated automatically during the import process. For many configurations, this default mesh provides adequate accuracy. However, the meshing quality of the imported lenses directly affects both simulation performance and the quality of the produced results — particularly for imaging systems where surface curvature fidelity is critical. Apply a local mesh refinement on the Optical Design Exchange component to achieve finer meshing where needed, for example on highly curved surfaces, surfaces with steep sag variation, or aspheric profiles where the default tessellation may not capture the surface shape with sufficient precision. To do this, right-click on the Optical Design Exchange feature in the Simulation tree, select Options, and adjust the meshing parameters. For optical imaging systems such as this pancake lens, it is recommended to increase the mesh density beyond the default to ensure that the surface geometry is accurately represented during ray tracing. Export the meshing settings as a Speos Preset and set them as a default to save time when working with future ODX imports.
Updating the Model With Your Parameters
Instructions for updating the model based on your device parameters
To adapt this example to your own pancake lens design, two main inputs need to be replaced.
First, substitute the provided ODX file with your own lens design exported from your Zemax OpticStudio pancake lens project. Ensure that before exporting, the duplicated sequential surfaces used for multi-pass folding in the Zemax model have been removed, as described in Step 1 of the Simulation Workflow. Also verify that the image plane is set as the Global Coordinate Reference in OpticStudio before export, so that the coordinate origin aligns correctly when imported into Speos.
Second, replace the JSON parameter files with those exported from your own Lumerical Stack or RCWA simulations, corresponding to the polarizer elements in your design. Each JSON file fully characterizes the surface optical property — including transmission, reflection, and polarization conversion coefficients — for the range of incident angles and wavelengths relevant to your system. Ensure the angular and spectral sweep ranges in your Lumerical simulations cover the full range of ray angles and wavelengths expected in the Speos ray tracing environment. If the sweep range is too narrow, rays arriving at angles or wavelengths outside the characterized range may produce inaccurate results. Additionally, update the UV Map origins for each surface to match the geometry and orientation of your own lens stack, and verify that the correct .sop plugin file is assigned to each material.
Taking the Model Further
Information and tips for users that want to further customize the model
This example provides a foundation for pancake lens system validation that can be extended in several directions depending on your design requirements.
Use the Light Expert tool to trace and analyze individual stray light ray paths through the system. Light Expert allows you to select specific rays or groups of rays and inspect their full propagation history — identifying which surfaces they interact with, where unwanted reflections occur, and which geometry is responsible for ghost images or polarization leakage. This is particularly valuable in a pancake lens system where the folded optical path creates multiple opportunities for stray light to reach the sensor.
Evaluate display uniformity by projecting a uniform white source through the pancake lens and examining the irradiance distribution across the eye box. Non-uniformity in the projected image can indicate issues with the polarizer efficiency at large field angles, vignetting from the lens apertures, or misalignment of the folding surfaces.
Project different test images — such as resolution charts, color grid patterns, or checkerboard targets — to assess various aspects of image quality including sharpness, geometric distortion, and chromatic aberration. Comparing the projected image against the input source provides a direct measure of the system's imaging fidelity.
Evaluate contrast ratio using the approach described in the Augmented Reality Optical System article on the Ansys Optics knowledge base. Contrast ratio is a critical metric for VR displays, as insufficient contrast degrades the perceived image quality and immersion. By comparing the bright and dark regions of a projected test pattern, you can quantify the contrast performance and identify whether stray light or polarization leakage is limiting it.
Perform color calibration analysis to verify chromatic fidelity across the field of view. Since the polarizer elements in a pancake lens system are wavelength-dependent, color shifts may occur at different field angles or across the eye box. Projecting known color targets and measuring the spectral response at the sensor allows you to characterize and correct for these shifts.
Assess the impact of lens stack displacement and decentration on image quality as part of an optomechanical tolerancing study. By introducing controlled perturbations to the lens positions — tilt, decenter, or axial shift — you can evaluate how sensitive the system performance is to manufacturing and assembly tolerances. The Speos Optimizer can be used to automate this process across multiple degrees of freedom, as described in the Optomechanical Tolerancing Using Speos article.
Additional Resources
Additional documentation, examples and training material
See also
- Lumerical Sub-Wavelength Model plugin: Usage in Speos – Ansys Optics
- Lumerical Sub-Wavelength Model plugin: Introduction and Data Generation – Ansys Optics