WO2020238136A1 - Polygon space division-based photon mapping optimization method, device and system - Google Patents

Polygon space division-based photon mapping optimization method, device and system Download PDF

Info

Publication number
WO2020238136A1
WO2020238136A1 PCT/CN2019/123404 CN2019123404W WO2020238136A1 WO 2020238136 A1 WO2020238136 A1 WO 2020238136A1 CN 2019123404 W CN2019123404 W CN 2019123404W WO 2020238136 A1 WO2020238136 A1 WO 2020238136A1
Authority
WO
WIPO (PCT)
Prior art keywords
scene
node
photon
area
polygon
Prior art date
Application number
PCT/CN2019/123404
Other languages
French (fr)
Chinese (zh)
Inventor
王璐
王欣
康春萌
徐延宁
孟祥旭
马蕾蕾
Original Assignee
山东大学
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 山东大学 filed Critical 山东大学
Publication of WO2020238136A1 publication Critical patent/WO2020238136A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/001Texturing; Colouring; Generation of texture or colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/50Lighting effects
    • G06T15/55Radiosity

Definitions

  • the present disclosure belongs to the technical field of graphics realistic rendering, and relates to a photon mapping optimization method, device and system based on polygonal space division.
  • one or more embodiments of the present disclosure provide a photon mapping optimization method, device and system based on polygonal space division.
  • a photon mapping optimization method based on polygonal space division is provided.
  • a photon mapping optimization method based on polygon space division includes:
  • the Master node receives the scene image, divides the scene, obtains the geometric boundary information, inserts a virtual portal at the dividing line, and sends it to each slave node respectively;
  • Each Slave node reads the sub-areas of the scene
  • photons are emitted from the light source inside the node, stored in the data structure when they reach the virtual portal of the node area boundary, and transmitted to the corresponding node in the adjacent area when the number of photons reaches the threshold;
  • Each Slave node performs the coloring calculation of the scene sub-region, and sends the coloring calculation information to the Master node;
  • the Master node selects the brightness of the intersection closest to the light source as the global brightness of the colored point according to the received coloring calculation information of each Slave node.
  • the geometric scene information includes vertex information of a polygon, a unique identifier of the polygon, and a unique identifier of adjacent polygons of the polygon.
  • the specific steps of the scene division by the Master node include:
  • the specific step of dividing the scene image into corresponding N parts includes:
  • the area of the target sub-polygon is calculated according to the area of the outer contour polygon
  • the outer contour polygon of the scene is divided into two, and one area is the target subpolygon area; iteratively use the same method to divide the other subpolygon until the area of all the subpolygons divided is close to the target subpolygon area;
  • the specific steps of each slave node reading the sub-region of the scene include:
  • each Slave node performs photon tracking and intersection detection in its own node.
  • each Slave node performs the coloring calculation of the scene subregion, and near the scene division line, an overlapped kd tree is used to store photons, light is emitted from the screen space, and the coloring point where the light intersects the geometry is recorded Calculate the radiance of the colored point by collecting photons through the photon graph, and complete the coloring calculation.
  • the specific steps include:
  • the brightness of the colored point is the radiance calculated from the photon graph inside the node
  • a photon mapping optimization system based on polygonal space division is provided.
  • a photon mapping optimization system based on polygonal space division includes: a Master node and several Slave nodes connected to it;
  • the Master node receives the scene image, divides the scene, obtains the geometric boundary information, inserts a virtual portal at the dividing line, and sends it to each slave node respectively;
  • Each Slave node reads the sub-areas of the scene
  • the photon is emitted from the light source inside the node, and stored in the data structure when it reaches the virtual portal at the boundary of the node area, and the photon is transmitted to the corresponding node in the adjacent area when the number of photons reaches the threshold;
  • Each Slave node performs the coloring calculation of the scene sub-region, and sends the coloring calculation information to the Master node;
  • the Master node selects the brightness of the intersection closest to the light source as the global brightness of the colored point according to the received coloring calculation information of each Slave node.
  • a photon mapping optimization method based on polygonal space division is provided.
  • a photon mapping optimization method based on polygon space division, implemented in the Master node, the method includes:
  • the Master node receives the scene image, divides the scene, obtains the geometric boundary information, inserts a virtual portal at the dividing line, and sends it to each slave node respectively;
  • the Master node selects the brightness of the intersection closest to the light source as the global brightness of the colored point according to the received coloring calculation information of each Slave node.
  • the geometric scene information includes vertex information of a polygon, a unique identifier of the polygon, and a unique identifier of adjacent polygons of the polygon.
  • the specific steps of the scene division by the Master node include:
  • the specific step of dividing the scene image into corresponding N parts includes:
  • the area of the target sub-polygon is calculated according to the area of the outer contour polygon
  • the outer contour polygon of the scene is divided into two, and one area is the target subpolygon area; iteratively use the same method to divide the other subpolygon until the area of all the subpolygons divided is close to the target subpolygon area;
  • a computer-readable storage medium is provided.
  • a computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor of an electronic device and executing the method for optimizing photon mapping based on polygonal space division.
  • an electronic device is provided.
  • An electronic device including a processor and a computer-readable storage medium, the processor is used to implement each instruction; the computer-readable storage medium is used to store a plurality of instructions, the instruction is suitable for being loaded by the processor and executed A photon mapping optimization method based on polygonal space division.
  • a photon mapping optimization method based on polygonal space division is provided.
  • a photon mapping optimization method based on polygonal space division, implemented in the Slave node, the method includes:
  • the Slave node reads the sub-areas of the scene
  • the photon is emitted from the light source inside the node, and stored in the data structure when it reaches the virtual portal at the boundary of the node area, and the photon is transmitted to the corresponding node in the adjacent area when the number of photons reaches the threshold;
  • Each Slave node performs the coloring calculation of the sub-region of the scene, and sends the coloring calculation information to the Master node.
  • the specific steps of the Slave node reading the sub-areas of the scene include:
  • each Slave node performs photon tracking and intersection detection in its own node.
  • each Slave node performs the coloring calculation of the scene subregion, and near the scene division line, an overlapped kd tree is used to store photons, light is emitted from the screen space, and the coloring point where the light intersects the geometry is recorded Calculate the radiance of the colored point by collecting photons through the photon graph, and complete the coloring calculation.
  • the specific steps include:
  • the brightness of the colored point is the radiance calculated from the photon graph inside the node
  • a computer-readable storage medium is provided.
  • a computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor of an electronic device and executing the method for optimizing photon mapping based on polygonal space division.
  • an electronic device is provided.
  • An electronic device comprising a processor and a computer-readable storage medium, the processor is used to implement each instruction; the computer-readable storage medium is used to store a plurality of instructions, the instructions are suitable for being loaded by the processor and executing the one A photon mapping optimization method based on polygonal space division.
  • the present disclosure provides a method, device and system for optimizing photon mapping based on polygonal space division, which has no obvious deviation in user vision; multiple nodes emit photons in parallel, and when the number of nodes increases, the photon emission time becomes shorter and shorter.
  • the method has good scalability in the drawing stage.
  • the photon emission time used by the division method proposed in this disclosure is shorter than the photon emission time based on the Kd tree division method.
  • the number of photons hitting the virtual portal is greater than that of the kd tree division method.
  • the quantity should be small to reduce the transmission cost.
  • the multiple nodes of the present disclosure successfully share the increased complexity of each scene, and the distributed architecture is suitable for drawing scenes with complex outer contours.
  • Fig. 1 is a flowchart of a method for optimizing photon mapping based on polygonal space division according to one or more embodiments
  • Fig. 2(a) is a graph of potential segmentation edges c1 of polygon ABCD according to one or more embodiments
  • Fig. 2(b) is a graph of potential segmentation edges c2 of polygon ABCD according to one or more embodiments
  • Fig. 3 is a segmentation diagram with AD and BC as paired edges according to one or more embodiments
  • FIG. 4 is a diagram of the shortest dividing line in the triangle AGB according to one or more embodiments.
  • FIG. 5 is a diagram of the shortest dividing line in a trapezoidal GDHB according to one or more embodiments
  • Fig. 6 is a photon image of an adjacent area that needs to be collected when the point of impact is very close to the virtual portal (dashed line) according to one or more embodiments;
  • Fig. 7 is a diagram of photons sent to neighboring nodes when they hit an overlapped area according to one or more embodiments.
  • each block in the flowchart or block diagram may represent a module, program segment, or part of code, and the module, program segment, or part of code may include one or more for implementing various embodiments. Executable instructions for the specified logic function.
  • the functions noted in the block may also occur in a different order than that noted in the drawings. For example, two blocks shown in succession may actually be executed substantially in parallel, or they may sometimes be executed in the reverse order, depending on the functions involved.
  • each block in the flowchart and/or block diagram, and the combination of the blocks in the flowchart and/or block diagram can be implemented using a dedicated hardware-based system that performs the specified functions or operations Or it can be implemented using a combination of dedicated hardware and computer instructions.
  • This embodiment proposes a distributed photon mapping algorithm for large indoor exhibition hall-like large scenes similar to museums. Because the outline of this type of scene is generally more complicated, there is no obvious room boundary indoors. And most of the exhibits are evenly placed inside the scene. Such large buildings are generally composed of tens of thousands of polygons and thousands of light sources. Therefore, if the memory cannot be loaded, it is necessary to divide the building into multiple units in a certain division method and load them in a distributed manner on each node. Each node only loads one of the units, so there is no need to worry about the memory load.
  • This embodiment proposes a scene division method based on the outline of the scene. This division method ensures that the divided sub-scene areas are roughly the same, and the sum of the dividing lines is the shortest. Insert a virtual portal at the dividing line to effectively organize the data transmission in the photon mapping process and maintain the connection between the dividing units.
  • the equal area ensures that the calculation amount of the intersection of each sub-area is approximately equal, so that the light intersection task of each node is more balanced, and the mutual waiting problem caused by unbalanced tasks during node communication is reduced, and the communication time is reduced;
  • the total length of the dividing line that divides the scene is the shortest.
  • the sum of the surface area of the portal is the smallest compared to other division methods. So as to ensure that the data transmission between each sub-area is minimal.
  • the master dispatches each divided subunit to the corresponding slave node, and each slave node processes one of the subunits separately, reducing the overall scene loading time.
  • a photon mapping optimization method based on polygonal space division is provided.
  • a photon mapping optimization method based on polygon space division includes:
  • the master node divides the outline of the scene into N parts according to the division method proposed in this article, and sends the divided geometric boundary information to each slave node, and each slave node reads the sub-region of the scene.
  • the Master node receives the scene image, divides the scene, obtains the geometric boundary information, inserts a virtual portal at the dividing line, and sends it to each slave node respectively;
  • Each Slave node reads the sub-areas of the scene
  • the photon is emitted from the light source inside the node, and stored in the data structure when it reaches the virtual portal at the boundary of the node area, and the photon is transmitted to the corresponding node in the adjacent area when the number of photons reaches the threshold;
  • photons are emitted from the light source inside the node, and photon tracking and intersection detection are performed in the node, just like photon emission from a single node. But when the photon reaches the virtual portal at the boundary of the node area, it will not be reflected or absorbed, but will be stored in a specific data structure. This data structure is responsible for storing all photons that hit this virtual portal. When the number of photons in this data structure reaches a certain value, the photons in the data structure are transmitted to the corresponding nodes in the adjacent area.
  • Each Slave node performs the coloring calculation of the scene sub-region, and sends the coloring calculation information to the Master node;
  • the Master node selects the brightness of the intersection closest to the light source as the global brightness of the colored point according to the received coloring calculation information of each Slave node.
  • the master node is responsible for sending eye rays to all slave nodes, calculating the intersection of light and scene on each slave node, and collecting photons at the intersection, calculating the brightness value of the point, and then each slave node The intersection position and the brightness value of the intersection are returned to the master node.
  • the master node selects the intersection closest to the viewpoint and the corresponding brightness value as the brightness value of a sampling point until all eye rays calculations are completed.
  • the geometric scene information includes vertex information of a polygon, a unique identifier of the polygon, and a unique identifier of adjacent polygons of the polygon.
  • step S1 of this embodiment the specific steps of scene division by the Master node include:
  • step S1 of this embodiment the specific step of dividing the scene image into corresponding N parts includes:
  • the area of the target sub-polygon is calculated according to the area of the outer contour polygon
  • the outer contour polygon of the scene is divided into two, and one area is the target subpolygon area; iteratively use the same method to divide the other subpolygon until the area of all the subpolygons divided is close to the target subpolygon area;
  • step S2 of this embodiment the specific steps for each slave node to read the sub-areas of the scene include:
  • the master node divides the scene outline into N parts according to the above division method, and sends the divided geometric boundary information to each slave node.
  • the divided polygon needs to record the following information: the vertex information of the polygon. This information is recorded to determine whether an object in the scene belongs to the polygon when the object is loaded on the slave node.
  • the unique identifiers of the adjacent polygons of the polygon should also be recorded, because only the slave nodes corresponding to the adjacent areas can communicate. In addition, the unique identification of the polygon also needs to be recorded.
  • the scene division and loading part are the following steps
  • the area A big of the larger polygon is:
  • the dividing line must start on one side of the polygon and end on the other side of the polygon. For example, there are 6 possible combinations of edges and edges in a 4-sided polygon. So there may be a potential cut. As shown in Figure 1, there are two potential split edges c1, c2. For all potential split edges, this article chooses the shortest one.
  • the first step is to determine the angle bisector formed by edge AD and edge BC , As shown in Figure 2 (a) and Figure 2 (b) dotted line, marked as m.
  • the second step the four vertices are respectively projected on the opposite side along the direction perpendicular to the angle bisector m. If the projection point does not fall on the line segment of the opposite side, the projection point is ignored.
  • the projection vertex of B is G
  • the projection point of D is H.
  • the effective projection points of the four vertices are G and H.
  • the third step is to connect vertices B and D to their corresponding effective projection points G and H, forming a combination of triangles AGB, DCH and trapezoid GDHB.
  • the fourth step if there is a minimum dividing line on side AD and side BC, they must be located in these two triangles or trapezoids. To find the position of the smallest dividing line, a simple area check can be performed. For example, A AGB is the area of the left triangle, A GDHB is the area of the trapezoid, and A DCH is the area of the right triangle. There are three situations where the smallest dividing line is located:
  • the minimum dividing line is in the triangle, as shown in Figure 4.
  • One end of the dividing line coincides with point B, and the other end of the dividing line can be obtained by linear interpolation based on points A and G in the target area.
  • the area of the target area is The other end of the dividing line can be obtained by linear interpolation by formula (4):
  • the minimum dividing line is in the trapezoid, as shown in Figure 5.
  • the two vertices of the dividing line can be moved according to the size of the target area. If the dividing line needs to be the shortest, then the angle of the dividing line must always be perpendicular to the angle bisector m of side AD and side BC.
  • One end of the dividing line is the linear interpolation of G and D. The other end of the dividing line is the linear interpolation of B and H.
  • the dividing line When the dividing line is in a trapezoid, the dividing line must be perpendicular to the angle bisector m of side AD and side BC. Geometric verification can be done by creating a trapezoid, where the parallel side and the angle bisector form an angle ⁇ . The area of this trapezoid can be expressed as a function of ⁇ . In order to make the dividing line the shortest, this article takes the derivative of the area, and it can be proved that for a given area, ⁇ must be equal to 90 degrees.
  • each slave node After the scene is divided, each slave node starts to read the geometric information and light source information of the divided sub-scene. Because the scene file is generally large, it can even reach dozens of G for some scene files. At this time, the memory cannot be loaded at one time. open. Therefore, a distributed method of loading objects in xml is adopted.
  • each slave node loads related objects in the scene, it uses SAH strategy to start building the scene kd tree. Since each slave node also loads the light source information, the photon graph belonging to the area can be generated inside the node. . Since each node does not need to store the global photons, it only needs to store the local photons, so the memory pressure of photon storage is reduced.
  • each Slave node performs photon tracking and intersection detection in its own node.
  • the photons in the photon graph of a node include the photons emitted from the area and the photons transmitted from the neighboring nodes through the virtual portal.
  • the photon travels in the scene, and when the photon hits the diffuse surface, it will be stored in the photon map. Since each node loads one of the sub-regions, each node has a photon map belonging to the region.
  • the photon map only needs to store the photons of the scene loaded by the node, and does not need to store the photons in the entire scene Therefore, the memory pressure is greatly reduced.
  • the photon emission stage is specifically as follows. Since each node is loaded with a light source within the range of each node, at each node, photons are emitted from the light source of this node, and intersection detection is performed in this node. Since each node only loads a sub-region of the scene, when performing intersection detection, this article only needs to consider the geometry in the sub-region. Therefore, the efficiency of intersection detection will be greatly improved.
  • the photon When the photon travels in the scene, the photon may hit different surfaces. When the photon hits the surface of these objects in the scene, the Russian wheel is used to determine whether it will be reflected, continue to propagate or be absorbed. However, when the photon reaches the inserted virtual portal, it will not be reflected or absorbed, but will be stored in a specific data structure. This data structure is responsible for storing all photons that hit this virtual portal. The size of the array storing these photons is given in this article a fixed value MAX_TEMP_PHOTONS. When the number of photons in this data structure reaches this fixed value, the adjacent area is activated and the photons in the data structure are transmitted to the node corresponding to the adjacent area. in.
  • the photon travels in the scene.
  • the photon will be stored in the relevant data structure.
  • the stored photons in the sub-region will be organized into a kd tree to build a photon graph. Since each node loads one of the sub-regions, each node has It belongs to the photon graph within this area.
  • the photon graph only needs to store the photons in the scene loaded by this node, and does not need to store the photons in the entire scene. Therefore, the level of each kd tree will be greatly reduced.
  • the algorithm calculates the brightness of the colored points within the search radius, it will become more efficient, and this greatly reduces the memory pressure.
  • each Slave node performs the coloring calculation of the scene sub-region. Near the scene dividing line, an overlapped kd tree is used to store photons, light is emitted from the screen space, and the coloring of the intersection of light and geometry is recorded To calculate the radiance of the colored point by collecting photons through the photon graph, and complete the coloring calculation, the specific steps include:
  • the brightness of the shading point is the radiance calculated from the photon graph inside the node
  • the present invention uses an overlapped k-d tree to store photons to solve the problem of collecting photons at the coloring point and cross-border point at the boundary, and adopts an overlapped k-d tree.
  • the specific method is to calculate the distance between the photon and the dividing plane in the x-axis, y-axis, and z-axis directions for each photon.
  • the photon needs to be sent to the adjacent area for further transmission in the adjacent area, just like the photon emitted from the light source.
  • each node is only responsible for the coloring calculation of a sub-region of the scene.
  • the coloring calculation information is sent to the master node, and the master node selects the brightness of the intersection closest to the light source as the global brightness of the coloring point.
  • the coloring point where the light intersects the geometry is recorded, and the radiance of the coloring point is calculated by photon graph collection, and the coloring calculation is completed.
  • the intersection point use k-nearest neighbors to search the surrounding photons to estimate the brightness of the intersection point. At this time, the search radius needs to be determined.
  • the radiance calculated using the photon graph inside the node is the luminosity of the point.
  • the shading point at the boundary of the region within the node that is, when the distance between the shading point and the virtual portal is less than the search radius, this will cause discontinuity of illumination. Therefore, it is necessary to access the photons of the adjacent divided regions.
  • the present invention uses overlapped k-d tree to solve this problem, as shown in Figure 6.
  • the specific method is to calculate the distance between the photon and the dividing plane in the x-axis, y-axis, and z-axis directions for each photon.
  • the photon needs to be sent to the adjacent area for further transmission in the adjacent area, just like the photon emitted from the light source.
  • the overlapped area is between the dashed line and the dividing line.
  • This embodiment can be extended to 128 nodes, and can be applied to both convex and concave outer contours, which fully solves the problem of rendering time and memory bottleneck in exhibition hall scenes.
  • the scene division algorithm of the present invention is compared with the kd tree-based division algorithm. Under the same number of nodes, the photon emission time used by the division method proposed in this paper is shorter than the photon emission time based on the kd tree method. Compared with the kd tree division method, the speed of this method is increased by more than 1.5 times.
  • a photon mapping optimization system based on polygonal space division is provided.
  • the Master node receives the scene image, divides the scene, obtains the geometric boundary information, inserts a virtual portal at the dividing line, and sends it to each slave node respectively;
  • Each Slave node reads the sub-areas of the scene
  • photons are emitted from the light source inside the node, stored in the data structure when they reach the virtual portal of the node area boundary, and transmitted to the corresponding node in the adjacent area when the number of photons reaches the threshold;
  • Each Slave node performs the coloring calculation of the scene sub-area, and sends the coloring calculation information to the Master node;
  • the Master node selects the brightness of the intersection closest to the light source as the global brightness of the colored point according to the received coloring calculation information of each Slave node.
  • a photon mapping optimization method based on polygonal space division is provided.
  • a photon mapping optimization method based on polygon space division, implemented in the Master node, the method includes:
  • the Master node receives the scene image, divides the scene, obtains the geometric boundary information, inserts a virtual portal at the dividing line, and sends it to each slave node respectively;
  • the Master node selects the brightness of the intersection closest to the light source as the global brightness of the colored point according to the received coloring calculation information of each Slave node.
  • the geometric scene information includes vertex information of a polygon, a unique identifier of the polygon, and a unique identifier of adjacent polygons of the polygon.
  • the specific steps of the scene division by the Master node include:
  • the specific step of dividing the scene image into corresponding N parts includes:
  • the area of the target sub-polygon is calculated according to the area of the outer contour polygon
  • the outer contour polygon of the scene is divided into two, and one area is the target subpolygon area; iteratively use the same method to divide the other subpolygon until the area of all the subpolygons divided is close to the target subpolygon area;
  • a computer-readable storage medium is provided.
  • a computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor of an electronic device and executing the method for optimizing photon mapping based on polygonal space division.
  • an electronic device is provided.
  • An electronic device including a processor and a computer-readable storage medium, the processor is used to implement each instruction; the computer-readable storage medium is used to store a plurality of instructions, the instruction is suitable for being loaded by the processor and executed A photon mapping optimization method based on polygonal space division.
  • a photon mapping optimization method based on polygonal space division is provided.
  • a photon mapping optimization method based on polygonal space division, implemented in the Slave node, the method includes:
  • the Slave node reads the sub-areas of the scene
  • photons are emitted from the light source inside the node, stored in the data structure when they reach the virtual portal of the node area boundary, and transmitted to the corresponding node in the adjacent area when the number of photons reaches the threshold;
  • Each Slave node performs the coloring calculation of the sub-region of the scene, and sends the coloring calculation information to the Master node.
  • the specific steps of the Slave node reading the sub-areas of the scene include:
  • each Slave node performs photon tracking and intersection detection in its own node.
  • each Slave node performs the coloring calculation of the scene subregion, and near the scene division line, an overlapped kd tree is used to store photons, light is emitted from the screen space, and the coloring point where the light intersects the geometry is recorded Calculate the radiance of the colored point by collecting photons through the photon graph, and complete the coloring calculation.
  • the specific steps include:
  • the brightness of the shading point is the radiance calculated from the photon graph inside the node
  • a computer-readable storage medium is provided.
  • a computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor of an electronic device and executing the method for optimizing photon mapping based on polygonal space division.
  • an electronic device is provided.
  • An electronic device comprising a processor and a computer-readable storage medium, the processor is used to implement each instruction; the computer-readable storage medium is used to store a plurality of instructions, the instructions are suitable for being loaded by the processor and executing the one A photon mapping optimization method based on polygonal space division.
  • the device executes the methods or processes described in the various embodiments of the present disclosure.
  • the computer program product may include a computer-readable storage medium, which carries computer-readable program instructions for executing various aspects of the present disclosure.
  • the computer-readable storage medium may be a tangible device that can hold and store instructions used by the instruction execution device.
  • the computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing.
  • Non-exhaustive list of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM) Or flash memory), static random access memory (SRAM), portable compact disk read-only memory (CD-ROM), digital versatile disk (DVD), memory stick, floppy disk, mechanical encoding device, such as a printer with instructions stored thereon
  • RAM random access memory
  • ROM read only memory
  • EPROM erasable programmable read only memory
  • flash memory flash memory
  • SRAM static random access memory
  • CD-ROM compact disk read-only memory
  • DVD digital versatile disk
  • memory stick floppy disk
  • mechanical encoding device such as a printer with instructions stored thereon
  • the computer-readable storage medium used here is not interpreted as a transient signal itself, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (for example, light pulses through fiber optic cables), or through wires Transmission of electrical signals.
  • the computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to various computing/processing devices, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and/or a wireless network.
  • the network may include copper transmission cables, optical fiber transmission, wireless transmission, routers, firewalls, switches, gateway computers, and/or edge servers.
  • the network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network, and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing/processing device .
  • the computer program instructions used to perform the operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or in one or more programming languages
  • Source code or object code written in any combination of, the programming language includes object-oriented programming languages-such as C++, etc., and conventional procedural programming languages-such as "C" language or similar programming languages.
  • Computer readable program instructions can be executed entirely on the user's computer, partly on the user's computer, executed as an independent software package, partly on the user's computer and partly executed on a remote computer, or entirely on the remote computer or server carried out.
  • the remote computer can be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (for example, using an Internet service provider to access the Internet connection).
  • LAN local area network
  • WAN wide area network
  • an electronic circuit such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), can be customized by using the status information of the computer-readable program instructions.
  • the computer-readable program instructions are executed to implement various aspects of the present disclosure.
  • the algorithm in this paper can be effectively extended to 128 nodes, and the parallel efficiency is above 20%. Therefore, the algorithm in this paper can be applied to exhibition hall scenes whose outer contour is convex polygon, as well as exhibition hall scenes whose outer contour is concave polygon.
  • this paper adopts a master-slave accelerated parallel mode with one master node and multiple slave nodes.
  • the master node is responsible for emitting eye rays. These eye rays will be sent to each other slave node separately.
  • eye ray will conduct an intersection test with each part of the scene loaded from the node, generate hit points, use the k-nearest neighbor algorithm to find the brightness of each hit point, and return the intersection point and the light estimation value of the intersection point
  • For the master node select the closest intersection point to the viewpoint on the master node, and use the light estimation value of the intersection point as the light estimation value of the pixel. Therefore, for the drawing stage, reducing the communication overhead between the master node and the slave node is the main problem.
  • the time used in the drawing phase is 52.2405min, when the number of nodes is increased to 32, the time used in the drawing phase is 55.9685min, and the communication time is increased 3.728min, which shows that with the growth of nodes, the drawing phase does not consume too much communication time, so the method in this paper has good scalability in the drawing phase.
  • the photon emission time used by the division method proposed in this paper is shorter than the photon emission time based on the Kd tree division method.
  • this method is faster than the kd tree division method. Improved by more than 1.5 times. This shows that in the photon emission stage, the number of photons hitting the virtual portal is less than that based on the k-d tree division method, which reduces the transmission cost.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Graphics (AREA)
  • Image Generation (AREA)

Abstract

A polygon space division-based photon mapping optimization method, a device and a system. Said method comprises: a Master node receiving a scene image, performing scene division to obtain geometric boundary information, inserting a virtual portal at a division line, and sending same to each Slave node (S1); each Slave node reading a sub-area of a scene (S2); for each Slave node, photons being emitted from a light source inside said node, and being stored in a data structure when reaching the virtual portal at the boundary of the area of said node, and the photons being transmitted to a corresponding node of an adjacent area when the number of photons reaches a threshold (S3); each Slave node performing coloring calculation on the sub-area of the scene, and sending coloring calculation information to the Master node (S4); and the Master node selecting, according to the received coloring calculation information of each Slave node, the light brightness of an intersection point closest to the light source as the global light brightness of the colored point (S5).

Description

一种基于多边形空间划分的光子映射优化方法、装置及系统Photon mapping optimization method, device and system based on polygonal space division 技术领域Technical field
本公开属于图形学真实感渲染的技术领域,涉及一种基于多边形空间划分的光子映射优化方法、装置及系统。The present disclosure belongs to the technical field of graphics realistic rendering, and relates to a photon mapping optimization method, device and system based on polygonal space division.
背景技术Background technique
本部分的陈述仅仅是提供了与本公开相关的背景技术信息,不必然构成在先技术。The statements in this section merely provide background information related to the present disclosure, and do not necessarily constitute prior art.
在建筑、艺术、尤其是数字电影领域,对绘制场景规模的需求和真实感的需求越来越大。为了生成相片级别的真实感图像,需要进行全局光照的计算,从而精确地模拟场景中所有光照情况。然而,由于全局光照计算中,需要渲染的空间场景可能会很大,其带来的大规模光照计算任务和大规模场景数据存储需求,给真实感渲染与视觉特效仿真提出新的挑战。因此,如何缩短渲染时间和减少内存使用成为越来越重要的问题。In the fields of architecture, art, and especially digital cinema, the demand for the scale of drawing scenes and the demand for realism are increasing. In order to generate photo-realistic images, global illumination needs to be calculated to accurately simulate all lighting conditions in the scene. However, in global illumination calculations, the spatial scene that needs to be rendered may be very large, and the large-scale lighting calculation tasks and large-scale scene data storage requirements brought about by it pose new challenges for realistic rendering and visual special effects simulation. Therefore, how to shorten rendering time and reduce memory usage has become an increasingly important issue.
随着近几年分布式框架的日益发展,越来越多的研究者将分布式与渲染相结合,借助集群强大的计算能力来减少渲染时间。这样,不仅仅大大减少了渲染时间,内存加载不下的问题也不复存在。针对大规模场景的光子存储瓶颈,目前研究者提出了一系列光子映射内外存调度方法,在大规模场景的绘制中起到一定的作用。这些方法大多采用特殊的场景划分策略,以适用于某种类型场景几何数据的分布特点,减少内外存的数据交换量。With the increasing development of distributed frameworks in recent years, more and more researchers combine distributed and rendering, and use the powerful computing power of clusters to reduce rendering time. In this way, not only the rendering time is greatly reduced, but the problem of memory load failure no longer exists. Aiming at the photon storage bottleneck of large-scale scenes, researchers have proposed a series of photon mapping internal and external memory scheduling methods, which play a certain role in the rendering of large-scale scenes. Most of these methods adopt special scene division strategies to suit the distribution characteristics of certain types of scene geometric data and reduce the amount of data exchange between internal and external storage.
然而,发明人在研发过程中发现,目前方法中尚没有高效的场景划分方法适用于大型展馆类的场景。However, during the research and development process, the inventor found that there is no efficient scene division method in the current method suitable for scenes of large exhibition halls.
发明内容Summary of the invention
针对现有技术中存在的不足,本公开的一个或多个实施例提供了一种基于多边形空间划分的光子映射优化方法、装置及系统。In view of the deficiencies in the prior art, one or more embodiments of the present disclosure provide a photon mapping optimization method, device and system based on polygonal space division.
根据本公开的一个或多个实施例的一个方面,提供一种基于多边形空间划分的光子映射优化方法。According to an aspect of one or more embodiments of the present disclosure, a photon mapping optimization method based on polygonal space division is provided.
一种基于多边形空间划分的光子映射优化方法,该方法包括:A photon mapping optimization method based on polygon space division, the method includes:
Master节点接收场景图像,进行场景划分,得到几何边界信息,在分割线处插入虚拟portal,并分别发送至各个Slave节点;The Master node receives the scene image, divides the scene, obtains the geometric boundary information, inserts a virtual portal at the dividing line, and sends it to each slave node respectively;
各个Slave节点读取场景的子区域;Each Slave node reads the sub-areas of the scene;
对每个Slave节点,光子从本节点内部的光源发射,到达本节点区域边界的虚拟portal时存储到数据结构中,并在光子数量到达阈值时将光子传输至相邻区域对应节点;For each Slave node, photons are emitted from the light source inside the node, stored in the data structure when they reach the virtual portal of the node area boundary, and transmitted to the corresponding node in the adjacent area when the number of photons reaches the threshold;
每个Slave节点进行该场景子区域的着色计算,并将着色计算信息发送至Master节点;Each Slave node performs the coloring calculation of the scene sub-region, and sends the coloring calculation information to the Master node;
Master节点根据接收的各Slave节点的着色计算信息,选择距离光源最近的交点的光亮度作为全局该着色点的光亮度。The Master node selects the brightness of the intersection closest to the light source as the global brightness of the colored point according to the received coloring calculation information of each Slave node.
进一步地,在该方法中,所述几何场景信息包括多边形的顶点信息、多边形的唯一标识和该多边形相邻多边形的唯一标识。Further, in this method, the geometric scene information includes vertex information of a polygon, a unique identifier of the polygon, and a unique identifier of adjacent polygons of the polygon.
进一步地,在该方法中,所述Master节点进行场景划分的具体步骤包括:Further, in this method, the specific steps of the scene division by the Master node include:
根据场景图像的俯视图,得到场景的轮廓坐标信息;Obtain the contour coordinate information of the scene according to the top view of the scene image;
根据Slave节点的数目,将场景图像划分成相应的N份;According to the number of Slave nodes, divide the scene image into corresponding N parts;
保证场景分割线总和最短和每块划分后的场景子区域面积差最小。Ensure that the sum of the segmentation lines of the scene is the shortest and the area difference of the sub-regions of each divided scene is the smallest.
进一步地,在该方法中,所述将场景图像划分成相应的N份的具体步骤包括:Further, in the method, the specific step of dividing the scene image into corresponding N parts includes:
假设场景的外轮廓多边形划分成N份,根据外轮廓多边形的面积,计算目标子多边形面积;Assuming that the outer contour polygon of the scene is divided into N parts, the area of the target sub-polygon is calculated according to the area of the outer contour polygon;
场景的外轮廓多边形一分为二,其中一个面积为目标子多边形面积;迭代使用相同的方法将另一个子多边形分割,直至分割的所有子多边形面积接近目标子多边形面积;The outer contour polygon of the scene is divided into two, and one area is the target subpolygon area; iteratively use the same method to divide the other subpolygon until the area of all the subpolygons divided is close to the target subpolygon area;
确定最短的场景分割线。Determine the shortest scene dividing line.
进一步地,在该方法中,所述各个Slave节点读取场景的子区域的具体步骤包括:Further, in this method, the specific steps of each slave node reading the sub-region of the scene include:
采用分布式加载场景的子区域中物体,采用SAH策略构建场景k-d树,在本节点内部生成属于本区域范围内的光子图。Distributed loading of objects in the sub-region of the scene is adopted, and the SAH strategy is used to construct the scene k-d tree, and the photon graph belonging to the region is generated inside the node.
进一步地,在该方法中,所述每个Slave节点在本节点内进行光子追踪求交检测。Further, in this method, each Slave node performs photon tracking and intersection detection in its own node.
进一步地,在该方法中,所述每个Slave节点进行该场景子区域的着色计算,在场景分割线附近,采用overlapped k-d树存储光子,从屏幕空间发射光线,记录光线与几何相交的着色点,通过光子图进行光子收集计算出该着色点的辐射亮度,并完成着色计算,具体步骤包括:Further, in this method, each Slave node performs the coloring calculation of the scene subregion, and near the scene division line, an overlapped kd tree is used to store photons, light is emitted from the screen space, and the coloring point where the light intersects the geometry is recorded Calculate the radiance of the colored point by collecting photons through the photon graph, and complete the coloring calculation. The specific steps include:
设定光子收集搜索半径;Set the photon collection search radius;
当着色点和虚拟portal距离大于等于搜索半径时,着色点的光亮度为该节点内部的光子图计算出的辐射亮度;When the distance between the colored point and the virtual portal is greater than or equal to the search radius, the brightness of the colored point is the radiance calculated from the photon graph inside the node;
当着色点和虚拟portal距离小于搜索半径时,访问相邻分割区域的光子,采用overlapped k-d树组织光子图,将划分区域边界处的光子重复存储到临近区域的节点上,着色点的光亮度为检测节点内部光子图中的光子图计算出的辐射亮度。When the distance between the shaded point and the virtual portal is less than the search radius, visit the photons in the adjacent segmented area, use the overlapped kd tree to organize the photon graph, and store the photons at the boundary of the segmented area repeatedly to the nodes in the adjacent area. The brightness of the colored point is Detect the radiance calculated from the photon graph in the photon graph inside the node.
根据本公开的一个或多个实施例的一个方面,提供一种基于多边形空间划分的光子映射优化系统。According to an aspect of one or more embodiments of the present disclosure, a photon mapping optimization system based on polygonal space division is provided.
一种基于多边形空间划分的光子映射优化系统,该系统包括:Master节点和与其连接的若干Slave节点;A photon mapping optimization system based on polygonal space division, the system includes: a Master node and several Slave nodes connected to it;
Master节点接收场景图像,进行场景划分,得到几何边界信息,在分割线处插入虚拟portal,并分别发送至各个Slave节点;The Master node receives the scene image, divides the scene, obtains the geometric boundary information, inserts a virtual portal at the dividing line, and sends it to each slave node respectively;
各个Slave节点读取场景的子区域;Each Slave node reads the sub-areas of the scene;
对每个Slave节点,光子从本节点内部的光源发射,到达本节点区域边界的虚拟portal时存储到数据结构中,并在光子数量到达阈值时将光子传输至相邻区域对应节点;For each Slave node, the photon is emitted from the light source inside the node, and stored in the data structure when it reaches the virtual portal at the boundary of the node area, and the photon is transmitted to the corresponding node in the adjacent area when the number of photons reaches the threshold;
每个Slave节点进行该场景子区域的着色计算,并将着色计算信息发送至Master节点;Each Slave node performs the coloring calculation of the scene sub-region, and sends the coloring calculation information to the Master node;
Master节点根据接收的各Slave节点的着色计算信息,选择距离光源最近的交点的光亮度作为全局该着色点的光亮度。The Master node selects the brightness of the intersection closest to the light source as the global brightness of the colored point according to the received coloring calculation information of each Slave node.
根据本公开的一个或多个实施例的一个方面,提供一种基于多边形空间划分的光子映射优化方法。According to an aspect of one or more embodiments of the present disclosure, a photon mapping optimization method based on polygonal space division is provided.
一种基于多边形空间划分的光子映射优化方法,在Master节点中实现,该方法包括:A photon mapping optimization method based on polygon space division, implemented in the Master node, the method includes:
Master节点接收场景图像,进行场景划分,得到几何边界信息,在分割线处插入虚拟portal,并分别发送至各个Slave节点;The Master node receives the scene image, divides the scene, obtains the geometric boundary information, inserts a virtual portal at the dividing line, and sends it to each slave node respectively;
Master节点根据接收的各Slave节点的着色计算信息,选择距离光源最近的交点的光亮度作为全局该着色点的光亮度。The Master node selects the brightness of the intersection closest to the light source as the global brightness of the colored point according to the received coloring calculation information of each Slave node.
进一步地,在该方法中,所述几何场景信息包括多边形的顶点信息、多边形的唯一标识和该多边形相邻多边形的唯一标识。Further, in this method, the geometric scene information includes vertex information of a polygon, a unique identifier of the polygon, and a unique identifier of adjacent polygons of the polygon.
进一步地,在该方法中,所述Master节点进行场景划分的具体步骤包括:Further, in this method, the specific steps of the scene division by the Master node include:
根据场景图像的俯视图,得到场景的轮廓坐标信息;Obtain the contour coordinate information of the scene according to the top view of the scene image;
根据Slave节点的数目,将场景图像划分成相应的N份;According to the number of Slave nodes, divide the scene image into corresponding N parts;
保证场景分割线总和最短和每块划分后的场景子区域面积差最小。Ensure that the sum of the segmentation lines of the scene is the shortest and the area difference of the sub-regions of each divided scene is the smallest.
进一步地,在该方法中,所述将场景图像划分成相应的N份的具体步骤包括:Further, in the method, the specific step of dividing the scene image into corresponding N parts includes:
假设场景的外轮廓多边形划分成N份,根据外轮廓多边形的面积,计算目标子多边形面积;Assuming that the outer contour polygon of the scene is divided into N parts, the area of the target sub-polygon is calculated according to the area of the outer contour polygon;
场景的外轮廓多边形一分为二,其中一个面积为目标子多边形面积;迭代使用相同的方法将另一个子多边形分割,直至分割的所有子多边形面积接近目标子多边形面积;The outer contour polygon of the scene is divided into two, and one area is the target subpolygon area; iteratively use the same method to divide the other subpolygon until the area of all the subpolygons divided is close to the target subpolygon area;
确定最短的场景分割线。Determine the shortest scene dividing line.
根据本公开的一个或多个实施例的一个方面,提供一种计算机可读存储介质。According to an aspect of one or more embodiments of the present disclosure, a computer-readable storage medium is provided.
一种计算机可读存储介质,其中存储有多条指令,所述指令适于由电子设备的处理器加载并执行所述的一种基于多边形空间划分的光子映射优化方法。A computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor of an electronic device and executing the method for optimizing photon mapping based on polygonal space division.
根据本公开的一个或多个实施例的一个方面,提供一种电子设备。According to an aspect of one or more embodiments of the present disclosure, an electronic device is provided.
一种电子设备,其包括处理器和计算机可读存储介质,处理器用于实现各指令;计算机可读存储介质用于存储多条指令,所述指令适于由处理器加载并执行所述的一种基于多边形空间划分的光子映射优化方法。An electronic device including a processor and a computer-readable storage medium, the processor is used to implement each instruction; the computer-readable storage medium is used to store a plurality of instructions, the instruction is suitable for being loaded by the processor and executed A photon mapping optimization method based on polygonal space division.
根据本公开的一个或多个实施例的一个方面,提供一种基于多边形空间划分的光子映射优化方法。According to an aspect of one or more embodiments of the present disclosure, a photon mapping optimization method based on polygonal space division is provided.
一种基于多边形空间划分的光子映射优化方法,在Slave节点中实现,该方法包括:A photon mapping optimization method based on polygonal space division, implemented in the Slave node, the method includes:
Slave节点读取场景的子区域;The Slave node reads the sub-areas of the scene;
对每个Slave节点,光子从本节点内部的光源发射,到达本节点区域边界的虚拟portal时存储到数据结构中,并在光子数量到达阈值时将光子传输至相邻区域对应节点;For each Slave node, the photon is emitted from the light source inside the node, and stored in the data structure when it reaches the virtual portal at the boundary of the node area, and the photon is transmitted to the corresponding node in the adjacent area when the number of photons reaches the threshold;
每个Slave节点进行该场景子区域的着色计算,并将着色计算信息发送至Master节点。Each Slave node performs the coloring calculation of the sub-region of the scene, and sends the coloring calculation information to the Master node.
进一步地,在该方法中,所述Slave节点读取场景的子区域的具体步骤包括:Further, in this method, the specific steps of the Slave node reading the sub-areas of the scene include:
采用分布式加载场景的子区域中物体,采用SAH策略构建场景k-d树,在本节点内部生成属于本区域范围内的光子图。Distributed loading of objects in the sub-region of the scene is adopted, and the SAH strategy is used to construct the scene k-d tree, and the photon graph belonging to the region is generated inside the node.
进一步地,在该方法中,所述每个Slave节点在本节点内进行光子追踪求交检测。Further, in this method, each Slave node performs photon tracking and intersection detection in its own node.
进一步地,在该方法中,所述每个Slave节点进行该场景子区域的着色计算,在场景分割线附近,采用overlapped k-d树存储光子,从屏幕空间发射光线,记录光线与几何相交的着色点,通过光子图进行光子收集计算出该着色点的辐射亮度,并完成着色计算,具体步骤包括:Further, in this method, each Slave node performs the coloring calculation of the scene subregion, and near the scene division line, an overlapped kd tree is used to store photons, light is emitted from the screen space, and the coloring point where the light intersects the geometry is recorded Calculate the radiance of the colored point by collecting photons through the photon graph, and complete the coloring calculation. The specific steps include:
设定光子收集搜索半径;Set the photon collection search radius;
当着色点和虚拟portal距离大于等于搜索半径时,着色点的光亮度为该节点内部的光子图计算出的辐射亮度;When the distance between the colored point and the virtual portal is greater than or equal to the search radius, the brightness of the colored point is the radiance calculated from the photon graph inside the node;
当着色点和虚拟portal距离小于搜索半径时,访问相邻分割区域的光子,采用overlapped k-d树组织光子图,将划分区域边界处的光子重复存储到临近区域的节点上,着色点的光亮度为检测节点内部光子图中的光子图计算出的辐射亮度。When the distance between the shaded point and the virtual portal is less than the search radius, visit the photons in the adjacent segmented area, use the overlapped kd tree to organize the photon graph, and store the photons at the boundary of the segmented area repeatedly to the nodes in the adjacent area. The brightness of the colored point is Detect the radiance calculated from the photon graph in the photon graph inside the node.
根据本公开的一个或多个实施例的一个方面,提供一种计算机可读存储介质。According to an aspect of one or more embodiments of the present disclosure, a computer-readable storage medium is provided.
一种计算机可读存储介质,其中存储有多条指令,所述指令适于由电子设备的处理器加载并执行所述的一种基于多边形空间划分的光子映射优化方法。A computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor of an electronic device and executing the method for optimizing photon mapping based on polygonal space division.
根据本公开的一个或多个实施例的一个方面,提供一种电子设备。According to an aspect of one or more embodiments of the present disclosure, an electronic device is provided.
一种电子设备,其包括处理器和计算机可读存储介质,处理器用于实现各指令;计算机可读存储介质用于存储多条指令,所述指令适于由处理器加载并执行所述的一种基于多边形空间划分的光子映射优化方法。An electronic device comprising a processor and a computer-readable storage medium, the processor is used to implement each instruction; the computer-readable storage medium is used to store a plurality of instructions, the instructions are suitable for being loaded by the processor and executing the one A photon mapping optimization method based on polygonal space division.
本公开的有益效果:The beneficial effects of the present disclosure:
本公开提供的一种基于多边形空间划分的光子映射优化方法、装置及系统,在用户视觉上无明显偏差;多个节点并行发射光子,当节点数目增加时,光子发射时间越来越短,该方法在绘制阶段具有很好的扩展性。同样数目节点情况下,本公开提出的划分方法所用的光子发射时间要小于基于K-d树划分方法的光子发射时间,在光子发射阶段,光子撞击到虚拟portal的数量要比基于k-d树划分方法中的数量要少,降低传输成本。本公开多节点成功分担了每一次场景增加的复杂度,该分布式架构适用于具有复杂外轮廓的场景的绘制。The present disclosure provides a method, device and system for optimizing photon mapping based on polygonal space division, which has no obvious deviation in user vision; multiple nodes emit photons in parallel, and when the number of nodes increases, the photon emission time becomes shorter and shorter. The method has good scalability in the drawing stage. In the case of the same number of nodes, the photon emission time used by the division method proposed in this disclosure is shorter than the photon emission time based on the Kd tree division method. In the photon emission stage, the number of photons hitting the virtual portal is greater than that of the kd tree division method. The quantity should be small to reduce the transmission cost. The multiple nodes of the present disclosure successfully share the increased complexity of each scene, and the distributed architecture is suitable for drawing scenes with complex outer contours.
附图说明Description of the drawings
构成本申请的一部分的说明书附图用来提供对本申请的进一步理解,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。The drawings of the specification forming a part of the application are used to provide a further understanding of the application, and the exemplary embodiments and descriptions of the application are used to explain the application, and do not constitute an improper limitation of the application.
图1是根据一个或多个实施例的一种基于多边形空间划分的光子映射优化方法流程图;Fig. 1 is a flowchart of a method for optimizing photon mapping based on polygonal space division according to one or more embodiments;
图2(a)是根据一个或多个实施例的多边形ABCD的潜在分割边c1图;Fig. 2(a) is a graph of potential segmentation edges c1 of polygon ABCD according to one or more embodiments;
图2(b)是根据一个或多个实施例的多边形ABCD的潜在分割边c2图;Fig. 2(b) is a graph of potential segmentation edges c2 of polygon ABCD according to one or more embodiments;
图3是根据一个或多个实施例的以AD和BC为配对边分割图;Fig. 3 is a segmentation diagram with AD and BC as paired edges according to one or more embodiments;
图4是根据一个或多个实施例的三角形AGB中的最短分割线图;4 is a diagram of the shortest dividing line in the triangle AGB according to one or more embodiments;
图5是根据一个或多个实施例的梯形GDHB中的最短分割线图;FIG. 5 is a diagram of the shortest dividing line in a trapezoidal GDHB according to one or more embodiments;
图6是根据一个或多个实施例的当撞击点离虚拟portal(虚线)很近时需要收集相邻区域的光子图;Fig. 6 is a photon image of an adjacent area that needs to be collected when the point of impact is very close to the virtual portal (dashed line) according to one or more embodiments;
图7是根据一个或多个实施例的光子撞击到overlapped区域时发送到相邻节点图。Fig. 7 is a diagram of photons sent to neighboring nodes when they hit an overlapped area according to one or more embodiments.
具体实施方式:Detailed ways:
下面将结合本公开的一个或多个实施例中的附图,对本公开的一个或多个实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本公开一部分实施例,而不是全部的实施例。基于本公开的一个或多个实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本公开保护的范围。The following will clearly and completely describe the technical solutions in one or more embodiments of the present disclosure in conjunction with the accompanying drawings in one or more embodiments of the present disclosure. Obviously, the described embodiments are only part of the implementation of the present disclosure. Examples, not all examples. Based on one or more embodiments of the present disclosure, all other embodiments obtained by a person of ordinary skill in the art without creative work shall fall within the protection scope of the present disclosure.
应该指出,以下详细说明都是例示性的,旨在对本申请提供进一步的说明。除非另有指明,本实施例使用的所有技术和科学术语具有与本申请所属技术领域的普通技术人员通常理解的相同含义。It should be pointed out that the following detailed descriptions are all illustrative and are intended to provide further explanations for the application. Unless otherwise specified, all technical and scientific terms used in this embodiment have the same meaning as commonly understood by those of ordinary skill in the technical field to which this application belongs.
需要注意的是,这里所使用的术语仅是为了描述具体实施方式,而非意图限制根据本申请的示例性实施方式。如在这里所使用的,除非上下文另外明确指出,否则单数形式也意图包括复数形式,此外,还应当理解的是,当在本说明书中使用术语“包含”和/或“包括”时,其指明存在特征、步骤、操作、器件、组件和/或它们的组合。It should be noted that the terms used here are only for describing specific embodiments, and are not intended to limit the exemplary embodiments according to the present application. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should also be understood that when the terms "comprising" and/or "including" are used in this specification, they indicate There are features, steps, operations, devices, components, and/or combinations thereof.
需要注意的是,附图中的流程图和框图示出了根据本公开的各种实施例的方法和系统的可能实现的体系架构、功能和操作。应当注意,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,所述模块、程序段、或代码的一部分可以包括一个或多个用于实现各个实施例中所规定的逻辑功能的可执行指令。也应当注意,在有些作为备选的实现中,方框中所标注的功能也可以按照不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,或者它们有时也可以按照相反的顺序执行,这取决于所涉及的功能。同样应当注意的是,流程图和/或框图中的每个方框、以及流程图和/或框图中的方框的组合,可以使用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以使用专用硬件与计算机指令的组合来实现。It should be noted that the flowcharts and block diagrams in the drawings illustrate the possible implementation architecture, functions, and operations of the method and system according to various embodiments of the present disclosure. It should be noted that each block in the flowchart or block diagram may represent a module, program segment, or part of code, and the module, program segment, or part of code may include one or more for implementing various embodiments. Executable instructions for the specified logic function. It should also be noted that, in some alternative implementations, the functions noted in the block may also occur in a different order than that noted in the drawings. For example, two blocks shown in succession may actually be executed substantially in parallel, or they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the flowchart and/or block diagram, and the combination of the blocks in the flowchart and/or block diagram, can be implemented using a dedicated hardware-based system that performs the specified functions or operations Or it can be implemented using a combination of dedicated hardware and computer instructions.
在不冲突的情况下,本公开中的实施例及实施例中的特征可以相互组合,下面结合附图与实施例对本公开作进一步说明。In the case of no conflict, the embodiments in the present disclosure and the features in the embodiments can be combined with each other, and the present disclosure will be further described below with reference to the drawings and embodiments.
本实施例提出了针对类似博物馆的室内展馆类大场景分布式光子映射算法,由于该类场景外轮廓一般较为复杂、室内没有明显的房间界限。并且大多数展品均匀摆放在场景内部。这种大型建筑物一般都由数以万计的多边形和数千个光源组成。因此,内存加载不开,就需要将建筑以某种划分方式分割成多个单元,分布式加载到各个节点上面,每个节点只加载其中一个单元,这样就不需要担心内存加载不下的情况。This embodiment proposes a distributed photon mapping algorithm for large indoor exhibition hall-like large scenes similar to museums. Because the outline of this type of scene is generally more complicated, there is no obvious room boundary indoors. And most of the exhibits are evenly placed inside the scene. Such large buildings are generally composed of tens of thousands of polygons and thousands of light sources. Therefore, if the memory cannot be loaded, it is necessary to divide the building into multiple units in a certain division method and load them in a distributed manner on each node. Each node only loads one of the units, so there is no need to worry about the memory load.
本实施例提出一种基于场景外轮廓的场景划分方式。该划分方式保证划分出的子场景面积大致相同,分割线总和最短。在分割线处插入虚拟portal,用于光子映射过程中的数据传输的有效组织,保持各个分割单元之间的联系。This embodiment proposes a scene division method based on the outline of the scene. This division method ensures that the divided sub-scene areas are roughly the same, and the sum of the dividing lines is the shortest. Insert a virtual portal at the dividing line to effectively organize the data transmission in the photon mapping process and maintain the connection between the dividing units.
其中,等面积保证各个子区域的求交计算量大致相等,从而使得每个节点的光照求交任务更加均衡,减少了节点通信时因为任务不均衡而造成的互相等待问题,减少了通信时间;此外,划分场景的分割线总长度最短,当portal的高度相同的情况下,相比其他划分方式,portal的表面积和是最小的。从而保证各个子区域之间的数据传输最少。场景划分之后,由master调度将各个划分的子单元分发到相应的slave节点上,每个slave节点分别处理其中一个子单元,减少了整体场景加载时间。Among them, the equal area ensures that the calculation amount of the intersection of each sub-area is approximately equal, so that the light intersection task of each node is more balanced, and the mutual waiting problem caused by unbalanced tasks during node communication is reduced, and the communication time is reduced; In addition, the total length of the dividing line that divides the scene is the shortest. When the height of the portal is the same, the sum of the surface area of the portal is the smallest compared to other division methods. So as to ensure that the data transmission between each sub-area is minimal. After the scene is divided, the master dispatches each divided subunit to the corresponding slave node, and each slave node processes one of the subunits separately, reducing the overall scene loading time.
实施例一Example one
根据本公开的一个或多个实施例的一个方面,提供一种基于多边形空间划分的光子映射优化方法。According to an aspect of one or more embodiments of the present disclosure, a photon mapping optimization method based on polygonal space division is provided.
一种基于多边形空间划分的光子映射优化方法,该方法包括:A photon mapping optimization method based on polygon space division, the method includes:
场景划分和加载阶段:Scene division and loading stage:
master节点将场景外轮廓按照本文提出划分方法划分成N份,将划分后的几何边界信息发送给每个slave节点,由各个slave节点读取场景的子区域。The master node divides the outline of the scene into N parts according to the division method proposed in this article, and sends the divided geometric boundary information to each slave node, and each slave node reads the sub-region of the scene.
S1:Master节点接收场景图像,进行场景划分,得到几何边界信息,在分割线处插入虚拟portal,并分别发送至各个Slave节点;S1: The Master node receives the scene image, divides the scene, obtains the geometric boundary information, inserts a virtual portal at the dividing line, and sends it to each slave node respectively;
S2:各个Slave节点读取场景的子区域;S2: Each Slave node reads the sub-areas of the scene;
光子发射阶段:Photon emission stage:
S3:对每个Slave节点,光子从本节点内部的光源发射,到达本节点区域边界的虚拟portal时存储到数据结构中,并在光子数量到达阈值时将光子传输至相邻区域对应节点;S3: For each slave node, the photon is emitted from the light source inside the node, and stored in the data structure when it reaches the virtual portal at the boundary of the node area, and the photon is transmitted to the corresponding node in the adjacent area when the number of photons reaches the threshold;
对于每一个slave节点而言,光子从本节点内部的光源发射,并在本节点内进行光子追踪求交检测,就像从单节点上进行光子发射一样。但是当光子到达本节点区域边界的虚拟portal的时候,它并不会反射或者被吸收,而是会被存储到一个特定的数据结构中。这个数 据结构负责存储所有撞击到这个虚拟portal的光子。当这个数据结构的光子数量达到一定值的时候,将数据结构中的光子传输到相邻区域对应的节点中。For each slave node, photons are emitted from the light source inside the node, and photon tracking and intersection detection are performed in the node, just like photon emission from a single node. But when the photon reaches the virtual portal at the boundary of the node area, it will not be reflected or absorbed, but will be stored in a specific data structure. This data structure is responsible for storing all photons that hit this virtual portal. When the number of photons in this data structure reaches a certain value, the photons in the data structure are transmitted to the corresponding nodes in the adjacent area.
绘制阶段:Drawing stage:
S4:每个Slave节点进行该场景子区域的着色计算,并将着色计算信息发送至Master节点;S4: Each Slave node performs the coloring calculation of the scene sub-region, and sends the coloring calculation information to the Master node;
S5:Master节点根据接收的各Slave节点的着色计算信息,选择距离光源最近的交点的光亮度作为全局该着色点的光亮度。S5: The Master node selects the brightness of the intersection closest to the light source as the global brightness of the colored point according to the received coloring calculation information of each Slave node.
在绘制阶段,master节点负责将eye rays发送到所有slave节点,在每个slave节点上计算光线和场景交点,并在该交点处做光子收集,计算该点的光亮度值,然后每个slave节点将交点位置和交点的光亮度值返回给master节点,master节点选择离视点最近的交点和对应的光亮度值,作为某个采样点的光亮度值,直到所有eye rays计算完成。In the drawing phase, the master node is responsible for sending eye rays to all slave nodes, calculating the intersection of light and scene on each slave node, and collecting photons at the intersection, calculating the brightness value of the point, and then each slave node The intersection position and the brightness value of the intersection are returned to the master node. The master node selects the intersection closest to the viewpoint and the corresponding brightness value as the brightness value of a sampling point until all eye rays calculations are completed.
在本实施例的步骤S1中,所述几何场景信息包括多边形的顶点信息、多边形的唯一标识和该多边形相邻多边形的唯一标识。In step S1 of this embodiment, the geometric scene information includes vertex information of a polygon, a unique identifier of the polygon, and a unique identifier of adjacent polygons of the polygon.
在本实施例的步骤S1中,所述Master节点进行场景划分的具体步骤包括:In step S1 of this embodiment, the specific steps of scene division by the Master node include:
根据场景图像的俯视图,得到场景的轮廓坐标信息;Obtain the contour coordinate information of the scene according to the top view of the scene image;
根据Slave节点的数目,将场景图像划分成相应的N份;According to the number of Slave nodes, divide the scene image into corresponding N parts;
保证场景分割线总和最短和每块划分后的场景子区域面积差最小。Ensure that the sum of the segmentation lines of the scene is the shortest and the area difference of the sub-regions of each divided scene is the smallest.
在本实施例的步骤S1中,所述将场景图像划分成相应的N份的具体步骤包括:In step S1 of this embodiment, the specific step of dividing the scene image into corresponding N parts includes:
假设场景的外轮廓多边形划分成N份,根据外轮廓多边形的面积,计算目标子多边形面积;Assuming that the outer contour polygon of the scene is divided into N parts, the area of the target sub-polygon is calculated according to the area of the outer contour polygon;
场景的外轮廓多边形一分为二,其中一个面积为目标子多边形面积;迭代使用相同的方法将另一个子多边形分割,直至分割的所有子多边形面积接近目标子多边形面积;The outer contour polygon of the scene is divided into two, and one area is the target subpolygon area; iteratively use the same method to divide the other subpolygon until the area of all the subpolygons divided is close to the target subpolygon area;
确定最短的场景分割线。Determine the shortest scene dividing line.
在本实施例的步骤S2中,所述各个Slave节点读取场景的子区域的具体步骤包括:In step S2 of this embodiment, the specific steps for each slave node to read the sub-areas of the scene include:
采用分布式加载场景的子区域中物体,采用SAH策略构建场景k-d树,在本节点内部生成属于本区域范围内的光子图。Distributed loading of objects in the sub-region of the scene is adopted, and the SAH strategy is used to construct the scene k-d tree, and a photon graph belonging to the region is generated inside the node.
在场景划分和加载阶段,master节点将场景外轮廓按照上述的划分方法划分成N份,将划分后的几何边界信息发送给每个slave节点。划分之后的多边形需要记录以下信息:多边形的顶点信息,记录该信息是为了在slave节点加载物体的时候,判断场景内的某个物体是否属于该多边形。该多边形的相邻的多边形的唯一标识也要记录,因为只有相邻区域对应的slave节点才进行通信。除此之外,该多边形的唯一标识也需要记录。In the scene division and loading stage, the master node divides the scene outline into N parts according to the above division method, and sends the divided geometric boundary information to each slave node. The divided polygon needs to record the following information: the vertex information of the polygon. This information is recorded to determine whether an object in the scene belongs to the polygon when the object is loaded on the slave node. The unique identifiers of the adjacent polygons of the polygon should also be recorded, because only the slave nodes corresponding to the adjacent areas can communicate. In addition, the unique identification of the polygon also needs to be recorded.
场景划分和加载部分为以下几个步骤The scene division and loading part are the following steps
步骤(1.1):找配对边Step (1.1): Find the matching side
对于给定场景的外轮廓多边形,假设需要把这个多边形分成N份,本文使用分而治之算法:计算外轮廓多边形的面积为A poly,因而,每个待划分的目标子多边形A tar的面积为: For the outer contour polygon of a given scene, suppose the polygon needs to be divided into N parts. This article uses the divide-and-conquer algorithm: calculate the area of the outer contour polygon as A poly , therefore, the area of each target sub-polygon A tar to be divided is:
Figure PCTCN2019123404-appb-000001
Figure PCTCN2019123404-appb-000001
针对初始多边形,首先把这个多边形分成两个,小的一个的面积A small为: For the initial polygon, first divide this polygon into two, the area of the smaller one A small is:
Figure PCTCN2019123404-appb-000002
Figure PCTCN2019123404-appb-000002
较大的那个多边形的面积A big为: The area A big of the larger polygon is:
Figure PCTCN2019123404-appb-000003
Figure PCTCN2019123404-appb-000003
迭代使用相同的方法将较大的那个多边形分割,直到分割的多边形面积符合公式(1)的要求.Iteratively use the same method to divide the larger polygon until the area of the divided polygon meets the requirements of formula (1).
步骤(1.2):确定分割线Step (1.2): Determine the dividing line
分割线肯定是从多边形的一条边开始,从多边形的另一条边结束。例如,在4条边的多边形中边与边的组合有6种可能。所以可能有一条潜在分割边(potential cut)。如图1,举出了2条潜在分割边c1,c2。对于所有的潜在分割边,本文选择一条最短的。The dividing line must start on one side of the polygon and end on the other side of the polygon. For example, there are 6 possible combinations of edges and edges in a 4-sided polygon. So there may be a potential cut. As shown in Figure 1, there are two potential split edges c1, c2. For all potential split edges, this article chooses the shortest one.
不失一般性,以图2(a)和图2(b)中的四边形为例,选择AD和BC为分割线顶点所在的边,第一步,确定边AD和边BC组成的角平分线,如图2(a)和图2(b)虚线,标记为m。第二步,四个顶点分别沿着垂直于角平分线m的方向,向相对边上做投影,如果投影点未落在相对边的线段上,则忽略该投影点。例如,在图3中,B的投影顶点是G,D的投影点是H。沿着与角平分线m垂直的方向投影A点,发现其投影点并不位于边BC上,所以顶点A被忽略。相同的论点适用于点C。四个顶点的有效投影点是G和H。第三步,将顶点B和D连接到它们对应的有效投影点G和H,形成了三角形AGB,DCH和梯形GDHB的组合。第四步,若边AD和边BC上存在最小分割线,则必须位于这两个三角形或梯形中。要找出最小分割线的位置,可以进行简单的区域检查。例如,A AGB是左三角形的面积,A GDHB是梯形的面积,A DCH是右边三角形的面积。最小的分割线所在位置有三种情况: Without loss of generality, take the quadrilateral in Figure 2(a) and Figure 2(b) as an example, choose AD and BC as the edge where the vertices of the dividing line are located. The first step is to determine the angle bisector formed by edge AD and edge BC , As shown in Figure 2 (a) and Figure 2 (b) dotted line, marked as m. In the second step, the four vertices are respectively projected on the opposite side along the direction perpendicular to the angle bisector m. If the projection point does not fall on the line segment of the opposite side, the projection point is ignored. For example, in Figure 3, the projection vertex of B is G, and the projection point of D is H. Project A along the direction perpendicular to the angle bisector m, and find that its projection point is not on the side BC, so vertex A is ignored. The same argument applies to point C. The effective projection points of the four vertices are G and H. The third step is to connect vertices B and D to their corresponding effective projection points G and H, forming a combination of triangles AGB, DCH and trapezoid GDHB. In the fourth step, if there is a minimum dividing line on side AD and side BC, they must be located in these two triangles or trapezoids. To find the position of the smallest dividing line, a simple area check can be performed. For example, A AGB is the area of the left triangle, A GDHB is the area of the trapezoid, and A DCH is the area of the right triangle. There are three situations where the smallest dividing line is located:
第一种情况,如果
Figure PCTCN2019123404-appb-000004
那么最小分割线在三角形中,如图4。分割线的一端与B点重合,分割线的另一端可以通过基于目标区域点A和G的线性插值得到。目标区域的面积是
Figure PCTCN2019123404-appb-000005
分割线另一个端点可以通过公式(4)线性插值得到:
In the first case, if
Figure PCTCN2019123404-appb-000004
Then the minimum dividing line is in the triangle, as shown in Figure 4. One end of the dividing line coincides with point B, and the other end of the dividing line can be obtained by linear interpolation based on points A and G in the target area. The area of the target area is
Figure PCTCN2019123404-appb-000005
The other end of the dividing line can be obtained by linear interpolation by formula (4):
Figure PCTCN2019123404-appb-000006
Figure PCTCN2019123404-appb-000006
第二种情况,如果
Figure PCTCN2019123404-appb-000007
Figure PCTCN2019123404-appb-000008
那么最小分割线在梯形中,如图5。分割线的两个顶点可以根据目标区域的面积大小进行移动。如果分割线需要最短的话,那么分割线的角度必须总是垂直于边AD和边BC的角平分线m。分割线的一端是G和D的线性插值。分割线的另一端是B和H的线性插值。
In the second case, if
Figure PCTCN2019123404-appb-000007
And
Figure PCTCN2019123404-appb-000008
Then the minimum dividing line is in the trapezoid, as shown in Figure 5. The two vertices of the dividing line can be moved according to the size of the target area. If the dividing line needs to be the shortest, then the angle of the dividing line must always be perpendicular to the angle bisector m of side AD and side BC. One end of the dividing line is the linear interpolation of G and D. The other end of the dividing line is the linear interpolation of B and H.
第三种情况,如果
Figure PCTCN2019123404-appb-000009
那么最小分割线在右三角形中。
The third case, if
Figure PCTCN2019123404-appb-000009
Then the smallest dividing line is in the right triangle.
当分割线是位于梯形中的时候,分割线一定会垂直于边AD和边BC的角平分线m,可以通过创建一个梯形来进行几何验证,其中平行边与角平分线成α角。这个梯形的面积可以表示为α的函数。为了使分割线最短,本文取该区域的导数,并且可以证明,对于给定区域,α必须等于90度。When the dividing line is in a trapezoid, the dividing line must be perpendicular to the angle bisector m of side AD and side BC. Geometric verification can be done by creating a trapezoid, where the parallel side and the angle bisector form an angle α. The area of this trapezoid can be expressed as a function of α. In order to make the dividing line the shortest, this article takes the derivative of the area, and it can be proved that for a given area, α must be equal to 90 degrees.
划分完场景后,每个slave节点开始读入划分子场景的几何信息和光源信息,由于场景文件一般比较大,对于有些场景文件来说甚至可以达到几十G,此时,内存一次性加载不开。所以采用分布式加载xml中物体的方式。当每个slave节点将场景内相关的物体加载进来之后,使用SAH策略开始构建场景k-d树,由于每个slave节点也加载了光源信息,所以可以在本节点内部生成属于本区域范围内的光子图。由于每个节点不需要存储全局的光子,只需要存储本区域的,所以减少了光子存储的内存压力。After the scene is divided, each slave node starts to read the geometric information and light source information of the divided sub-scene. Because the scene file is generally large, it can even reach dozens of G for some scene files. At this time, the memory cannot be loaded at one time. open. Therefore, a distributed method of loading objects in xml is adopted. When each slave node loads related objects in the scene, it uses SAH strategy to start building the scene kd tree. Since each slave node also loads the light source information, the photon graph belonging to the area can be generated inside the node. . Since each node does not need to store the global photons, it only needs to store the local photons, so the memory pressure of photon storage is reduced.
在本实施例的步骤S3中,所述每个Slave节点在本节点内进行光子追踪求交检测。In step S3 of this embodiment, each Slave node performs photon tracking and intersection detection in its own node.
一个节点中的光子图中的光子包括本区域发射的光子和从相邻节点通过虚拟portal传输过来的光子。光子在场景内传输,当光子碰到漫反射(diffuse)表面的时候,就会被存储到光子图中。由于每个节点加载其中一个子区域,因此,每个节点都有属于本区域范围内的光子图,该光子图只需要存储在本节点所加载场景的光子,并不需要存储整个场景中的光子,因此,大大减少了内存压力。The photons in the photon graph of a node include the photons emitted from the area and the photons transmitted from the neighboring nodes through the virtual portal. The photon travels in the scene, and when the photon hits the diffuse surface, it will be stored in the photon map. Since each node loads one of the sub-regions, each node has a photon map belonging to the region. The photon map only needs to store the photons of the scene loaded by the node, and does not need to store the photons in the entire scene Therefore, the memory pressure is greatly reduced.
光子发射阶段,具体如下,由于每个节点加载了属于每个节点范围内的光源,所以在每个节点上,光子从本节点的光源发射,并在本节点内进行求交检测。由于每个节点只加载了场景的一个子区域,当进行求交检测的时候,本文只需要考虑子区域中的几何,因此,求交检测的效率会大大提高。The photon emission stage is specifically as follows. Since each node is loaded with a light source within the range of each node, at each node, photons are emitted from the light source of this node, and intersection detection is performed in this node. Since each node only loads a sub-region of the scene, when performing intersection detection, this article only needs to consider the geometry in the sub-region. Therefore, the efficiency of intersection detection will be greatly improved.
当光子在场景内传输期间,光子可能会撞击到不同的表面,当光子撞击到场景内的这些物体表面时,使用俄罗斯轮盘来决定它是否会被反射,继续传播或者被吸收。然而,当光子到达插入的虚拟portal的时候,它并不会反射或者被吸收,而是会被存储到一个特定的数据结构中。这个数据结构负责存储所有撞击到这个虚拟portal的光子。存储这些光子的数组的大小本文给了一个固定值MAX_TEMP_PHOTONS,本文当这个数据结构的光子数量达到这个固定值的时候,就激活相邻区域,将数据结构中的光子传输到相邻区域对应的节点中。当光子传输到相邻区域的节点时,这些光子开始和相邻区域内的物体进行求交运算,像从光源发射的光子一样。当节点没有计算任务的时候,本文此时会再次检测虚拟portal上面的光子数量。此时,即使虚拟portal上面的光子的数量由于没有达到MAX_TEMP_PHOTONS,这些虚拟portal上面的光子也会被全部传输到相邻区域,减少了光子损失,提高了准确率。When the photon travels in the scene, the photon may hit different surfaces. When the photon hits the surface of these objects in the scene, the Russian wheel is used to determine whether it will be reflected, continue to propagate or be absorbed. However, when the photon reaches the inserted virtual portal, it will not be reflected or absorbed, but will be stored in a specific data structure. This data structure is responsible for storing all photons that hit this virtual portal. The size of the array storing these photons is given in this article a fixed value MAX_TEMP_PHOTONS. When the number of photons in this data structure reaches this fixed value, the adjacent area is activated and the photons in the data structure are transmitted to the node corresponding to the adjacent area. in. When photons are transmitted to nodes in adjacent areas, these photons begin to intersect objects in the adjacent area, just like photons emitted from a light source. When the node has no computing tasks, this article will detect the number of photons on the virtual portal again at this time. At this time, even if the number of photons on the virtual portal does not reach MAX_TEMP_PHOTONS, all the photons on the virtual portal will be transmitted to the adjacent area, reducing the photon loss and improving the accuracy.
光子在场景内传输,当光子碰到漫反射(diffuse)表面的时候,光子就会被存储到相关数据结构中。一旦光子在场景的子区域中传输完毕,该子区域中的存储的光子就会被组织成k-d树,用来构建光子图,由于每个节点加载其中一个子区域,因此,每个节点都有属于本区域范围内的光子图,该光子图只需要存储在本节点所加载场景的光子,并不需要存储整个场景中的光子,因此,每棵k-d树的层次会大大减少,当使用k近邻算法计算搜索半径内的着色点的光亮度的时候,将会变得更高效,而且这大大减少了内存压力。The photon travels in the scene. When the photon hits the diffuse surface, the photon will be stored in the relevant data structure. Once the photons are transmitted in the sub-region of the scene, the stored photons in the sub-region will be organized into a kd tree to build a photon graph. Since each node loads one of the sub-regions, each node has It belongs to the photon graph within this area. The photon graph only needs to store the photons in the scene loaded by this node, and does not need to store the photons in the entire scene. Therefore, the level of each kd tree will be greatly reduced. When using k nearest neighbors When the algorithm calculates the brightness of the colored points within the search radius, it will become more efficient, and this greatly reduces the memory pressure.
在本实施例的步骤S4中,所述每个Slave节点进行该场景子区域的着色计算,在场景分割线附近,采用overlapped k-d树存储光子,从屏幕空间发射光线,记录光线与几何相交的着色点,通过光子图进行光子收集计算出该着色点的辐射亮度,并完成着色计算,具体步骤包括:In step S4 of this embodiment, each Slave node performs the coloring calculation of the scene sub-region. Near the scene dividing line, an overlapped kd tree is used to store photons, light is emitted from the screen space, and the coloring of the intersection of light and geometry is recorded To calculate the radiance of the colored point by collecting photons through the photon graph, and complete the coloring calculation, the specific steps include:
设定光子收集搜索半径;Set the photon collection search radius;
当着色点和虚拟portal距离大于等于搜索半径时,着色点的光亮度为该节点内部的光子图计算出的辐射亮度;When the distance between the shading point and the virtual portal is greater than or equal to the search radius, the brightness of the shading point is the radiance calculated from the photon graph inside the node;
当着色点和虚拟portal距离小于搜索半径时,访问相邻分割区域的光子,采用overlapped k-d树组织光子图,将划分区域边界处的光子重复存储到临近区域的节点上,着色点的光亮度为检测节点内部光子图中的光子图计算出的辐射亮度。When the distance between the shaded point and the virtual portal is less than the search radius, visit the photons in the adjacent segmented area, use the overlapped kd tree to organize the photon graph, and store the photons at the boundary of the segmented area repeatedly to the nodes in the adjacent area. The brightness of the colored point is Detect the radiance calculated from the photon graph in the photon graph inside the node.
本发明使用overlapped k-d树存储光子在解决边界处着色点跨界点收集光子的问题,采用overlapped k-d树。在场景分割线区域设定一个范围,本文将该范围设定为光子收集搜索半径,将这个范围作为重叠(overlapped)区域。光子发射之后的光子如果落在该边界范围内,则将该光子需要在相邻区域节点均存储。具体做法是,对于每一个光子来说,分别在x轴、y轴和z轴方向计算这个光子与分割平面的距离,如果该光子与x轴、y轴、z轴的距离都小于搜索半径的话,那该光子就需要被发送到相邻区域,在相邻区域进行进一步的传输,就像从光源发射的光子一样。通过将划分区域边界处的光子重复存储到临近区域的节点上, 在对某个着色点求光亮度的时候,只需要检测节点内部光子图中的光子,没有通信代价,提高了计算效率。The present invention uses an overlapped k-d tree to store photons to solve the problem of collecting photons at the coloring point and cross-border point at the boundary, and adopts an overlapped k-d tree. Set a range in the scene dividing line area. This article sets this range as the photon collection search radius, and this range is regarded as an overlapped area. If the photon after the photon emission falls within the boundary range, the photon needs to be stored in the adjacent area nodes. The specific method is to calculate the distance between the photon and the dividing plane in the x-axis, y-axis, and z-axis directions for each photon. If the distance between the photon and the x-axis, y-axis, and z-axis is less than the search radius , Then the photon needs to be sent to the adjacent area for further transmission in the adjacent area, just like the photon emitted from the light source. By repeatedly storing the photons at the boundary of the divided area to the nodes in the adjacent area, when calculating the brightness of a certain coloring point, only the photons in the photon graph inside the node need to be detected, and there is no communication cost, which improves the calculation efficiency.
光子收集阶段,每个节点也只是负责一个场景子区域的着色计算,最后将着色计算信息发送到master节点上面,让master节点选择距离光源最近的交点的光亮度作为全局该着色点的光亮度。在进行光估计的过程中,从屏幕空间发射光线,记录光线与几何相交的着色点,通过光子图进行光子收集计算出该着色点的辐射亮度,并完成着色计算。在相交点使用k近邻搜索周围的光子来估计相交点的光亮度,此时需要确定搜索半径。给定一个搜索半径,对于远离虚拟portal处的相交点,使用该节点内部的光子图计算出的辐射亮度就是该点的光亮度。但是针对节点内区域边界处的着色点,即当着色点和虚拟portal距离小于搜索半径时,这个时候就会造成光照的不连续性,因此,需要访问相邻分割区域的光子。本发明使用overlapped k-d tree解决该问题,如图6。具体做法是,对于每一个光子来说,分别在x轴、y轴和z轴方向计算这个光子与分割平面的距离,如果该光子与x轴、y轴、z轴的距离都小于搜索半径的话,那该光子就需要被发送到相邻区域,在相邻区域进行进一步的传输,就像从光源发射的光子一样。如图7,虚线与分割线之间的就是overlapped区域。为了能够使用k-近邻算法快速定位屏幕空间发射出的光线与场景相交点半径范围内的光子,本文使用k-d树组织光子图。通过将划分区域边界处的光子重复存储到临近区域的节点上,在对某个着色点求光亮度的时候,只需要检测节点内部光子图中的光子,没有通信代价,提高了计算效率。In the photon collection stage, each node is only responsible for the coloring calculation of a sub-region of the scene. Finally, the coloring calculation information is sent to the master node, and the master node selects the brightness of the intersection closest to the light source as the global brightness of the coloring point. In the process of light estimation, light is emitted from the screen space, and the coloring point where the light intersects the geometry is recorded, and the radiance of the coloring point is calculated by photon graph collection, and the coloring calculation is completed. At the intersection point, use k-nearest neighbors to search the surrounding photons to estimate the brightness of the intersection point. At this time, the search radius needs to be determined. Given a search radius, for the intersection point far away from the virtual portal, the radiance calculated using the photon graph inside the node is the luminosity of the point. However, for the shading point at the boundary of the region within the node, that is, when the distance between the shading point and the virtual portal is less than the search radius, this will cause discontinuity of illumination. Therefore, it is necessary to access the photons of the adjacent divided regions. The present invention uses overlapped k-d tree to solve this problem, as shown in Figure 6. The specific method is to calculate the distance between the photon and the dividing plane in the x-axis, y-axis, and z-axis directions for each photon. If the distance between the photon and the x-axis, y-axis, and z-axis is less than the search radius , Then the photon needs to be sent to the adjacent area for further transmission in the adjacent area, just like the photon emitted from the light source. As shown in Figure 7, the overlapped area is between the dashed line and the dividing line. In order to use the k-nearest neighbor algorithm to quickly locate the photons within the radius of the intersection point between the light emitted by the screen space and the scene, this paper uses the k-d tree to organize the photon graph. By repeatedly storing the photons at the boundary of the divided area on the nodes in the adjacent area, when calculating the brightness of a coloring point, only the photons in the photon graph inside the node need to be detected, and there is no communication cost, which improves the calculation efficiency.
本实施例可以扩展到128个节点,并且无论是凸外轮廓还是凹外轮廓都可以适用,充分解决了展馆类场景的渲染时间和内存瓶颈问题。不仅如此,本发明场景划分算法和基于kd树的划分算法相比较,在同样数目节点情况下,本文提出的划分方法所用的光子发射时间要小于基于kd树方法的光子发射时间,在超过8个节点时,本文方法相对于kd树划分方法,速度提升了1.5倍以上。This embodiment can be extended to 128 nodes, and can be applied to both convex and concave outer contours, which fully solves the problem of rendering time and memory bottleneck in exhibition hall scenes. Not only that, the scene division algorithm of the present invention is compared with the kd tree-based division algorithm. Under the same number of nodes, the photon emission time used by the division method proposed in this paper is shorter than the photon emission time based on the kd tree method. Compared with the kd tree division method, the speed of this method is increased by more than 1.5 times.
实施例二Example two
根据本公开的一个或多个实施例的一个方面,提供一种基于多边形空间划分的光子映射优化系统。According to an aspect of one or more embodiments of the present disclosure, a photon mapping optimization system based on polygonal space division is provided.
一种基于多边形空间划分的光子映射优化系统,基于实施例一种所述的一种基于多边形空间划分的光子映射优化方法,该系统包括:Master节点和与其连接的若干Slave节点;A photon mapping optimization system based on polygonal space division, and the photon mapping optimization method based on polygonal space division described in the embodiment, the system includes: a Master node and several slave nodes connected to it;
Master节点接收场景图像,进行场景划分,得到几何边界信息,在分割线处插入虚拟portal,并分别发送至各个Slave节点;The Master node receives the scene image, divides the scene, obtains the geometric boundary information, inserts a virtual portal at the dividing line, and sends it to each slave node respectively;
各个Slave节点读取场景的子区域;Each Slave node reads the sub-areas of the scene;
对每个Slave节点,光子从本节点内部的光源发射,到达本节点区域边界的虚拟portal时存储到数据结构中,并在光子数量到达阈值时将光子传输至相邻区域对应节点;For each Slave node, photons are emitted from the light source inside the node, stored in the data structure when they reach the virtual portal of the node area boundary, and transmitted to the corresponding node in the adjacent area when the number of photons reaches the threshold;
每个Slave节点进行该场景子区域的着色计算,并将着色计算信息发送至Master节点;Each Slave node performs the coloring calculation of the scene sub-area, and sends the coloring calculation information to the Master node;
Master节点根据接收的各Slave节点的着色计算信息,选择距离光源最近的交点的光亮度作为全局该着色点的光亮度。The Master node selects the brightness of the intersection closest to the light source as the global brightness of the colored point according to the received coloring calculation information of each Slave node.
根据本公开的一个或多个实施例的一个方面,提供一种基于多边形空间划分的光子映射优化方法。According to an aspect of one or more embodiments of the present disclosure, a photon mapping optimization method based on polygonal space division is provided.
一种基于多边形空间划分的光子映射优化方法,在Master节点中实现,该方法包括:A photon mapping optimization method based on polygon space division, implemented in the Master node, the method includes:
Master节点接收场景图像,进行场景划分,得到几何边界信息,在分割线处插入虚拟portal,并分别发送至各个Slave节点;The Master node receives the scene image, divides the scene, obtains the geometric boundary information, inserts a virtual portal at the dividing line, and sends it to each slave node respectively;
Master节点根据接收的各Slave节点的着色计算信息,选择距离光源最近的交点的光亮度作为全局该着色点的光亮度。The Master node selects the brightness of the intersection closest to the light source as the global brightness of the colored point according to the received coloring calculation information of each Slave node.
进一步地,在该方法中,所述几何场景信息包括多边形的顶点信息、多边形的唯一标识和该多边形相邻多边形的唯一标识。Further, in this method, the geometric scene information includes vertex information of a polygon, a unique identifier of the polygon, and a unique identifier of adjacent polygons of the polygon.
进一步地,在该方法中,所述Master节点进行场景划分的具体步骤包括:Further, in this method, the specific steps of the scene division by the Master node include:
根据场景图像的俯视图,得到场景的轮廓坐标信息;Obtain the contour coordinate information of the scene according to the top view of the scene image;
根据Slave节点的数目,将场景图像划分成相应的N份;According to the number of Slave nodes, divide the scene image into corresponding N parts;
保证场景分割线总和最短和每块划分后的场景子区域面积差最小。Ensure that the sum of the segmentation lines of the scene is the shortest and the area difference of the sub-regions of each divided scene is the smallest.
进一步地,在该方法中,所述将场景图像划分成相应的N份的具体步骤包括:Further, in the method, the specific step of dividing the scene image into corresponding N parts includes:
假设场景的外轮廓多边形划分成N份,根据外轮廓多边形的面积,计算目标子多边形面积;Assuming that the outer contour polygon of the scene is divided into N parts, the area of the target sub-polygon is calculated according to the area of the outer contour polygon;
场景的外轮廓多边形一分为二,其中一个面积为目标子多边形面积;迭代使用相同的方法将另一个子多边形分割,直至分割的所有子多边形面积接近目标子多边形面积;The outer contour polygon of the scene is divided into two, and one area is the target subpolygon area; iteratively use the same method to divide the other subpolygon until the area of all the subpolygons divided is close to the target subpolygon area;
确定最短的场景分割线。Determine the shortest scene dividing line.
根据本公开的一个或多个实施例的一个方面,提供一种计算机可读存储介质。According to an aspect of one or more embodiments of the present disclosure, a computer-readable storage medium is provided.
一种计算机可读存储介质,其中存储有多条指令,所述指令适于由电子设备的处理器加载并执行所述的一种基于多边形空间划分的光子映射优化方法。A computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor of an electronic device and executing the method for optimizing photon mapping based on polygonal space division.
根据本公开的一个或多个实施例的一个方面,提供一种电子设备。According to an aspect of one or more embodiments of the present disclosure, an electronic device is provided.
一种电子设备,其包括处理器和计算机可读存储介质,处理器用于实现各指令;计算机可读存储介质用于存储多条指令,所述指令适于由处理器加载并执行所述的一种基于多边形空间划分的光子映射优化方法。An electronic device including a processor and a computer-readable storage medium, the processor is used to implement each instruction; the computer-readable storage medium is used to store a plurality of instructions, the instruction is suitable for being loaded by the processor and executed A photon mapping optimization method based on polygonal space division.
根据本公开的一个或多个实施例的一个方面,提供一种基于多边形空间划分的光子映射优化方法。According to an aspect of one or more embodiments of the present disclosure, a photon mapping optimization method based on polygonal space division is provided.
一种基于多边形空间划分的光子映射优化方法,在Slave节点中实现,该方法包括:A photon mapping optimization method based on polygonal space division, implemented in the Slave node, the method includes:
Slave节点读取场景的子区域;The Slave node reads the sub-areas of the scene;
对每个Slave节点,光子从本节点内部的光源发射,到达本节点区域边界的虚拟portal时存储到数据结构中,并在光子数量到达阈值时将光子传输至相邻区域对应节点;For each Slave node, photons are emitted from the light source inside the node, stored in the data structure when they reach the virtual portal of the node area boundary, and transmitted to the corresponding node in the adjacent area when the number of photons reaches the threshold;
每个Slave节点进行该场景子区域的着色计算,并将着色计算信息发送至Master节点。Each Slave node performs the coloring calculation of the sub-region of the scene, and sends the coloring calculation information to the Master node.
进一步地,在该方法中,所述Slave节点读取场景的子区域的具体步骤包括:Further, in this method, the specific steps of the Slave node reading the sub-areas of the scene include:
采用分布式加载场景的子区域中物体,采用SAH策略构建场景k-d树,在本节点内部生成属于本区域范围内的光子图。Distributed loading of objects in the sub-region of the scene is adopted, and the SAH strategy is used to construct the scene k-d tree, and the photon graph belonging to the region is generated inside the node.
进一步地,在该方法中,所述每个Slave节点在本节点内进行光子追踪求交检测。Further, in this method, each Slave node performs photon tracking and intersection detection in its own node.
进一步地,在该方法中,所述每个Slave节点进行该场景子区域的着色计算,在场景分割线附近,采用overlapped k-d树存储光子,从屏幕空间发射光线,记录光线与几何相交的着色点,通过光子图进行光子收集计算出该着色点的辐射亮度,并完成着色计算,具体步骤包括:Further, in this method, each Slave node performs the coloring calculation of the scene subregion, and near the scene division line, an overlapped kd tree is used to store photons, light is emitted from the screen space, and the coloring point where the light intersects the geometry is recorded Calculate the radiance of the colored point by collecting photons through the photon graph, and complete the coloring calculation. The specific steps include:
设定光子收集搜索半径;Set the photon collection search radius;
当着色点和虚拟portal距离大于等于搜索半径时,着色点的光亮度为该节点内部的光子图计算出的辐射亮度;When the distance between the shading point and the virtual portal is greater than or equal to the search radius, the brightness of the shading point is the radiance calculated from the photon graph inside the node;
当着色点和虚拟portal距离小于搜索半径时,访问相邻分割区域的光子,采用overlapped k-d树组织光子图,将划分区域边界处的光子重复存储到临近区域的节点上,着色点的光亮度为检测节点内部光子图中的光子图计算出的辐射亮度。When the distance between the shaded point and the virtual portal is less than the search radius, visit the photons in the adjacent segmented area, use the overlapped kd tree to organize the photon graph, and store the photons at the boundary of the segmented area repeatedly to the nodes in the adjacent area. The brightness of the colored point is Detect the radiance calculated from the photon graph in the photon graph inside the node.
实施例二Example two
根据本公开的一个或多个实施例的一个方面,提供一种计算机可读存储介质。According to an aspect of one or more embodiments of the present disclosure, a computer-readable storage medium is provided.
一种计算机可读存储介质,其中存储有多条指令,所述指令适于由电子设备的处理器加载并执行所述的一种基于多边形空间划分的光子映射优化方法。A computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor of an electronic device and executing the method for optimizing photon mapping based on polygonal space division.
实施例三Example three
根据本公开的一个或多个实施例的一个方面,提供一种电子设备。According to an aspect of one or more embodiments of the present disclosure, an electronic device is provided.
一种电子设备,其包括处理器和计算机可读存储介质,处理器用于实现各指令;计算机可读存储介质用于存储多条指令,所述指令适于由处理器加载并执行所述的一种基于多边形空间划分的光子映射优化方法。An electronic device comprising a processor and a computer-readable storage medium, the processor is used to implement each instruction; the computer-readable storage medium is used to store a plurality of instructions, the instructions are suitable for being loaded by the processor and executing the one A photon mapping optimization method based on polygonal space division.
这些计算机可执行指令在设备中运行时使得该设备执行根据本公开中的各个实施例所描述的方法或过程。When these computer-executable instructions run in the device, the device executes the methods or processes described in the various embodiments of the present disclosure.
在本实施例中,计算机程序产品可以包括计算机可读存储介质,其上载有用于执行本公开的各个方面的计算机可读程序指令。计算机可读存储介质可以是可以保持和存储由指令执行设备使用的指令的有形设备。计算机可读存储介质例如可以是――但不限于――电存储设备、磁存储设备、光存储设备、电磁存储设备、半导体存储设备或者上述的任意合适的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:便携式计算机盘、 硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、静态随机存取存储器(SRAM)、便携式压缩盘只读存储器(CD-ROM)、数字多功能盘(DVD)、记忆棒、软盘、机械编码设备、例如其上存储有指令的打孔卡或凹槽内凸起结构、以及上述的任意合适的组合。这里所使用的计算机可读存储介质不被解释为瞬时信号本身,诸如无线电波或者其他自由传播的电磁波、通过波导或其他传输媒介传播的电磁波(例如,通过光纤电缆的光脉冲)、或者通过电线传输的电信号。In this embodiment, the computer program product may include a computer-readable storage medium, which carries computer-readable program instructions for executing various aspects of the present disclosure. The computer-readable storage medium may be a tangible device that can hold and store instructions used by the instruction execution device. The computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples (non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM) Or flash memory), static random access memory (SRAM), portable compact disk read-only memory (CD-ROM), digital versatile disk (DVD), memory stick, floppy disk, mechanical encoding device, such as a printer with instructions stored thereon The protruding structure in the hole card or the groove, and any suitable combination of the above. The computer-readable storage medium used here is not interpreted as a transient signal itself, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (for example, light pulses through fiber optic cables), or through wires Transmission of electrical signals.
本文所描述的计算机可读程序指令可以从计算机可读存储介质下载到各个计算/处理设备,或者通过网络、例如因特网、局域网、广域网和/或无线网下载到外部计算机或外部存储设备。网络可以包括铜传输电缆、光纤传输、无线传输、路由器、防火墙、交换机、网关计算机和/或边缘服务器。每个计算/处理设备中的网络适配卡或者网络接口从网络接收计算机可读程序指令,并转发该计算机可读程序指令,以供存储在各个计算/处理设备中的计算机可读存储介质中。The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to various computing/processing devices, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, optical fiber transmission, wireless transmission, routers, firewalls, switches, gateway computers, and/or edge servers. The network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network, and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing/processing device .
用于执行本公开内容操作的计算机程序指令可以是汇编指令、指令集架构(ISA)指令、机器指令、机器相关指令、微代码、固件指令、状态设置数据、或者以一种或多种编程语言的任意组合编写的源代码或目标代码,所述编程语言包括面向对象的编程语言—诸如C++等,以及常规的过程式编程语言—诸如“C”语言或类似的编程语言。计算机可读程序指令可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络—包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。在一些实施例中,通过利用计算机可读程序指令的状态信息来个性化定制电子电路,例如可编程逻辑电路、现场可编程门阵列(FPGA)或可编程逻辑阵列(PLA),该电子电路可以执行计算机可读程序指令,从而实现本公开内容的各个方面。The computer program instructions used to perform the operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or in one or more programming languages Source code or object code written in any combination of, the programming language includes object-oriented programming languages-such as C++, etc., and conventional procedural programming languages-such as "C" language or similar programming languages. Computer readable program instructions can be executed entirely on the user's computer, partly on the user's computer, executed as an independent software package, partly on the user's computer and partly executed on a remote computer, or entirely on the remote computer or server carried out. In the case of a remote computer, the remote computer can be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (for example, using an Internet service provider to access the Internet connection). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), can be customized by using the status information of the computer-readable program instructions. The computer-readable program instructions are executed to implement various aspects of the present disclosure.
本公开的有益效果是:The beneficial effects of the present disclosure are:
(1)、随着节点数目的增加,本文方法误差范围都是在比较小的范围内,且在用户视觉上无明显偏差。(1) With the increase of the number of nodes, the error range of the method in this paper is in a relatively small range, and there is no obvious deviation in the user's vision.
(2)、在光子发射阶段,由于是多个节点并行发射光子,所以当节点数目增加时,光子发射时间越来越短。因为多个节点并行发射光子分担了总体任务量,即使是有通信时间的影响,但是发射光子所耗费的时间依旧越来越短。但是从并行效率来看,无论是发射2000万光子、3600万光子还是6000万光子,并行效率随着节点数目的增加有所降低。原因是随着节点数量的增加,节点之间的通信开销会逐渐增加,从而导致并行效率降低。即使是多边形外轮廓为凹边形的情况下,也是同样的规律。因此,无论外轮廓是凸多边形还是凹多边形, 本文算法都可以有效扩展到128个节点,且并行效率在20%以上。因此,本文算法既可以适用于外轮廓为凸多边形的展馆类场景,也适用于外轮廓为凹多边形的展馆类场景。(2) During the photon emission stage, since multiple nodes emit photons in parallel, as the number of nodes increases, the photon emission time becomes shorter and shorter. Because multiple nodes emit photons in parallel to share the overall task load, even if it is affected by communication time, the time it takes to emit photons is still getting shorter and shorter. But from the perspective of parallel efficiency, whether 20 million photons, 36 million photons or 60 million photons are emitted, the parallel efficiency decreases with the increase in the number of nodes. The reason is that as the number of nodes increases, the communication overhead between nodes will gradually increase, resulting in a decrease in parallel efficiency. Even when the outer contour of the polygon is concave, the same rules apply. Therefore, no matter the outer contour is convex polygon or concave polygon, the algorithm in this paper can be effectively extended to 128 nodes, and the parallel efficiency is above 20%. Therefore, the algorithm in this paper can be applied to exhibition hall scenes whose outer contour is convex polygon, as well as exhibition hall scenes whose outer contour is concave polygon.
(3)在绘制阶段,本论文采用的是1个master节点多个slave节点的主从加速并行模式,master节点负责发射eye ray,这些eye ray会分别发送到其他每个slave节点,在每个slave节点上面,eye ray会和从节点加载的每部分场景进行求交测试,产生hit points,使用k近邻算法求出每个hit point处的光亮度,并将交点和该交点的光估计值返回给master节点,在master节点上面选出与视点最近的交点,并将该交点的光估计值作为该像素的光估计值。所以对于绘制阶段,降低master节点与slave节点之间的通信开销是主要的问题。使用4个节点,发射25万光子,每个像素8个采样点,绘制阶段所用的时间是52.2405min,当把节点增加到32个的时候,绘制阶段所用的时间为55.9685min,通信时间增加了3.728min,说明随着节点的增长,绘制阶段并没有耗费太多通信时间,故本文方法在绘制阶段具有很好的扩展性。(3) In the drawing stage, this paper adopts a master-slave accelerated parallel mode with one master node and multiple slave nodes. The master node is responsible for emitting eye rays. These eye rays will be sent to each other slave node separately. On the slave node, eye ray will conduct an intersection test with each part of the scene loaded from the node, generate hit points, use the k-nearest neighbor algorithm to find the brightness of each hit point, and return the intersection point and the light estimation value of the intersection point For the master node, select the closest intersection point to the viewpoint on the master node, and use the light estimation value of the intersection point as the light estimation value of the pixel. Therefore, for the drawing stage, reducing the communication overhead between the master node and the slave node is the main problem. Using 4 nodes, emitting 250,000 photons, 8 sampling points per pixel, the time used in the drawing phase is 52.2405min, when the number of nodes is increased to 32, the time used in the drawing phase is 55.9685min, and the communication time is increased 3.728min, which shows that with the growth of nodes, the drawing phase does not consume too much communication time, so the method in this paper has good scalability in the drawing phase.
(4)在同样数目节点情况下,本文提出的划分方法所用的光子发射时间要小于基于K-d树划分方法的光子发射时间,在超过8个节点时,本文方法相对于基于k-d树划分方法,速度提升了1.5倍以上。这说明在光子发射阶段,光子撞击到虚拟portal的数量要比基于k-d树划分方法中的数量要少,降低传输成本。(4) In the case of the same number of nodes, the photon emission time used by the division method proposed in this paper is shorter than the photon emission time based on the Kd tree division method. When there are more than 8 nodes, this method is faster than the kd tree division method. Improved by more than 1.5 times. This shows that in the photon emission stage, the number of photons hitting the virtual portal is less than that based on the k-d tree division method, which reduces the transmission cost.
(5)在不同节点数目下,将场景外轮廓边数由8条边增加到100条边的时候,光子发射时间均没有明显增加。这是因为虽然场景复杂度变多,但是场景里面物体数量以及划分场景的分割线长度并没有变化很多,导致光子发射时间变化没有那么明显。这说明多节点成功分担了每一次场景增加的复杂度,该分布式架构适用于具有复杂外轮廓的场景的绘制。(5) Under different number of nodes, when the number of edges of the outline of the scene is increased from 8 edges to 100 edges, the photon emission time does not increase significantly. This is because although the complexity of the scene has increased, the number of objects in the scene and the length of the dividing line dividing the scene have not changed much, resulting in less obvious changes in the photon emission time. This shows that multiple nodes successfully share the increased complexity of each scene, and the distributed architecture is suitable for drawing scenes with complex outer contours.
以上所述仅为本申请的优选实施例而已,并不用于限制本申请,对于本领域的技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。因此,本公开将不会被限制于本文所示的这些实施例,而是要符合与本文所公开的原理和新颖特点相一致的最宽的范围。The foregoing descriptions are only preferred embodiments of the application, and are not used to limit the application. For those skilled in the art, the application can have various modifications and changes. Any modification, equivalent replacement, improvement, etc., made within the spirit and principle of this application shall be included in the protection scope of this application. Therefore, the present disclosure will not be limited to the embodiments shown in this document, but should conform to the widest scope consistent with the principles and novel features disclosed in this document.

Claims (10)

  1. 一种基于多边形空间划分的光子映射优化方法,其特征在于,该方法包括:A photon mapping optimization method based on polygon space division, characterized in that the method includes:
    Master节点接收场景图像,进行场景划分,得到几何边界信息,在分割线处插入虚拟portal,并分别发送至各个Slave节点;The Master node receives the scene image, divides the scene, obtains the geometric boundary information, inserts a virtual portal at the dividing line, and sends it to each slave node respectively;
    各个Slave节点读取场景的子区域;Each Slave node reads the sub-areas of the scene;
    对每个Slave节点,光子从本节点内部的光源发射,到达本节点区域边界的虚拟portal时存储到数据结构中,并在光子数量到达阈值时将光子传输至相邻区域对应节点;For each Slave node, photons are emitted from the light source inside the node, stored in the data structure when they reach the virtual portal of the node area boundary, and transmitted to the corresponding node in the adjacent area when the number of photons reaches the threshold;
    每个Slave节点进行该场景子区域的着色计算,并将着色计算信息发送至Master节点;Each Slave node performs the coloring calculation of the scene sub-region, and sends the coloring calculation information to the Master node;
    Master节点根据接收的各Slave节点的着色计算信息,选择距离光源最近的交点的光亮度作为全局该着色点的光亮度。The Master node selects the brightness of the intersection closest to the light source as the global brightness of the colored point according to the received coloring calculation information of each Slave node.
  2. 如权利要求1所述的一种基于多边形空间划分的光子映射优化方法,其特征在于,在该方法中,所述几何场景信息包括多边形的顶点信息、多边形的唯一标识和该多边形相邻多边形的唯一标识。A photon mapping optimization method based on polygon space division according to claim 1, wherein, in the method, the geometric scene information includes the vertex information of the polygon, the unique identifier of the polygon, and the information of the adjacent polygons of the polygon. Uniquely identifies.
    和/或,在该方法中,所述Master节点进行场景划分的具体步骤包括:And/or, in this method, the specific steps of scene division by the Master node include:
    根据场景图像的俯视图,得到场景的轮廓坐标信息;Obtain the contour coordinate information of the scene according to the top view of the scene image;
    根据Slave节点的数目,将场景图像划分成相应的N份;According to the number of Slave nodes, divide the scene image into corresponding N parts;
    保证场景分割线总和最短和每块划分后的场景子区域面积差最小。Ensure that the sum of the segmentation lines of the scene is the shortest and the area difference of the sub-regions of each divided scene is the smallest.
    和/或,在该方法中,所述将场景图像划分成相应的N份的具体步骤包括:And/or, in the method, the specific step of dividing the scene image into corresponding N parts includes:
    假设场景的外轮廓多边形划分成N份,根据外轮廓多边形的面积,计算目标子多边形面积;Assuming that the outer contour polygon of the scene is divided into N parts, the area of the target sub-polygon is calculated according to the area of the outer contour polygon;
    场景的外轮廓多边形一分为二,其中一个面积为目标子多边形面积;迭代使用相同的方法将另一个子多边形分割,直至分割的所有子多边形面积接近目标子多边形面积;The outer contour polygon of the scene is divided into two, and one area is the target subpolygon area; iteratively use the same method to divide the other subpolygon until the area of all the subpolygons divided is close to the target subpolygon area;
    确定最短的场景分割线。Determine the shortest scene dividing line.
    和/或,在该方法中,所述各个Slave节点读取场景的子区域的具体步骤包括:And/or, in this method, the specific steps of each slave node reading the sub-region of the scene include:
    采用分布式加载场景的子区域中物体,采用SAH策略构建场景k-d树,在本节点内部生成属于本区域范围内的光子图。Distributed loading of objects in the sub-region of the scene is adopted, and the SAH strategy is used to construct the scene k-d tree, and the photon graph belonging to the region is generated inside the node.
    和/或,在该方法中,所述每个Slave节点在本节点内进行光子追踪求交检测。And/or, in this method, each Slave node performs photon tracking and intersection detection in its own node.
    和/或,在该方法中,所述每个Slave节点进行该场景子区域的着色计算,在场景分割线附近,采用overlapped k-d树存储光子,从屏幕空间发射光线,记录光线与几何相交的着色点,通过光子图进行光子收集计算出该着色点的辐射亮度,并完成着色计算,具体步骤包括:And/or, in this method, each Slave node performs the coloring calculation of the scene subregion, and uses an overlapped kd tree to store photons near the scene dividing line, emits light from the screen space, and records the coloring of the intersection of the light and the geometry Point, collect the photon through the photon graph to calculate the radiance of the colored point, and complete the coloring calculation, the specific steps include:
    设定光子收集搜索半径;Set the photon collection search radius;
    当着色点和虚拟portal距离大于等于搜索半径时,着色点的光亮度为该节点内部的光子图计算出的辐射亮度;When the distance between the shading point and the virtual portal is greater than or equal to the search radius, the brightness of the shading point is the radiance calculated by the photon graph inside the node;
    当着色点和虚拟portal距离小于搜索半径时,访问相邻分割区域的光子,采用overlapped k-d树组织光子图,将划分区域边界处的光子重复存储到临近区域的节点上,着色点的光亮度为检测节点内部光子图中的光子图计算出的辐射亮度。When the distance between the shaded point and the virtual portal is less than the search radius, visit the photons in the adjacent segmented area, use the overlapped kd tree to organize the photon graph, and store the photons at the boundary of the segmented area repeatedly to the nodes in the adjacent area. The brightness of the colored point is Detect the radiance calculated from the photon graph in the photon graph inside the node.
  3. 一种基于多边形空间划分的光子映射优化系统,其特征在于,该系统包括:Master节点和与其连接的若干Slave节点;A photon mapping optimization system based on polygonal space division, characterized in that the system includes: a Master node and a number of Slave nodes connected to it;
    Master节点接收场景图像,进行场景划分,得到几何边界信息,在分割线处插入虚拟portal,并分别发送至各个Slave节点;The Master node receives the scene image, divides the scene, obtains the geometric boundary information, inserts a virtual portal at the dividing line, and sends it to each slave node respectively;
    各个Slave节点读取场景的子区域;Each Slave node reads the sub-areas of the scene;
    对每个Slave节点,光子从本节点内部的光源发射,到达本节点区域边界的虚拟portal时存储到数据结构中,并在光子数量到达阈值时将光子传输至相邻区域对应节点;For each Slave node, photons are emitted from the light source inside the node, stored in the data structure when they reach the virtual portal of the node area boundary, and transmitted to the corresponding node in the adjacent area when the number of photons reaches the threshold;
    每个Slave节点进行该场景子区域的着色计算,并将着色计算信息发送至Master节点;Each Slave node performs the coloring calculation of the scene sub-region, and sends the coloring calculation information to the Master node;
    Master节点根据接收的各Slave节点的着色计算信息,选择距离光源最近的交点的光亮度作为全局该着色点的光亮度。The Master node selects the brightness of the intersection closest to the light source as the global brightness of the coloring point according to the received coloring calculation information of each Slave node.
  4. 一种基于多边形空间划分的光子映射优化方法,在Master节点中实现,其特征在于,该方法包括:A photon mapping optimization method based on polygonal space division, implemented in the Master node, is characterized in that the method includes:
    Master节点接收场景图像,进行场景划分,得到几何边界信息,在分割线处插入虚拟portal,并分别发送至各个Slave节点;The Master node receives the scene image, divides the scene, obtains the geometric boundary information, inserts a virtual portal at the dividing line, and sends it to each slave node respectively;
    Master节点根据接收的各Slave节点的着色计算信息,选择距离光源最近的交点的光亮度作为全局该着色点的光亮度。The Master node selects the brightness of the intersection closest to the light source as the global brightness of the coloring point according to the received coloring calculation information of each Slave node.
  5. 如权利要求4所述的一种基于多边形空间划分的光子映射优化方法,其特征在于,在该方法中,所述几何场景信息包括多边形的顶点信息、多边形的唯一标识和该多边形相邻多边形的唯一标识。A photon mapping optimization method based on polygon space division according to claim 4, characterized in that, in the method, the geometric scene information includes the vertex information of the polygon, the unique identifier of the polygon, and the adjacent polygons of the polygon. Uniquely identifies.
    和/或,在该方法中,所述Master节点进行场景划分的具体步骤包括:And/or, in this method, the specific steps of scene division by the Master node include:
    根据场景图像的俯视图,得到场景的轮廓坐标信息;Obtain the contour coordinate information of the scene according to the top view of the scene image;
    根据Slave节点的数目,将场景图像划分成相应的N份;According to the number of slave nodes, divide the scene image into corresponding N parts;
    保证场景分割线总和最短和每块划分后的场景子区域面积差最小。Ensure that the sum of the segmentation lines of the scene is the shortest and the area difference of the sub-regions of each divided scene is the smallest.
    和/或,在该方法中,所述将场景图像划分成相应的N份的具体步骤包括:And/or, in the method, the specific step of dividing the scene image into corresponding N parts includes:
    假设场景的外轮廓多边形划分成N份,根据外轮廓多边形的面积,计算目标子多边形面积;Assuming that the outer contour polygon of the scene is divided into N parts, the area of the target sub-polygon is calculated according to the area of the outer contour polygon;
    场景的外轮廓多边形一分为二,其中一个面积为目标子多边形面积;迭代使用相同的方法将另一个子多边形分割,直至分割的所有子多边形面积接近目标子多边形面积;The outer contour polygon of the scene is divided into two, and one area is the target subpolygon area; iteratively use the same method to divide the other subpolygon until the area of all the subpolygons divided is close to the target subpolygon area;
    确定最短的场景分割线。Determine the shortest scene dividing line.
  6. 一种基于多边形空间划分的光子映射优化方法,在Slave节点中实现,其特征在于,该方法包括:A photon mapping optimization method based on polygonal space division, implemented in the Slave node, characterized in that the method includes:
    Slave节点读取场景的子区域;The Slave node reads the sub-areas of the scene;
    对每个Slave节点,光子从本节点内部的光源发射,到达本节点区域边界的虚拟portal时存储到数据结构中,并在光子数量到达阈值时将光子传输至相邻区域对应节点;For each Slave node, the photon is emitted from the light source inside the node, and stored in the data structure when it reaches the virtual portal at the boundary of the node area, and the photon is transmitted to the corresponding node in the adjacent area when the number of photons reaches the threshold;
    每个Slave节点进行该场景子区域的着色计算,并将着色计算信息发送至Master节点。Each Slave node performs the coloring calculation of the sub-region of the scene, and sends the coloring calculation information to the Master node.
  7. 如权利要求6所述的一种基于多边形空间划分的光子映射优化方法,其特征在于,在该方法中,所述Slave节点读取场景的子区域的具体步骤包括:A photon mapping optimization method based on polygonal space division according to claim 6, wherein, in the method, the specific steps of the Slave node reading the sub-regions of the scene include:
    采用分布式加载场景的子区域中物体,采用SAH策略构建场景k-d树,在本节点内部生成属于本区域范围内的光子图。Distributed loading of objects in the sub-region of the scene is adopted, and the SAH strategy is used to construct the scene k-d tree, and a photon graph belonging to the region is generated inside the node.
    和/或,在该方法中,所述每个Slave节点在本节点内进行光子追踪求交检测。And/or, in this method, each Slave node performs photon tracking and intersection detection in its own node.
  8. 如权利要求6所述的一种基于多边形空间划分的光子映射优化方法,其特征在于,在该方法中,所述每个Slave节点进行该场景子区域的着色计算,在场景分割线附近,采用overlapped k-d树存储光子,从屏幕空间发射光线,记录光线与几何相交的着色点,通过光子图进行光子收集计算出该着色点的辐射亮度,并完成着色计算,具体步骤包括:A photon mapping optimization method based on polygonal space division according to claim 6, characterized in that, in the method, each slave node performs the coloring calculation of the scene sub-region, and near the scene division line, The overlapped kd tree stores photons, emits light from the screen space, records the shading point where the light intersects the geometry, collects the photon through the photon graph, calculates the radiance of the shading point, and completes the shading calculation. The specific steps include:
    设定光子收集搜索半径;Set the photon collection search radius;
    当着色点和虚拟portal距离大于等于搜索半径时,着色点的光亮度为该节点内部的光子图计算出的辐射亮度;When the distance between the colored point and the virtual portal is greater than or equal to the search radius, the brightness of the colored point is the radiance calculated from the photon graph inside the node;
    当着色点和虚拟portal距离小于搜索半径时,访问相邻分割区域的光子,采用overlapped k-d树组织光子图,将划分区域边界处的光子重复存储到临近区域的节点上,着色点的光亮度为检测节点内部光子图中的光子图计算出的辐射亮度。When the distance between the shaded point and the virtual portal is less than the search radius, visit the photons in the adjacent segmented area, use the overlapped kd tree to organize the photon graph, and store the photons at the boundary of the segmented area repeatedly to the nodes in the adjacent area. The brightness of the colored point is Detect the radiance calculated from the photon graph in the photon graph inside the node.
  9. 一种计算机可读存储介质,其中存储有多条指令,其特征在于,所述指令适于由电子设备的处理器加载并执行如权利要求4-5或权利要求6-8任一项所述的一种基于多边形空间划分的光子映射优化方法。A computer-readable storage medium, wherein multiple instructions are stored, wherein the instructions are adapted to be loaded by a processor of an electronic device and executed as described in any one of claims 4-5 or 6-8 A photon mapping optimization method based on polygonal space division.
  10. 一种电子设备,其包括处理器和计算机可读存储介质,处理器用于实现各指令;计算机可读存储介质用于存储多条指令,其特征在于,所述指令适于由处理器加载并执行如权利要求4-5或权利要求6-8任一项所述的一种基于多边形空间划分的光子映射优化方法。An electronic device comprising a processor and a computer-readable storage medium, the processor is used to implement each instruction; the computer-readable storage medium is used to store multiple instructions, characterized in that the instructions are suitable for being loaded and executed by the processor A photon mapping optimization method based on polygonal space division according to any one of claims 4-5 or 6-8.
PCT/CN2019/123404 2019-05-29 2019-12-05 Polygon space division-based photon mapping optimization method, device and system WO2020238136A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910457850.7 2019-05-29
CN201910457850.7A CN110211197B (en) 2019-05-29 2019-05-29 Photon mapping optimization method, device and system based on polygon space division

Publications (1)

Publication Number Publication Date
WO2020238136A1 true WO2020238136A1 (en) 2020-12-03

Family

ID=67789406

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/123404 WO2020238136A1 (en) 2019-05-29 2019-12-05 Polygon space division-based photon mapping optimization method, device and system

Country Status (2)

Country Link
CN (1) CN110211197B (en)
WO (1) WO2020238136A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110211197B (en) * 2019-05-29 2020-10-02 山东大学 Photon mapping optimization method, device and system based on polygon space division
CN115495056B (en) * 2022-11-17 2023-03-07 阿里巴巴(中国)有限公司 Distributed graph computing system and method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120206459A1 (en) * 2010-01-04 2012-08-16 Adshir Ltd. Method and Apparatus for Parallel Ray-Tracing Employing Modular Space Division
CN106251393A (en) * 2016-07-14 2016-12-21 山东大学 A kind of gradual Photon Mapping optimization method eliminated based on sample
CN106251394A (en) * 2016-07-14 2016-12-21 山东大学 A kind of distributed global illumination computational methods based on Photon Mapping
CN110211197A (en) * 2019-05-29 2019-09-06 山东大学 It is a kind of based on polygon space divide Photon Mapping optimization method, apparatus and system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101820584B (en) * 2009-02-27 2013-09-11 中兴通讯股份有限公司 Method and device for dividing and mapping resources
CN103021018B (en) * 2012-11-07 2015-04-22 浙江工业大学 Method for parallel ray tracing by building BVH tree based on graphics processing unit (GPU)
CN104700448B (en) * 2015-03-23 2017-06-20 山东大学 A kind of self adaptation Photon Mapping optimized algorithm based on gradient
CN106296793B (en) * 2016-08-02 2018-10-30 山东大学 The global illumination scene rendering method based on point under Intel MIC hardware structures

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120206459A1 (en) * 2010-01-04 2012-08-16 Adshir Ltd. Method and Apparatus for Parallel Ray-Tracing Employing Modular Space Division
CN106251393A (en) * 2016-07-14 2016-12-21 山东大学 A kind of gradual Photon Mapping optimization method eliminated based on sample
CN106251394A (en) * 2016-07-14 2016-12-21 山东大学 A kind of distributed global illumination computational methods based on Photon Mapping
CN110211197A (en) * 2019-05-29 2019-09-06 山东大学 It is a kind of based on polygon space divide Photon Mapping optimization method, apparatus and system

Also Published As

Publication number Publication date
CN110211197A (en) 2019-09-06
CN110211197B (en) 2020-10-02

Similar Documents

Publication Publication Date Title
Schöps et al. Surfelmeshing: Online surfel-based mesh reconstruction
US10592765B2 (en) Systems and methods for generating information about a building from images of the building
Murali et al. Indoor Scan2BIM: Building information models of house interiors
US20190197770A1 (en) 3d model reconstruction method, electronic device, and non-transitory computer readable storage medium thereof
US9053571B2 (en) Generating computer models of 3D objects
Wang et al. Irs: A large naturalistic indoor robotics stereo dataset to train deep models for disparity and surface normal estimation
JP6080642B2 (en) 3D point cloud analysis method
US8441477B2 (en) Apparatus and method of enhancing ray tracing speed
US11321903B2 (en) Bounding volume hierarchy compression
KR102399399B1 (en) Using free-form deformations in surface reconstruction
US20150109292A1 (en) Method and apparatus for generating acceleration structure in ray tracing system
US20150091904A1 (en) Ray tracing processing apparatus and method
WO2020238136A1 (en) Polygon space division-based photon mapping optimization method, device and system
CN110838129A (en) Three-dimensional building model contour characteristic line extraction method based on oblique photogrammetry
JP2014185947A (en) Image photographing method for three-dimensional restoration
US11651569B2 (en) System and method for mapping
CN111744199B (en) Image processing method and device, computer readable storage medium and electronic equipment
JP2014186566A (en) Analysis method of three-dimensional point group
JP6080640B2 (en) 3D point cloud analysis method
US20150091894A1 (en) Method and apparatus for tracing ray using result of previous rendering
Mura et al. Robust reconstruction of interior building structures with multiple rooms under clutter and occlusions
CN103136399A (en) System and method for radiation intensity parallel rendering for indoor scene
WO2024021340A1 (en) Robot following method and apparatus, and robot and computer-readable storage medium
CN112015938A (en) Point cloud label transmission method, device and system
KR102193683B1 (en) Apparatus and method for traversing acceleration structure in a ray tracing system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19930857

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19930857

Country of ref document: EP

Kind code of ref document: A1