Method for Scattering Ray Tracing Using Harvey Scattering Model with Modulation Translation Transformation

By rewritten BRDF into the modulation function P in the Harvey scattering model using the sampling area modulation parameter r, the cumulative distribution function is constructed to realize scattered ray tracing, which solves the problem of difficult to construct the scattered ray tracing probability model of the Harvey model in the prior art, and achieves an accurate and efficient ray tracing effect.

CN115170718BActive Publication Date: 2025-06-10NANJING UNIV OF SCI & TECH
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210900539.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-28
Publication Date
2025-06-10
Estimated Expiration
2042-07-28

AI Technical Summary

Technical Problem

The prior art is difficult to effectively construct the scattered ray tracing probability model of the Harvey scattering model, making it difficult to accurately simulate the direction and energy of the scattered ray in optical simulation.

Method used

By setting the parameters in the Harvey scattering model and rewritten BRDF into the modulation function P using the sampling area modulation parameter r, the cumulative distribution function is constructed to obtain the probability in the direction of the scattered light, and then tracing the scattered light rays is achieved.

Benefits of technology

This method can accurately and efficiently realize the scattered ray tracing of the Harvey model, avoiding energy loss caused by coordinate point translation, and solving the problem that there is no analytical solution to the BRDF integral directly.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115170718B_ABST
    Figure CN115170718B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for scattering light ray tracing using a Harvey scattering model with modulation translation transformation. First, the sampling region modulation parameter is determined according to the incident light ray direction. Then, the bidirectional reflectance distribution function (BRDF) describing the Harvey scattering model is rewritten as a modulation function with an analytical solution for the integral. On this basis, a scattering light ray tracing probability model is constructed to simulate and sample the zenith angle and azimuth angle. After converting the coordinates of the sampling points into coordinates in the quadratic direction cosine coordinate system, a translation transformation is performed, and the effective samples are screened out through the limiting conditions. Finally, the direction cosine of the scattering light ray is determined. The energy of the scattering light ray can be solved through the BRDF, the number of scattering light rays, and the energy of the incident light ray. By rewriting the BRDF as a modulation function with an analytical solution for the integral through the sampling region modulation parameter, the present invention solves the problem of difficult construction of the scattering light ray tracing probability model, and at the same time avoids the energy loss caused by coordinate translation, and finally can realize the scattering light ray tracing of the Harvey scattering model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of stray radiation, and particularly to a method for scattering light ray tracing using a Harvey scattering model with modulated translation transformation. Background Art

[0002] J.E. Harvey mentioned in his doctoral thesis that if the angular variables in the bidirectional reflectance distribution function (BRDF) are replaced by direction cosine variables, the value of the BRDF is independent of the incident light direction, that is, the scattering distribution has translational invariance. As a classical BRDF model, the Harvey scattering model can be used to accurately describe the scattering characteristics of surfaces with roughness less than the wavelength, and is now widely used in the modeling of smooth surfaces such as optical lenses. In optical simulation, the core of realizing scattering light ray tracing based on the BRDF model is to determine the direction cosine and energy of the scattered light rays. The principle is to convert the BRDF distribution into a probability distribution, and use the Monte Carlo method to simulate sampling to obtain the direction cosine of the scattered light rays by constructing a probability model. The energy of the scattered light rays is solved by the BRDF, the number of scattered light rays, and the energy of the incident light rays. In summary, reasonably constructing the probability model of scattering light ray tracing is the key to achieving accurate scattering light ray tracing.

[0003] In the Chinese patent "High-fidelity rendering algorithm for materials based on measured BRDF data" (CN201210586753.6), the rendering model of the material is fitted by collecting the measured data of the material, and then the ambient light is collected randomly and discretely in different directions. Finally, the rendering of the material is realized by scattering light ray tracing through the rendering model. The modeling scheme of the Cook-Torrance model in the article involves taking approximations of the BRDF parameters and finding the analytical solutions and inverse functions of the function integrals. Considering that the approximation method will cause errors in the results of scattering light ray tracing, and there is no analytical solution for directly integrating the BRDF of the Harvey model, resulting in the inability to solve the inverse function subsequently, and ultimately unable to construct the probability model of scattering light ray tracing.

[0004] Cheng Xiaohao from Harbin Institute of Technology mentioned in his dissertation "Research on the Transmission Characteristics of Stray Radiation in Infrared Detection Systems with Coated Windows" that the basis of using the Monte Carlo method to solve stray radiation is to establish corresponding probability models for each energy transmission process, and then simulate sampling to determine the direction of the scattered light rays. The probability model of the zenith angle θ s1 of the scattered light rays in the article is in the form of an integral implicit function, which will lead to difficulties in simulation sampling, and ultimately it is difficult to solve the θ s1 component in the scattered light ray coordinates. Summary of the Invention

[0005] The purpose of the present invention is to provide a method for scattering light ray tracing using a Harvey scattering model with modulated translation transformation, which plays an important role in the field of scattering surface property modeling and stray light analysis.

[0006] The technical solution for implementing the present invention is as follows: A method for scattering light ray tracing using a Harvey scattering model with modulation translation transformation, the steps are as follows:

[0007] Step 1: Set the intercept b, 0 shoulder angle l, slope s in the Harvey scattering model, and determine the incident light energy E, in zenith angle θ of the incident light, i and azimuth angle as well as the number n of scattered light rays, and then go to Step 2.

[0008] Step 2: Calculate the sampling area modulation parameter r according to θ i and , and then go to Step 3.

[0009] Step 3: Rewrite the bidirectional reflectance distribution function BRDF as a modulation function P through r, and on this basis, construct a cumulative distribution function, and then obtain the probability on the scattered light ray direction where θ s1 is the zenith angle of the scattered light ray, is the azimuth angle of the scattered light ray, and then go to Step 4.

[0010] Step 4: Since the θ s1 and in are independent of each other, rewrite as where p 1 (θ s1 ) is the probability at θ s1 , is the probability at , and then go to Step 5.

[0011] Step 5: Find the inverse functions of p 1 (θ s1 ) and correspondingly as θ s1 (p 1 ) and , and then go to Step 6.

[0012] Step 6: Select a scattered light ray, take two independent random numbers p 1 and p 2 according to the uniform distribution U(0,1), substitute them into θ s1 (p 1 ) and respectively, and solve the corresponding θ s1 and , and then go to Step 7.

[0013] Step 7: Expand the coordinate range of the direction cosine coordinate system to obtain a secondary direction cosine coordinate system. Convert θ s1 and to coordinates in the secondary direction cosine coordinate system. Perform a translation transformation on the coordinates in the above secondary direction cosine coordinate system to obtain the modulated x-direction cosine x* and the modulated y-direction cosine y*, and then proceed to Step 8.

[0014] Step 8: Determine whether the constraint condition (x*) 2 +(y*) 2 ≤1 holds. When it holds, take x* and y* as valid samples, denoted as L and M respectively, and proceed to Step 9. When it does not hold, return to Step 6 until valid samples are obtained.

[0015] Step 9: Select a new scattered ray and return to Step 6 until n pairs of L and M are obtained. Calculate the z-direction cosine N based on L and M:

[0016]

[0017] Obtain the direction cosines (L, M, N) of n scattered rays and proceed to Step 10.

[0018] Step 10: Calculate the energy E in of each scattered ray according to the BRDF describing the Harvey scattering model, the incident ray energy E sc and the number n of scattered rays. Then proceed to Step 11.

[0019] Step 11: Perform scattered ray tracing according to the energy E sc of the scattered rays and the direction cosines (L, M, N) of each scattered ray.

[0020] Compared with the prior art, the significant advantages of the present invention are as follows:

[0021] (1) The present invention expands the sampling area through the sampling area modulation parameter r, solving the problem of energy loss caused by coordinate point translation in the subsequent process;

[0022] (2) The present invention rewrites the BRDF as a modulation function P through the sampling area modulation parameter r, solving the problem that there is no analytical solution for directly integrating the BRDF;

[0023] (3) In the design process of performing scattered ray tracing based on the Harvey model, the present invention does not approximate the intermediate variables and can accurately and efficiently implement scattered ray tracing. Description of the Drawings

[0024] Figure 1 is a flowchart of the method for performing scattered ray tracing using the Harvey scattering model with modulation translation transformation of the present invention.

[0025] Figure 2 This is a schematic diagram of sampling area modulation and coordinate point translation for the present invention. Figure 2 In (a) of Figure 2 there is no modulation and no translation. Figure 2 In (b) of Figure 2 there is no modulation but translation.

[0026] Figure 3 This is a schematic diagram of the Harvey model simulation in the specific implementation manner of the present invention.

[0027] Figure 4 This is the surface energy distribution diagram of the simulation result analysis of the present invention. Figure 4 In (a) of Figure 4 is the simulation result of the Matlab simulation program compiled according to the present invention.

[0028] To make the above objects and features of the present invention more obvious and understandable, the technical solution of the present invention will be further described below in conjunction with the embodiments shown in the drawings. Specific implementation manner

[0029] The present invention discloses a method for scattering light ray tracing using a Harvey scattering model with modulation translation transformation. The sampling area modulation parameter is determined according to the incident light ray direction to solve the problem of energy non-conservation caused by the translation of sampling points subsequently. The BRDF describing the Harvey model is rewritten as a modulation function through the sampling area modulation parameter, solving the problem that there is no analytical solution for directly integrating the BRDF. On this basis, a scattering light ray tracing probability model is constructed to simulate and sample the zenith angle and azimuth angle. The angular coordinates of the sampling points are converted into coordinates in the quadratic direction cosine coordinate system, and the above coordinates are translated according to the "translation invariance" characteristic of the BRDF. Effective samples are screened out through limiting conditions, and finally the direction cosine of the scattering light ray is determined. The energy of the scattering light ray can be solved through the BRDF, the number of scattering light rays, and the incident light energy.

[0030] To better verify a method for scattering light ray tracing using a Harvey scattering model with modulation translation transformation involved in the present invention, the specific implementation manner is elaborated by specifying the process parameters of the scattering light ray tracing. The schematic diagram of the Harvey scattering model simulation is as Figure 3 shown.

[0031] Combined with Figure 1 , a method for scattering light ray tracing using a Harvey scattering model with modulation translation transformation is as follows:

[0032] Step 1: Set the intercept b, shoulder angle l, and slope s in the Harvey scattering model, and determine the incident light energy E 0 , zenith angle θ of the incident light in , and azimuth angle i , as well as the number of scattered light rays n, and then proceed to Step 2;

[0033] Step 2: Calculate the sampling area modulation parameter r according to θ i and as follows:

[0034] Step 2-1: Convert the angle θ of the incident light into direction cosines according to the direction cosine coordinate system: i , where x

[0035]

[0036] 0 represents the direction cosine of the incident light in the x direction, and y 0 represents the direction cosine of the incident light in the y direction.

[0037] Step 2-2: Calculate the sampling area modulation parameter r based on the x and y direction cosines of the incident light:

[0038]

[0039] α represents the modulation constant, and generally the value range is 0 ≤ α ≤ 1.

[0040] Proceed to Step 3.

[0041] Step 3: Rewrite the bidirectional reflectance distribution function BRDF as a modulation function P through r, and on this basis, construct a cumulative distribution function to obtain the probability in the direction of the scattered light where θ s1 and are respectively the zenith angle and azimuth angle of the scattered light, as follows:

[0042]

[0043] Proceed to Step 4.

[0044] Step 4: Since θ and in s1 are independent of each other, rewrite as where p 1 (θ s1 ) is the probability at θ s1 , s1 and is The probability at is θ s1 The probability p at 1 (θ s1 ) and The probability at Take the product and go to step 5.

[0045] Step 5. Find p 1 (θ s1 ) and The inverse functions of are θ s1 (p 1 ) and Go to step 6.

[0046] Step 6. Select a scattered ray and take two independent random numbers p 1 and p 2 , substitute them into θ s1 (p 1 ) and respectively, and solve the corresponding θ s1 and Go to step 7.

[0047] Step 7. Expand the coordinate range of the direction cosine coordinate system to obtain a quadratic direction cosine coordinate system, convert θ s1 and into coordinates in the quadratic direction cosine coordinate system, and perform a translation transformation on the above coordinates to obtain the modulated x direction cosine x* and the modulated y direction cosine y*:

[0048]

[0049] Go to step 8.

[0050] Step 8. Judge whether the constraint condition (x*) 2 +(y*) 2 ≤1 holds. If it holds, take x* and y* as valid samples, denoted as L and M respectively, and go to step 9. If it does not hold, return to step 6 until valid samples are obtained.

[0051] Step 9. Select a new scattered ray, return to step 6 until n pairs of L and M are obtained, and calculate the z direction cosine N based on L and M:

[0052]

[0053] Obtain the direction cosines (L, M, N) of n scattered rays and go to step 10.

[0054] Step 10. According to the BRDF describing the Harvey scattering model and the incident ray energy E inObtain the energy E of each scattered ray based on the number n of scattered rays sc , and proceed to step 10.

[0055] Step 11. According to the energy E of the scattered ray sc and the direction cosines (L, M, N) of each scattered ray, perform scattered ray tracing.

[0056] Embodiment 1

[0057] A method for performing scattered ray tracing using the Harvey scattering model with modulated translation transformation according to the present invention is as follows:

[0058] Step 1. Set the intercept b in the Harvey scattering model 0 = 2.3, the shoulder angle l = sin5°, the slope s = -2.4, and determine the energy E of the incident ray in = 1W, the zenith angle θ of the incident ray i = 45° and the azimuth angle and the number n of scattered rays = 10 7 , and proceed to step 2;

[0059]

[0060] Step 2. Calculate the sampling region modulation parameter r = 1.3391 according to θ i and , where the modulation constant α takes the typical value of 0.6320.

[0061] Step 2-1. According to the direction cosine coordinate system, convert the angle θ of the incident ray i , into direction cosines:

[0062]

[0063] Among them, the x direction cosine x of the incident ray 0 = 0.7071, and the y direction cosine y of the incident ray 0 = 0.

[0064] Step 2-2. Calculate the sampling region modulation parameter r = 1.3391 according to the x and y direction cosines of the incident ray

[0065]

[0066] α represents the modulation constant, and the typical value is taken as 0.6320 here.

[0067] Step 3: Rewrite the bidirectional reflectance distribution function (BRDF) as a modulation function P using the sampling region modulation parameter r. On this basis, construct a cumulative distribution function with an analytical solution, and then obtain the probability that the scattering ray direction is at where θ s1 and are the zenith angle and azimuth angle of the scattering ray respectively, as follows:

[0068]

[0069]

[0070] Proceed to Step 4.

[0071] Step 4: Since θ s1 and are independent of each other, rewrite as where is the probability p s1 at θ 1 (θ s1 ) and is the probability at

[0072]

[0073] Proceed to Step 5.

[0074] Step 5: Find the inverse functions of p 1 (θ s1 ) and which are θ s1 (p 1 ) and where m and k are intermediate variables in different cases, and proceed to Step 6;

[0075]

[0076] Proceed to Step 6.

[0077] Step 6: Select a scattering ray and take two independent random numbers p 1 and p 2 from the uniform distribution U(0,1), substitute them into θ s1 (p 1 ) and respectively, and solve for the corresponding θ s1 and Proceed to Step 7.

[0078] Step 7. Expand the coordinate range of the direction cosine coordinate system by the sampling region modulation parameter r to obtain a secondary direction cosine coordinate system, and convert θ s1 and into coordinates in the secondary direction cosine coordinate system. Perform a translation transformation on the above coordinates to obtain the modulated x-direction cosine x* and the modulated y-direction cosine y*, so as to solve the Figure 2 energy loss problem in (b);

[0079]

[0080] Proceed to Step 8.

[0081] Step 8. Judge whether the constraint condition (x*) 2 +(y*) 2 ≤1 holds. When it holds, regard x* and y* as valid samples, denoted as L and M respectively, and proceed to Step 9. When it does not hold, return to Step 6 until valid samples are obtained.

[0082] Step 9. Select a new scattered ray and return to Step 6 until 10 7 For L and M, obtain the z-direction cosine N according to L and M;

[0083]

[0084] Obtain the direction cosines (L, M, N) of 10 7 scattered rays. The coordinates of the 10 7 scattered rays in the direction cosine coordinate system are as shown in Figure 2 (d); Proceed to Step 10.

[0085] Step 10. According to the BRDF of the Harvey scattering model, the incident ray energy E in = 1W and the number of scattered rays n = 10 7 , obtain the energy E sc = 1.526×10 -8 W of each scattered ray:

[0086]

[0087] Proceed to Step 11.

[0088] Step 11. Perform scattered ray tracing according to the scattered ray energy E sc and the direction cosines (L, M, N) of each scattered ray.

[0089] Taking the scattering plane as the global coordinate origin, set the position coordinates of the analysis plane to (0, 1, 1), the size to 2×2 mm, and the number of pixels to 100×100. Write the corresponding simulation program in Matlab according to steps 1 to 10 and the analysis plane parameters, and set the same parameters under the same simulation conditions in the commercial stray light software Lighttools to perform the scattering ray tracing.

[0090] The simulation results of the program compiled according to the present invention and the simulation results of the commercial stray light software Lighttools are as Figure 4 shown. The correlation coefficient of the energy on the analysis plane is 0.9999, and the energy distributions are highly similar. The scattering ray tracing of the Harvey model is accurately and efficiently realized through the modulation translation change.

Claims

1. A method for scattering light ray tracing using the Harvey scattering model with modulation translation transformation, characterized in that, the steps are as follows: Step 1: Set the intercept b in the Harvey scattering model 0 , shoulder angle l, slope s, and determine the incident light energy E in , the zenith angle θ of the incident light i With azimuth And the number of scattered light rays n, go to step 2; Step 2: According to θ i and calculate the sampling area modulation parameter r, specifically as follows: Step 2-1: According to the direction cosine coordinate system, convert the angle θ of the incident light ray i , into direction cosines: where x 0 represents the cosine of the x - direction of the incident light, and y 0 represents the cosine of the y - direction of the incident light; Step 2-2: Calculate the modulation parameter r of the sampling region according to the cosine of the incident light ray in the x direction and the cosine of the incident light ray in the y direction; α represents the modulation constant, and the value range is 0 ≤ α ≤ 1; Proceed to Step 3; Step 3: Rewrite the bidirectional reflectance distribution function (BRDF) as a modulation function P through r. On this basis, construct the cumulative distribution function, and then obtain the direction of the scattered light Probability on where θ s1 is the zenith angle of the scattered light, is the azimuth angle of the scattered light, and proceed to Step 4; Step 4. Since θ s1 and are independent of each other, rewrite as where p 1 (θ s1 ) is the probability at θ s1 , and is the probability at, go to Step 5; Step 5, find p 1 (θ s1 ) and 's inverse functions correspond to θ s1 (p 1 ) and Proceed to Step 6; Step 6: Select a scattered light ray, and take two independent random numbers p according to the uniform distribution U(0, 1). 1 and p 2 , substitute them into θ s1 (p 1 ) and respectively, solve the corresponding θ s1 and and go to Step 7; Step 7. Expand the coordinate range of the direction cosine coordinate system to obtain a quadratic direction cosine coordinate system. Convert θ s1 and into coordinates in the quadratic direction cosine coordinate system, and perform a translation transformation on the coordinates in the above quadratic direction cosine coordinate system to obtain the modulated x-direction cosine x* and the modulated y-direction cosine y*: Proceed to Step 8; Step 8. Determine the limiting condition (x*) 2 +(y*) 2 ≤ 1 holds. When it holds, take x* and y* as valid samples, denoted as L and M respectively, and go to Step 9; when it does not hold, return to Step 6 until valid samples are obtained; Step 9: Select a new scattered light ray, return to Step 6, until n pairs of L and M are obtained, and obtain the cosine N in the z direction according to L and M: Obtain the direction cosines (L, M, N) of n scattered light rays; proceed to Step 10; Step 10. Obtain the energy E of each scattered ray based on the BRDF describing the Harvey scattering model, the energy E of the incident ray, and the number n of scattered rays; proceed to Step 11; in sc ​​ Step 11. Perform scattered light tracing based on the scattered light energy E sc and the direction cosines (L, M, N) of each scattered light ray.

2. The method for scattering light ray tracing using the Harvey scattering model with modulation translation transformation according to claim 1, characterized in that: In Step 3, rewrite the BRDF as a modulation function P through r, specifically as follows:

Citation Information

Patent Citations

  • High-realism material rendering algorithm based on BRDF measured data

    CN103035025B