In this example, a method is presented for generating a Speos light field source file (
*.olf
) to model a high-resolution emissive display with subpixel-level accuracy. The approach uses spatially resolved luminance data, which can come from either simulated or measured, to capture variations in brightness across the screen and map them into a detailed light source model. This enables flexible light source shapes and precise 2D intensity distributions, allowing realistic representation of RGB subpixels, local dimming zones, and other non-uniformities. The workflow consists of four main steps: preparing RGB subpixel intensity data from simulations, defining the subpixel arrangement based on a display content images, running a Python script that reads the subpixel data, geometry, and display content to generate light field source files, finally importing these files into Speos for human vision simulation.
Overview
Understand the simulation workflow and key results
When simulating high-resolution emissive structures, Ansys Speos users typically choose between a variable exitance surface source or a ray file source. However, both approaches have limitations:
- Variable exitance surface sources cannot represent spatially varying intensity and are restricted to planar surfaces.
- Ray file sources offer more flexibility in terms of source shape and intensity distribution but can become extremely large when modeling high-resolution emissive structures.
These limitations significantly impact the simulation of high-resolution displays like OLED TVs, where each subpixel (red, green, blue) emits light at different intensities. Accurately modeling subpixel intensities is essential for evaluating display performance, especially when studying color shift phenomena.
To overcome these challenges, Ansys Speos offers the Light Field Source approach, which reads optical light field (*.olf) files. These files can efficiently represent complex, arbitrarily shaped light sources with spatially varying intensity. In this article, we present a workflow for modeling an extremely high-resolution emissive structure with a 2D spatially varying intensity distribution.
Run and Results
Instructions for running the model and discussion of key results
Step 1: Prepare Red, Green, Blue subpixel intensity
The subpixel intensity data can be obtained either from experimental measurements or numerical simulations. The subpixel light sources may use either LED or OLED technologies.
In this example, subpixel intensity data is taken from the Planar OLED Microcavities - Color Shift and Extraction Efficiency study , where planar red, green, and blue OLEDs were simulated. At the end of this step, three text files are generated, each recording the angular light intensity at different sampled wavelengths for the red, green, and blue subpixels.
Step 2: Generate light field source file based on subpixel pattern and display content
The subpixel arrangement significantly affects texture and image quality. In this example, a simple subpixel pattern is used, but more complex patterns (such as RGB, RGBW, etc.) can be applied depending on design requirements.
A display content image must also be prepared. The image’s pixel RGB values will later determine the subpixel intensity in the model. The intensity of each subpixel is assumed to be proportional to the relative RGB value, normalized to a range of 0 to 1. In this example, a simple test image (resolution 102 x 24 ) and a standard TV test image (resolution 3841 x 2160) is used.
simple test image
standard TV test image
Run the provided Python script, which performs the following steps:
- Read the Display Content Image: The display content image is used to provide the r, g, b values (normalized via dividing by 255) for all the pixel within the display content.
cwd = os.getcwd()
demo_img = os.path.join(cwd, "oled", "TVTestScreen.png")
pixel_value = get_rgb_data(demo_img)
oled_subpixel_green = os.path.join(cwd, "oled", "subpixel_green.stl")
green_meshes, green_vertices = get_mesh_data(oled_subpixel_green)
oled_subpixel_red = os.path.join(cwd, "oled", "subpixel_red.stl")
red_meshes, red_vertices = get_mesh_data(oled_subpixel_red)
oled_subpixel_blue = os.path.join(cwd, "oled", "subpixel_blue.stl")
blue_meshes, blue_vertices = get_mesh_data(oled_subpixel_blue)
- Read Subpixel Geometry Files: This process involves reading the R, G, B intensity files generated by Lumerical STACK, along with the corresponding relative position data defined in the subpixel pattern file. The data can be loaded at different resolutions by specifying the desired theta, phi, and wavelength sampling values.
-
In this example, we assume the pixel light is rotationally symmetric, so only
phi = 3is used. The RGB light source data generated by STACK has a theta resolution of 26 and a wavelength resolution of 53. Therefore, thetheta_samplingparameter in this script can be set to any value less than or equal to 26, and thewavelength_samplingcan be set to any value less than or equal to 53.
r = os.path.join(cwd, "oled", "SPEOS_file_R.txt")
g = os.path.join(cwd, "oled", "SPEOS_file_G.txt")
b = os.path.join(cwd, "oled", "SPEOS_file_B.txt")
theta_sampling = 6
phi_sampling = 3
wavelength_sampling = 10
red_data = read_file(r, theta_sampling)
green_data = read_file(g, theta_sampling)
blue_data = read_file(b, theta_sampling)
- Save the olf files: Due to the high resolution of the display content used, the light field data for red, green, and blue subpixels are saved in three separate files to manage file sizes effectively
- After running the script, three light field source files will be generated. These can be imported into a Speos project for simulation using an observer sensor.
[[NOTES:]] Lightfield file generation for high resolution source
Using the theta, phi, and wavelength resolutions specified in this example, the script takes approximately 2 minutes to run with the provided simple test image, but about 4-5 days to complete when using the standard TV test image included in the example folder. For convenience, the lightfield source files for the simple test image have already been precomputed and are provided in the example folder. Due to file seize limit, the lightfield source files generated with the standard TV test image (resolution 3841 x 2160) cannot be uploaded. Please contact us for support if you would like to test.
Step 3: Speos Simulation Human Vision
With the lightfield source files generated/shared from the example folder, user can import them into a speos project. An observer sensor can be created to observe the light intensity at different observation angles:
- Normal Direction View:
[[NOTES:]] User will need to apply the power calibration values for the red, green, blue source provided in the article Planar OLED Human Vision .
Simulation result using lightfield sources generated based on the simple test image:
For the simulation using lightfield sources generated based on the standard TV test image:
- Side View (theta = 22.5 degrees):
- Detailed View:
From the detailed view, the pixel granular effect can be evaluated due to the subpixel pattern design.
Important model settings
Description of important objects and settings used in this model
-
Ensure sufficient sampling of intensity values across wavelengths, theta, and phi angles to maintain the accuracy and quality of the generated light field.
-
Due to Python and API limitations, the process is currently single-threaded. For the example presented (using theta_sampling = 6, phi_sampling = 3, wavlength_sampling = 10), the light field generation took approximately 4-5 days to complete for a high resolution 2D spatial resolution light map.
-
The resolution of the display content image directly affects the resolution and quality of the simulation. As seen when comparing the simple test image with the standard TV test image, lower-resolution input requires less computation time but results in lower-fidelity display output. Similarly, a low-resolution light field causes the light intensity to remain constant between data points, leading to a loss of fine light characteristics in the simulation.
Updating the model with your parameters
Instructions for updating the model based on your device parameters
-
Change the Observer Sensor: Adjust the sensor configuration to view the TV display from different angles.
-
Virtual Light Control: Use virtual light control to turn individual red, green, or blue layers on or off to study the color shift impact of each subpixel.
-
Experiment with Subpixel Patterns: Modify the subpixel arrangement to study its influence on texture and image quality.
Additional resources
Additional documentation, examples, and training material