This article is a tutorial for Speos for NX.
To read the Speos version of this tutorial, click here.
In this example, we will look at how to effectively simulate light sources that have transparent materials in front. This is an advanced method to reduce the size of the simulation and improve convergence by first capturing the glass cover into the source itself. This is especially important for camera/LiDAR applications, where the sensor and source lie on the same side of the lens.
Authored By H Yi & Akshay Patke
Overview
When a source is placed behind one or more materials, it can increase the ray-tracing convergence time, especially for camera and LiDAR simulations. Hence, using up valuable simulation time that does not give us results. To reduce this time, we precalculated the glass cover into the source and hence only the output from the glass surface is our effective source. These emitted rays that exit the cover glass will only interact with the environment and reach the sensor, thereby reducing the time it takes to run the full simulation and getting us a response on the sensor surface. In this example, we have a Speos simulation of a Camera and a static LIDAR module with IR illuminators that use cover lenses. More generically, this is also useful when having a larger simulation system with a light source having a cover lens like a headlamp cover, a windshield, or any other type of light-transmitting cover.
A light source having a lens cover can be reduced by capturing the output from the cover by creating variable exitance or IES which reduces overall simulation time.
Prerequisites:
- Ansys License Manager 2026 R1 or later.
- Speos for NX 2026 R1.1 or later. The license needed is OST add-on.
In this example, we have a module that consists of both a camera and a LiDAR system, each of which has its own integrated light source. The model is already set up with the proper materials, sources, and sensors, and we will focus on the best-practice to achieve optimal ray-convergence for each system.
Open the project file, Camera with source behind lens.prt from the start folder.
We have a camera and LiDAR setup with an IR LED illuminator in the middle. We will be using this example to understand how this method of variable exitance is helpful in reducing simulation time.
Example 1: Source for Camera
Let's start by looking at the camera system, which has an integrated infrared (IR) light source and camera. It is required to pre-compute the light source propagation through the cover lens, before simulating what the camera would see.
Step 1: Create an Irradiance sensor directly in front of the glass
Before we proceed with the sensors let's update a test simulation without the variable exitance technique, to capture the "before scenario."
Double-click on the “Sim with Glass” direct simulation from the simulation panel. Understand the current setup and make note of the number of passes (15 passes). Compute the simulation. The result you see will have no light convergence and only a few spots. This indicates that the simulation will require more rays (500 or more passes) to get us a high-fidelity result.
Now, to capture the light from the LED as soon as it exits the glass cover, we will need to create an irradiance sensor and capture the exitance.
Start by creating a coordinate system at the center of the source but with 0.5mm offset to the glass cover.
Create an irradiance sensor with parameters as shown in the diagram below. Make sure the integration direction is same as ray direction
Step 2: Compute simulation with source on the irradiance sensor to capture exitance.
Create a direct simulation, including only the cover glass in the geometries list. For the source, choose the “Surface IR” surface source. For the sensor, choose the “Irradiance Sensor” sensor. Then, compute the simulation with Number of rays = 20 Mega-Rays.
The irradiance result will appear in the 3D workspace, and the exitance of the Source is captured. Note the file name CAMERA WITH SOURCE BEHIND LENS.Direct Irradiance (0).Irradiance Sensor (0).xmp.
Step 3: Creating a source with variable exitance.
We will now create a new source with the same parameters as the original source, but we will have variable exitance by adding the XMP result from the previous direct simulation.
Create a new surface source and name it “Surface IR Variable Exit”. Set the “Exitance” to “Variable” and browse for the file CAMERA WITH SOURCE BEHIND LENS.Direct Irradiance (0).Irradiance Sensor (0).xmp in the output folder which was the result from the previous step. Use the same coordinate system to orient this as per the irradiance sensor from the previous step. Use the Flux of 4 W and also the Spectrum from the original source as shown below.
Once the source setup is complete you should be able to see the rays emit from the exitance created in front of the cover glass.
Step 4: Create new simulation with variable exitance source.
Copy and paste the simulation “Sim with Glass” and rename it to “Sim with Variable Exit”. Change the source to “Surface IR Variable Exit” (created in step 4).
Compute the simulation and CAMERA WITH SOURCE BEHIND LENS.Sim with Variable Exit (1).Camera IR (0).png file will open.
We are able to see that for the same time we did the simulation in step 1, we are now able to see a higher convergence of rays onto the camera sensor.
Example 2: Source for LiDAR
We can use a similar technique to create LiDAR sources that have cover lenses. Using the same setup, we will now see how to create a LiDAR source easily by creating an IES file instead of an Irradiance sensor. This IES file will then be the input to the LiDAR sensor.
Step 1: Create an Intensity sensor
Click on the Intensity sensor in the Speos toolbar.
Change the format to IESNA type C
Assign the origin and axes the same as the irradiance coordinate system which is right outside the glass cover in front of the source.
Step 2: Capture source Intensity using direct simulation
Create a direct simulation with the LED source(‘Surface IR’), intensity sensor, and the cover glass as geometry.
Compute the simulation and note the result is in .ies.
Step 3: Use the IES file for LiDAR simulations
We will now create a LiDAR sensor and use the IES file created in step 2 as the source at Camera Axis.
Important Model Settings
Generally, there are no Speos settings to change. They are all set to default. For the inverse simulation, we want to make sure of the following:
Meshing
Meshing is proportional to face size unless we are looking at very large surfaces such as windshields. They may require a fixed mesh. This can also be done separately with Local meshing.
Inverse Simulation Properties
- The Monte Carlo algorithm is activated, to perform a probabilistic simulation with a randomized algorithm.
- Fast transmission gathering is off (default) since we want to consider light refraction as it passes through the transparent materials.
Taking the model further
Packaging a LiDAR/camera from this is one stage, however, chances are that this is placed in another housing such as behind a windshield or inside a headlamp. We would then have to repeat the above steps to consider the next level of light propagation if the windshield or headlamp lens covers the entirety of the source and sensor. These layers of cover glasses add distortion and act as filters to the LiDAR/camera to avoid noise from any other source that might be within the sensor wavelength range.
Additional Resources
Ansys Learning Hub courses