This article focuses on the external stray light analysis (SLA) of laminated automotive windshields, with an emphasis on optical performance for cameras mounted behind the glass. External stray light can originate from natural and artificial outdoor lighting (e.g., sun, sky dome, streetlights, headlights) and propagate through or reflect within the windshield structure before reaching the camera sensor. These interactions can produce ghost images, veiling glare, reduced contrast, and other artifacts that degrade perception reliability in ADAS (Advanced Driver Assistance Systems) camera systems.
The workflow presented in this article demonstrates how to evaluate external stray light by leveraging Zemax OpticStudio (for camera ROM generation) and Speos (for system-level camera simulation) , and how to mitigate imaging artifacts via material and geometric improvements.
Authored By Alborz Ehteshami
Prerequisites
- Zemax OpticStudio 2024 R2 or higher
- Speos 2024 R2 or higher
Overview
Understand the simulation workflow and key results.
The goal of this workflow is to analyze external stray light paths that degrade the image quality of a camera positioned behind a laminated automotive windshield. External stray light can arise from:
- Reflections between windshield layers (outer glass ↔ PVB ↔ inner glass): producing ghost images and veiling glare
- Shroud surface reflections: caused by sunlight or artificial light hitting internal shroud surfaces and scattering toward the camera
- Wet road or surrounding object reflections: redirecting specular light into the windshield toward the camera under low sun angles or night illumination
- Shroud reflections via windshield to the camera: where light reflects from shroud surfaces onto the windshield and then back toward the camera sensor, creating secondary ghost artifacts
The workflow is divided into four main steps:
- Step 1 – Prepare the Camera Model (Zemax OpticStudio): Design the camera lens in OpticStudio. Depending on your analysis goals, you may export either a Reduced-Order Model (ROM) (for external SLA only) or the full lens stack (for internal + external SLA) from Zemax OpticStudio to Speos. This step is already done and not covered in this article. Note: Throughout this article, SLA refers to Stray Light Artifacts.
- Step 2 – Configure the Scene and Camera in Speos: Import or create the scene containing the windshield, camera shroud, and camera mounting location behind the glass. Assign optical and material properties to the windshield (glass/PVB stack), shroud (BRDF/BSDF), and interior surfaces. Define the camera sensor in Speos using ROM or full lens model and place the camera at the predefined mounting location.
- Step 3 – Run External Stray Light Analysis in Speos: Define illumination based on relevant operating conditions (e.g., low-angle sun, diffuse sky, wet road reflections, nighttime lighting). Run the camera simulation with the Camera Sensor and Light Expert Analysis to evaluate external stray light at the sensor plane.
- Step 4 – Material and Geometry Optimization: Update shroud materials or geometry (matte coatings, light traps, baffles, textures) and explore the impact on the camera results considering different lighting scenarios and identify an optimal configuration.
Using a Camera Model in Speos
Depending on your stray light analysis goals, the camera lens system can be brought into Speos in different ways:
-
Reduced-Order Model (ROM)
from Zemax OpticStudio
A ROM can be used when you are only interested in external stray light or if you have blackbox model of the camera. This way you do not consider stray light caused by Camera’s internal lens surface. (To learn more about how to generate the ROM of the lens system ,refer to this guide: ( Getting started with Speos Camera Sensor ) -
Full Lens Stack Import
If you want to evaluate stray light caused by internal reflections and bounces within the lens group , you can bring the complete lens stack from OpticStudio to Speos using Optical Design Exchange. For a detailed example of this workflow, see step 3a Stray Light Analysis – Smartphone Camera – Ansys Optics
In this article, the focus is on external stray light interacting with the windshield and shroud. The camera model (reduced order model) is assumed to be present in the Speos scene, and only external effects are analyzed.
Run and Results
Instructions for running the model and discussion of key results.
Step 2 – Configure the Scene and Camera in Speos
Once you have generated the Reduced-Order Model (ROM) file in OpticStudio, open the Speos project included in the associated files of this article. The speos project contains the windshield and shroud geometry, and the predefined camera mounting location behind the windshield.
Follow the steps below to prepare the camera in Camera Model Mode:
- In Speos: Go to the Simulation tab. Locate the Camera and double-click on it.
-
Apply the ROM file generated in OpticStudio (example in Getting started with Speos Camera Sensor ) to the Camera Sensor. (located in the input folder).
- Click Select Coordinate System to set the camera’s object coordinate system
-
Go to the
Structure
tab and locate the axis named
Axis System – Camera
. Update its position and orientation to match the actual camera mounting location in the vehicle. Note that the origin placement depends on the ROM version being used:
V1 ROM:
origin is located at the
entrance pupil position V2 and Binary ROM:
origin is located at the
center of the imager
Alternative Method: Rather than modifying the existing axis, you can create a new coordinate origin by following these steps: - Go to the Design tab
-
Create a new origin and move it to the desired location for your sensor
-
Use Automatic Framing to verify the camera is facing the correct direction.
Configure Windshield and Shroud for External Stray Light
After preparing the camera model, configure the optical environment needed for external stray light evaluation:
- To apply the Windshield Glass material, Click on the Simulation tab.
- In the Material list, select the windshield material and double-click it.
- In the Definition tab, you can see that this material is not yet applied to any object in the Geometry section as it is grayed out
- Click Select Objects for Geometry .
- In the Structure tab, select the windshield structure shown in orange in the 3D view.
-
Once selected, click green check mark to Validate and activate the material assignment.
-
Note: The interlayer material in the windshield is already applied in the structure. In the Structure and Material tabs, it can be found under WS-Foil , which represents the typical plastic interlayer used in this type of part.
To properly assess external stray light behavior, the system must be exposed to lighting conditions that represent both typical and worst-case environments. For this reason, multiple illumination scenarios were constructed, including controlled uniform sun inputs, natural outdoor HDR environments, road reflection cases, solar angle sweeps, and low-light nighttime settings. Together, these scenarios provide a comprehensive view of how stray light reaches the camera under real-world conditions.
Before reviewing these scenarios, we first examine the Light Expert stray light analysis to understand the origin of the unwanted light paths and how to interpret them before evaluating the different lighting conditions.
Step 3 – Run External Stray Light Analysis in Speos
Run External Stray Light Analysis
Use the Radiance sensor together with Light Expert Analysis (CPU compute) to trace stray-light paths inside the scene. This helps identify dominant contributors such as:
- Windshield layer reflections
- Shroud scattering / shroud edge reflections
- Wet road reflections (if included)
- Other environmental surfaces
After the simulation completes, examine:
-
Luminance / irradiance distribution
-
Washed-out or veiled regions
-
Ghost reflections from laminated windshield interfaces
-
Localized bright spots from shroud edges
-
Loss of contrast in the field of view.
To run and View the simulation result
- Go to the Simulation tab.
- Click on Light Expert – Direct Black Glossy simulation
- In the Definition tab, set Light Expert from False to True .
- Set Rays to 2e6 (2 million) .
- Run the simulation using CPU by clicking Compute .
-
To review the results, (a) open the generated .lpf file, (b) click on measure button, (c) move the mask to the region of interest, and (d) observe the rays live in 3D window.
The stray light artifacts originate from multiple paths, including:
- Direct reflections from the shroud into the camera
- Multi-bounce reflections (e.g., shroud → windshield → camera)
- Side shroud reflections and internal scatter
- (Not included in this case) reflections from road surfaces or external objects
Although stray light artifacts cannot always be fully eliminated, their impact can be reduced to improve image quality which can be by:
- Material modification including reflectivity optimization, coating application and etc
- Geometry tuning
- System signal to noise ratio.
In the next sections, we review the different illumination scenarios and analyze their effect on the final camera image and overall stray-light behavior.
Scenario 1 – Uniform Sun + Environment Sun ( Sunny Road )
- This scenario uses a uniform solar source combined with an environment sun to represent a clean daytime illumination condition with minimal scene complexity.
- Uniform (Daytime) component: provides a consistent 6000 K sun spectrum.
- Environment Sun: adds directional light consistent with sun position (Sunny Road).
-
Purpose: establishes a baseline for evaluating external stray light entering the system without complex scene reflections.
To run and View the simulation result
- Go to the Simulation tab.
- Click on Camera – Black Glossy simulation .
- In the 3D window , click Select Object for Selection Source (out) .
- Hold control in your keyboard and choose both the Uniform and Environmental sources.
- Once selected, click the green checkmark ( Validate ) to confirm.
-
Set the desired number of passes or simulation duration .
-
Right-click on the simulation and run it using GPU execution.
The camera simulation results demonstrate that, in addition to capturing the environmental image of the sunny road and surrounding scene, the system also captures stray light originating from the shroud—visible as linear artifacts in the main image—along with other types of stray light such as glare.
Scenario 2 – Uniform Sun + Road Structure
-
This scenario isolates solar contributions and road reflections without using an HDR environment.
The focus is on how the road surface itself introduces stray light into the system. - Uniform (Daytime) Solar Source: applies a consistent 6000 K sun spectrum without sky contribution.
- Road Geometry Included: physical pavement geometry is enabled to capture direct reflections from the road surface.
- No HDR Environment Source: ensures that all reflected contributions originate from road geometry only , rather than image-based lighting.
-
Purpose: This setup is useful for evaluating the influence of road-induced reflections on stray light, especially when isolating environmental contributors. It is well-suited for studies focused on how pavement brightness, material properties, and incidence angles affect the camera’s internal SLA performance.
To run and View the simulation result
- Go to the Simulation tab.
- Click on Camera – Black Glossy + Road simulation.
- In the 3D window , click Select Object for Selection Geometry.
- Choose the Road Component to include the road and all associated objects in the component.
-
Click on validate to activate the selection.
- Right-click on the simulation and run it using GPU execution.
By evaluating the signal levels across the scene, it is possible to determine whether key signal objects remain detectable under operational lighting conditions. The image bellow illustrates the camera field-of-view captured through the aperture, enabling a direct comparison between scene signal and stray light contribution. The contrast between foreground targets (pedestrians and road surface markings) and the background SLA contribution can be assessed to determine whether it exceeds the required threshold for reliable detection. While the road geometry introduces additional reflected light into the system, the signal level from scene objects remains sufficiently distinct from the SLA contribution, preserving the effective contrast ratio necessary for classification algorithms to operate correctly.
Camera field-of-view showing the road scene with pedestrian targets under uniform daytime solar illumination, including road-induced reflections.
Scenario 3 – Solar Angle Sweep (SET A / SET B)
This scenario evaluates how stray light varies as the sun position changes throughout the day.
- Natural Light or Uniform Solar Source: used as the primary illumination for sweeping sun angle.
- Solar Elevation Sweep: multiple sun positions are tested to represent different times of day .
- SET A / SET B: define different sweep configurations (e.g., different azimuths, elevations, or step sizes) for broader coverage.
Purpose: The objective of this scenario is to stress test the system across a full range of solar angles, identifying worst-case conditions where external stray light peaks. This helps ensure performance is robust under realistic daytime lighting variability, including low-sun conditions when reflections and glare can be most pronounced.
To View the simulation result
-
Go to the Simulation tab.
- Click on LT-Black Glossy – Angular Sun – Set 1 simulation.
- Open the XMP Irradiance file.
- Click on Tool and choose Level , then set the level to 500 .
- Go back to the XMP irradiance file and click on All Layers .
-
Sweep between the different Sources , one by one, to monitor the effect of SLA on the imaging system throughout the stress sweep.
-
Repeat the same process for LT-Black Glossy – Angular Sun – Set 2.
Imaging across the full range of solar angles confirms that system performance is angle-dependent, with failure occurring under specific illumination geometries. The worst-case stray light condition was observed at high noon, where overhead solar positioning produces maximum direct irradiance into the optical path, driving the signal-to-noise ratio below the system's acceptable threshold. At these angles, SLA intensity overwhelms the scene signal, rendering reliable object classification unachievable.
Angular Scan Set A shows a sweep of solar illumination angles across seven frames, with the final panel displaying the corresponding angular diagram illustrating the range of tested solar positions. The sequence progresses from oblique low-angle illumination through increasingly steep elevation angles, capturing the evolution of stray light artifacts within the optical cavity.
presents a complementary angular sweep from the opposing illumination geometry, again concluding with an angular diagram. This set captures the system response at higher solar elevations approaching overhead incidence, where internal reflections and SLA intensity increase substantially.
At all other tested solar angles, the system maintains sufficient SNR to sustain detection performance, demonstrating that the failure mode is bounded and geometrically predictable. These results establish high solar elevation as the critical stress condition for this optical configuration, providing a clear boundary for operational envelope definition and targeted mitigation efforts such as baffling, coating optimization, or adaptive exposure control. Note: Make sure to adjust the display level adequately to visualize the signal. If the output appears as a dark screen, reduce the signal level until the image becomes visible.
Step 4 – Material and Geometry Optimization
- This scenario uses the same illumination setup as Scenario 1 (Uniform Sun + Environment Sun ) but replaces the shroud coating/finish to evaluate material-level improvements in stray light suppression .
- In this case, the shroud coating is changed to Vantablack (Note: Vantablack is used here as a near-ideal absorber benchmark in simulation), which has significantly lower reflectivity . This allows us to mimic the behavior of highly absorptive materials and study how reduced internal reflections may help resolve the SLA problem.
To View the simulation result
-
Go to the Simulation tab.
- Under Materials , click on light-trap-vantablack .
- In the Definition tab, note that the material is not yet assigned to any geometry. Click Select Objects for Geometry in 3D Window .
- In the 3D view and Structure tab, locate the Light Trap component and assign light-trap-vantablack to it.
-
click the green checkmark ( Validate ) to activate the assignment.
- Return to the Simulation tab and click on Camera – vantablack .
-
Under
Geometry
, add
light-trap-vantablack
to the component list.
- Hold Ctrl to keep previously assigned geometry. - Right-click on the simulation and run it using GPU execution.
Camera simulation results successfully demonstrate that upgrading the final finish of the shroud material produces a significant reduction in Stray Light Artifacts relative to the main scene signal, yielding a measurable improvement in overall image quality. The updated surface finish lowers the reflectivity of the shroud interior, directly reducing the magnitude of stray light contributions reaching the image plane.
Artifact lines remain present in the output imagery; however, their intensity is substantially reduced compared to the baseline configuration evaluated in Scenario 1. The SLA-to-signal ratio improves to a level where scene objects and road features retain greater contrast and classification integrity. These findings confirm that shroud material selection is a viable and effective mitigation lever for stray light management, and that further finish optimization or coating treatment could potentially suppress residual artifacts further toward system threshold requirements.
Important Model Settings
Description of important objects and settings used in this model
Efficient Meshing for Simulation
To efficiently run your simulation, it is important to use local meshing , which allows you to define different mesh resolutions for regions that require fine detail versus regions that do not. For example, in environmental studies (such as including the road), the mesh does not need to be as fine as it does for the shroud and windshield , where the majority of SLA is generated. This approach significantly reduces model preparation time and improves computational efficiency.
Preparing Angular Sweep Sources
Speos offers multiple approaches for setting up sun position sweeps, ranging from fully automated to manual.
Method 1 — Ambient Source with Parametric Sun Orientation (Recommended)
Starting with Speos 2026 R1, the ambient Natural Light source natively supports parametric sun orientation via azimuth and elevation angle parameters. This is the simplest approach: create an ambient Natural Light source, set the Sun Type to Manual, and parameterize the azimuth and elevation angles directly. These parameters can then be swept using optiSLang or the Speos scripting interface without creating multiple surface sources at all ( Stray Light Analysis Overview – Ansys Optics ).
Method 2 — Automated Parametric Surface Source Script
For versions prior to 2026 R1, or when a surface source model is preferred (e.g., to define a specific angular extent or spectral profile), an automated Python script can generate parametrized sun source positions based on a surface source. The Stray Light Analysis – Smartphone Camera example includes a project with a parametrized sun source model where the rotation in the XY plane, FOV angles, and angular steps are controlled through the Groups panel. A companion automation script for this workflow is detailed in the Stray Light Analysis Automation Scripts article. This approach eliminates manual source duplication while giving full control over sweep parameters ( Stray Light Analysis – Automation Scripts – Ansys Optics ).
Method 3 — Manual Pattern Creation (Fallback)
If scripting is not available, you can manually create angular sweep sources using the Create Pattern function:
- Create your initial surface source under its component.
- Create a reference line or curve that defines the angular sweep path.
- Select the structure component containing the source.
- Go to the Design tab → Move → Create Patterns.
- In the 3D window, choose Move Along Trajectory and click the reference line.
- Define the start and end points along the path.
- Enter the Count value to specify how many source positions to generate along the sweep.
This is functional but requires manual setup for each new sweep configuration. For repeated or multi-angle studies, Methods 1 or 2 are strongly preferred.
Use Natural Sun + Environment HDR (Sunny Road)
- In this scenario, an alternative illumination source is used where the Natural Sun model replaces the Uniform Sun source. This setup better represents real outdoor conditions by combining a physically based sun and sky model with an HDR environment.
-
Natural Light Ambient Source (Daytime model):
- Generates sun + sky with a spectral range of 380–780 nm
- Sun intensity and sky distribution are based on time-of-day and geographic location
-
Environment Source (HDR
): Provides realistic scene luminance from a
sunny road environment
- Includes reflections from pavement, buildings, and surroundings
-
Purpose: This configuration enables evaluation of stray light inside the shroud under realistic daylight conditions where environmental reflections contribute to SLA , making it suitable for field-representative outdoor testing.
To run and View the simulation result
- Go to the Simulation tab.
- Click on Camera – Black Glossy - Natural Light.
- In the Definition tab, set the Location
-
And Time and Date to reflect the desired solar position for the simulation.
-
Right-click on the simulation and run it using GPU execution.
Updating the Model With Your Parameters
Instructions for updating the model based on your device parameters
This workflow is designed to be easily adapted to your own product geometry, optical sources, and material data. By updating a few key parameters in the provided project files, you can apply the same evaluation methodology to your specific hardware.
1. Update the Camera / Optical Chain
You can generate your own Reduced-Order Model (ROM) in Zemax and configure the camera in Speos by updating parameters such as:
-
Sensor size and position
-
Pixel count & pitch
-
Spectral sensitivity
-
Distortion file (ROM)
This ensures the camera module reflects your actual optical system characteristics.
2. Update the Scene and Environment
You can replace the environment with your own relevant use cases, for example:
- Street scenes
- Cityscapes
- Highways
- Industrial areas
- Parking lots
Environment content can be added using HDR/EXR , GLTF , or other compatible formats.
3. Update Shroud / Housing Geometry
To adapt the mechanical envelope to your product:
- Insert your CAD shroud , baffle , or housing geometry
- Move it into the correct coordinate position
- Validate alignment relative to the windshield and camera
You can also modify or tune geometry directly inside Speos if needed.
4. Update Material / Coatings
Evaluate the impact of material choices by:
- Applying your own coatings or paints
- Testing alternative low-reflectance finishes
- Updating plastic, metal, or absorptive materials
- Comparing different reflectivity levels
This enables direct comparison between coating strategies for SLA mitigation.
Taking the Model Further
Information and tips for users that want to further customize the model
Nighttime Road + Street Light
-
Simulates nighttime driving conditions with road reflections and street light illumination .
-
While solar-based SLA is not present, the image signal levels are much lower , meaning smaller amounts of stray light can still affect image quality.
-
Useful for verifying low-light robustness .
Additional Resources
Additional documentation, examples and training material
See also
- Stray Light Analysis – Smartphone Camera – Ansys Optics
- Human Factors: Unwanted Reflections – Ansys Optics
- Stray Light Analysis – Mechanical Geometry Modification – Ansys Optics
- Windshield Optical Distortion Analysis – Ansys Optics
- Stray Light Analysis Overview – Ansys Optics
- Stray Light Analysis – Automation Scripts – Ansys Optics
Ansys Learning Hub Courses
- Head Up Display Straylight Analysis in Ansys Speos Software - Ansys Learning Hub
- Stray Light Analysis in Ansys Speos Software - Ansys Learning Hub