What does ray tracing involve?
In nature, light behaves as an electromagnetic wave, but for engineering purposes — designing lighting systems, lenses, reflectors, and optical instruments — it is enough to model it as a set of geometric rays. Each ray has a direction, energy, and spectrum. When it meets a surface, it can reflect, pass through a material (refracting according to Snell's law), be absorbed, or be scattered. Tracing millions of such rays through a complex optical system gives a precise picture of light distribution — irradiance, luminance, optical efficiency.
The ray tracing method in engineering splits into two approaches:
Sequential ray tracing — rays pass through optical surfaces in a predetermined order (surface 1 → 2 → 3...). Used in designing imaging systems: lenses, microscopes, spectrometers.
Tools: OSLO; this option is also available in TracePro.
Non-sequential ray tracing — rays can hit any surface in the 3D model in any order, reflecting and scattering multiple times. Essential for illumination analysis, stray light, and systems with multiple reflections.
Tools: TracePro.
The Monte Carlo method — why millions of rays?
Monte Carlo ray tracing is used in lighting systems and stray light analysis. Instead of tracing a single ray, the algorithm simulates millions of rays with randomly sampled directions and energies consistent with the source's characteristics. The statistical result — an irradiance map on a surface — is more accurate the more rays have been traced.
Modern software such as TracePro can trace tens of millions of rays in minutes thanks to multi-core processing. For systems requiring stray light analysis on the order of -60 dB (e.g. astronomical instruments), tracing billions of rays is necessary — which requires compute clusters or GPU acceleration.
Convergence test: when is a result trustworthy?
Because TracePro uses Monte Carlo ray tracing, results that depend on statistical sampling carry noise whose level decreases as the number of samples grows. Roughly, the statistical uncertainty falls in inverse proportion to the square root of the number of samples (1/√N, where N is the number of samples).
In practice you therefore have to check whether the result is stable enough for the purpose of the analysis. Lambda Research recommends running successive ray traces with different Random Seed values and assessing the spread of the results obtained. If the differences are larger than acceptable for the analysis, the number of traced rays should be increased.
For irradiance / illuminance maps, the number of rays reaching the analysed surface also matters. It can be raised by increasing the number of starting rays and — in suitable applications — by using importance sampling.
Statistical stability of a result should not, however, be equated with confirmation that the whole physical model is correct. A stable result means that, for the assumed model and parameters, the influence of random sampling is sufficiently small. It does not confirm that the geometry, the source characteristics, the optical properties of the materials, or the analysis conditions accurately correspond to the real system.
What the simulation delivers: output quantities
Engineering ray tracing is not only about generating an image. Depending on the type of analysis, it lets you determine quantitative radiometric and photometric quantities that describe the properties of an optical system:
- Illuminance or irradiance distribution — a map of the relevant quantity across a working surface, a measurement screen, or a detector.
- Optical efficiency — the ratio of the flux reaching a defined target to the flux emitted by the source; the exact definition depends on the assumed system boundaries and the type of flux analysed.
- Luminance and intensity distribution — quantities for analysing the photometric properties of a system; depending on the application, the results are presented as distributions or photometric curves.
- Stray light analysis — analysis of unwanted radiation arising from reflections, scattering, or other propagation paths, which can degrade image quality and contrast or cause unwanted illumination.
- Spectral distribution of radiation — the dependence of the analysed radiometric quantity on wavelength, important e.g. in the analysis of sources and detectors, colour measurement, and systems that use specific spectral ranges, such as LiDAR.
The results of such analyses are used to optimise the design and — where the scope and method of the analysis meet the requirements of specific regulations or standards — to assess compliance with those requirements.
Engineering ray tracing vs. computer-graphics ray tracing
Both approaches share the same mathematical roots, but serve different purposes:
| Feature | Engineering ray tracing | Graphics ray tracing |
|---|---|---|
| Goal | Photometric precision, physical accuracy | Visual realism, aesthetics |
| Units | Candela, lumens, lux, W/m² | Pixels, RGB colors |
| Accuracy | Quantitative (±1–5%) | Perceptual |
| Computation time | Minutes to hours | Real-time (GPU) |
| Tools | TracePro, OSLO | NVIDIA RTX, Blender Cycles |
The difference also reaches how geometry is handled. Graphics engines work on simplified triangle meshes, which introduces a shape error on curved surfaces. Engineering software computes directly on the mathematical surface description (NURBS), which is critical when modelling precise reflectors, aspheres, and lenses. Add to that full spectral verification — analysis of the energy distribution for specific wavelengths — and reports compliant with international standards. A game engine offers none of this.
Applications of engineering ray tracing
LED and architectural lighting
Designing luminaires — reflectors, TIR lenses, diffusers, and light pipes — requires precise light-distribution analysis. Ray tracing lets you optimise the shape of the reflector and lens for the required photometric curve and energy efficiency before building a prototype.
Automotive
Car headlights must meet strict standards — sequential ray tracing verifies the light distribution on a 25 m screen. LIDAR systems require analysis of laser beam propagation and the return signal.
Aerospace and space instruments
Stray light analysis in telescopes and satellite instruments — unwanted scattering only detectable when tracing billions of rays. TracePro was used in the analysis of the James Webb Telescope and the Mars Rover cameras.
Medicine
Modelling light propagation in biological tissue (tissue optics) — Monte Carlo simulations answer the question of how deeply and evenly light used in phototherapy or diagnostics penetrates. In TracePro you can additionally model fluorescence and volume scattering, which is used in medical lighting and backlit panels.
What input data is needed for a ray tracing simulation?
A good simulation requires four groups of data:
Geometry — a 3D model of the optical system (imported from CAD or built in the program)
Material properties — refraction, absorption, and scattering coefficients for each material
Surface properties — reflectance, transmittance, BSDF (bidirectional scattering distribution function) for each surface
Source characteristics — angular emission distribution, spectrum, position, and orientation
Simulation quality is directly tied to input-data quality — especially the accuracy of LED source models and optical coating properties.
Source models deserve separate attention. Instead of an isotropic point source, more detailed emission models can be used, including:
- IES (LM-63) or Eulumdat/LDT photometric files — data describing the luminous-intensity distribution of a source or luminaire, used to reproduce its photometric properties;
- ray-data-based models — sets of data representing the rays emitted by a given source; depending on the format and origin they may contain information about the ray's position, direction, power or energy, and spectral properties.
The more faithfully the source model and the optical surface properties, including the BSDF characteristics, correspond to the real system, the better the chance of obtaining results that match reality. The classic rule applies here: "garbage in, garbage out" — even a very advanced computational method will not compensate for incorrect or insufficiently accurate input data.
Software and deployment
The choice of a specific tool — TracePro for illumination and stray light, OSLO for imaging, the Optiwave packages for wave photonics — depends on the type of project, the scale of the system, CAD integration (STEP, IGES, SAT; the RayViz plug-in for SolidWorks), and the licensing model (perpetual with annual maintenance, or time-limited/subscription; separate, preferential academic and educational licences). We set out the selection criteria step by step in the guide How to choose optical simulation software?. iSymulacje — a brand of SPECTROPOL, the Polish distributor of Lambda Research Corporation and Optiwave — helps match the modules and start a trial version.
When to use ray tracing, and when FDTD or BPM?
Geometric ray tracing is accurate when the dimensions of the optical elements are much larger than the wavelength of light. For structures with dimensions comparable to the wavelength (nanometres to micrometres), wave methods are necessary:
-
FDTD (Finite-Difference Time-Domain) — for sub-micrometre structures, photonic crystals, plasmonics
-
BPM (Beam Propagation Method) — for long optical waveguides
-
Ray tracing — for macroscopic optical systems (millimetres and larger)
In practice, a complete project often uses both approaches — FDTD for photonic-component analysis, ray tracing for system-level analysis. We compare the numerical methods in detail — ray tracing, FDTD, BPM, EME, RCWA — in the article Methods for modelling optical phenomena, and the FDTD method itself in How does the FDTD method work, and when should you use it?.