Optical simulation methods

What is ray tracing? Applications in optical engineering

Ray tracing is one of the fundamental methods for simulating light propagation. Used both in 3D rendering and in professional engineering software, it lets you predict how light will behave in a designed optical system before it is built. In this article we explain how it works, how engineering ray tracing differs from graphics ray tracing, and where it is used in practice.

What is ray tracing? Applications in optical engineering
Request a quote Start a trial

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?.

Frequently asked questions
What is ray tracing? Applications in optical engineering

Does ray tracing simulation require a very powerful computer?

The requirements depend on the complexity of the model, the number of traced rays, and the resolution of the analysed maps. TracePro computes mainly on the CPU and scales with the number of cores and threads, while memory demand grows with the size of the geometry and the number of sources. A reasonable starting point is a capable multi-core workstation with a few tens of GB of RAM; very large analyses use compute clusters or the cloud.

How does TracePro differ from free optics programs?

The key factors are physical credibility and the technical support required in industrial processes. Free tools usually offer simplified models that do not capture advanced scattering or material absorption. TracePro provides radiometric and photometric accuracy at the level required for product certification, together with seamless CAD integration, which eliminates geometry-conversion errors.

Does TracePro support importing files from SolidWorks?

Yes. The RayViz add-in lets you define optical properties and run ray tracing directly in the SolidWorks model, with the full analysis then carried out in TracePro. Beyond that, TracePro imports the standard data-exchange formats — STEP, IGES, and SAT — preserving the accurate surface description of lenses, reflectors, and housings.

How long does it take to learn a professional ray tracing program?

The basic functions needed to run a first simulation can be mastered within a few days. Making full use of the advanced algorithms and optimisation methods usually takes a few months of regular work. The process is shortened by practical training based on real design examples.

Which industries in Poland use ray tracing simulation most often?

Primarily LED lighting manufacturers, the automotive sector (headlights, HUD systems, LiDAR), and the medical industry. The defence and aerospace sectors are becoming more important, where precise modelling of vision and LiDAR systems is critical for devices operating in demanding environmental conditions.

Can simulation completely replace building prototypes?

Rarely completely, but it drastically reduces the number of iterations. Simulation is used to detect design errors early and to optimise parameters before the costly production phase. Instead of ten physical models, usually one is built — for final validation and certification.

Ready to check it on your own project?

Ask our engineers for a tailored quote or start a free trial today.

Request a quote Start a trial

← All articles