A 3D rendering fusion method, system and medium based on multi-GPU collaboration

By segmenting the 3D scene into multiple subscenes and rendering together on multiple GPUs, the problem of insufficient performance of a single GPU is solved, and efficient rendering of complex 3D scenes and multi-user shared rendering is achieved.

CN114494559BActive Publication Date: 2025-04-15CHENGDU GRAVITATION SHICHUANG TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210137934.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-15
Publication Date
2025-04-15
Estimated Expiration
2042-02-15

AI Technical Summary

Technical Problem

In the prior art, the computing performance of a single GPU is limited and cannot effectively handle the rendering of complex three-dimensional scenes. The three-dimensional engine can only render on one GPU, which cannot meet the large-scale and high-precision rendering needs.

Method used

By dividing the three-dimensional scene into multiple sub-3D scenes and rendering them together on multiple GPUs, each sub-3D scene is allocated at least one GPU, and the distance between the position marking point in each sub-observation area and the sub-field camera is used to calculate the distance between the position marking point in each sub-observation area and the sub-field camera, and the image is fused according to the distance order to form a complete rendered image.

Benefits of technology

It realizes efficient rendering of complex three-dimensional scenes, solves the problem of insufficient performance of single GPU, can handle large-scale and high-precision three-dimensional rendering, and supports multi-user shared rendering, with a wide range of applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114494559B_ABST
    Figure CN114494559B_ABST
Patent Text Reader

Abstract

The present invention is applicable to the field of three-dimensional scene rendering technology, and provides a three-dimensional rendering fusion method, system, and medium based on multi-GPU collaboration, including the following step S10: obtaining a sub-observation area, and respectively calculating the distance between each position mark point in each sub-observation area and the corresponding sub-field of view camera; step S20: calculating and obtaining the first distance between the position mark point in each sub-observation area and the sub-field of view camera; step S30: obtaining the sub-rendering image after each GPU rendering; step S40: according to the first distance between the position mark point in each sub-observation area and the sub-field of view camera, obtaining the order of fusion of each sub-rendering image, forming a complete rendering image through calculation, preventing occlusion, making the fused rendering image consistent with the three-dimensional scene position of the rendering object, and avoiding confusion in the fusion process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of three-dimensional scene rendering, and in particular to a three-dimensional rendering fusion method, system and medium based on multi-GPU collaboration. Background Art

[0002] The purpose of computer 3D graphics rendering is to generate raster image information through GPU calculation for the designed 3D data (including 3D mesh data, material data, etc.) and display it on the display. 3D graphics rendering is a necessary part of expressing 3D scene information and is widely used in various industries, such as games, VR, design, geographic information, metaverse and other fields.

[0003] The 3D rendering operation process is to read the 3D data through the software 3D engine, control the GPU operation through the standard graphics interface at the bottom of the operating system, convert the 3D data into raster image information according to the current viewing angle, and display it on the output device;

[0004] Three-dimensional rendering is divided into real-time rendering and non-real-time rendering. In real-time rendering, the rendering data is updated in real time according to the user's operation information (such as the current viewing angle, distance, etc.), and the rendering result is obtained. This creates an effect that the user can freely watch in the holographic scene. The rendering process in the prior art is as shown in the attached figure. Figure 1 As shown, a 3D rendering engine usually reads data of a 3D scene, controls the GPU to perform rendering operations by calling the operating system image API, and then outputs the rendering structure to the display. It can be seen that the prior art has the following problems:

[0005] (1) The computing performance of a single GPU is limited: Different types of GPUs have different numbers of computing units, so their computing performance is also different. However, regardless of the type of GPU, the total number of computing units is limited, resulting in limited corresponding computing performance.

[0006] (2) A 3D scene can only be rendered on one GPU: Currently, the 3D engine is designed for an application scenario where the rendering of a 3D scene is usually bound to one GPU. That is, a 3D engine can only load one 3D model scene data and can only control one GPU to work at the same time.

[0007] (3) The scale and accuracy of rendering cannot meet the requirements: The amount of data of a 3D scene varies with its scale and accuracy. As the amount of 3D data required to render the scene increases and the rendering results need to be obtained in real time, the current GPU performance cannot meet the requirements.

[0008] (4) The output of the 3D engine can only be displayed locally: The traditional display adapter hardware structure usually integrates a GPU and a display device. When the 3D engine is working, it can only output the rendering structure in the local host to the display device corresponding to the GPU, and cannot output it to another device.

[0009] (5) The diversity of 3D rendering engines, operating systems, and hardware architectures results in different rendering solutions being incompatible with each other. 3D engines based on different hardware architectures (such as x86, ARM), different operating systems (such as Windows, Linux), and different types of 3D engines (such as Unreal, Unity, etc.) cannot work together to complete the same rendering task. Summary of the invention

[0010] The purpose of the present invention is to provide a 3D rendering fusion method, system, and readable medium based on multi-GPU collaboration to solve the above technical problems existing in the prior art, which mainly include the following five aspects:

[0011] A first aspect of the present invention provides a 3D rendering fusion method based on multi-GPU collaboration, comprising the following steps:

[0012] Step S10: obtaining sub-observation areas, and respectively calculating the distance between each position mark point in each sub-observation area and the corresponding sub-field of view camera, wherein the sub-observation area is the observation area formed in the sub-field of view camera corresponding to each sub-3D scene;

[0013] Step S20: Calculate and obtain a first distance between a position mark point and a sub-field-of-view camera in each sub-observation area; wherein, when there is one position mark point, the first distance is the distance between the position mark point and the corresponding sub-field-of-view camera; and when there are multiple position mark points, the first distance is the shortest distance between multiple position mark points and the sub-field-of-view camera.

[0014] Step S30: Obtain the sub-rendered image rendered by each GPU;

[0015] Step S40: According to the first distance between the position mark point in each sub-observation area and the sub-field of view camera, the order of fusing each sub-rendering image is obtained, and a complete rendering image is formed by calculation.

[0016] Furthermore, in step S10, the sub-viewing camera in each sub-3D scene is located in a global unified coordinate system, and the position and direction of each sub-viewing camera are the same.

[0017] Further, in step S10, the position marking points in each sub-observation area include a first position marking point, a second position marking point, a third position marking point, and a fourth position marking point, and the first position marking point, the second position marking point, the third position marking point, and the fourth position marking point are respectively four preset position points in each sub-observation area.

[0018] Furthermore, in step S40, the first distances from the position markers in each sub-observation area to the sub-field of view camera are compared, and each sub-rendered image is fused in order of distance from far to near / from near to far to the sub-field of view camera.

[0019] A second aspect of the present invention provides a 3D rendering fusion system based on multi-GPU collaboration, comprising the following modules:

[0020] Marking point module: used to obtain sub-observation areas and calculate the distance between each position marking point in each sub-observation area and the corresponding sub-field of view camera, wherein the sub-observation area is the observation area formed by the sub-field of view camera corresponding to each sub-3D scene;

[0021] Calculation module: calculates and obtains the first distance between the position mark point and the sub-viewing field camera in each sub-observation area; wherein, when there is one position mark point, the first distance is the distance between the position mark point and the corresponding sub-viewing field camera; when there are multiple position mark points, the first distance is the shortest distance between multiple position mark points and the sub-viewing field camera.

[0022] Image acquisition module 1: used to obtain the sub-rendered image after each GPU rendering;

[0023] Fusion module: used to obtain the order of fusion of each sub-rendering image according to the first distance between the position mark point in each sub-observation area and the sub-field of view camera, and form a complete rendering image through calculation.

[0024] A third aspect of the present invention provides a 3D rendering method based on multi-GPU collaboration, comprising the following steps:

[0025] Step S100: obtaining a three-dimensional scene of a rendering object;

[0026] Step S200: segmenting the acquired three-dimensional scene to obtain a plurality of sub-three-dimensional scenes;

[0027] Step S300: each sub-3D scene is assigned at least one GPU for rendering, and the sub-viewing field camera maps the 3D scene in the sub-observation area into a 2D rendered image, and the 2D rendered image is recorded as a sub-rendered image;

[0028] Step S400: fusing multiple sub-rendering images according to the three-dimensional rendering fusion method based on multi-GPU collaboration to achieve rendering of a three-dimensional scene.

[0029] Furthermore, before performing step S300, the following steps are also included:

[0030] In each sub-three-dimensional scene, a corresponding sub-field-of-view camera is respectively set, wherein each sub-field-of-view camera is located in a unified global coordinate system;

[0031] At least one position marking point is set in the sub-observation area formed by the sub-field-of-view camera.

[0032] Furthermore, step S300 also includes the following steps:

[0033] Before outputting a plurality of sub-rendering images, the background of the sub-viewing field camera is set to be empty, and the obtained sub-rendering images are divided into a projection area and a blank area.

[0034] A fourth aspect of the present invention provides a 3D rendering system based on multi-GPU collaboration.

[0035] Image acquisition module 2: used to acquire the three-dimensional scene of the rendered object;

[0036] Segmentation module: used to segment the acquired 3D scene to obtain multiple sub-3D scenes;

[0037] Rendering module: used to allocate at least one GPU to each sub-3D scene for rendering. The sub-viewing field camera maps the 3D scene in the sub-observation area into a 2D rendered image, and records the 2D rendered image as a sub-rendered image.

[0038] Fusion module: used to fuse multiple sub-rendering images according to the above-mentioned three-dimensional rendering fusion method based on multi-GPU collaboration to achieve rendering of three-dimensional scenes.

[0039] A fifth aspect of the present invention provides a readable medium for storing a program, which, when executed, is used to implement a three-dimensional rendering fusion method based on multi-GPU collaboration as described above or a three-dimensional rendering method based on multi-GPU collaboration as described above.

[0040] Compared with the prior art, the present invention has at least the following technical effects:

[0041] (1) By finding the first distance between the position marker point in each sub-observation area and the sub-field of view camera, and then fusing them from far to near, occlusion is prevented, so that the fused rendering image is consistent with the three-dimensional scene position of the rendering object, avoiding confusion in the fusion process.

[0042] (2) The sub-view cameras in each sub-3D scene are located in a global unified coordinate system. The position and direction of each sub-view camera are the same, so that each sub-3D scene is rendered simultaneously at each step, which also ensures the simultaneity of the fusion of subsequent sub-rendering images and enables the 3D rendering image to be displayed quickly and in real time.

[0043] (3) By setting the pixel channel of the image output by the field of view camera, the amount of data required for the subsequent sub-rendering images during fusion is reduced, the accuracy of the fused rendering image is improved, and the interference of other backgrounds is reduced.

[0044] (4) In this application, by dividing the 3D scene, the local scenes are placed in multiple GPUs for rendering operations, which solves the problem of low rendering efficiency when the amount of computation required for 3D scene rendering is greater than the amount of computation that can be provided by an independent GPU, and can achieve the purpose of real-time rendering. Therefore, by combining low-computing-power GPUs, real-time rendering of infinitely large 3D scenes can be achieved, and rendering results can be provided to multiple users.

[0045] (5) In this application, the three-dimensional scene is divided and the local scenes are placed in multiple GPUs for rendering operations, so that different hardware architectures, different operating systems, and different types of three-dimensional engines can collaborate with each other to complete the same rendering task, which has a wide range of applications. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments of the present invention or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0047] Figure 1 It is a three-dimensional scene rendering process in the prior art;

[0048] Figure 2 is a flow chart of the three-dimensional rendering fusion method in the present invention;

[0049] Figure 3 It is a schematic diagram of the viewing range VF of the RVC in the present invention;

[0050] Figure 4 is a schematic diagram of the system in the present invention;

[0051] Figure 5 It is a workflow diagram in the present invention;

[0052] Figure 6 is a flow chart of the three-dimensional rendering method in the present invention;

[0053] Figure 7 is the three-dimensional scene in the present invention;

[0054] Figure 8 is a top view of the three-dimensional scene in the present invention;

[0055] Fig. 9 is a segmentation map of the three-dimensional scene in the present invention;

[0056] Fig.10 It is a change diagram corresponding to RVC after RE in the present invention receives a user operation command;

[0057] Fig.11 It is a schematic diagram of the output of a sub-3D rendering image in the sub-field of view camera of the present invention;

[0058] Fig.12 is a schematic diagram of output of the first sub-rendered image after setting the pixel channel in the present invention;

[0059] Fig.13 is a schematic diagram of output of the second sub-rendered image after setting the pixel channel in the present invention;

[0060] Fig.14 is a schematic diagram of output of the third sub-rendered image after setting the pixel channel in the present invention;

[0061] Fig.15 is a schematic diagram of output of a fourth sub-rendered image after setting pixel channels in the present invention;

[0062] Fig.16 is a schematic diagram of the fusion of neutron rendering images of the present invention;

[0063] Fig.17 It is a three-dimensional schematic diagram of the smart city in the present invention;

[0064] Fig.18 It is a three-dimensional schematic diagram of the video monitoring in the present invention;

[0065] Fig.19 It is the oblique photography in the present invention that generates three-dimensional data. DETAILED DESCRIPTION

[0066] The following description provides many different embodiments or examples for implementing different features of the present invention. The components and arrangements described in the following specific examples are only used to simplify the present invention and are only used as examples, not to limit the present invention.

[0067] Various aspects of the present invention will be described more fully below with reference to the accompanying drawings. However, the present invention can be embodied in many different forms and should not be construed as limited to any specific structure or function presented throughout the present invention. On the contrary, providing these aspects will make the present invention comprehensive and complete, and the present invention will fully convey the scope of the present invention to those skilled in the art. Based on the teachings herein, those skilled in the art should realize that whether any aspect disclosed herein is implemented alone or in combination with any other aspect of the present invention, the scope of the present invention is intended to cover any aspect disclosed herein. For example, any number of cameras or execution methods proposed herein can be used to implement. In addition, in addition to the multiple aspects of the present invention proposed herein, the scope of the present invention is more intended to cover cameras or methods implemented using other structures, functions, or structures and functions. It should be understood that any aspect disclosed herein can be embodied by one or more elements of the claims.

[0068] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.

[0069] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification, and should not be interpreted in an idealized or overly rigid manner.

[0070] First embodiment:

[0071] like Figure 2 As shown, the first embodiment of the present invention provides a 3D rendering fusion method based on multi-GPU collaboration, comprising the following steps:

[0072] Step S10: obtaining sub-observation areas, and respectively calculating the distance between each position mark point in each sub-observation area and the corresponding sub-field of view camera, wherein the sub-observation area is the observation area formed in the sub-field of view camera corresponding to each sub-3D scene;

[0073] Step S20: Calculate and obtain a first distance between a position mark point and a sub-field-of-view camera in each sub-observation area; wherein, when there is one position mark point, the first distance is the distance between the position mark point and the corresponding sub-field-of-view camera; and when there are multiple position mark points, the first distance is the shortest distance between multiple position mark points and the sub-field-of-view camera.

[0074] Step S30: Obtain the sub-rendered image rendered by each GPU;

[0075] Step S40: According to the first distance between the position mark point in each sub-observation area and the sub-field of view camera, the order of fusing each sub-rendering image is obtained, and a complete rendering image is formed by calculation.

[0076] In the above scheme, the acquired three-dimensional scene is first divided into multiple sub-three-dimensional scenes, and at least one corresponding GPU is assigned to each sub-three-dimensional scene. Then, the multiple sub-three-dimensional scenes are rendered simultaneously under the GPU to obtain corresponding multiple sub-rendered images. Then, four position marking points including but not limited to are set on each sub-observation area. Five position marking points can also be set, such as the four vertices and the center point in each sub-observation area. There is no restriction on the number and position of the specific marking points; it can also be set to one position marking point.

[0077] The distance between each position mark point set on each sub-observation area and the corresponding sub-viewing camera is calculated respectively. For example, when there are four position mark points, the first distance from the sub-viewing camera is calculated among the four position mark points. Finally, the first distances in each sub-observation area are sorted, and the order is set as the fusion order of the sub-rendered images. The fusion order is as follows: Fig.16 As shown, the image formed by such fusion can ensure that each sub-rendered image is not blocked during the fusion process, and the formed three-dimensional rendering image is complete.

[0078] It should be noted that the positions of the marking points set on each sub-observation area are the same. For example, the positions of at least four marking points set on the sub-observation area in the first sub-3D scene are the four vertices on the field of view cone. Then, the positions of the marking points set on the sub-observation areas in the remaining sub-3D scenes are also four vertices. The position numbers of the marking points in each sub-observation area can be different. This ensures that the calculated distance between each sub-observation area and the sub-field of view cameras is comparable, so that subsequent image fusion can be carried out smoothly.

[0079] Specifically, multiple sub-rendered images are fused according to the fusion method in this application, such as Fig.16 As shown, the overall rendering of the three-dimensional scene is completed.

[0080] RCE needs to calculate the Z-order of each RES(1..n) based on the position and direction of RVC in each RE(x). The specific steps are as follows:

[0081] The three-dimensional coordinate positions of each RVC (1...n) in the global coordinate system are set to be the same, that is, the average coordinates are all RVC (x, y, z). In the subsequent calculation process, the sub-field of view camera is always in this coordinate system, and the position and direction of the sub-field of view camera in each sub-observation area are the same, so that each sub-rendering image is performed under the same field of view, that is, each sub-field of view camera is equivalent to the user's eyes. This not only ensures that the rendering can be completed faster, but also ensures that after the rendering is completed, the three-dimensional scene can be observed by adjusting the position and angle of the sub-field of view camera.

[0082] Assume: 1<=i<=n, i is the serial number of the sub-observation area, n is the number of sub-observation areas

[0083] In global coordinates, the minimum distance of the field of view VF(i) of each RVC(x,y,z), that is: MinRange(i).

[0084] Also suppose:

[0085] VF(i).top is the upper edge of the field of view of VF(i).

[0086] VF(i).bottom is the lower edge of the field of view of VF(i).

[0087] VF(i).left is the left edge of the field of view of VF(i).

[0088] VF(i).right is the right edge of the VF(i) field of view.

[0089] Then we have:

[0090] The top left corner of VF(i)’s field of view is VF(i).topleft(x,y,z).

[0091] The top right corner of VF(i)’s field of view is VF(i).topright(x,y,z).

[0092] The lower left corner of VF(i)'s field of view is VF(i).bottomleft(x,y,z).

[0093] The lower right corner of VF(i)’s field of view is VF(i).bottomright(x,y,z).

[0094] Let point A = VF(x).topleft(x,y,z), point B = RVC(x,y,z), i = 1, Range(i) = |AB|;

[0095] Let point C = VF(x).topright(x,y,z), point B = RVC(x,y,z), i = 2, Range(i) = |CB|;

[0096] Let point D = VF(x).bottomleft(x,y,z), point B = RVC(x,y,z), i = 3, Range(i) = |DB|;

[0097] Let point E = VF(x).bottomright(x,y,z), point B = RVC(x,y,z), i = 3, Range(i) = |EB|;

[0098] Among them, A is the first position mark point in sub-observation area i, B is the position of the field of view camera, C is the second position mark point in sub-observation area i, D is the third position mark point in sub-observation area i, E is the fourth position mark point in sub-observation area i, and Range(i) is the distance between RVC and the corresponding corner points of each mark point in the field of view.

[0099] Find the minimum median distance in Range(i), i.e. MinRange(i).

[0100] For RVC(1…n), the minimum distance to VF(1…n), MinRange(1…n), is calculated in sequence.

[0101] Compare MinRange(1…n) and sort them from large to small to get the corresponding RES(1…n) order, which is the order in which the sub-rendering images are fused. For example, the order of superposition fusion of sub-rendering images is RES(3), RES(4), RES(1), RES(2). Fig.16 shown.

[0102] According to the distance order between RVC and each sub-observation area, the sub-rendering images RES (1…n) are superimposed in sequence, that is, from far to near, to form a correct occlusion effect. In the calculation process, the pixel alpha = 0, or transparent color, does not participate in the calculation, such as Figure 12-Figure 15 As shown, during the superposition fusion calculation process, the pixel data of RES (1..n) are copied to the calculation buffer in sequence according to the new order, and when the alpha channel value is 0 or the color value of the pixel is a predetermined transparent color, it is not processed, and finally a rendering image corresponding to the three-dimensional scene before segmentation is formed, thereby realizing the rendering of the three-dimensional scene.

[0103] Optionally, the number of position marking points can be 1, 2, 3...n, etc. The positions of the position marking points can be the four vertex positions in the sub-observation area, the center position, or position marking points located at different positions on the four boundaries. The specific positions of the position marking points in the sub-observation area are not limited here and can be set according to actual needs.

[0104] Furthermore, in step S10, the sub-field of view camera in each sub-3D scene is located in the global unified coordinate system, and the position and direction of each sub-field of view camera are the same, so that each sub-3D scene is performed simultaneously in each step of the rendering process, and the simultaneity of the fusion of subsequent sub-rendering images is ensured, and the position relationship remains consistent, thereby avoiding confusion in the fusion process and allowing the 3D rendering image to be displayed quickly and in real time.

[0105] Further, in step S10, the position marking points in each sub-observation area include a first position marking point, a second position marking point, a third position marking point, and a fourth position marking point, and the first position marking point, the second position marking point, the third position marking point, and the fourth position marking point are respectively four preset position points in each sub-observation area. By setting the position marking points in the sub-observation area, the distance between each sub-observation area and the sub-field of view camera can be conveniently and quickly obtained.

[0106] Furthermore, in step S40, the first distance from each sub-observation area to the sub-field of view camera is compared, and each sub-rendering image is fused in order of distance from the sub-field of view camera from far to near / from near to far. By finding the first distance from each sub-observation area to the sub-field of view camera, the sub-rendering images are fused in order of distance from far to near to prevent occlusion, so that the fused rendering image is consistent with the three-dimensional scene position of the rendering object, avoiding confusion in the fusion process.

[0107] Second embodiment:

[0108] The second embodiment of the present invention provides a 3D rendering fusion system based on multi-GPU collaboration, including the following modules:

[0109] Marking point module: used to obtain sub-observation areas and calculate the distance between each position marking point in each sub-observation area and the corresponding sub-field of view camera, wherein the sub-observation area is the observation area formed by the sub-field of view camera corresponding to each sub-3D scene;

[0110] Calculation module: calculates and obtains the first distance between the position mark point and the sub-viewing field camera in each sub-observation area; wherein, when there is one position mark point, the first distance is the distance between the position mark point and the corresponding sub-viewing field camera; when there are multiple position mark points, the first distance is the shortest distance between multiple position mark points and the sub-viewing field camera.

[0111] Image acquisition module 1: used to obtain the sub-rendered image after each GPU rendering;

[0112] Fusion module: used to obtain the order of fusion of each sub-rendering image according to the first distance between the position mark point in each sub-observation area and the sub-field of view camera, and form a complete rendering image through calculation.

[0113] Furthermore, in the marking point module, the sub-field-of-view camera in each sub-3D scene is located in a global unified coordinate system, and the position and direction of each sub-field-of-view camera are the same.

[0114] Furthermore, in the marking point module, the position marking points in each sub-observation area include a first position marking point, a second position marking point, a third position marking point, and a fourth position marking point, and the first position marking point, the second position marking point, the third position marking point, and the fourth position marking point are respectively four preset position points in each sub-observation area.

[0115] Furthermore, in the fusion module, the first distance from the position marker in each sub-observation area to the sub-field of view camera is compared, and each sub-rendering image is fused in the order of distance from far to near / from near to far to the sub-field of view camera.

[0116] Third embodiment:

[0117] like Figure 6 As shown, the third embodiment of the present invention provides a 3D rendering method based on multi-GPU collaboration, comprising the following steps:

[0118] Step S100: obtaining a three-dimensional scene of a rendering object;

[0119] Step S200: segmenting the acquired three-dimensional scene to obtain a plurality of sub-three-dimensional scenes;

[0120] Step S300: at least one GPU is assigned to each sub-3D scene for rendering, and the sub-viewing field camera maps the 3D scene in the sub-observation area into a 2D rendered image, and the 2D rendered image is recorded as a sub-rendered image;

[0121] Step S400: fusing multiple sub-rendering images according to the above-mentioned 3D rendering fusion method based on multi-GPU collaboration to achieve rendering of a 3D scene.

[0122] Furthermore, before performing step S300, the following steps are also included:

[0123] In each sub-3D scene, a corresponding sub-field-of-view camera is respectively set, and the position and direction of the sub-field-of-view camera are set. Each sub-field-of-view camera currently has a certain observation range, that is, a field-of-view cone. Within the field-of-view cone, the three-dimensional content of the rendered scene is intercepted and obtained, that is, a sub-observation area, wherein each sub-field-of-view camera is located in a unified global coordinate system;

[0124] At least one position marking point is set in the sub-observation area formed by the sub-field of view camera, and the distance between each position marking point and the corresponding sub-field of view camera is calculated respectively, and the shortest distance is used as the distance between the sub-observation area and the sub-field of view camera. The sub-field of view camera takes pictures, and the three-dimensional scene in the sub-observation area is mapped into a two-dimensional image, that is, a sub-rendering image. Then, according to the first distance, the sub-rendering images are fused in a certain order, and the overall rendering result image of the total three-dimensional scene is formed by calculation.

[0125] That is, before performing step S300, the following steps are also included:

[0126] Establish a global unified coordinate system and distribute it to each GPU. Each GPU is equipped with a corresponding rendering engine.

[0127] A corresponding sub-field of view camera is established for each rendering engine.

[0128] Furthermore, step S300 also includes the following steps:

[0129] Before outputting a plurality of sub-rendering images, the background of the sub-viewing field camera is set to be empty, and the obtained sub-rendering images are divided into a projection area and a blank area.

[0130] In the above scheme, the rendering objects include but are not limited to large-scale cities, video surveillance, geographic information management systems, and metaverse open worlds.

[0131] Obtain a 3D scene of a rendering object, wherein the 3D scene includes 3D data, and the 3D data includes mesh data, material data, texture data, and other data required to form a 3D scene;

[0132] The acquired 3D data is preprocessed, i.e. segmented. The amount of data of the segmented sub-3D scene is significantly smaller than the 3D data of the rendering object, and can be independently loaded by a 3D rendering engine and fully rendered by a GPU. The segmentation method can be segmented by coordinates, content, space, or other methods. For example, a 3D model of a city can be segmented into multiple sub-scenes (sub-3D scenes) according to administrative regions or coordinates. The specific segmentation method can be manual segmentation through 3D tools, customized automatic segmentation, etc. There is no specific limitation on the segmentation method.

[0133] Optionally, a GPU can be allocated to each segmented sub-3D scene. The GPUs include but are not limited to 1, 2, 3, etc. The GPU can be in other hosts in the network. One host can carry multiple GPUs. The GPU can also be reasonably allocated according to the amount of data of each sub-3D scene after segmentation. For example, among the sub-3D scenes after coordinate segmentation, if one of the sub-3D scenes has a larger amount of data, it can be correspondingly allocated to a GPU with matching data volume and performance, thereby ensuring the synchronization of each sub-3D scene during the rendering process and the real-time rendering of the image.

[0134] When the 3D scene rendering of the rendering object is completed, the sub-field of view camera takes a picture and maps the sub-3D scene within the field of view into a 2D image, that is, the sub-rendered image is output. Specifically, the image data is continuously output in the memory at a preset frame rate. The output image data can be used as input for other systems for subsequent 3D scene processing.

[0135] Explanation of some terms involved in this application:

[0136] Rendering Engine (RE), abbreviated as RE.

[0137] The 3D rendering program is responsible for reading 3D data, controlling the GPU, and outputting the rendered image. The rendering engine is the program that actually completes the 3D rendering. It can be third-party software or custom-developed software.

[0138] Render Control Engine (RCE for short): a program that controls various rendering engines to work together and generate final output results, which is the core logic of the present invention.

[0139] Render View Camera (RVC): In the rendering engine RE, you can create a view camera (RVC), which is the viewing angle in this scene. RVC simulates the function of the user's eyes and can move in a three-dimensional scene, sampling the content seen from the current position and angle to generate image information. RVC has parameters such as viewing angle width and height, viewing angle position, current direction, and resolution. Its position and direction can be controlled in real time through commands to achieve the purpose of field of view movement.

[0140] View field (VF): Each RVC has a view frustum. In a 3D scene, the area inside the view frustum is the scene content that the current user can see. It is reflected in the 3D model as the viewing range VF of the RVC. Figure 3 As shown:

[0141] Rendering engine output result (res): what RVC sees is projected as a two-dimensional image, namely RES, and is output in the form of RES raster data, usually saved in memory or video memory buffer, representing the real-time rendering output result of the current RE.

[0142] like Figure 4 As shown in the figure, to meet the needs of large-scale real-time rendering, multiple hosts need to be combined and interconnected through a high-speed network to form a cluster computing structure. Among them, the RE host is the core computing device for rendering operations. In the RE host, each GPU carries an RE rendering operation. One GPU corresponds to one RE, which acts as a rendering computing unit to allocate resources. The RE host can also install multiple GPUs and run multiple REs to form multiple computing units. The RCE host runs the RCE service, which is responsible for establishing user sessions, transferring user operation instructions to each RE, and recombining the output results of each RE to form the final output screen. The scheduling host runs the resource scheduling service. After each RE and RCE is started, it needs to register in the scheduling service and report its own computing load to the scheduling service in real time.

[0143] In this application, the three-dimensional scene model is defined as WM (whole model), and the three-dimensional scene model (selected object) is taken as an example to illustrate the implementation process of the method provided by this application.

[0144] Assume WM is a complex three-dimensional scene data, such as Figure 7 and Figure 8 As shown, it can be divided into multiple partitions, that is, multiple sub-3D scene models. The segmentation method depends on the application requirements, including but not limited to segmentation methods by content, coordinates, space, etc. In this application, the coordinate area segmentation is taken as an example:

[0145] The total scene WM is divided into four sub-scene models according to the coordinate area, namely M(1), M(2), M(3), and M(4). The four sub-scene 3D models are rendered separately in RE (1…n, n=4). The 3D data of the four sub-models are stored in the memory of the corresponding RE host:

[0146] The user first sends a rendering request from the client program to the scheduler in the scheduling host. The scheduler allocates RCE according to the current resource status and forwards the request to the specified RCE. After the scheduling service receives the user request, it allocates the idle RCE(n) according to the running status of the registered RCE service and forwards the request to the corresponding RCE. After receiving the user request, RCE(n) establishes a user session according to the user request content and applies for RE computing units from the scheduling service. The scheduling service allocates the computing unit corresponding to the user request scene to RCE control. RCE gets the allocated RE(1 …n), it is necessary to initialize RE(1…n): first set the global unified coordinate system to RE(1…n). In the subsequent rendering and calculation process, RE(1…n) is always in the global coordinate system. Then establish the field of view camera RVC(1…n) of each RE(1…n). For example, the RVC established in M(1) is RVC(1), where RVC has field of view parameters, FOV(x) is the horizontal field of view, FOV(y) is the vertical field of view, and the area that can be collected in the three-dimensional scene according to the range of the viewing cone of RVC is VF (view field). Finally, the segmented sub-three-dimensional scenes are loaded into the corresponding rendering engines, such as M(1) is loaded into RE(1), and M(2) is loaded into RE(2). After the initialization is completed, the rendering engine RE(1…n) enters the waiting state. When receiving a rendering or control request, it immediately starts the corresponding work.

[0147] The client program collects user input through input devices. It should be noted that the input devices here include but are not limited to mouse, keyboard, VR glasses, etc. After collecting user input, it converts network commands and sends them to RCE. After receiving the user operation command, RCE converts it into the operation and direction information corresponding to RVC and sends it to RE. There are various ways for RCE to convert to RVC, which are not limited here.

[0148] After receiving the user operation command sent by RCE (1…n), RE (1…n) sets the new position and direction of RVC (1…n) respectively, such as Fig.10 As shown, a new VF (1…n) is formed, and RCE triggers a rendering signal to RE (1…n) uniformly to control RVC (1…n) to collect cameras at the same time point, thereby obtaining the output image RES at the same time. In this way, each sub-3D scene is performed simultaneously in each step of the rendering process, which also ensures the simultaneity of the fusion of subsequent sub-rendering images and enables the 3D rendering image to be displayed quickly and in real time.

[0149] Before each sub-rendering image needs to be output, the imaging background of RVC (1...n) is set to empty, that is, in the RVC output image, only the projection of the valid 3D model is retained, and the background of the blank area is empty.

[0150] Control RVC (1…n) to generate a frame of projection image. The result obtained at this time is a two-dimensional projection image of what RVC (1…n) sees in the three-dimensional scene, which is equivalent to RVC taking a photo in the three-dimensional scene. The resulting image is saved in the video memory. The formats of the saved image include but are not limited to RGB, RGBA, ARGB, etc. Fig.11 As shown, the background is blank and only the projection of the three-dimensional scene is retained in the image.

[0151] The pixels in each sub-rendering image are set, and the pixels in the sub-rendering image that has been rendered are set according to the projection classification. The pixels with projection are defined as valid pixels, and the pixels without projection are defined as invalid pixels, such as Fig.13 As shown, the gray in the RVC (2) image indicates invalid pixels, which are set to the alpha channel value or transparent color according to the set pixel type:

[0152] When RVC outputs a 2D image format with an alpha channel, you can set the pixel's alpha channel value to 0 or 255.

[0153] For invalid pixels, set alpha = 0, which means that this pixel will not participate in subsequent calculations;

[0154] For valid pixels, set alpha=255, which means that this pixel needs to be involved in subsequent calculations.

[0155] When RVC outputs a 2D image format without an alpha channel, you can set a special color that is not commonly used as the transparent color. For example, set RGB (255, 0, 255) as the color.

[0156] For an invalid pixel, the color value=RGB(255, 0, 255), which means that this pixel will not be involved in subsequent calculations.

[0157] For valid pixels, the color value = the original color value. Keeping the original color value unchanged means that this pixel needs to be involved in subsequent calculations. The output image after M(1), M(2), M(3), and M(4) are rendered and the pixel channel values ​​are set is as follows: Figure 12-Figure 15 shown.

[0158] By setting the pixel channel of the image output by the field of view camera, the amount of data for subsequent sub-rendering images during fusion is reduced, the accuracy of the fused rendering image is improved, and the interference of other backgrounds is reduced.

[0159] The rendered output image in RVC (1…n) is stored in the video memory and then transferred to the frame buffer of RCE, namely RES (1…n). Each result image is transmitted through the network. For image data with a large amount of data, the image compression and then decompression method can be used to reduce the amount of transmitted data. After RE (1…n) completes one frame of rendering, it enters the state of waiting for the next rendering request. After RCE waits to receive all the RE (1…n) result image sets, it enters the next processing link. If one of the RE (n) rendering fails or times out, all results are cleared and the task is restarted to achieve the effect of synchronization and ensure that the subsequent steps can proceed smoothly.

[0160] Finally, the output multiple sub-rendered images are fused according to the fusion method in this application, such as Fig.16 As shown, the overall rendering of the three-dimensional scene is completed.

[0161] RCE needs to calculate the Z-order of each RES(1..n) based on the position and direction of RVC in each RE(x). The specific steps are as follows:

[0162] Because the three-dimensional coordinate position of each RVC (1…n) in the global coordinate system is the same, that is, the coordinates are all RVC (x, y, z).

[0163] Assume: 1<=i<=n,

[0164] In global coordinates, the minimum distance of the field of view VF(i) of each RVC(x,y,z), that is: MinRange(i).

[0165] Also suppose:

[0166] VF(i).top is the upper edge of the field of view of VF(i).

[0167] VF(i).bottom is the lower edge of the field of view of VF(i).

[0168] VF(i).left is the left edge of the field of view of VF(i).

[0169] VF(i).right is the right edge of the VF(i) field of view.

[0170] Then we have:

[0171] The top left corner of VF(i)’s field of view is VF(i).topleft(x,y,z).

[0172] The top right corner of VF(i)’s field of view is VF(i).topright(x,y,z).

[0173] The lower left corner of VF(i)'s field of view is VF(i).bottomleft(x,y,z).

[0174] The lower right corner of VF(i)’s field of view is VF(i).bottomright(x,y,z).

[0175] Let point A = VF(x).topleft(x,y,z), point B = RVC(x,y,z), i = 1, Range(i) = |AB|;

[0176] Let point C = VF(x).topright(x,y,z), point B = RVC(x,y,z), i = 2, Range(i) = |CB|;

[0177] Let point D = VF(x).bottomleft(x,y,z), point B = RVC(x,y,z), i = 3, Range(i) = |DB|;

[0178] Let point E = VF(x).bottomright(x,y,z), point B = RVC(x,y,z), i = 3, Range(i) = |EB|;

[0179] Find the minimum median distance in Range(i), i.e. MinRange(i).

[0180] For RVC(1…n), the minimum distance to VF(1…n), MinRange(1…n), is calculated in sequence.

[0181] Compare MinRange(1…n) and sort them from large to small to get the corresponding RES(1…n) order, which is the order in which the sub-rendering images are fused. For example, the order of superimposed fusion of sub-rendering images is RES(3), RES(4), RES(1), RES(2).

[0182] According to the distance order between RVC and each sub-rendered three-dimensional image, the result images RES (1...n) are superimposed in sequence, that is, from far to near, to form a correct occlusion effect, and in the calculation process, the pixel alpha = 0, or is transparent, and does not participate in the calculation. As shown in the figure, during the superposition and fusion calculation process, the pixel data of RES (1..n) is copied to the calculation buffer in sequence according to the new order, and when the alpha channel value is 0 or the color value of the pixel is a predetermined transparent color, it is not processed, and finally a rendering image corresponding to the three-dimensional scene before segmentation is formed, thereby realizing the rendering of the three-dimensional scene.

[0183] Optionally, the position of the marking point may be not only the four vertex positions in the sub-observation area, but also the center position, or different position marking points may be set on the four boundaries, which is not limited here.

[0184] RCE can transmit the result image to the client program according to actual needs. If the network bandwidth is limited, the image data can be compressed and transmitted through image encoding. After receiving, the client program decodes and restores the image and displays it. The result display output methods include but are not limited to the following: display output, VR device display output.

[0185] It should be noted that after the above steps are completed, the GPU collaborative rendering of one frame of image is completed. In order to achieve the goal of dynamic images, the subsequent frames are rendered according to the previous steps. Usually, more than 25 frames per second are required to achieve dynamic image output.

[0186] Suppose: the rendering frame rate is set to fps, that is, the number of frames to be rendered per second.

[0187] When the fps is set, the upper limit of each frame rendering time is MRT (max render time), in ms.

[0188] That is: MRT = 1000ms / fps

[0189] Suppose RCE takes URT (use render time) to process and output a frame completely, in milliseconds

[0190] Let DRT (delta render time) be the excess time difference, that is, DRT = MRT - URT.

[0191] When DRT<=0, it means that the frame processing time has exceeded the set frame processing time. There is no need to wait and the next frame rendering will be started directly.

[0192] When DRT>0, it means that the output task of one frame has been completed within the set time. At this time, it is necessary to wait for the DRT time to ensure the dynamic picture output and save computing power.

[0193] When the user selects to end, cleanup operations are performed, such as: clearing RVC (1...n); removing RE (1...n); clearing cache space, etc. The workflow diagram of this application is as follows: Figure 5 As shown,

[0194] Therefore, through the 3D rendering method based on multi-GPU collaboration provided by this application, users can directly access the rendering results through the network and display them on mobile devices. At the same time, by controlling the position and direction of the sub-field of view camera, a user experience consistent with local rendering can be achieved.

[0195] By setting a camera (RVC) in the 3D engine, the 3D engine can output images without being displayed on the local device. The camera can obtain image data through RVC and perform post-processing or transmit it to other devices for processing. In this case, a variety of commercial 3D engines can also be installed to enable it to have multiple output methods.

[0196] This application solves the problem of low rendering efficiency when the amount of computation required for 3D scene rendering is greater than the amount of computation that a single GPU can provide by dividing the 3D scene and putting the local scenes into multiple GPUs for rendering operations, and can achieve the purpose of real-time rendering. Thus, real-time rendering of infinitely large 3D scenes can be achieved by combining low-computing-power GPUs, and rendering results can be provided to multiple users.

[0197] The method of the present invention can be run on a variety of operating systems and hardware devices, and achieve the desired effect of combined computing. RE and RCE can run on physical machines of different architectures (such as x64, ARM, etc.) and operating systems (such as windows, linux, etc.).

[0198] Through the method of the present application, multiple users can be in the system at the same time, set their own RVC, have their own viewing perspective, and achieve the purpose of multi-user shared rendering, thereby achieving goals such as centralized computing devices and weakened terminal devices.

[0199] By establishing a rendering cluster, we can make full use of different types of computing devices and make them work together to achieve the goal of fully utilizing the devices.

[0200] By adopting the method of the present invention, the three-dimensional data (including meshes, materials, maps, etc.) only exists in the system, and does not need to be deployed locally on the user end. The user end only receives the final rendering result image data and displays it. The user end cannot access the data itself, and there is no data leakage problem, which ensures the security of the three-dimensional data during transmission.

[0201] Fourth embodiment:

[0202] A fourth embodiment of the present invention provides a 3D rendering system based on multi-GPU collaboration.

[0203] Image acquisition module 2: used to acquire the three-dimensional scene of the rendered object;

[0204] Segmentation module: used to segment the acquired 3D scene to obtain multiple sub-3D scenes;

[0205] Rendering module: used to allocate at least one GPU to each sub-3D scene for rendering. The sub-viewing field camera maps the 3D scene in the sub-observation area into a 2D rendered image, and records the 2D rendered image as a sub-rendered image.

[0206] Fusion module: used to fuse multiple sub-rendering images according to a three-dimensional rendering fusion method based on multi-GPU collaboration as described in the first embodiment, so as to realize rendering of a three-dimensional scene.

[0207] Furthermore, the following modules are also included:

[0208] Before the rendering module: respectively set a corresponding sub-viewing field camera in each sub-3D scene, wherein each sub-viewing field camera is located in a unified global coordinate system;

[0209] At least one position marking point is set in the sub-observation area formed by the sub-field-of-view camera.

[0210] Furthermore, the following modules are also included:

[0211] Denoising module: Before outputting multiple sub-rendering images, the background of the sub-viewing field camera is set to empty, and the obtained sub-rendering image is divided into a projection area and a blank area.

[0212] In order to better understand this application, the following is an explanation with reference to specific cases:

[0213] Case 1: Smart City - Application of 3D real-time rendering in large-scale cities

[0214] Large-scale urban 3D real-time rendering is widely used in the field of smart cities to build digital twin platforms for city management. However, the scale of cities is characterized by the large amount of data required for 3D modeling and the increased accuracy requirements for 3D rendering, which leads to a significant increase in data volume. Cities usually need to be rendered in a single scene, such as Fig.17 As shown, it is a high-precision three-dimensional modeling map of a city. This kind of three-dimensional map has a large amount of data. The rendering method in the prior art usually deploys a large amount of three-dimensional data to the user end and uses a high-performance GPU. However, this cannot achieve real-time rendering requirements.

[0215] The 3D rendering and fusion method based on multi-GPU collaboration of the present application is adopted. First, the 3D model of the object to be rendered is divided into multiple sub-3D models according to the number of GPUs or other requirements, and then the sub-3D models are distributed to different GPUs through the system for rendering. During the rendering process, the method of the present application is carried out in a global unified coordinate system. The position and deflection angle of the field of view camera corresponding to each GPU in the coordinate system are the same, so that a sub-observation area under the same viewing angle can be obtained. At least four position marking points are set in each sub-observation area, and the distance between each marking point and the corresponding sub-field of view camera in each sub-observation area is calculated respectively, and the first distance between the four marking points and the field of view camera is found, and the first distance of each sub-observation area is sorted. For example, according to the principle of distance from the field of view camera from far to near, multiple sub-rendering images are superimposed and fused to form a complete rendering image, so as to achieve real-time rendering speed. Users can directly access the rendering results through the network and display them on mobile devices. By controlling the movement and change of the viewing angle of the field of view camera, a user experience consistent with the overall rendering is achieved.

[0216] By adopting the fusion rendering method of this application, a cloud rendering platform is established, which can be used as a basic platform to provide rendering services for other smart city management platforms, such as urban management platforms, traffic management platforms, etc. The upper-level platform does not need to consider the issues of three-dimensional data and three-dimensional rendering.

[0217] Case 2: Application in video surveillance-3D video fusion

[0218] In the field of video surveillance, projecting the video images captured by the surveillance camera into a three-dimensional model can reproduce the dynamic scenes of the surveillance area, showing strong spatial geographic information features, which is conducive to the user's overall observation, such as Fig.18 As shown,

[0219] The projection of the camera screen requires decoding and projecting the camera video, but the decoding performance of a host is limited, and usually only 20-30 channels of video can be decoded and projected. As a result, the 3D video fusion system in the prior art can only be rendered locally, and the 3D model data is not conducive to data security when downloaded to the local host. In addition, due to the limitation of video decoding capabilities, 3D video fusion can only be performed in local areas and cannot be fully fused.

[0220] By adopting the 3D rendering and fusion method based on multi-GPU collaboration of the present application, the decoding and projection of the surveillance video are distributed to different hosts and GPUs, which averages the computing load. At the same time, the 3D scene of the monitoring area is rendered separately, which largely solves the problem of insufficient computing power and enables the ability to reproduce the monitoring scenes and surveillance videos to be infinitely expanded, thereby meeting the needs of large-scale applications. For example, in city-scale scenes, real-time surveillance images of numerous channels can be reproduced to form a large-scale dynamic digital twin city.

[0221] Case 3: Application in Geographic Information Management - Geographic Data Rendering

[0222] In the Geographic Information Management System (GIS), geographic data is displayed and applied. In traditional GIS systems, vector data is usually displayed. With the development of three-dimensional data acquisition technology, the accuracy of three-dimensional data collected through methods such as oblique photography and point cloud scanning has been greatly improved, and the amount of data has also increased significantly. Fig.19 Generate 3D data for oblique photography.

[0223] By adopting the 3D rendering and fusion method based on multi-GPU collaboration provided by this application, the 3D geographic data is divided into blocks and assigned to different GPUs for real-time rendering. Geographical marker information (such as boundaries, roads, etc.) can be superimposed during the rendering process, and finally a large-scale, high-precision geographic information display required by users is formed. Compared with the local display method of the traditional GIS system, users can experience no difference and achieve high-precision geographic information data acquisition, while also ensuring the security of geographic data.

[0224] Case 4:

[0225] The concept of the metaverse is a recently proposed Internet concept and is also the prototype of the next generation of the Internet. Its essence is to establish a virtual three-dimensional open world. Users can access the three-dimensional open world in real time through remote devices (such as mobile devices, VR glasses, etc.). Each user has his or her own virtual character in the virtual world, and many virtual characters constitute a virtual society.

[0226] In the application scenarios of the Metaverse, real-time three-dimensional rendering of elements of the virtual world (such as buildings, spaces, characters, objects, etc.) is required. The huge amount of three-dimensional data of the Metaverse cannot be rendered locally, and many different types of devices need to obtain the rendering results in real time.

[0227] Currently, the application of the metaverse is still in its early stages, and the breadth and accuracy of three-dimensional display are at a relatively low level, among which the rendering capability of three-dimensional scenes is the limiting bottleneck.

[0228] By adopting the 3D rendering and fusion method based on multi-GPU collaboration provided in the application, a metaverse basic rendering platform is established, and the metaverse 3D scenes are distributed and calculated. By integrating various computing powers, real-time rendering of ultra-large-scale scenes can be achieved, and the rendering pool can be dynamically expanded. This makes the application effect of the metaverse not limited to the current low-quality level, and provides space for the subsequent expansion and improvement of metaverse applications.

[0229] Fifth embodiment:

[0230] The fifth embodiment of the present invention provides a readable medium, characterized in that it is used to store a program, and when the program is executed, it is used to implement a three-dimensional rendering fusion method based on multi-GPU collaboration as described in the first embodiment or a three-dimensional rendering method based on multi-GPU collaboration as described in the third embodiment.

[0231] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A 3D rendering fusion method based on multi-GPU collaboration, characterized in that: The steps include: Step S10: Obtain sub-observation areas, and respectively calculate the distance between each position mark point in each sub-observation area and the corresponding sub-field of view camera, wherein the sub-observation area is an observation area formed by the sub-field of view camera corresponding to each sub-3D scene; each sub-3D scene is assigned at least one GPU for rendering; Step S20: Calculate and obtain the first distance between the position marking point and the sub-field-of-view camera in each sub-observation area; wherein, when there is one position marking point, the first distance is the distance between the position marking point and the corresponding sub-field-of-view camera; when there are multiple position marking points, the first distance is the shortest distance between the multiple position marking points and the sub-field-of-view camera; the position of the position marking point set in each sub-observation area is the same; Step S30: Obtain the sub-rendered image rendered by each GPU; Step S40: obtaining the order of fusion of each sub-rendered image according to the first distance between the position mark point in each sub-observation area and the sub-field of view camera, and forming a complete rendered image by calculation; In step S40, the first distances from the position markers in each sub-observation area to the sub-field of view camera are compared, and each sub-rendered image is fused in the order of distance from far to near / from near to far to the sub-field of view camera.

2. The 3D rendering fusion method based on multi-GPU collaboration as claimed in claim 1, characterized in that: In step S10, the sub-viewing cameras in each sub-3D scene are located in a global unified coordinate system, and the position and direction of each sub-viewing camera are the same.

3. The 3D rendering fusion method based on multi-GPU collaboration as claimed in claim 1, characterized in that: In step S10, the position marking points in each sub-observation area include a first position marking point, a second position marking point, a third position marking point, and a fourth position marking point, and the first position marking point, the second position marking point, the third position marking point, and the fourth position marking point are respectively four preset position points in each sub-observation area.

4. A 3D rendering fusion system based on multi-GPU collaboration, characterized in that: Includes the following modules: Marking point module: used to obtain sub-observation areas and calculate the distance between each position marking point and the corresponding sub-field of view camera in each sub-observation area, wherein the sub-observation area is the observation area formed in the sub-field of view camera corresponding to each sub-3D scene; each sub-3D scene is assigned at least one GPU for rendering; the position marking point is set at the same position in each sub-observation area; Calculation module: calculate and obtain the first distance between the position mark point and the sub-field of view camera in each sub-observation area; wherein, when there is one position mark point, the first distance is the distance between the position mark point and the corresponding sub-field of view camera; when there are multiple position mark points, the first distance is the shortest distance between multiple position mark points and the sub-field of view camera; Image acquisition module 1: used to obtain the sub-rendered image after each GPU rendering; Fusion module: used for obtaining the order of fusion of each sub-rendering image according to the first distance between the position mark point in each sub-observation area and the sub-field of view camera, and forming a complete rendering image through calculation; The first distances from the position markers in each sub-observation area to the sub-field of view camera are compared, and each sub-rendered image is fused in the order of distance from far to near / from near to far to the sub-field of view camera.

5. A 3D rendering method based on multi-GPU collaboration, characterized in that: The steps include: Step S100: obtaining a three-dimensional scene of a rendering object; Step S200: segmenting the acquired three-dimensional scene to obtain a plurality of sub-three-dimensional scenes; Step S300: at least one GPU is assigned to each sub-3D scene for rendering, and the sub-viewing field camera maps the 3D scene in the sub-observation area into a 2D rendered image, and the 2D rendered image is recorded as a sub-rendered image; Step S400: fusing a plurality of sub-rendering images according to a 3D rendering fusion method based on multi-GPU collaboration as described in any one of claims 1 to 3 to achieve rendering of a 3D scene.

6. The 3D rendering method based on multi-GPU collaboration as claimed in claim 5, characterized in that: Before performing step S300, the following steps are also included: In each sub-three-dimensional scene, a corresponding sub-field-of-view camera is respectively set, wherein each sub-field-of-view camera is located in a unified global coordinate system; At least one position marking point is set in the sub-observation area formed by the sub-field-of-view camera.

7. The 3D rendering method based on multi-GPU collaboration as claimed in claim 5, characterized in that: Step S300 also includes the following steps: Before outputting a plurality of sub-rendering images, the background of the sub-viewing field camera is set to be empty, and the obtained sub-rendering images are divided into a projection area and a blank area.

8. A 3D rendering system based on multi-GPU collaboration, characterized in that: Image acquisition module 2: used to acquire the three-dimensional scene of the rendered object; Segmentation module: used to segment the acquired 3D scene to obtain multiple sub-3D scenes; Rendering module: used to allocate at least one GPU to each sub-3D scene for rendering. The sub-viewing field camera maps the 3D scene in the sub-observation area into a 2D rendered image, and records the 2D rendered image as a sub-rendered image. Fusion module: used to fuse multiple sub-rendering images according to a three-dimensional rendering fusion method based on multi-GPU collaboration as described in any one of claims 1-3 to achieve rendering of a three-dimensional scene.

9. A readable medium, characterized in that: Used to store a program, which, when executed, is used to implement a three-dimensional rendering fusion method based on multi-GPU collaboration as described in one of claims 1-3 or a three-dimensional rendering method based on multi-GPU collaboration as described in one of claims 5-7.

Citation Information

Patent Citations

  • Visual image generation method based on close-range layered rendering

    CN111988598A

  • Rendering method and device and computer readable storage medium

    CN112669372A

  • Target object rendering method and device, computer equipment and medium

    CN113096254A