- Home
- Non Sequential Ray Tracing
- Sources, Splitting and Scattering
- How to Model Scattering Efficiently
How to Model Scattering Efficiently
- By Akash Arora
- Published 15 October 2007
- Sources, Splitting and Scattering
-
Rating:




Introduction
Modeling surface scattering is important in many optical systems and is critical for stray light analysis. ZEMAX has several built-in scatter models with flexibility to encompass nearly any scattering profile.
Accurate modeling of surface scatter in non-sequential ray tracing can require a large number of rays to strike a desired object in order to properly model the scatter profile. This problem is exacerbated if the desired target subtends a small solid angle from the scatter point. The solution to this problem is to increase the number of incident and/or scattered rays so that more rays will strike the desired target. Of course, tracing more rays takes more time, and thus modeling scatter can be a lengthy process.
ZEMAX allows use of a “Scatter To” list to improve scattering efficiency, whereby scattered rays are only traced if they intersect some desired object(s). This doesn’t guarantee that scattered rays will hit an object, so the number of rays needed for accurate results could still be quite large.
ZEMAX now has “Importance Sampling” to drastically improve scatter efficiency. Both features can be found in the “Scatter To” tab in the object properties dialog. 
Importance sampling is fundamentally different than Scatter to. If an object is listed in the importance sampling list, ZEMAX will always scatter rays towards a target sphere centered at this object. To account for the scatter profile, ZEMAX will weight the power in these rays so that the flux seen at the object is realistic; the signal to noise ratio is increased. The size of the target sphere and the maximum solid angle it may subtend are specified by the user.
In the system below, a Lambertian surface scatters incident light into a hemisphere. Even with 10 scattered rays per incident ray, few rays make it to the small detector. 
When importance sampling is enabled, however, numerous rays strike the detector.
There are a few important things to understand when using importance sampling. First, the object itself is not the target of scattered rays, but rather a sphere with a given radius, centered at the local origin of the object. Consequently, the target sphere should be made slightly larger than the object to ensure the scattered rays overfill the desired object.
The limit parameter on the target sphere is defined to ensure the BSDF of the scattering surface doesn’t vary too much within the solid angle subtended by the target sphere. This is necessary due to the manner in which ZEMAX apportions power to the scattered rays. As discussed previously, the directions of the rays are independent of the BSDF, so the flux must be weighted properly. Each importance sampled ray targeting a specific object contains the same flux. ZEMAX takes the average of the BSDF within the targeted solid angle and applies flux to each ray accordingly. The scatter function plot below shows a specific range of scatter vector magnitudes (vertical red bars) and the approximate value of the BSDF that ZEMAX would choose for importance sampled rays (horizontal red bar).
If the BSDF changes appreciably over the solid angle of the target sphere, the flux seen at the target sphere from importance sampled rays will not be accurate.
To get an idea of how importance sampling improves scatter efficiency and analysis time, a comparison of normal scatter and importance sampling is performed. The plot below shows the number of rays striking the detector for a system with 1E5 analysis rays and a target object that subtends approximately 0.2 sr from the point of scatter.
With importance sampling, several times as many rays hit the desired object in the same amount of time as with one scattered ray. Next, we will look at an example of stray light analysis using importance sampling.