A ray tracing method, device, equipment and computer readable storage medium
By determining the ray path based on the emission point and the receiving point in ray tracing and generating a ray mirror tree, the problem of high computing complexity in the prior art is solved, and more efficient ray tracing is achieved.
Patent Information
- Application Number
- CN202411896418.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-04-04
AI Technical Summary
The prior art is difficult to reduce the computational complexity while ensuring the accuracy of the ray tracing channel modeling method.
By determining the start and end points of the ray path based on the emission point and the receiving point, a mirror point of the emission point is generated with respect to the surface, a target mutual visible information between the mirror point and the surface of the static object is determined, and a comparison with the pre-stored mutual visible reference information is made to generate a ray mirror tree.
The calculation complexity of ray tracing is reduced, efficiency is improved, and the preprocessing time-consuming problem in the spatial segmentation method is avoided.
Smart Images

Figure CN119762657A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of wireless communication technology, and in particular to a ray tracing method, device, equipment and computer-readable storage medium. Background Art
[0002] The acceleration technology of ray tracing algorithms mainly focuses on utilizing parallel computing resources and optimizing scene processing methods. First, the parallel computing acceleration method of ray tracing utilizes the parallel computing power of the CPU or the graphics processing power of the GPU, which can significantly improve the execution efficiency of the ray tracing algorithm, thereby supporting the simulation of large-scale complex scenes. However, this method relies on the improvement of hardware performance and has limited contribution to the optimization of the algorithm itself. Secondly, through spatial segmentation technology (such as the spatial hierarchical bounding box algorithm), the scene can be effectively simplified and divided, thereby accelerating the ray tracing process. This method improves the efficiency of the algorithm by reducing unnecessary intersection calculations between rays and scene elements. Nevertheless, the spatial segmentation method may face the problems of unsatisfactory segmentation and time-consuming preprocessing.
[0003] Therefore, how to reduce computational complexity and improve ray tracing efficiency is a technical problem that technical personnel in this field urgently need to solve. Summary of the invention
[0004] In view of this, an object of the present invention is to provide a ray tracing method, apparatus, device and computer-readable storage medium, which solve the technical problem in the prior art that it is impossible to reduce the computational complexity while ensuring the accuracy of the ray tracing channel modeling method.
[0005] In order to solve the above technical problems, the present invention provides a ray tracing method, comprising:
[0006] Determine the starting point of the ray path based on the starting position of the transmitting point, and determine the end point of the ray propagation path based on the starting position of the receiving point;
[0007] Generate a mirror image point of the emission point with respect to a surface, and determine target mutual visibility information between the mirror image point and the surface of a static object;
[0008] Comparing the target mutual visibility information with pre-stored mutual visibility reference information to obtain a comparison result; wherein the mutual visibility reference information is the mutual visibility relationship between adjacent static objects and determines the path of each ray;
[0009] A ray mirror tree is generated based on the comparison result, the starting point and the end point.
[0010] Optionally, generating a mirror image point of the emission point with respect to a surface, and determining target mutual visibility information between the mirror image point and the surface of the static object includes:
[0011] For each emission point, the mirror image point is generated on the reflection surface according to the law of reflection;
[0012] The target mutual visibility information between the mirror point and the reflective surface of the static object is determined.
[0013] Optionally, comparing the target mutual visibility information with pre-stored mutual visibility reference information to obtain a comparison result includes:
[0014] comparing the target mutual visibility information with the mutual visibility reference information;
[0015] If the angle of the mutual visible information of the targets is smaller than the angle of the corresponding mutual visible reference information, determining the mirror point to generate a transmitted ray;
[0016] After completing a ray emission determination of the mirror point, the step of generating a ray mirror tree based on the comparison result, the starting point and the end point is executed, and the mutual visibility relationship between the mirror point and the surface of the next static object is obtained by using a chain calculation rule, until the generation of the ray emission is stopped when the set reflection order is reached.
[0017] Optionally, before comparing the target mutual visibility information with pre-stored mutual visibility reference information to obtain a comparison result, the method further includes:
[0018] Obtain the vertex coordinates of all static objects in the static scene, and construct the face of each static object according to the vertex coordinates corresponding to each static object; wherein the boundary of the face is determined by the edge;
[0019] The surface of the static object is divided into a target surface and a reference surface; in ray tracing, the target surface is the surface where the ray finally reflects and reaches, and the reference surface is the surface where the ray reflects;
[0020] The angle relationship between the vertices of the reference surface and the target surface is determined by using a vector product to obtain the mutually visible reference information.
[0021] Optionally, after generating the ray mirror tree based on the comparison result, the starting point and the end point, the method further includes:
[0022] The ray mirror tree is simplified according to the reflection rays and reflection surfaces generated by the mirror points to obtain a simplified mirror tree; wherein the simplified mirror tree is a tree that only includes reflection surfaces.
[0023] Optionally, after simplifying the ray mirror tree according to the reflection rays and reflection surfaces generated by the mirror points to obtain a simplified mirror tree, the method further includes:
[0024] A mutual visibility table is generated based on the simplified mirror tree.
[0025] Optionally, after generating the mutual visibility table based on the simplified mirror tree, the method further includes:
[0026] Determining path information on the emission point trajectory, as well as the generation time and disappearance time of the path based on the mutual visibility table;
[0027] Determining a channel coherence time based on the generation time and the disappearance time;
[0028] Dynamic ray tracing is performed based on the channel coherence time.
[0029] The present invention also provides a ray tracing device, comprising:
[0030] A starting point and end point determination module, used to determine the starting point of the ray path based on the starting position of the transmitting point, and determine the end point of the ray propagation path based on the starting position of the receiving point;
[0031] A target mutual visibility information determination module, used to generate a mirror image point of the emission point with respect to a surface, and determine target mutual visibility information between the mirror image point and a surface of a static object;
[0032] A comparison module, used to compare the target mutual visibility information with pre-stored mutual visibility reference information to obtain a comparison result; wherein the mutual visibility reference information is the mutual visibility relationship between adjacent static objects and determines the path of each ray;
[0033] A ray mirror tree determination module is used to generate a ray mirror tree based on the comparison result, the starting point and the end point.
[0034] The present invention also provides a ray tracing device, comprising:
[0035] Memory for storing computer programs;
[0036] A processor is used to execute the computer program to implement the steps of the ray tracing method as described above.
[0037] The present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the ray tracing method described above are implemented.
[0038] The present invention also provides a computer program product, comprising a computer program / instruction, which implements the steps of the above-mentioned ray tracing method when executed by a processor.
[0039] It can be seen that the present invention determines the starting point of the ray path based on the starting position of the transmitting point, and determines the end point of the ray propagation path based on the starting position of the receiving point; generates a mirror point of the transmitting point about the surface, and determines the target mutual visibility information between the mirror point and the surface of the static object; compares the target mutual visibility information with the pre-stored mutual visibility reference information to obtain a comparison result; wherein the mutual visibility reference information is the mutual visibility relationship between adjacent static objects, and determines the information of the path of each ray; generates a ray mirror tree based on the comparison result, the starting point and the end point. The beneficial effect of the present invention is that compared with the ray tracing with time-consuming preprocessing caused by the current space segmentation method, the present application pre-calculates and stores the mutual visibility reference information, so that the mutual visibility reference information can be directly used later without regeneration, and the target mutual visibility reference information currently calculated and the mutual visibility reference information can be compared to perform ray tracing, thereby reducing the complexity of the calculation.
[0040] In addition, the present invention also provides a ray tracing method, device, equipment and computer-readable storage medium, which also have the above-mentioned beneficial effects. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0042] Figure 1 A flowchart of a ray tracing method provided by an embodiment of the present invention;
[0043] Figure 2 A schematic diagram of target mutual visibility information provided by an embodiment of the present invention;
[0044] Figure 3 A schematic diagram of mutually visible reference information provided by an embodiment of the present invention;
[0045] Figure 4 A schematic diagram of the structure of a ray tracing device provided by an embodiment of the present invention;
[0046] Figure 5 A schematic diagram of the structure of a ray tracing device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0047] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0048] The existing acceleration methods of ray tracing algorithms can be mainly divided into the following categories, and their problems are as follows:
[0049] 1) Using the parallel computing power of the computer's CPU (central processing unit) or GPU (graphics processing unit) to accelerate the ray tracing algorithm, thereby supporting the simulation of large-scale complex scenes. However, this method relies on the improvement of hardware performance and has limited optimization of the algorithm itself, resulting in high hardware costs.
[0050] 2) Use space segmentation and heuristic algorithms, such as the spatial hierarchical bounding box algorithm, to simplify and divide the scene, thereby accelerating the ray tracing algorithm to support the simulation of large-scale complex scenes. However, this method may face the problems of imperfect space segmentation and time-consuming preprocessing.
[0051] 3) Reduce the complexity of the simulation scene by preprocessing it, so as to support ray tracing for simulation of large-scale complex scenes. However, the current preprocessing methods are mainly aimed at two-dimensional scenes, and the preprocessing support for three-dimensional scenes is not sufficient, and there are certain limitations in the application scenarios.
[0052] The method of the present invention aims to solve the problem of high computational complexity of ray tracing algorithms, as well as the problems of unsatisfactory acceleration effects and limited application scenarios of the above acceleration methods. The method can support three-dimensional scenes and high-mobility communication scenes, and further expand the application scope of ray tracing scene preprocessing algorithms.
[0053] Please refer to Figure 1 , Figure 1 A flowchart of a ray tracing method provided by an embodiment of the present invention. The method may include:
[0054] S101, determining a starting point of a ray path based on a starting position of a transmitting point, and determining an end point of the ray propagation path based on a starting position of a receiving point.
[0055] The execution subject of this embodiment is an electronic device. The electronic device can be a computer; or the electronic device in this embodiment can also be a computer, etc. In this embodiment, the starting position of the launch point and the starting position of the receiving point can be determined based on user needs. In this embodiment, the starting positions of the launch point and the receiving point are determined in a static scene, and these positions will serve as the starting point and end point of the subsequent ray propagation path calculation. And when it needs to be stored in a database, it can be used as the retrieval starting point of the visible relationship database.
[0056] S102, generating a mirror image point of the emission point with respect to the surface, and determining target mutual visibility information between the mirror image point and the surface of the static object.
[0057] The mirror point (reflection point) in this embodiment is the mirror position of the emission point with respect to the reflection surface. If a point passes through the reflection surface, its mirror position on the other side is the mirror point. The static object in this embodiment is the object in the current static scene. The mutual visibility information in this embodiment is the information for determining whether an object or a part of an object can be directly seen by an observer (such as a camera or user's perspective) without being blocked by other objects. The target mutual visibility information in this embodiment can be angle information.
[0058] It should be further explained that the above-mentioned generating the mirror image point of the emission point with respect to the surface and determining the target mutual visibility information between the mirror image point and the surface of the static object may include:
[0059] S1021: For each emission point, generate a mirror image point on the reflection surface according to the law of reflection.
[0060] In this embodiment, a mirror image point of the emission point with respect to the surface is generated.
[0061] S1022, determining target mutual visibility information between the mirror point and the reflective surface of the static object.
[0062] This embodiment determines the visible relationship between the mirror point and other static objects, so that the propagation path of the ray can be calculated. This embodiment provides a specific process of determining the mutual visibility information of the targets, thereby improving the accuracy of determining the mutual visibility information of the targets.
[0063] S103, comparing the target mutual visibility information with the pre-stored mutual visibility reference information to obtain a comparison result; wherein the mutual visibility reference information is the mutual visibility relationship between adjacent static objects and determines the path of each ray.
[0064] The pre-stored mutual visibility reference information in this embodiment refers to the visible relationship between all static objects and other adjacent objects that can be generated before ray tracing. This embodiment does not limit the storage location of the mutual visibility parameter information. For example, the mutual visibility reference information in this embodiment can be stored in a database; or this embodiment can store the mutual visibility reference information in a cache. This embodiment compares the target mutual visibility information with the angle in the mutual visibility reference information, and can compare whether the ray propagation angle in the target mutual visibility information is greater than the vertex generation angle between the reference plane and the target plane in the pre-stored mutual visibility reference information; or the ray propagation angle in the target mutual visibility information is less than the vertex generation angle between the reference plane and the target plane in the pre-stored mutual visibility reference information. Specifically, greater than and less than need to be determined according to the direction of the direction vector in the mutual visibility reference information. When the direction vector is downward, it is judged whether it is less than. When the ray propagation angle in the target mutual visibility information is less than the reference information, it is not visible. When the direction vector is upward, it is judged whether it is greater than. When the ray propagation angle in the target mutual visibility information is greater than the reference information, it is not visible. Only within the range are the targets mutually visible.
[0065] It should be further explained that, based on any of the above embodiments, the above-mentioned comparing the target mutual visibility information with the pre-stored mutual visibility reference information to obtain the comparison result may include:
[0066] S1031, comparing the target mutual visibility information with the mutual visibility reference information.
[0067] S1032: If the angle of the target mutual visibility information is smaller than the angle of the corresponding mutual visibility reference information, determine the mirror point to generate a transmission ray.
[0068] In this embodiment, the direction vector corresponding to the angle of the mutually visible reference information is downward. When the direction vector corresponding to the angle of the mutually visible reference information is upward, if the angle of the target mutually visible information is greater than the angle of the corresponding mutually visible reference information, the mirror point is determined to generate an emission ray.
[0069] S1033, after completing the first emission ray determination of the mirror point, execute the step of generating a ray mirror tree based on the comparison result, the starting point and the end point, and use the chain calculation rule to obtain the mutual visibility relationship between the mirror point and the surface of the next static object, until the set reflection order is reached and the generation of the emission ray is stopped.
[0070] This embodiment compares the angle of the mutual visibility information of the target with the angle of the pre-stored mutual visibility reference information. If the angle between the mirror point and the surface is less than the pre-stored angle relationship, the mirror point can generate a reflection ray. If the angle between the mirror point and the surface is greater than the pre-stored angle relationship, the mirror point cannot generate a reflection ray. The first-order reflection relationship between the mirror point and the surface generated by the emission point is as follows: Figure 2 As shown, Figure 2 A schematic diagram of target mutual visibility information provided by an embodiment of the present invention, Figure 2 (a) in the figure shows the visibility relationship (mutual visibility information) of the emission points on the XY plane. Indicates the launch point, is the mirror point of the emission point, AB is the emission surface (reference surface) composed of vertices A and B, CD is the reflection surface (target surface) composed of vertices C and D, V1 is the BE vector, V2 is B vector v3: A vector, is the angle between vectors V1 and V2, is the angle between v1 and V3. The direction vector is downward. Figure 2 (b) shows the visibility relationship of the emission points on the YZ plane (mutual visibility information). For the launch point is the mirror point about FG, G' is the intersection point between the OH ray generated due to the occlusion relationship and the FG surface, FG is the emission surface, HJ is the reflection surface, HI is the reflection surface, is the mirror point about HI, V4, V5, V6, V7, V8 are vectors, : The angle between V4 and V5, is the angle between V4 and V6, is the angle between V7 and V9, It is the included angle between V7 and V8.
[0071] After completing the determination of the first reflection ray of the mirror point, this embodiment can use chain calculation to further obtain the angle relationship with the next reflection surface, still following the principle that if the angle generated by the ray and the surface is less than the angle of the visible relationship, the reflection ray can be generated, otherwise the reflection ray cannot be generated, and the second-order and higher-order reflection relationship between the mirror reflection point and other propagable surfaces is generated until the reflection order set by the simulation is reached and the calculation is stopped. This embodiment provides a specific process for ray tracing based on the comparison results, which improves the accuracy of ray mirror tree generation.
[0072] It should be further explained that, in order to improve the efficiency of using the mutual visibility reference information, before comparing the target mutual visibility information with the pre-stored mutual visibility reference information to obtain the comparison result, the following may also be included:
[0073] S1: Obtain the vertex coordinates of all static objects in the static scene, and construct the face of each static object according to the vertex coordinates corresponding to each static object; wherein the boundary of the face is determined by the edge.
[0074] S2: Divide the surface of the static object into a target surface and a reference surface; in ray tracing, the target surface is the surface where the ray finally reflects and reaches, and the reference surface is the surface where the ray reflects;
[0075] S3: Use the vector product to determine the angular relationship between the vertices of the reference surface and the target surface to obtain mutually visible reference information.
[0076] This embodiment can obtain the vertex position information of all static objects in a typical wireless communication scenario. The three-dimensional vertex data of buildings and other static objects in the simulation area are obtained through scene modeling software. Based on these vertex data, the edge and face information of each static object is constructed for the subsequent calculation of the mutual visibility relationship between static objects. The angle threshold algorithm is used to calculate the angle relationship between the object vertices (4 in the two-dimensional graph) and the faces of each static object in the scene. Through this algorithm, it can be determined whether each vertex is directly visible to the vertices of other static objects. This angle threshold algorithm ensures that the visible relationship between all static objects is accurately recorded. The angle threshold algorithm divides the faces into two categories, one is the target face and the other is the reference face, and the vector product is used to calculate the angle relationship between each vertex between the reference face and the target face as the reference angle. The reference angle is the mutual visibility relationship between adjacent objects (mutually visible reference information). In this patent, all rays specifically refer to the rays generated by the ray tracing mirror method for connecting the transmitter and the receiver. When calculating the reflection of a ray, if the angle between the reflected ray and the reference face is within the reference angle range, then the reflected ray exists, and the geometric calculation relationship of the relevant angles and the reflection correlation relationship are as shown in Figure 3 As shown, Figure 3 A schematic diagram of mutually visible reference information provided by an embodiment of the present invention, Figure 3 (a) is the visibility relationship of the XY scatterer (mutually visible reference information).
[0077] The scatterer in this embodiment is a static object, AB is the reference surface (emitting surface), CD is the target surface (reflecting surface), is the angle of ∠CAB, is the angle of ∠DAB, is the angle of ∠CBE, is the angle ∠DBE, and BE is the direction vector. Figure 3 (b) shows the visibility relationship of the YZ scatterers (mutually visible reference information), FG is the reference surface, HJ and HI are the target surfaces, is ∠IFG, is ∠HFG, For JFG, is ∠FHL, is ∠LHG, is ∠FIL, is ∠FIG, is ∠HGK, is ∠IGK, ∠JGK. This embodiment uses the visible relationship between adjacent objects to determine the path of each ray, and records these paths for subsequent use. Here, the reflection order of the simulation setting can be ignored, and as much reflection information as possible can be recorded. In order to reduce a certain complexity, it can generally be set to 10 orders, which is sufficient for most scene simulations. When this embodiment obtains the mutually visible reference information, the mutually visible reference information can be persistently stored so that it can be directly called when used. For example, the mutually visible reference information between all static objects is stored in a database, including angle thresholds and all ray information. The goal of this step is to create a comprehensive visible relationship database to quickly retrieve relevant information when needed.
[0078] S104, generating a ray mirror tree based on the comparison result, the starting point and the end point.
[0079] In this embodiment, the process of generating a ray mirror tree based on the comparison result, the starting point and the end point can be: based on the comparison result, a reflection ray is generated. After the determination of the reflection ray of the mirror point is completed, a chain calculation is used to further obtain a mutual visibility relationship with the next reflection surface, and a second-order and higher-order reflection relationship between the mirror reflection point and other propagable surfaces is generated, until the reflection order set by the simulation is reached and the calculation is stopped.
[0080] It should be further explained that, based on any of the above embodiments, after generating a ray mirror tree based on the comparison results, the starting point and the end point, it may also include: simplifying the ray mirror tree according to the reflection rays and reflection surfaces generated by the mirror points to obtain a simplified mirror tree; wherein the simplified mirror tree is a tree that only includes reflection surfaces. In this embodiment, a simplified mirror tree required for the ray tracing mirror method is generated according to the reflection rays and reflection surfaces generated by the mirror points. Unlike the traditional mirror tree, the simplified mirror tree only includes the surface that generates reflection. The traditional mirror tree includes the traversal process of all static object surfaces, and the method used in this patent will greatly improve the generation efficiency of the mirror tree. After the simplified mirror tree is generated, all nodes and information related to the mirror tree are stored.
[0081] It should be further explained that, based on any of the above embodiments, after simplifying the ray mirror tree according to the reflected rays and reflection surfaces generated by the mirror points to obtain the simplified mirror tree, it may also include: generating a mutual visibility table based on the simplified mirror tree. This embodiment stores the simplified mirror tree relationship of all related objects of the current transmitting point and receiving point in a database. When the transmitting point and the receiving point change, new mirror points are generated according to the movement trajectories of the transmitting point and the receiving point, and the angular relationship between the mirror point and the surface at each new position can be further calculated, thereby repeating the above process of generating the ray mirror tree to complete the generation of the mutual visibility table on the entire path. The mutual visibility table generated in this embodiment can be used for retrieval, which can improve the retrieval efficiency of points on the path.
[0082] It should be further explained that, based on any of the above embodiments, after generating a mutual visibility table based on a simplified mirror tree, it may also include: determining the path information on the trajectory of the emission point based on the mutual visibility table, as well as the generation time and disappearance time of the path; determining the channel coherence time based on the generation time and disappearance time; and performing dynamic ray tracing based on the channel coherence time. This embodiment can know the path information on the trajectory of the emission point through the mutual visibility table, thereby obtaining the generation and disappearance time of the main path, and based on the calculated visibility relationship and path information, calculate the time for the channel receiving power to remain substantially unchanged through the distance and movement speed, that is, the channel coherence time. The channel coherence time will be used as an important output and as an important parameter for dynamic ray tracing in the subsequent dynamic ray tracing algorithm. The channel coherence time in this embodiment is intelligently calculated based on relevant parameters. Compared with the current setting of a fixed value for tracing, the embodiment of the present invention improves the accuracy of determining the channel coherence time.
[0083] The ray tracing method provided by the embodiment of the present invention may include: S101, determining the starting point of the ray path based on the starting position of the emission point, and determining the end point of the ray propagation path based on the starting position of the receiving point; S102, generating a mirror point of the emission point on the surface, and determining the target mutual visibility information between the mirror point and the surface of the static object; S103, comparing the target mutual visibility information with the pre-stored mutual visibility reference information to obtain a comparison result; wherein the mutual visibility reference information is the mutual visibility relationship between adjacent static objects, and determines the information of the path of each ray; S104, generating a ray mirror tree based on the comparison result, the starting point and the end point. The embodiment of the present invention can pre-calculate and store the mutual visibility reference information, so that the mutual visibility reference information can be directly used later without regeneration, and the target mutual visibility reference information currently calculated can be compared with the mutual visibility reference information to perform ray tracing, thereby reducing the complexity of calculation.
[0084] The embodiment of the present invention provides an innovative ray tracing scene preprocessing method, and the main technical means are as follows: 1) This method advances the intersection judgment process of ray tracing (corresponding to the judgment performed when obtaining the mutual visibility reference information above) to the preprocessing stage for the first time, and reduces the calculation amount of real-time ray tracing by optimizing the preprocessing stage, wherein the intersection judgment is mainly used to determine whether there is an intersection between the ray and the surface. 2) The mutual visibility reference information generated in the preprocessing stage can be reused in multiple scene simulations, thereby reducing the complexity of multiple simulations. 3) Based on the coordinate point data in the scene, the static environment state is captured to generate a 3D mutual visibility matrix, and the movement state of the transmitter, receiver and scatterer is combined with the 3D mutual visibility matrix of the static environment to construct a 3D visibility table (mutual visibility table). Compared with the traditional ray tracing method, this scheme has the following significant advantages and innovations: 1) By pre-positioning the intersection judgment process in ray tracing to the scene preprocessing, the computational efficiency of the ray tracing related processes is improved; 2) The scene preprocessing algorithm divides the dynamic scene into multiple stable states, which enhances the adaptability of the ray tracing algorithm to dynamic scenes; 3) By dynamically updating the three-dimensional mutual visibility table, unnecessary ray tracing calculations are effectively reduced, significantly improving the performance of the entire ray tracing process.
[0085] The ray tracing device provided in an embodiment of the present invention is introduced below. The ray tracing device described below and the ray tracing method described above can be referenced to each other.
[0086] Please refer to Figure 4 , Figure 4 A schematic diagram of the structure of a ray tracing device provided in an embodiment of the present invention may include:
[0087] A starting point and end point determination module 100, used to determine the starting point of the ray path based on the starting position of the transmitting point, and determine the end point of the ray propagation path based on the starting position of the receiving point;
[0088] The target mutual visibility information determination module 200 is used to generate a mirror image point of the emission point with respect to a surface, and determine the target mutual visibility information between the mirror image point and the surface of a static object;
[0089] A comparison module 300 is used to compare the target mutual visibility information with pre-stored mutual visibility reference information to obtain a comparison result; wherein the mutual visibility reference information is the mutual visibility relationship between adjacent static objects and determines the path of each ray;
[0090] The ray mirror tree determination module 400 is used to generate a ray mirror tree based on the comparison result, the starting point and the end point.
[0091] Further, based on any of the above embodiments, the target mutual visibility information determination module 200 may include:
[0092] A mirror point determination unit, configured to generate the mirror point on the reflection surface according to the law of reflection for each emission point;
[0093] The mutual visibility information determination unit is used to determine the target mutual visibility information between the mirror point and the reflecting surface of the static object.
[0094] Further, based on any of the above embodiments, the ray mirror tree determination module 400 may include:
[0095] a comparing unit, configured to compare the target mutual visibility information with the mutual visibility reference information;
[0096] A unit for generating a transmitted ray is used to determine a mirror point to generate a transmitted ray if the angle of the mutual visible information of the targets is smaller than the angle of the corresponding mutual visible reference information;
[0097] The ray mirror tree generation unit is used to execute the step of generating a ray mirror tree based on the comparison result, the starting point and the end point after completing a transmitted ray determination of the mirror point, and use the chain calculation rule to obtain the mutual visibility relationship between the mirror point and the surface of the next static object until the set reflection order is reached to stop the generation of the transmitted ray.
[0098] Further, based on any of the above embodiments, the ray tracing device may further include:
[0099] The static object face determination module is used to obtain the vertex coordinates of all static objects in the static scene, and construct the face of each static object according to the vertex coordinates corresponding to each static object; wherein the boundary of the face is determined by the edge;
[0100] The target surface and reference surface determination module is used to divide the surface of the static object into a target surface and a reference surface; wherein, in ray tracing, the target surface is the surface where the ray finally reflects and reaches, and the reference surface is the surface where the ray reflects;
[0101] The mutual visibility reference information generation module is used to determine the angle relationship between the vertices of the reference surface and the target surface by using a vector product to obtain the mutual visibility reference information.
[0102] Further, based on any of the above embodiments, the ray tracing device may further include:
[0103] The simplified mirror tree determination module is used to simplify the ray mirror tree according to the reflection rays and reflection surfaces generated by the mirror points to obtain a simplified mirror tree; wherein the simplified mirror tree is a tree that only includes reflection surfaces.
[0104] Further, based on any of the above embodiments, the ray tracing device may further include:
[0105] The mutual visibility table generation module is used to generate a mutual visibility table based on the simplified mirror tree.
[0106] Further, based on any of the above embodiments, the ray tracing device may further include:
[0107] A path information determination module, used to determine the path information on the emission point trajectory, as well as the generation time and disappearance time of the path based on the mutual visibility table;
[0108] A channel coherence time determination module, configured to determine the channel coherence time based on the generation time and the disappearance time;
[0109] A ray tracing module is used to perform dynamic ray tracing based on the channel coherence time.
[0110] It should be noted that the order of the modules and units in the above-mentioned ray tracing device can be changed without affecting the logic.
[0111] The ray tracing device provided by the embodiment of the present invention may include: a starting point and end point determination module 100, which is used to determine the starting point of the ray path based on the starting position of the emission point, and determine the end point of the ray propagation path based on the starting position of the receiving point; a target mutual visibility information determination module 200, which is used to generate the mirror point of the emission point on the surface, and determine the target mutual visibility information between the mirror point and the surface of the static object; a comparison module 300, which is used to compare the target mutual visibility information with the pre-stored mutual visibility reference information to obtain a comparison result; wherein the mutual visibility reference information is the mutual visibility relationship between adjacent static objects, and determines the information of the path of each ray; a ray mirror tree determination module 400, which is used to generate a ray mirror tree based on the comparison result, the starting point and the end point. The embodiment of the present invention can pre-calculate and store the mutual visibility reference information, so that the mutual visibility reference information can be directly used later without regeneration, and the target mutual visibility reference information currently calculated can be compared with the mutual visibility reference information to perform ray tracing, thereby reducing the complexity of calculation.
[0112] A ray tracing device provided in an embodiment of the present invention is introduced below. The ray tracing device described below and the ray tracing method described above can refer to each other.
[0113] Please refer to Figure 5 , Figure 5A schematic diagram of the structure of a ray tracing device provided in an embodiment of the present invention may include:
[0114] A memory 10, used for storing computer programs;
[0115] The processor 20 is used to execute a computer program to implement the above-mentioned ray tracing method.
[0116] The memory 10 , the processor 20 , and the communication interface 30 all communicate with each other via a communication bus 40 .
[0117] In the embodiment of the present invention, the memory 10 is used to store one or more programs, and the program may include program code, and the program code includes computer operation instructions. In the embodiment of the present invention, the memory 10 may store programs for implementing the following functions:
[0118] Determine the starting point of the ray path based on the starting position of the transmitting point, and determine the end point of the ray propagation path based on the starting position of the receiving point;
[0119] Generate a mirror image point of the emission point with respect to the surface, and determine the target mutual visibility information between the mirror image point and the surface of the static object;
[0120] Compare the target mutual visibility information with the pre-stored mutual visibility reference information to obtain a comparison result; wherein the mutual visibility reference information is the mutual visibility relationship between adjacent static objects and determines the path of each ray;
[0121] Generate a ray mirror tree based on the comparison results, the starting point and the end point.
[0122] In a possible implementation, the memory 10 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function, etc.; the data storage area may store data created during use.
[0123] In addition, the memory 10 may include a read-only memory and a random access memory, and provide instructions and data to the processor. A portion of the memory may also include an NVRAM. The memory stores an operating system and operating instructions, executable modules or data structures, or a subset thereof, or an extended set thereof, wherein the operating instructions may include various operating instructions for implementing various operations. The operating system may include various system programs for implementing various basic tasks and processing hardware-based tasks.
[0124] The processor 20 may be a central processing unit (CPU), an application specific integrated circuit, a digital signal processor, a field programmable gate array or other programmable logic device, a microprocessor or any conventional processor, etc. The processor 20 may call a program stored in the memory 10 .
[0125] The communication interface 30 may be an interface of a communication module, and is used to connect to other devices or systems.
[0126] Of course, it should be noted that Figure 5 The structure shown does not constitute a limitation on the ray tracing device in the embodiment of the present invention. In actual applications, the ray tracing device may include Figure 5 More or fewer components than shown, or combinations of certain components.
[0127] The computer-readable storage medium provided in an embodiment of the present invention is introduced below. The computer-readable storage medium described below and the ray tracing method described above can be referenced to each other.
[0128] The present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above-mentioned ray tracing method are implemented.
[0129] The computer-readable storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.
[0130] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0131] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0132] Finally, it should be noted that, in this article, relationships such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprises" or any other variations are intended to cover non-exclusive inclusion, so that a process, method, article or device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0133] The above is a detailed introduction to a ray tracing method, device, equipment and computer-readable storage medium provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A ray tracing method, characterized in that: include: Determine the starting point of the ray path based on the starting position of the transmitting point, and determine the end point of the ray propagation path based on the starting position of the receiving point; Generate a mirror image point of the emission point with respect to a surface, and determine target mutual visibility information between the mirror image point and the surface of a static object; Comparing the target mutual visibility information with pre-stored mutual visibility reference information to obtain a comparison result; wherein the mutual visibility reference information is the mutual visibility relationship between adjacent static objects and determines the path of each ray; A ray mirror tree is generated based on the comparison result, the starting point and the end point.
2. The ray tracing method according to claim 1, characterized in that: Generating a mirror image point of the emission point with respect to a surface, and determining target mutual visibility information between the mirror image point and the surface of a static object, including: For each emission point, the mirror image point is generated on the reflection surface according to the law of reflection; The target mutual visibility information between the mirror point and the reflective surface of the static object is determined.
3. The ray tracing method according to claim 1, characterized in that: Comparing the target mutual visibility information with the pre-stored mutual visibility reference information to obtain a comparison result, including: comparing the target mutual visibility information with the mutual visibility reference information; If the angle of the mutual visible information of the targets is smaller than the angle of the corresponding mutual visible reference information, determining the mirror point to generate a transmitted ray; After completing a ray emission determination of the mirror point, the step of generating a ray mirror tree based on the comparison result, the starting point and the end point is executed, and the mutual visibility relationship between the mirror point and the surface of the next static object is obtained by using a chain calculation rule, until the generation of the ray emission is stopped when the set reflection order is reached.
4. The ray tracing method according to any one of claims 1 to 3, characterized in that: Before comparing the target mutual visibility information with the pre-stored mutual visibility reference information to obtain a comparison result, the method further includes: Obtain the vertex coordinates of all static objects in the static scene, and construct the face of each static object according to the vertex coordinates corresponding to each static object; wherein the boundary of the face is determined by the edge; The surface of the static object is divided into a target surface and a reference surface; in ray tracing, the target surface is the surface where the ray finally reflects and reaches, and the reference surface is the surface where the ray reflects; The angle relationship between the vertices of the reference surface and the target surface is determined by using a vector product to obtain the mutually visible reference information.
5. The ray tracing method according to claim 1, characterized in that: After generating a ray mirror tree based on the comparison result, the starting point and the end point, the method further includes: The ray mirror tree is simplified according to the reflection rays and reflection surfaces generated by the mirror points to obtain a simplified mirror tree; wherein the simplified mirror tree is a tree that only includes reflection surfaces.
6. The ray tracing method according to claim 5, characterized in that: After simplifying the ray mirror tree according to the reflection rays and reflection surfaces generated by the mirror points to obtain a simplified mirror tree, the method further includes: A mutual visibility table is generated based on the simplified mirror tree.
7. The ray tracing method according to claim 6, characterized in that: After generating a mutual visibility table based on the simplified mirror tree, the method further includes: Determining path information on the emission point trajectory, as well as the generation time and disappearance time of the path based on the mutual visibility table; Determining a channel coherence time based on the generation time and the disappearance time; Dynamic ray tracing is performed based on the channel coherence time.
8. A ray tracing device, characterized in that: include: A starting point and end point determination module, used to determine the starting point of the ray path based on the starting position of the transmitting point, and determine the end point of the ray propagation path based on the starting position of the receiving point; A target mutual visibility information determination module, used to generate a mirror image point of the emission point with respect to a surface, and determine target mutual visibility information between the mirror image point and a surface of a static object; A comparison module, used to compare the target mutual visibility information with pre-stored mutual visibility reference information to obtain a comparison result; wherein the mutual visibility reference information is the mutual visibility relationship between adjacent static objects and determines the path of each ray; A ray mirror tree determination module is used to generate a ray mirror tree based on the comparison result, the starting point and the end point.
9. A ray tracing device, characterized in that: include: Memory for storing computer programs; A processor, configured to execute the computer program to implement the steps of the ray tracing method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the ray tracing method according to any one of claims 1 to 7 are implemented.
11. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the ray tracing method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Dynamic ray tracing wireless channel modeling method, device, equipment and medium
CN120528537A