Multi-GPU parallel rendering system and method in space electromagnetic environment

文档序号:192779 发布日期:2021-11-02 浏览:36次 中文

阅读说明:本技术 空间电磁环境的多gpu并行渲染系统及方法 (Multi-GPU parallel rendering system and method in space electromagnetic environment ) 是由 刘镇瑜 杨英科 霍烁烁 赵文杰 陈磊 燕明亮 李咏晋 谢婷婷 张会 宋磊 李子时 于 2021-06-30 设计创作,主要内容包括:本发明公开一种空间电磁环境的多GPU并行渲染系统,其包括:至少一个物理机,每个物理机上安装有至少一个用于进行渲染操作的GPU模块;GPU代理模块,安装在每个物理机上,用于识别物理机上GPU模块的配置、标识符,设置GPU模块的工作状态、参数,给GPU模块分配渲染任务,收集渲染结果;GPU虚拟服务器,用于管理GPU代理的数量、状态、可用资源,分发渲染任务、渲染参数,收集并融合渲染结果,支持GPU代理模块的动态添加、删除;电磁环境渲染模块,用于设置渲染参数,生成各个辐射源的电磁场及其坐标变换矩阵;通信总线,用于进行GPU代理模块、GPU虚拟服务器和电磁环境渲染模块之间的相互连接。本发明能够加速空间电磁环境渲染工作,无需改变硬件结构,扩展性强。(The invention discloses a multi-GPU parallel rendering system in a space electromagnetic environment, which comprises: each physical machine is provided with at least one GPU module for rendering operation; the GPU proxy module is arranged on each physical machine and used for identifying the configuration and the identifier of the GPU module on the physical machine, setting the working state and the parameters of the GPU module, distributing rendering tasks to the GPU module and collecting rendering results; the GPU virtual server is used for managing the number, the state and the available resources of the GPU agents, distributing rendering tasks and rendering parameters, collecting and fusing rendering results and supporting the dynamic addition and deletion of GPU agent modules; the electromagnetic environment rendering module is used for setting rendering parameters and generating electromagnetic fields and coordinate transformation matrixes of the radiation sources; and the communication bus is used for interconnecting the GPU proxy module, the GPU virtual server and the electromagnetic environment rendering module. The method can accelerate the rendering work of the space electromagnetic environment, does not need to change the hardware structure, and has strong expansibility.)

1. A multi-GPU parallel rendering system of a space electromagnetic environment is characterized in that: it includes:

each physical machine is provided with at least one GPU module, and the GPU module is used for performing rendering operation;

the GPU proxy module is arranged on each physical machine and used for identifying the configuration and the identifier of the GPU module on the physical machine, setting the working state and the parameters of the GPU module, distributing rendering tasks to the GPU module and collecting rendering results;

the GPU virtual server is used for managing the number, the state and the available resources of the GPU agents, distributing rendering tasks and rendering parameters, collecting and fusing rendering results and supporting the dynamic addition and deletion of GPU agent modules;

the electromagnetic environment rendering module is used for setting rendering parameters, including the position, the direction, the resolution, the far plane, the near plane, the upper boundary, the lower boundary, the left boundary and the right boundary of camera parameters, the number, the position, the power and the radiation characteristics of radiation source parameters, refreshing frequency and generating an electromagnetic field and a coordinate transformation matrix of each radiation source;

and the communication bus is used for interconnecting the GPU proxy module, the GPU virtual server and the electromagnetic environment rendering module.

2. The system for multi-GPU parallel rendering of a spatial electromagnetic environment of claim 1, wherein: the physical machine is a graphic workstation, a server, a desktop computer, a notebook computer or a tablet computer.

3. A multi-GPU parallel rendering method of a space electromagnetic environment is characterized by comprising the following steps: which comprises the following steps:

s1, starting a GPU proxy module, identifying a GPU module on the physical machine, and sending registration information to a GPU virtual server;

s2, starting the GPU virtual server, accepting the registration information of the GPU proxy module, identifying the GPU proxy module, numbering the physical machine and the GPU proxy module, and numbering the GPU module;

s3, starting an electromagnetic environment rendering module, identifying a GPU virtual server, setting camera parameters, setting radiation source parameters, generating a radiation source electromagnetic field and a coordinate conversion matrix thereof, generating a rendering task and sending the rendering task to the GPU virtual server for processing;

s4, after receiving the rendering task, the GPU virtual server divides the rendering task into a plurality of sub-rendering tasks and sends the sub-rendering tasks to the GPU proxy module for processing;

s5, after receiving the plurality of sub-rendering tasks, the GPU proxy module allocates one sub-rendering task to one GPU module for rendering;

s6, executing rendering work by the GPU module on the physical machine, wherein the rendering result is a color buffer area and a depth buffer area;

s7, the GPU proxy module collects the rendering result of the GPU module on the physical machine and sends the rendering result to the GPU virtual server;

s8, the GPU virtual server receives rendering results of all GPU proxy modules and then performs fusion, color values in each color buffer area are fused according to depth values in the corresponding depth buffer areas, finally a picture is formed, the picture represents a space electromagnetic environment rendering effect seen under the current camera view angle, and the result picture is sent to the electromagnetic environment rendering module;

and S9, the electromagnetic environment rendering module displays the rendering result picture on a graphical interface after receiving the rendering result picture.

Technical Field

The invention relates to the technical field of computers and information security, in particular to a multi-GPU parallel rendering system and method in a space electromagnetic environment.

Background

The electromagnetic environment is generated by superposition of the electromagnetic fields of the plurality of radiation sources. The electromagnetic fields of the radiation sources have the relations of crossing, shielding, transparency and the like, and are shown as the shade, the brightness and the like of colors in a visual view. A general mapping method of an electromagnetic environment is to generate electromagnetic fields of respective radiation sources, and map the electromagnetic fields by a volume mapping algorithm. The space electromagnetic environment generally has the characteristics of large radiation source quantity and dispersed geographic space, has high requirements on the storage space of electromagnetic field data and the algorithm drawing speed, and the single GPU rendering environment generally cannot meet the requirements. With the improvement of hardware performance, a system configured by multiple GPUs is more and more popular, the parallel rendering capability of the multiple GPUs can be fully utilized, and the rendering generation speed of the space electromagnetic environment is increased.

Currently, there are three main technologies for parallel rendering using multiple GPUs: the first is the physical splicing of GPU hardware, typically the SLI (flexible Link Interface) technology of NVIDIA and the crossbar fire technology of AMD, and logically splices a plurality of physical GPUs into one GPU, thereby improving the performance of a single GPU such as video memory, throughput and the like; the second is an Alternate Frame Rendering (AFR) technique, where different frames are handed to different GPUs for Rendering; the third is a Frame division Rendering (SFR) technique, in which a Frame is divided into a plurality of sub-frames, and each sub-Frame is delivered to a different GPU for Rendering.

The physical splicing technology of GPU hardware mainly solves the problem that a large amount of electromagnetic field data is frequently uploaded to a GPU to cause jitter of a video memory of the GPU; each frame of rendering of the AFR technology is a serial rendering method; each sprite rendering of the SFR technique is a serial rendering method.

Disclosure of Invention

In order to solve the above problems, an object of the present invention is to provide a system and a method for rendering multiple GPUs in a spatial electromagnetic environment based on a frame fusion technique, where the frame is the result information of GPU rendering, and the technical features of frame fusion mainly include: (1) different frames have the same camera parameters, the same color buffer and depth buffer parameters; (2) the geometry rendered for different frames is different.

In order to achieve the purpose, the invention adopts the following technical scheme:

a multi-GPU parallel rendering system of a spatial electromagnetic environment, comprising:

each physical machine is provided with at least one GPU module, and the GPU module is used for performing rendering operation;

the GPU proxy module is arranged on each physical machine and used for identifying the configuration and the identifier of the GPU module on the physical machine, setting the working state and the parameters of the GPU module, distributing rendering tasks to the GPU module and collecting rendering results;

the GPU virtual server is used for managing the number, the state and the available resources of the GPU agents, distributing rendering tasks and rendering parameters, collecting and fusing rendering results and supporting the dynamic addition and deletion of GPU agent modules;

the electromagnetic environment rendering module is used for setting rendering parameters, including the position, the direction, the resolution, the far plane, the near plane, the upper boundary, the lower boundary, the left boundary and the right boundary of camera parameters, the number, the position, the power and the radiation characteristics of radiation source parameters, refreshing frequency and generating an electromagnetic field and a coordinate transformation matrix of each radiation source;

and the communication bus is used for interconnecting the GPU proxy module, the GPU virtual server and the electromagnetic environment rendering module.

A multi-GPU parallel rendering method of a spatial electromagnetic environment comprises the following steps:

s1, starting a GPU proxy module, identifying a GPU module on the physical machine, and sending registration information to a GPU virtual server;

s2, starting the GPU virtual server, accepting the registration information of the GPU proxy module, identifying the GPU proxy module, numbering the physical machine and the GPU proxy module, and numbering the GPU module;

s3, starting an electromagnetic environment rendering module, identifying a GPU virtual server, setting camera parameters, setting radiation source parameters, generating a radiation source electromagnetic field and a coordinate conversion matrix thereof, generating a rendering task and sending the rendering task to the GPU virtual server for processing;

s4, after receiving the rendering task, the GPU virtual server divides the rendering task into a plurality of sub-rendering tasks and sends the sub-rendering tasks to the GPU proxy module for processing;

s5, after receiving the plurality of sub-rendering tasks, the GPU proxy module allocates one sub-rendering task to one GPU module for rendering;

s6, executing rendering work by the GPU module on the physical machine, wherein the rendering result is a color buffer area and a depth buffer area;

s7, the GPU proxy module collects the rendering result of the GPU module on the physical machine and sends the rendering result to the GPU virtual server;

s8, the GPU virtual server receives rendering results of all GPU proxy modules and then performs fusion, color values in each color buffer area are fused according to depth values in the corresponding depth buffer areas, finally a picture is formed, the picture represents a space electromagnetic environment rendering effect seen under the current camera view angle, and the result picture is sent to the electromagnetic environment rendering module;

and S9, the electromagnetic environment rendering module displays the rendering result picture on a graphical interface after receiving the rendering result picture.

Further, the physical machine is a graphic workstation, a server, a desktop computer, a notebook computer, or a tablet computer.

Due to the adoption of the technical scheme, the invention has the following advantages:

the multi-GPU parallel rendering system of the space electromagnetic environment starts from the generation and rendering mode of the space electromagnetic environment, camera parameters are uniformly set by utilizing the multi-GPU parallel rendering capability, an electromagnetic field of each radiation source is distributed to a GPU module for rendering, rendering results are stored in a color buffer area and a depth buffer area, the rendering results are fused to finally form a picture, and the picture represents the rendering effect of the space electromagnetic environment seen under the current camera view angle; the camera parameters and the radiation source parameters are changed, different space electromagnetic environment rendering effects can be seen by repeating the above processes, and the changed space electromagnetic environment rendering effects can be seen by repeating the above processes for the time-varying radiation source setting rendering updating frequency.

The multi-GPU parallel rendering system of the space electromagnetic environment can simultaneously utilize various heterogeneous GPU resources with different configurations, models, brands and the like to accelerate the rendering work of the space electromagnetic environment without changing a hardware structure.

The multi-GPU parallel rendering system in the space electromagnetic environment has strong expansibility, is very convenient for distributed deployment, and can also be used for deployment on the cloud.

Drawings

FIG. 1 is a schematic diagram of a multi-GPU parallel rendering system for a spatial electromagnetic environment of the present invention;

FIG. 2 is a sequence diagram of the operation of the multi-GPU parallel rendering method of the spatial electromagnetic environment of the present invention;

FIG. 3 is a schematic diagram of the internal communication of the multi-GPU parallel rendering system of the spatial electromagnetic environment of the present invention.

Detailed Description

The technical solution of the present invention will be further described in detail with reference to the accompanying drawings and examples.

As shown in fig. 1, a multi-GPU parallel rendering system for a spatial electromagnetic environment, comprising:

each physical machine is provided with at least one GPU module, and the GPU module is used for performing rendering operation; the physical machine is a graphic workstation, a server, a desktop computer, a notebook computer or a tablet computer;

the GPU proxy module is arranged on each physical machine and used for identifying the configuration and the identifier of the GPU module on the physical machine, setting the working state and the parameters of the GPU module, distributing rendering tasks to the GPU module and collecting rendering results;

the GPU virtual server is used for managing the number, the state and the available resources of the GPU agents, distributing rendering tasks and rendering parameters, collecting and fusing rendering results and supporting the dynamic addition and deletion of GPU agent modules; when the number of the GPU proxy modules is large, the GPU proxy modules are separately managed through a plurality of GPU virtual servers;

the electromagnetic environment rendering module is used for setting rendering parameters, including the position, the direction, the resolution, the far plane, the near plane, the upper boundary, the lower boundary, the left boundary and the right boundary of camera parameters, the number, the position, the power and the radiation characteristics of radiation source parameters, refreshing frequency and generating an electromagnetic field and a coordinate transformation matrix of each radiation source;

the communication bus is used for interconnecting the GPU proxy module, the GPU virtual server and the electromagnetic environment rendering module, and is convenient for realizing data transceiving and instruction control transmission; the implementation mode is DDS, HLA, TENA or DIS.

As shown in fig. 2 and 3, a method for parallel rendering multiple GPUs in a spatial electromagnetic environment includes the following steps:

s1, starting a GPU agent, identifying the number, identifiers and state parameters of GPU modules on the physical machine through an operating system API, a GPU driver and a graphics API (OpenGL, Vulkan, DirectX and Mental), and submitting registration information to the GPU virtual server in a polling mode, wherein the mode supports dynamic addition of the GPU agent modules to the GPU virtual server; the polling mode can send information to the opposite terminal at regular time until response;

s2, starting a GPU virtual server, accepting the registration information of a GPU proxy module, identifying the GPU proxy module, supporting dynamic addition of the GPU proxy module, establishing heartbeat information connection between the GPU virtual server and the GPU proxy module after the GPU virtual server identifies the GPU proxy module, numbering 1, … and N for a physical machine (GPU proxy module), and numbering 1, … and L for the GPU module; the heartbeat information is sent to the opposite terminal regularly until the system quits or the opposite terminal does not respond for a long time; with the enlargement of the parallel GPU scale, each GPU virtual server can manage a certain number of GPU proxy modules through a plurality of GPU virtual servers;

s3, starting an electromagnetic environment rendering module, identifying a GPU virtual server, and adopting a polling mode;

s3.1, setting camera parameters PC, including: position, direction, resolution, far plane, near plane, upper boundary, lower boundary, left boundary, right boundary;

s3.2, setting radiation source parameters PS, including: quantity, location, power, radiation characteristics;

s3.3, generating a radiation source electromagnetic field F, wherein the F is a three-dimensional scalar field taking a radiation source as a center;

s3.4, generating a coordinate conversion matrix M of the radiation source electromagnetic field F, wherein the coordinate conversion matrix M is responsible for converting the radiation source electromagnetic field F into a three-dimensional scalar field taking a camera as a center; the generation method of the coordinate transformation matrix M is carried out by adopting the steps of firstly transforming from a radiation source local coordinate system to a global coordinate system and then transforming from the global coordinate system to a camera local coordinate system; the coordinate conversion work can be finished in a CPU module or a GPU module, and if the CPU module is finished, a coordinate conversion matrix M is set as a unit matrix after the coordinate conversion is finished;

s3.5, generating a rendering task T and sending the rendering task T to the GPU virtual server;

the rendering task T comprises two parts of rendering parameters PR and rendering data PD, and T is { PR, PD };

the rendering parameters PR include camera parameters PC, color buffer format CB (typically 32 RGBA, depending on the attributes supported by the GPU), depth buffer format DB (32-bit, 16-bit, or 24-bit, depending on the attributes supported by the GPU), refresh frequency, PR ═ PC, CB, DB };

rendering data PD is a set of all radiation source electromagnetic field data and conversion matrixes thereof, PD { { F1, M1}, …, { FK, MK } }, K is the number of radiation sources;

note: the starting sequence of the steps S3.1, S3.2 and S3.3 can be exchanged, the polling mode ensures mutual discovery, and the heartbeat information ensures connection and maintenance;

s4, after the GPU virtual server receives the rendering task T,

s4.1, dividing the rendering task into a plurality of sub-rendering tasks, wherein each sub-rendering task tiRendering data comprising rendering parameters and a single radiation source, ti={PR,{Fi,MiH, 1, …, K; k is the number of radiation sources;

s4.2, sending the plurality of sub-rendering tasks to a GPU agent module for processing, wherein the number of the sub-rendering tasks is consistent with the number of idle GPUs managed by the GPU agent module;

s5, after the GPU proxy module receives a plurality of sub-rendering tasks,

s5.1, rendering one sub-task tiAllocating the data to a GPU;

s5.2, setting the GPU state according to the rendering parameters PR, ensuring that the rendering states of all GPUs are consistent, and facilitating the fusion of the step S8;

s5.3, uploading rendering data of the sub-rendering tasks to a GPU module;

s6, the GPU module on the physical machine executes rendering work according to a volume rendering algorithm, the volume rendering algorithm is various, and the common algorithms are as follows: a ray casting method, a footprint method, a miscut-deformation method, a frequency domain method;

s7, the GPU proxy module collects the rendering result of the GPU module on the physical machine and sends the rendering result to the GPU virtual server;

the rendering result isi is the number of the physical machine, and p, … and q are the numbers of the GPU modules on the physical machine i;a color buffer for GPU # x rendering,a depth buffer rendered for GPU # x;

s8, the GPU virtual server receives the rendering results of all the GPU proxy modules and then performs fusion to form a final fusion result R, and the fusion result R is transmitted to the electromagnetic environment rendering module to be displayed; rendering results for all GPUs are I ═ I1,…,INH, the final fused result is R ═ mix (i); the fusion method Mix mainly has two kinds, one is covered according to the depth value; the other is that the color is weighted and fused according to the transparency and the depth;

the depth value coverage fusion method comprises the following steps:

minimum size

The weighted fusion method comprises the following steps:

in the above formula, RGB (.) is the operation of taking color, a (.) is the operation of taking transparency, and R (i, j) represents the color of the pixel point in the ith row and the jth column;

and S9, drawing on the screen by using GDI or OpenGL after the electromagnetic environment rendering module receives the rendering result R.

The above description is only a preferred embodiment of the present invention, and not intended to limit the present invention, and all equivalent changes and modifications made within the scope of the claims of the present invention should fall within the protection scope of the present invention.

9页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:基于虚拟场景的物体绘制方法、装置、设备及存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!