A GPU and BVH structure-based simulation method for pulsed laser proximity detection
By combining GPU parallel processing and BVH structure to accelerate ray intersection judgment, the problem of low computing efficiency of traditional CPU is solved, realizing real-time pulse laser detection simulation in complex scenarios and improving simulation efficiency and accuracy.
Patent Information
- Application Number
- CN202411407915.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-10
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2044-10-10
AI Technical Summary
Traditional CPU serial computing methods are slow when processing complex pulsed laser detection simulations, making it difficult to achieve real-time simulations, especially when the number of triangular elements is large.
It utilizes the parallel processing capabilities of GPUs and the BVH structure. By adding the BVH structure to the CPU, it accelerates the determination of light-object intersections. It performs detailed calculations only on objects that may intersect, and combines the GPU for ray tracing and scattering calculations to reduce unnecessary computation.
It significantly improves simulation efficiency and accuracy, and can maintain an output frame rate of over 30fps in complex scenarios, meeting the requirements of real-time simulation and improving the reliability and stability of the system.
Smart Images

Figure CN119375862B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of laser short-range detection technology, and in particular to a simulation method for pulsed laser short-range detection based on GPU and BVH structure. Background Technology
[0002] Laser detection is a high-precision detection device widely used in both civilian and military fields. It is typically used to accurately measure target distance and velocity, providing crucial target information for the system. Pulsed laser detection requires processing vast amounts of optical data, including beam emission, scattering, and reception. These computational processes are often highly complex, involving sophisticated mathematical models and algorithms. Simulation techniques play a vital role in the research, development, and performance evaluation of pulsed laser detection. Through simulation, the system's performance under different conditions can be predicted without actual physical testing, thereby reducing reliance on physical hardware and lowering development costs and testing risks. Simultaneously, it accelerates the system's design iteration process, rapidly evaluates the performance of different design schemes, and improves design efficiency.
[0003] Traditional simulation methods use CPU serial computation. When the model is relatively detailed, i.e., there are many triangular facets, the CPU traversal speed is too low to achieve real-time simulation. Summary of the Invention
[0004] To overcome or alleviate the above-mentioned technical problems, the purpose of this invention is to provide a pulsed laser short-range detection simulation method based on GPU and BVH structure to improve simulation efficiency. The powerful parallel processing capability of the GPU is used to achieve ray tracing; simultaneously, the BVH structure is used to quickly eliminate intersection tests between rays and most irrelevant objects, performing detailed calculations only on potentially intersecting objects, significantly reducing unnecessary computation. During simulation, the CPU receives inputs such as 3D scene model data and system parameters, and then transfers the vertices, faces, and textures of the 3D scene to the GPU buffer. To further improve intersection detection efficiency, a BVH structure is added to the 3D scene in the CPU and transferred to the GPU. After receiving the required raw data stream, the GPU calls the scene rendering engine for preprocessing, performs the ray tracing process according to the set initial conditions, and then returns the results to the CPU for output.
[0005] This invention provides the following technical solution:
[0006] In a first aspect, the present invention provides a simulation method for short-range detection of pulsed lasers based on GPU and BVH architecture, which includes the following steps:
[0007] S1: Ray generation: Starting from the detector position, rays are emitted sequentially from the GPU to each surface element of the 3D model read from the CPU to simulate ray transmission.
[0008] S2: BVH Acceleration: Reads the BVH structure passed from the CPU, adds bounding boxes to each object in the 3D scene, and then determines whether a ray intersects with an object by first determining whether it intersects with the bounding box. If they do not intersect, the calculation can be stopped directly, thus accelerating the determination of ray intersection with objects.
[0009] S3: Ray Intersection Traversal: Traverse the generated initial rays. According to the BVH acceleration scheme, perform ray intersection judgment on each node in the BVH structure, i.e., bounding box traversal. If they do not intersect, the light intensity of that point is 0. If they intersect, calculate the light intensity of that point by combining system parameters and model parameters.
[0010] S4: Scattering and Gray-Scale Calculation: When an intersection of a ray and an object is detected, the scattering intensity is iteratively calculated based on the BRDF model. Otherwise, a new ray is generated, and recursive ray tracing is performed on the scattered rays until the maximum number of iterations is reached, at which point the recursion ends. Based on the ray tracing results, the gray-scale value of each pixel is calculated and transmitted back to the CPU to generate a complete simulation image.
[0011] According to some implementation methods, step S1 includes the following steps:
[0012] S11: Receive 3D scene model data, projectile parameters and transceiver system parameters on the CPU side, and then pass the vertices, face elements and textures of the 3D scene to the GPU buffer respectively; at the same time, to further improve the intersection judgment efficiency, add a bounding volume hierarchy (BVH) structure to the 3D scene in the CPU and pass it to the GPU.
[0013] S12: After receiving the required raw data stream, the GPU calls the scene rendering engine for preprocessing and generates initial light rays based on the set camera orientation and pose.
[0014] According to some implementations, step S2 includes the following steps:
[0015] S21: When partitioning the triangular face set, first divide the total space of all face elements into eight AABB boxes according to the octree structure. Taking the x-coordinate sorting as an example, assume there are seven face elements AG in the space, and the minimum x-coordinate of each face element is xA-xG. Then xD is the median of the minimum x-coordinate of the face element. Let it be face Px and divide the total space in half. By analogy, eight AABB bounding boxes can be obtained. The number of face elements in each bounding box is approximately equal.
[0016] S22: Divide the set of face elements into each sub-bounding box. The criterion is: for a face element, if all vertices of the sub-bounding box are on the same side of the face element, then the face element is considered not to be inside the bounding box.
[0017] S23: Transfer the BVH linked list structure to the GPU as an array and assign an ID to each node. Transfer the BVH structure to the GPU global memory area all at once.
[0018] According to some implementations, step S3 includes the following steps:
[0019] S31: Generate the initial emitted ray;
[0020] S32: Traverse BVH; Perform intersection checks on the bounding boxes corresponding to the nodes of the constructed octree, starting from the root node. If the nodes intersect, continue traversing until a leaf node is reached; otherwise, abandon the subtree.
[0021] S33: Determine if there is a hit node in the scene, i.e., the object intersects with the ray. According to the BVH acceleration scheme, when performing pulsed laser detection simulation using the ray tracing method, first traverse each node in the BVH structure to determine the ray intersection. If there is no intersection, it means that the laser has not detected the object, and jump to S38 to end the tracing; if there is an intersection, jump to S34.
[0022] S34: Perform a traversal of the surface elements under this node to determine the intersection of light rays. If there are intersecting surface elements, calculate the direction and intensity weight of the scattered light rays according to the BRDF model and iterate before jumping to S4.
[0023] Step S4 involves scattering and grayscale calculation, specifically including the following steps:
[0024] S41: Scattering Update; If the current element is the element with the shortest distance, calculate the scattering intensity according to BRDF; Record the scattering intensity and weight value;
[0025] S42: Determine whether the tracking iteration has reached the maximum number of iterations weight. If not, jump to S32; if yes, jump to S43.
[0026] S43: Calculate grayscale based on scattering intensity and weight;
[0027] S44: End tracking.
[0028] According to some implementation methods, in step S34, when the ray is found to intersect with the surface element, the traversal is determined by updating the ray direction and intensity weight based on the scattering of the ray on the surface. The specific steps are as follows:
[0029] S341: Use BRDF to sample the scattered light rays. When the light ray is found to intersect with the surface element, calculate the direction and intensity weight of the scattered light ray according to the BRDF model and iterate.
[0030] S342: Based on the ray tracing results, calculate the light intensity weight of each pixel. When the number of ray iterations reaches the threshold, the ray is considered to have disappeared and the light intensity weight is 0. If it can return to the ray before disappearing, it proves that the ray can undergo a complete emission-scattering-reception process. Record the final light intensity weight of the ray for use in S43 to calculate the grayscale output result.
[0031] Secondly, the present invention provides a program having program code for executing the above-described simulation method when the program code is run on a computer, processor, control module or programmable hardware component.
[0032] Thirdly, the present invention provides a memory that stores a computer program, which, when executed by a processor, implements the steps of the above-described simulation method for pulsed laser short-range detection based on GPU and BVH structure.
[0033] Compared with the prior art, the present invention has the following beneficial effects:
[0034] 1. Accelerated computation: GPUs possess highly parallel processing capabilities, significantly improving the speed of simulation calculations. Compared to traditional CPUs, GPUs are more efficient at processing large-scale data and complex calculations, especially in large-scale ray tracing and data parallel processing, where they can drastically reduce simulation time.
[0035] 2. Improved Detection Accuracy: The BVH structure is a hierarchical bounding volume structure that optimizes the detection process of ray-object intersections by grouping objects in a scene and approximating them with bounding volumes. This method reduces unnecessary computation and improves detection accuracy and efficiency.
[0036] 3. Improve system reliability and stability: The high computing power of the GPU and the efficient data management of the BVH structure can improve the system's reliability and stability in complex environments, especially in multi-target detection and dynamic environments.
[0037] 4. When performing pulsed laser short-range detection simulation in the CPU, the speed is insufficient to support real-time requirements. The simulation method using only GPU acceleration significantly reduces the simulation time compared to the method without acceleration. However, when the input model is a complex scene, this method is insufficient to meet the real-time simulation requirements. The pulsed laser short-range detection simulation method based on GPU and BVH structure provided by this invention, after superimposing the BVH structure, can still maintain an output frame rate of more than 30fps in complex scenes, which meets the real-time simulation requirements. Attached Figure Description
[0038] Figure 1 A three-dimensional scene model diagram provided for an embodiment of the present invention.
[0039] Figure 2 This is a diagram of a GPU-accelerated simulation architecture provided for an embodiment of the present invention.
[0040] Figure 3 This is a BVH-AABB bounding box partitioning diagram provided in an embodiment of the present invention.
[0041] Figure 4 This is a multi-level BVH bounding box partitioning diagram provided for an embodiment of the present invention.
[0042] Figure 5 The storage sequence diagram of the octree spatial data structure provided in the embodiment of the present invention.
[0043] Figure 6 A flowchart illustrating a pulsed laser short-range detection simulation method based on a GPU and BVH structure, provided for embodiments of the present invention.
[0044] Figure 7 The flowchart of ray tracing steps S3 and S4 provided in the embodiments of the present invention. Detailed Implementation
[0045] The present invention will now be described in detail with reference to embodiments and accompanying drawings. However, it should be understood that the embodiments and drawings are for illustrative purposes only and do not constitute any limitation on the scope of protection of the present invention. All reasonable modifications and combinations included within the inventive spirit of the present invention fall within the scope of protection of the present invention.
[0046] The present invention will be further described below with reference to the accompanying drawings.
[0047] Example 1
[0048] This embodiment uses Figure 1 The established 3D scene model is used as input, and the total number of facets in the scene is 16384.
[0049] like Figure 6 This embodiment provides a simulation method for short-range detection of pulsed lasers based on GPU and BVH architecture, including the following steps:
[0050] Step S1: Ray Generation. Rays are generated on the GPU, originating from the detector (camera) position and emanating towards each pixel on the imaging plane, simulating ray transmission. A pulsed laser detection simulation method based on GPU acceleration and BVH optimization is defined, employing the reverse ray path simulation method proposed by Turner Whitted based on the reversibility of optical paths. A main ray is emitted from a pixel of the camera (detection device). If it does not intersect with any object, the point is considered empty, and calculation can stop. When the ray hits an object, the next level of reflection, refraction, and shadow rays are generated based on the model's material properties, and these are used as new rays to continue iteratively until they disappear or hit the light source. In pulsed lasers, the transceiver system is coaxial; therefore, the light source and detector can be considered to be at the same position, making the reverse ray path essentially the same as the forward ray path. The simulation is designed to be performed in parallel on the GPU. Based on the basic principles of ray tracing and the GPU architecture, a GPU-accelerated architecture for pulsed laser detection simulation is designed as follows: Figure 2 As shown.
[0051] The CPU receives inputs such as 3D scene model data, projectile parameters, and transceiver system parameters, and then passes the vertices, facets, and textures of the 3D scene to the GPU buffer. At the same time, to further improve the efficiency of intersection judgment, a bounding volume hierarchy (BVH) structure is added to the 3D scene in the CPU and passed to the GPU. After receiving the required raw data stream, the GPU calls the scene rendering engine for preprocessing, generates initial rays according to the set camera orientation and pose, and then starts the ray tracing process. After completion, the results are passed back to the CPU and output.
[0052] Step S2: Select AABB bounding box and octree structure to construct BVH acceleration.
[0053] S21: When partitioning the triangular face set, first divide the total space of all face elements into eight AABB boxes according to the octree structure. The partitioning criterion is to sort all face element vertices according to their x, y, and z coordinates, and take the median values Px, Py, and Pz as the three partitioning faces.
[0054] Taking x-coordinate sorting as an example, suppose there are seven facets AG in space, and the minimum x-coordinate of each facet is xA-xG. Then xD is the median of the minimum x-coordinates of the facets, which is denoted as face Px, and the entire space is divided in two. By analogy, eight AABB bounding boxes can be obtained, such as... Figure 3 As shown.
[0055] S22: Divide the set of face elements into sub-bounding boxes. The criterion is: for a face element, if all vertices of the sub-bounding boxes are on the same side of the face element, then the face element is considered not to be inside the bounding box.
[0056] S23: Based on the aforementioned eight basic bounding boxes, continue adding bounding boxes layer by layer until the number of facets within each bounding box reaches a threshold, ultimately resulting in a set of recursively nested cube structures. AABB bounding boxes use binary encoding as an index, with the encoding method as follows: Figure 4 As shown on the right, each of the eight sub-bounding boxes is encoded to ensure each bounding box has a unique index. Representing each bounding box index as a node, the nested AABB bounding boxes constructed above are represented as an octree in spatial data structure, with each node connecting eight child nodes. Nodes can be divided into leaf nodes containing actual face elements and branch nodes containing AABB boxes, based on their bounding content. Each leaf node contains the maximum and minimum 3D coordinates (xmax, ymax, zmax) and (xmin, ymin, zmin) of the bounding box. The BVH structure is constructed highly recursively in the CPU using a linked list. During function calls, a null pointer is first passed as the parent node pointer. Then, a new node pointer is defined as a BVH Node pointer. After the BVH child node partitioning is completed, the BVH constructor is recursively called, passing the child node pointer as the next-level parent pointer. Finally, the recursion ends when a leaf node is reached, completing the overall BVH construction.
[0057] S24: Transfer the BVH structure to the GPU global memory area in one go. In the simulation, the BVH linked list structure is transferred to the GPU as an array, and each node is assigned an ID according to the above encoding. Figure 5 Taking the octree structure shown as an example, after the GPU array traverses from the root node and stores the leaf nodes N10-N17 connected to N2, it returns to the second level to store N3-N9, and finally stores the leaf nodes N18-N25 connected to N9.
[0058] like Figure 7 The process includes steps S3 and S4, which constitute the entire ray tracing process. S3 mainly describes the process of determining whether a ray intersects with a surface element; S4 describes the calculations after an intersection is found. Specifically:
[0059] S3: During GPU parallel processing, multiple light rays are simultaneously processed. Figure 7 The process shown performs a recursive tracing operation. Step S3 includes the following steps:
[0060] S31: Generate the initial emitted ray;
[0061] S32: Traverse BVH; Perform intersection checks on the bounding boxes corresponding to the nodes of the octree constructed above, starting from the root node. If the nodes intersect, continue traversing until the leaf node; otherwise, abandon the subtree.
[0062] S33: Determine if there is a hit node in the scene, i.e., the object intersects with the ray. According to the BVH acceleration scheme, when performing pulsed laser detection simulation using the ray tracing method, first traverse each node (bounding box) in the BVH structure to determine the ray intersection. If there is no intersection, it means that the laser has not detected the object, and jump to S44 to end the tracing; if there is an intersection, jump to S34.
[0063] S34: Perform a traversal of the face elements under this node to determine the intersection of rays. If there are intersecting face elements, then jump to S4.
[0064] S4: Scattering and grayscale calculation, specifically including the following steps:
[0065] S41: Scattering Update; If the current element is the element with the shortest distance, calculate the scattering intensity according to BRDF; Record the scattering intensity and weight value;
[0066] S42: Determine whether the tracking iteration has reached the maximum number of iterations weight. If not, jump to S32; if yes, jump to S43.
[0067] S43: Calculate grayscale based on scattering intensity and weight;
[0068] S44: End tracking.
[0069] In S34, when a ray is found to intersect with a surface element, the traversal is determined by updating the ray direction and intensity weights based on the scattering of the ray on the surface. The specific steps are as follows:
[0070] S341: Use BRDF to sample the scattered light rays. When the light ray is found to intersect with the surface element, calculate the direction and intensity weight of the scattered light ray according to the BRDF model and iterate.
[0071] S342: Based on the ray tracing results, calculate the light intensity weight of each pixel. When the number of ray iterations reaches the threshold, the ray is considered to have disappeared and the light intensity weight is 0. If it can return to the ray before disappearing, it proves that the ray can undergo a complete emission-scattering-reception process. Record the final light intensity weight of the ray for use in S43 to calculate the grayscale output result.
[0072] Example 2
[0073] This embodiment uses three pulsed laser detection simulation methods to compare the implementation effects of different simulation methods. The output power image pixels are 32×32, 64×64, and 128×128. The overall simulation method without acceleration, the acceleration method that only calls the GPU, and the acceleration method with superimposed BVH acceleration structure are used for repeated simulation. The average time of the three methods is shown in Table 1.
[0074] Table 1 shows the simulation performance comparison under different pixel conditions.
[0075]
[0076] As shown in Table 1, the simulation method without acceleration increases proportionally with the increase in pixels. For the GPU-accelerated and BVH-overlay acceleration methods, both methods call the GPU for parallel computation. However, the number of pixels required for simulation is far below the GPU's parallel limit. Therefore, these two acceleration methods are not sensitive to changes in pixel values, and the simulation speed is relatively stable.
[0077] When the pixel value requirement is the same, the performance of the GPU acceleration method is far superior to the simulation method without acceleration, and the larger the pixel value, the more obvious this advantage is. When the output image pixel is 128×128, the GPU acceleration method improves the simulation speed by nearly 1000 times. The GPU acceleration method with BVH superimposed on this basis further improves the simulation speed to about 0.02s, that is, the frame rate exceeds 40fps (frame per second, fps), making real-time simulation of pulsed laser detection possible.
[0078] When the output image pixels are set to a fixed value of 64×64, and the total number of facets in the 3D scene model is 12, 2842, 12014, 16384 and 25661 respectively, the average time consumption of the three simulation methods is shown in Table 2.
[0079] Table 2 compares the simulation performance for different numbers of facets.
[0080]
[0081] The GPU acceleration method solves the problem that the simulation time of pulsed laser detection without acceleration increases with the complexity of the scene, especially when the number of facets in the scene model reaches 10. 4 At the scale of [scale value], the simulation method without acceleration takes up to hundreds of seconds, while the GPU-accelerated method only takes a few seconds. The GPU-accelerated method with BVH is the least time-consuming, indicating that the acceleration structure is effective.
[0082] When using only GPU acceleration, the simulation time shows a slight increasing trend with the increase of the number of facets. However, after adding BVH, the growth rate of simulation time decreases significantly, indicating that the BVH structure can greatly reduce unnecessary ray intersection judgments and further improve simulation efficiency. In addition, when the number of facets is small, i.e., the scene is relatively simple, the scene management advantage of BVH is not prominent, so the performance difference before and after adding BVH is not significant. However, when the number of facets increases to 25661, the GPU acceleration method without BVH takes 3.0491s, while the GPU acceleration method with BVH takes 0.0255s, and the output frame rate is still greater than 30fps, proving that the designed BVH+GPU acceleration simulation method is sufficient to realize the real-time simulation function of pulse laser detection in complex scenes.
[0083] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0084] The above embodiments are merely preferred embodiments of the present invention, and the scope of protection of the present invention is not limited to the above embodiments. All technical solutions falling within the scope of the present invention's concept are within the scope of protection of the present invention. It should be noted that for those skilled in the art, improvements and modifications made without departing from the principles of the present invention should also be considered within the scope of protection of the present invention.
Claims
1. A simulation method for short-range detection of pulsed lasers based on GPU and BVH architecture, characterized in that: Includes the following steps: S1: Ray generation: Starting from the detector position, rays are emitted sequentially from the GPU to each surface element of the 3D scene model read into the CPU to simulate ray transmission. S2: BVH Acceleration: Reads the BVH structure passed from the CPU, adds bounding boxes to each object in the 3D scene, and then determines whether a ray intersects with an object by first determining whether it intersects with the bounding box. If they do not intersect, the calculation can be stopped directly, thus accelerating the determination of ray intersection with objects. S3: Ray Intersection Traversal: Traverse the generated initial rays. According to the BVH acceleration scheme, perform ray intersection judgment on each node in the BVH structure, i.e., bounding box traversal. If they do not intersect, the light intensity of that point is 0. If they intersect, calculate the light intensity of that point by combining system parameters and model parameters. S4: Scattering and Gray Scale Calculation: When it is determined that a ray intersects with an object, the scattering intensity is calculated iteratively according to the BRDF model. Otherwise, a new ray is generated, and the scattered ray is recursively traced until the maximum number of iterations is reached, at which point the recursion ends. Based on the ray tracing results, the gray scale value of each pixel is calculated and transmitted back to the CPU to generate a complete simulation image.
2. The pulsed laser short-range detection simulation method based on GPU and BVH structure according to claim 1, characterized in that: Step S1 includes the following steps: S11: Receive 3D scene model data, projectile parameters and transceiver system parameters on the CPU side, and then pass the vertices, face elements and textures of the 3D scene to the GPU buffer respectively; at the same time, to further improve the intersection judgment efficiency, add a bounding volume hierarchy (BVH) structure to the 3D scene in the CPU and pass it to the GPU. S12: After receiving the required raw data stream, the GPU calls the scene rendering engine for preprocessing and generates initial light rays based on the set camera orientation and pose.
3. The pulsed laser short-range detection simulation method based on GPU and BVH structure according to claim 2, characterized in that: Step S2 includes the following steps: S21: When partitioning the triangular face set, first divide the total space of all face elements into eight AABB boxes according to the octree structure. Taking the x-coordinate sorting as an example, assume there are seven face elements A-G in the space, and the minimum x-coordinate of each face element is xA-xG. Then xD is the median of the minimum x-coordinate of the face element. Let it be face Px and divide the total space in half. By analogy, eight AABB bounding boxes can be obtained. The number of face elements in each bounding box is approximately equal. S22: Divide the set of face elements into each sub-bounding box. The criterion is: for a face element, if all vertices of the sub-bounding box are on the same side of the face element, then the face element is considered not to be inside the bounding box. S23: Transfer the BVH linked list structure to the GPU as an array and assign an ID to each node. Transfer the BVH structure to the GPU global memory area all at once.
4. The pulsed laser short-range detection simulation method based on GPU and BVH structure according to claim 3, characterized in that: Step S3 includes the following steps: S31: Generate the initial emitted ray; S32: Traverse BVH; Perform intersection judgment on each bounding box corresponding to the octree node, start traversing from the root node, if the nodes intersect, continue traversing until the leaf node, otherwise abandon the subtree formed from the root node to the leaf node. S33: Determine if there is a hit node in the scene, i.e., the object intersects with the ray. According to the BVH acceleration scheme, when performing pulsed laser detection simulation using the ray tracing method, first traverse each node in the BVH structure to determine ray intersection. If there is no intersection, it means that the laser has not detected an object, and jump to S38 to end the tracing; if there is an intersection, jump to S34. S34: Perform a traversal of the surface elements under this node to determine the intersection of light rays. If there are intersecting surface elements, calculate the direction and intensity weight of the scattered light rays according to the BRDF model and iterate before jumping to S4. Step S4 involves scattering and grayscale calculation, specifically including the following steps: S41: Scattering Update; If the current element is the element with the shortest distance, calculate the scattering intensity according to BRDF; Record the scattering intensity and weight value; S42: Determine whether the tracking iteration has reached the maximum number of iterations weight. If not, jump to S32; if yes, jump to S43. S43: Calculate grayscale based on scattering intensity and weight; S44: End tracking.
5. The pulsed laser short-range detection simulation method based on GPU and BVH structure according to claim 4, characterized in that: In step S34, when the intersection of the ray and the surface element is detected, the traversal is determined by updating the ray direction and intensity weight based on the scattering of the ray on the surface. The specific steps are as follows: S341: Use BRDF to sample the scattered light rays. When the light ray is found to intersect with the surface element, calculate the direction and intensity weight of the scattered light ray according to the BRDF model and iterate. S342: Based on the ray tracing results, calculate the light intensity weight of each pixel. When the number of ray iterations reaches the threshold, the ray is considered to have disappeared and the light intensity weight is 0. If it can return to the ray before disappearing, it proves that the ray can undergo a complete emission-scattering-reception process. Record the final light intensity weight of the ray for use in S43 to calculate the grayscale output result.
6. A computer program, characterized in that, To be used when it is running on a computer, processor, control module or programmable hardware component to perform the simulation method according to any one of claims 1 to 5.
7. A memory storing a computer program, characterized in that, When executed by a processor, the program implements the steps of the pulsed laser short-range detection simulation method based on GPU and BVH structure as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Light tracking optimization method facing 3D scenes
CN108090947A
Computer vision system
CN113228114A