Non-sequential stray light tracing method
By determining the focus surface and key surface in the optical system, generating key sampling light, and prioritizing the trace of stray light that may reach the image surface, the problem of slow and low efficiency of stray light tracing in the optical system in traditional technology is solved, and fast and efficient stray light analysis is achieved.
Patent Information
- Application Number
- CN202211155304.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-22
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2042-09-22
AI Technical Summary
The traditional Monte Carlo ray tracing technology is slow, has low efficiency when analyzing stray light in optical systems with high precision and efficient analysis, and the accuracy is difficult to meet the analysis requirements.
By determining the focus surface and the key surface, key sampling light is generated, and stray light that may be scattered to the image surface next time is preferred, and energy focus sampling method is used.
It achieves the rapid completion of high-magnitude stray tracing, improves simulation speed and efficiency, and can quickly judge the magnitude of stray tracing, which is more convenient to analyze the path and the trace tracing process is smarter.
Smart Images

Figure CN115629473B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a non-sequential stray light tracing method. Background Art
[0002] With the increasing demand for optical system indicators, simulation and analysis of external stray light in optical systems are also widely used in various optical systems with high image quality and high stray light suppression ratio. The simulation and analysis of external stray light in optical systems mainly use Monte Carlo ray tracing technology to convert stray light into light with direction and energy, trace all external stray light rays, and perform statistics at the image plane to finally obtain the path and results of the stray light.
[0003] At present, the traditional Monte Carlo ray tracing technology is mostly aimed at ray tracing technology for the purpose of graphics rendering, or the existing non-sequential stray light tracing directly traverses all light rays to complete the calculation from the light source to the receiver. The technology with graphics rendering as the core focuses on visual effects and realism, and is not suitable for high-precision and efficient analysis of stray light in optical systems. Due to the random scattering direction, the traditional non-sequential stray light tracing method will generate a large number of low-energy light rays that cannot reach the image plane after multiple scatterings. Since the total scattering number of ray tracing is a constant, the light that cannot reach the detector will affect the number of high-energy light rays that can reach the detector, thereby reducing the simulation progress, and also leading to a reduction in simulation speed and efficiency.
[0004] Therefore, the currently used non-sequential stray light tracing technology has a slow tracing speed and low efficiency, and the accuracy of the non-sequential stray light tracing method based on the rendering equation is difficult to meet the requirements of external stray light analysis of the optical system. Summary of the invention
[0005] In view of this, it is necessary to provide a non-sequential stray light tracing method.
[0006] The present invention provides a non-sequential stray light tracing method, which comprises the following steps: a. determining a focus surface according to an optical system for tracing stray light; b. determining a key sampling projection area and a key sampling solid angle of scattered light according to the focus surface; c. generating key sampling light according to the key sampling projection area and the key sampling solid angle to complete the tracing of all light rays.
[0007] Specifically, the method further includes: setting key sampling light information.
[0008] Specifically, the step a comprises:
[0009] Starting from the light source, fast tracing is performed to count all surfaces that can be directly reached by the light emitted by the light source, and such surfaces are recorded as the illumination surface Ψ1-Ψ n; Starting from the image plane, use the image plane as the extended light source and calculate the light source angle using the F number. The formula is as follows:
[0010]
[0011] Where f / # is the detector F number.
[0012] Specifically, the step a further comprises:
[0013] Count all surfaces that can be directly reached by light emitted from the image plane, and record such surfaces as key surfaces Τ1-Τ n ; Take the intersection of the lighting surface and the key surface and determine it as the focus surface Τ i -Τ j .
[0014] Specifically, the step b comprises:
[0015] When the light reaches the scattering surface, a corresponding number of scattered rays is generated according to the preset number of scattered rays N, the key sampling projection area is confirmed, and more scattered rays are incident on the surface with large stray light contribution; the light intersection is indexed with all the focus surfaces.
[0016] Specifically, the step b further includes:
[0017] If there is a straight line connecting the point and the surface of interest, there is a key sampling projection area. By calculating the configuration factor GCF, the key sampling solid angle ω is calculated. The calculation formula is:
[0018] Specifically, the step b further includes:
[0019] If there is no straight line connecting the point with the surface of interest, then each surface of interest is projected through the optical surface, that is, connected through the optical surface: if the line can be directly connected, the edge light is calculated by Snell's law, the angle is determined by the upper and lower limits, and then the key sampling solid angle is calculated by formula 2; if the line cannot be directly connected, that is, there is no intersection with the surface of interest through the optical surface, then there is no need for key sampling, and such light cannot reach the image plane through the next scattering.
[0020] Specifically, the step c comprises:
[0021] After confirming the key sampling solid angle, N is generated first according to the preset number of scattered rays N. imp The formula for calculating the total energy flux of the key sampling light in the solid angle is as follows:
[0022]
[0023] Among them, BRDF is the bidirectional scattering distribution function.
[0024] Specifically, the step c also includes:
[0025] In the key sampling solid angle, the generated light is evenly distributed, the corresponding BRDF value is calculated according to the exit angle, the flux proportion of each light is calculated according to the corresponding BRDF value obtained, and the total energy of the generated light is φ importantray , and then the general light energy total flux calculation formula is generated as follows:
[0026] Φ normal =φ imput *TIS-φ importantray
[0027] Where, TIS = ∫ hemispheren BSDFcosθdΩ, randomly generated NN imp The corresponding BRDF value is calculated according to the angle, and the flux ratio of each ray is calculated according to the corresponding BRDF value, and the total energy of the generated ray is Φ normal .
[0028] Compared with the prior art, the beneficial effects of this application include:
[0029] First, it can quickly determine the level of stray light suppression
[0030] The present application can quickly locate zero-order stray light and first-scattered stray light by determining the focus surface and the key surface; energy-focused sampling is used in multi-level scattering to prioritize the tracking of stray light that may be scattered to the image plane next time. Therefore, high-level stray light tracking can be completed quickly, thereby realizing rapid judgment of the stray light suppression level.
[0031] Second, path analysis is more convenient
[0032] The present application first utilizes forward and reverse ray tracing to determine the critical surfaces and the illuminated surfaces. When counting the sources of the stray light paths, it is able to index all the light rays reaching the surfaces of interest and the critical surfaces. Such light rays contribute greatly to stray energy. Therefore, as long as the light rays reaching the critical surfaces or the surfaces of interest are found, the stray light paths can be quickly analyzed, and stray light suppression can be achieved by processing the surfaces of interest and the surfaces of interest (aperture, blackening processing).
[0033] Third, the tracking process is more intelligent
[0034] The present application sets the focus surface and the key surface to quickly determine the source of high-level stray light and prioritizes tracing of key sampling light. Therefore, the source of stray light can be determined in a very short time. Since the key surface has been pre-processed for the optical system, there is no need to set additional scattered area key sampling during the tracing process. The present invention can automatically realize the setting of the interest surface, with short tracing time, high efficiency and higher accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 It is a flow chart of the non-sequential stray light tracing method of the present invention;
[0036] Figure 2 A schematic diagram of confirming a focus surface provided by an embodiment of the present invention;
[0037] Figure 3 A schematic diagram of a key sampling projection area provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0038] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0039] See also Figure 1 , is an operation flow chart of a preferred embodiment of the non-sequential stray light tracing method of the present invention.
[0040] Step S1, setting the key sampling light information. Specifically:
[0041] In ray tracing, light information is the core. Each ray is defined as a line segment consisting of an emission point and a direction. During the tracing process, each computing node is also divided in this way. Obtain node information for intersection and calculate emission information, and use this as a tracing record node. Each time an intersection, judgment, and calculation is performed, it is recorded and used as a new starting point for continuous tracing. Therefore, during the tracing process, information is updated for each segment. In this embodiment, the node is the inflection point where the light is reflected or transmitted during the emission process.
[0042] The light source emits 10,000 rays of light l1~l 10000 For example, the key sampled light information includes: the starting coordinates of the light source (x, y, z), the direction vector (l, m, n), and the light energy E. The construction of the optical system structure model is an important part of ray tracing. The three-dimensional structure model patch is triangulated and the optical surface properties are attached to the surface of the structure model.
[0043] Step S2, determining the focus surface according to the optical system for tracing stray light. Specifically:
[0044] Starting from the light source, fast tracing is performed to count all surfaces that can be directly reached by the light emitted by the light source, and such surfaces are recorded as the illumination surface Ψ1-Ψ n Starting from the image plane, use the image plane as the extended light source and calculate the light source angle using the F number. The formula is as follows:
[0045]
[0046] Where f / # is the detector F number.
[0047] Count all surfaces that can be directly reached by light emitted from the image plane, and record such surfaces as key surfaces Τ1-Τ n Take the intersection of the lighting surface and the key surface and determine it as the focus surface Τ i -Τ j Please refer to Figure 2 .
[0048] Step S3, determining the key sampling projection area and key sampling solid angle of the scattered light according to the focus surface. Specifically:
[0049] See also Figure 3 When the light reaches the scattering surface, according to the preset number of scattered light rays N, a corresponding number of scattered light rays are generated, the key sampling projection area is confirmed, and more scattered light rays are incident on the surface with large stray light contribution. Indexing is performed through the intersection of light rays and all the focus surfaces:
[0050] If there is a straight line connecting the point and the surface of interest, there is a key sampling projection area. By calculating the configuration factor GCF, the key sampling solid angle ω is calculated. The calculation formula is:
[0051] If there is no straight line connecting the point with the surface of interest, then each surface of interest is projected through the optical surface, that is, connected through the optical surface (transmission, reflection): If the line can be directly connected, the edge light is calculated by Snell's law, the angle is determined by the upper and lower limits, and then the key sampling solid angle is calculated by formula 2; if the line cannot be directly connected, that is, there is no intersection with the surface of interest through the optical surface, then there is no need for key sampling, and such light cannot reach the image plane through the next scattering.
[0052] Step S4, generating key sampling rays according to the key sampling projection area and the key sampling solid angle, so as to complete the tracing of all rays. Specifically:
[0053] After confirming the key sampling solid angle, N is generated first according to the preset number of scattered rays N. imp The formula for calculating the total energy flux of the key sampling light in the solid angle is as follows:
[0054]
[0055] Among them, BRDF is the bidirectional scattering distribution function. In the key sampling solid angle, the light is evenly distributed, the corresponding BRDF value is calculated according to the exit angle, and the flux proportion of each light is calculated according to the corresponding BRDF value obtained, and the total energy of the generated light is φ importantray The general total light energy flux calculation formula is then generated as follows:
[0056] Φ normal =φ imput*TIS-φ importantray
[0057] Where, TIS = ∫ hemispheren BSDFcosθdΩ, randomly generated NN imp The corresponding BRDF value is calculated according to the angle, and the flux ratio of each ray is calculated according to the corresponding BRDF value, and the total energy of the generated light is Φ normal .
[0058] Step S5, scattered energy key sampling and tracing rules:
[0059] After the optical system is indexed by the focus surface, the light source light is preferentially projected to the focus surface by calculating the key sampling solid angle and the key sampling light, and the scattered or mirror light generated by the focus surface is preferentially traced to the image surface. Then, after the light source light reaches the non-focus surface, the generated scattered light is preferentially projected to the key surface through the key sampling method by calculating the key sampling solid angle and generating the key sampling light, and the scattered or mirror light generated by the key surface is preferentially traced to the image surface. Finally, the ordinary scattered light is traced until all the light is traced. The tracing results of tracing by this rule give priority to generating primary scattered or secondary scattered light, and the tracing results are easy to analyze; high-level stray light tracing can be preferentially completed in a very short time.
[0060] The present application positions the critical surfaces of the optical system and weights the scattered light that can directly reach the optical surface, thereby increasing the number of light that can reach the critical surfaces. The scattered light that passes through the critical surfaces can reach the detector after one scattering, thereby increasing the propagation of such light and ensuring the priority propagation of high-level, high-contribution light, thereby greatly improving the efficiency of ray tracing.
[0061] Although the present invention has been described with reference to the current preferred embodiments, those skilled in the art should understand that the above-mentioned preferred embodiments are only used to illustrate the present invention and are not used to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the scope of protection of the present invention.
Claims
1. A non-sequential stray light tracing method, characterized in that: The method comprises the following steps: a. Determine the focus area based on the optical system that is to track stray light; b. Determine the focus sampling projection area and the focus sampling solid angle of the scattered light according to the surface of interest; c. Generate key sampling rays according to the key sampling projection area and key sampling solid angle to complete the tracing of all rays; The step a comprises: Starting from the light source, fast tracing is performed to count all surfaces that can be directly reached by the light emitted by the light source, and such surfaces are recorded as the illumination surface Ψ1-Ψ n ; Starting from the image plane, use the image plane as the extended light source and calculate the light source angle using the F number. The formula is as follows: Where, f / # is the detector F number; The step a also includes: Count all surfaces that can be directly reached by light emitted from the image plane, and record such surfaces as key surfaces Τ1-Τ n ; Take the intersection of the lighting surface and the key surface and determine it as the focus surface Τ i -Τ j ; The step b comprises: When the light reaches the scattering surface, a corresponding number of scattered rays is generated according to the preset number of scattered rays N, the key sampling projection area is confirmed, and more scattered rays are incident on the surface with large stray light contribution; the light intersection is indexed with all the focus surfaces.
2. The method according to claim 1, characterized in that The method further includes: Set the focus sampling light information.
3. The method according to claim 2, characterized in that The step b further comprises: If there is a straight line connecting the point and the surface of interest, there is a key sampling projection area. By calculating the configuration factor GCF, the key sampling solid angle ω is calculated. The calculation formula is:
4. The method according to claim 3, characterized in that The step b further comprises: If there is no straight line connecting the point with the surface of interest, then each surface of interest is projected through the optical surface, that is, connected through the optical surface: if the line can be directly connected, the edge light is calculated by Snell's law, the angle is determined by the upper and lower limits, and then the key sampling solid angle is calculated by formula 2; if the line cannot be directly connected, that is, there is no intersection with the surface of interest through the optical surface, then there is no need for key sampling, and such light cannot reach the image plane through the next scattering.
5. The method according to claim 4, characterized in that The step c comprises: After confirming the key sampling solid angle, N is generated first according to the preset number of scattered rays N. imp The formula for calculating the total energy flux of the key sampling light in the solid angle is as follows: Among them, BRDF is the bidirectional scattering distribution function.
6. The method according to claim 5, characterized in that The step c also includes: In the key sampling solid angle, the generated light is evenly distributed, the corresponding BRDF value is calculated according to the exit angle, the flux proportion of each light is calculated according to the corresponding BRDF value obtained, and the total energy of the generated light is φ importantray , and then the general light energy total flux calculation formula is generated as follows: Φ normal =φ imput *TIS-φ importantray Where, TIS = ∫ hemispheren BD=SDFcosθdΩ, randomly generated NN imp The corresponding BRDF value is calculated according to the angle, and the flux ratio of each ray is calculated according to the corresponding BRDF value, and the total energy of the generated light is Φ normal .
Citation Information
Patent Citations
Ray tracing-based optical camera simulation imaging method and system
CN107092752A
Optical payload external stray light suppression method based on ray tracing theory
CN110489851A