Image rendering method and device

Ray tracing technology is processed through a super-resolution denoising network and a bidirectional frame interpolation network, which solves the problem of insufficient frame rate and resolution of ray tracing technology under low sampling values, achieves efficient image rendering, reduces hardware requirements and reduces noise.

CN112184575BActive Publication Date: 2024-09-13HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010971444.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-16
Publication Date
2024-09-13
Estimated Expiration
2040-09-16

AI Technical Summary

Technical Problem

Existing ray tracing technology cannot meet the high frame rate and high resolution requirements of game rendering under low sampling value conditions, and has high hardware requirements, large computational loads, and serious noise problems.

Method used

The super-resolution denoising network and the bidirectional frame interpolation network are used to process the image. By acquiring three consecutive frames of images, updating the illumination map and interpolating the frames, the noise problem of insufficient sampling information is compensated, and the image resolution and frame rate are improved.

Benefits of technology

Realize high frame rate, high-resolution real-time ray tracing image rendering under low sampling value conditions, reduce hardware equipment requirements, reduce noise, and ensure smooth rendering.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112184575B
    Figure CN112184575B
Patent Text Reader

Abstract

The present application provides a method and device for image rendering, which can achieve high-resolution, high-frame-rate rendering images under low sampling value conditions. The method includes: obtaining three consecutive frames of images, namely, a first image, a second image, and a third image; updating the illumination map of the second image according to the first image to obtain the updated illumination map of the second image; inputting the updated illumination map of the second image into a super-resolution denoising network to obtain a super-resolution denoising image of the second image; updating the illumination map of the third image according to the second image to obtain the updated illumination map of the third image; inputting the updated illumination map of the third image into a super-resolution denoising network to obtain a super-resolution denoising image of the third image; obtaining an initial interpolation image at a target moment according to the super-resolution denoising image of the second image and the super-resolution denoising image of the third image; and inputting the initial interpolation image into a bidirectional interpolation network to obtain an interpolation image at the target moment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and more specifically, to a method and device for image rendering. Background Art

[0002] Ray tracing is a technology used in modern movies, games and other fields to produce or enhance special visual effects. It achieves global illumination such as ambient occlusion, indirect reflection, and diffuse illumination by tracing each ray of light emitted from the camera, ensuring a seamless connection between the image and reality in the rendering framework.

[0003] The current mainstream ray tracing technology is mainly divided into three modes, including offline mode, interactive mode, and real-time mode. The offline mode has the best rendering effect but takes a long time. The interactive mode balances the rendering effect and time, while the real-time mode sacrifices some rendering effects to meet the real-time requirements. The presentation of movies is non-interactive, so it can be rendered offline through a large number of servers during production, while games require real-time human-computer interaction. Therefore, game manufacturers can only calculate each frame of the picture through real-time rendering, and real-time calculation brings a huge amount of calculation. In the field of ray tracing, the light sampling value of each pixel directly affects the rendering effect. A high sampling value means a huge amount of calculation, while a low sampling value introduces a lot of noise while ensuring real-time rendering, which reduces the quality of the rendered image.

[0004] In the prior art, the path tracing algorithm based on Optix takes 70ms to render when the number of samples per pixel (spp) is 1 in the SponzaGlossy scene, and takes 260ms to render when the number of samples per pixel (spp) is 1 in the SanMiguel scene. For the game industry, which takes at most 16ms to render each frame, the path tracing algorithm based on Optix cannot meet the requirements. Therefore, to achieve real-time rendering under limited hardware conditions, it is necessary to use low sampling values ​​and combine them with noise reduction algorithms. Table 1 shows the optimization effect of existing noise reduction algorithms under low sampling values ​​of 1 to 2spp:

[0005] Table 1

[0006] Noise Reduction Algorithm Sample value (spp) Resolution Time consumed (ms) Hardware SBF 1 720 7402 Titan XP AAF 1 720 211 Titan XP LBF 1 720 1550 Titan XP NFOR 1 720 107~121 Intel i7-7700HQ AE 1 720 54.9 Titan XP KPCN 32 1080 12000 Nvidia Quadro M6000 SVGF 1 720 4~5 Titan XP

[0007] In the above table, Titan XP, Intel i7-7700HQ, and Nvidia Quadro M6000 are all high-performance graphics cards. SBF (sure based filter), AAF (axis aligned filter for both soft shadows), LBF (learning based filter), NFOR (nonlinearly weighted first order regression), AE (interactive reconstruction of Monte Carlo image sequences using a recurrent denoising autoencoder) and other denoising algorithms take too long to obtain 720P resolution rendering images under low sampling values ​​and cannot meet the requirements. KPCN (kernel predicting convolutional networks) denoising algorithm requires a higher sampling value to obtain a higher resolution 1080P rendering image, and takes too long and cannot meet the requirements. The time taken by spatiotemporal variance-guided filtering (SVGF) denoising algorithm to obtain 720P resolution rendering images under low sampling values ​​meets the time requirements, but the 720P resolution cannot guarantee the smoothness of the game. Therefore, it can be seen from the above table that the existing real-time ray tracing technology still has the defects of large amount of calculation and high hardware requirements. To achieve a good rendering effect under low sampling value conditions, the rendering takes a long time and cannot meet the time-consuming requirements of game rendering. Therefore, it is particularly important to obtain high frame rate and high resolution real-time rendering effects without increasing hardware costs. Summary of the invention

[0008] The present application provides an image rendering method and device, which can achieve high-resolution, high-frame-rate rendered images under low sampling value conditions.

[0009] In a first aspect, a method for image rendering is provided, the method comprising: acquiring a first image, a second image and a third image, wherein the first image, the second image and the third image are three consecutive frames of images; updating an illumination map of the second image according to the first image to obtain an updated illumination map of the second image; inputting the updated illumination map of the second image into a super-resolution denoising network to obtain a super-resolution denoised image of the second image; updating the illumination map of the third image according to the second image to obtain an updated illumination map of the third image; inputting the updated illumination map of the third image into a super-resolution denoising network to obtain a super-resolution denoised image of the third image; acquiring an initial interpolated frame image at a target moment according to the super-resolution denoised image of the second image and the super-resolution denoised image of the third image; and inputting the initial interpolated frame image into a bidirectional interpolated frame network to obtain an interpolated frame image at the target moment.

[0010] The image rendering method of the embodiment of the present application can process images with low sampling values ​​(for example, 1spp), which greatly reduces the requirements for hardware equipment; the image rendering method of the embodiment of the present application accumulates color values ​​of pixels and updates the illumination map of low sampling values, which can make up for the noise problem caused by insufficient sampling information; the image rendering method of the embodiment of the present application uses a super-resolution denoising network to process the image, which can improve the resolution of the image; the image rendering method of the embodiment of the present application interpolates two consecutive frames of images, and uses a bidirectional interpolation network to process the interpolated image, thereby improving the frame rate of the image and ensuring the smoothness of image rendering.

[0011] In combination with the first aspect, in certain implementations of the first aspect, updating the illumination map of the second image according to the first image to obtain an updated illumination map of the second image includes: obtaining the illumination map of the second image, the illumination map of the second image including color values ​​of multiple pixels, the illumination map of the second image being a direct illumination map or an indirect illumination map; obtaining a second pixel corresponding to a first pixel in the first image, the first pixel being any one of the multiple pixels; and updating the color value of the first pixel according to the color value of the first pixel and the color value of the second pixel to obtain an updated illumination map.

[0012] In order to address the serious noise problem caused by low sampling values, the image rendering method of the embodiment of the present application accumulates time domain information and updates the color value of each pixel in combination with the historical color information of the pixel, thereby updating the image's illumination map, compensating for insufficient sampling values, and reducing rendering noise.

[0013] In combination with the first aspect, in certain implementations of the first aspect, when the position of the second pixel point is not on a grid node of the first image, the method further includes: obtaining the color values ​​of four pixels points closest to the second pixel point, the four pixels points being on a grid node of the first image; and obtaining the color value of the second pixel point based on the color values ​​of the four pixels points.

[0014] The image rendering method of the embodiment of the present application takes into account that the corresponding pixel points of the pixel points of the subsequent frame image in the previous frame image may not be on the grid nodes of the previous frame image. At this time, the color value of the pixel point in the previous frame image cannot be directly obtained. Therefore, the image rendering method of the embodiment of the present application obtains the color value of the pixel point of the previous frame image according to the bilinear interpolation method.

[0015] In combination with the first aspect, in certain implementations of the first aspect, before updating the color value of the first pixel based on the color value of the first pixel and the color value of the second pixel, the method also includes: determining whether the first pixel and the second pixel are consistent, and the determination that the first pixel and the second pixel are consistent includes: obtaining the depth value of the first pixel, the normal value of the first pixel, the patch ID of the first pixel, and the depth value of the second pixel, the normal value of the second pixel, and the patch ID of the second pixel; the square of the difference between the depth value of the first pixel and the depth value of the second pixel is less than a first threshold; the square of the difference between the normal value of the first pixel and the normal value of the second pixel is less than a second threshold; the patch ID of the first pixel is equal to the patch ID of the second pixel.

[0016] In order to ensure that the second pixel is indeed the pixel corresponding to the first pixel in the first image, before using the color value of the second pixel to update the color value of the first pixel, the method of the embodiment of the present application also includes making a consistency judgment on the first pixel and the second pixel. Similarly, if the position of the second pixel corresponding to the first pixel in the first image is not on the grid node of the first image, the depth value, normal vector value, and face ID of the second pixel cannot be directly obtained at this time. Similar to the above method of obtaining the color value, a bilinear interpolation algorithm is required to obtain the depth value, normal vector value, and face ID of the second pixel.

[0017] In combination with the first aspect, in certain implementations of the first aspect, the color value of the first pixel is updated according to the color value of the first pixel and the color value of the second pixel, including: the updated color value of the first pixel is the sum of multiplying the color value of the first pixel by a first coefficient and multiplying the color value of the second pixel by a second coefficient.

[0018] The image rendering method of the embodiment of the present application provides a color value of a first pixel point and a color value of a second pixel point, and a method for updating the color value of the first pixel point, wherein the first coefficient and the second coefficient are preset values.

[0019] In combination with the first aspect, in certain implementations of the first aspect, inputting the updated illumination map of the second image into the super-resolution denoising network also includes: obtaining a depth map of the second image and a normal map of the second image; fusing the depth map of the second image, the normal map of the second image, and the updated illumination map of the second image to obtain a first fusion result; and inputting the first fusion result into the super-resolution denoising network.

[0020] In order to compensate for the problem of inaccurate motion vector estimation for non-rigid motion and shadow motion, the image rendering method of the embodiment of the present application also includes feature fusion of the depth map, the normal vector map and the updated illumination map.

[0021] In combination with the first aspect, in certain implementations of the first aspect, obtaining an initial interpolated frame image at a target moment based on a super-resolution denoised image of a second image and a super-resolution denoised image of a third image includes: obtaining a motion vector from the third image to the second image; determining a first motion vector from the initial interpolated frame image at the target moment to the second image and a second motion vector from the initial interpolated frame image at the target moment to the third image based on the motion vector from the third image to the second image; and obtaining the initial interpolated frame image at the target moment based on the super-resolution denoised image of the second image, the super-resolution denoised image of the third image, the first motion vector, and the second motion vector.

[0022] The image rendering method of the embodiment of the present application interpolates two consecutive frames of images, thereby improving the frame rate of image rendering.

[0023] In combination with the first aspect, in certain implementations of the first aspect, inputting the initial interpolation image into the bidirectional interpolation network also includes: obtaining a depth map of the second image, a normal map of the second image, a depth map of the third image, and a normal map of the third image; fusing the depth map of the second image, the normal map of the second image, the depth map of the third image, and the normal map of the third image with the initial interpolation image to obtain a second fusion result; and inputting the second fusion result into the bidirectional interpolation network.

[0024] In order to compensate for the problem of inaccurate motion vector estimation for non-rigid motion and shadow motion, the image rendering method of the embodiment of the present application further includes performing feature fusion on the depth map, the normal vector map and the initial interpolated image.

[0025] In combination with the first aspect, in certain implementations of the first aspect, the super-resolution denoising network is a pre-trained neural network model, and the training of the super-resolution denoising network includes: obtaining multiple sets of super-resolution denoising original training data, each set of super-resolution denoising original training data in the multiple sets of super-resolution denoising original training data includes two consecutive frames of images and a standard image corresponding to the latter frame of the two consecutive frames of images; judging that the pixels of the two consecutive frames of images are consistent; obtaining the depth map of the latter frame of the two consecutive frames of images, the normal vector map of the latter frame of the image, and the illumination map of the latter frame of the image, the illumination map of the latter frame of the image is a direct illumination map or an indirect illumination map; updating the color values ​​of the pixels of the latter frame of the image according to the two consecutive frames of images to obtain an updated illumination map of the latter frame of the image; fusing the depth map of the latter frame of the image, the normal vector map of the latter frame of the image, and the updated illumination map of the latter frame of the image to obtain an updated image; and training the super-resolution denoising network based on the updated image and the standard image.

[0026] The embodiment of the present application also provides a training method for a super-resolution denoising network, which obtains a low sampling value (e.g., 1spp) image, uses the rendering result of the next frame of the image under a high sampling value (e.g., 4096spp) condition as a standard image, and trains the neural network.

[0027] In combination with the first aspect, in certain implementations of the first aspect, the bidirectional interpolation network is a pre-trained neural network model, and the training of the bidirectional interpolation network includes: obtaining multiple groups of bidirectional interpolation original training data, each group of bidirectional interpolation original training data in the multiple groups of bidirectional interpolation original training data includes a fourth image, a fifth image, and a sixth image, and the fourth image, the fifth image, and the sixth image are three consecutive frames of images; obtaining an interpolation image at an intermediate moment between the fourth image and the sixth image based on the fourth image and the sixth image; and training the bidirectional interpolation network based on the interpolation image at the intermediate moment and the fifth image.

[0028] The embodiment of the present application also provides a training method for a bidirectional interpolation network, which obtains a continuous fourth image, a fifth image, and a sixth image, interpolates the fourth image and the sixth image to obtain an initial interpolation result, and then uses the fifth image as a standard to train the neural network.

[0029] In a second aspect, a device for image rendering is provided, which includes: an acquisition module, used to acquire a first image, a second image and a third image, wherein the first image, the second image and the third image are three consecutive frames of images; a processing module, used to update the illumination map of the second image according to the first image to obtain the updated illumination map of the second image; the processing module is also used to input the updated illumination map of the second image into a super-resolution denoising network to obtain a super-resolution denoised image of the second image; the processing module is also used to update the illumination map of the third image according to the second image to obtain the updated illumination map of the third image; the processing module is also used to input the updated illumination map of the third image into the super-resolution denoising network to obtain the super-resolution denoised image of the third image; the processing module is also used to acquire an initial interpolated frame image at a target moment according to the super-resolution denoised image of the second image and the super-resolution denoised image of the third image, wherein the target moment is a moment between the second image and the third image; the processing module is also used to input the initial interpolated frame image into a bidirectional interpolated frame network to obtain the interpolated frame image at the target moment.

[0030] In combination with the second aspect, in certain implementations of the second aspect, the processing module updates the illumination map of the second image according to the first image to obtain an updated illumination map of the second image, including: obtaining the illumination map of the second image, the illumination map of the second image including color values ​​of multiple pixels, the illumination map of the second image being a direct illumination map or an indirect illumination map; obtaining the second pixel corresponding to the first pixel in the first image, the first pixel being any one of the multiple pixels; updating the color value of the first pixel according to the color value of the first pixel and the color value of the second pixel to obtain an updated illumination map.

[0031] In combination with the second aspect, in certain implementations of the second aspect, when the position of the second pixel point is not on the grid node of the first image, the processing module is also used to: obtain the color values ​​of the four pixels points closest to the second pixel point; and obtain the color value of the second pixel point based on the color values ​​of the four pixels points.

[0032] In combination with the second aspect, in certain implementations of the second aspect, before the processing module updates the color value of the first pixel based on the color value of the first pixel and the color value of the second pixel, the processing module is also used to: determine whether the first pixel and the second pixel are consistent, and the determination of whether the first pixel and the second pixel are consistent includes: obtaining the depth value of the first pixel, the normal value of the first pixel, the patch ID of the first pixel, and the depth value of the second pixel, the normal value of the second pixel, and the patch ID of the second pixel; the square of the difference between the depth value of the first pixel and the depth value of the second pixel is less than a first threshold; the square of the difference between the normal value of the first pixel and the normal value of the second pixel is less than a second threshold; the patch ID of the first pixel is equal to the patch ID of the second pixel.

[0033] In combination with the second aspect, in certain implementations of the second aspect, the color value of the first pixel is updated according to the color value of the first pixel and the color value of the second pixel, including: the updated color value of the first pixel is the sum of multiplying the color value of the first pixel by a first coefficient and multiplying the color value of the second pixel by a second coefficient.

[0034] In combination with the second aspect, in certain implementations of the second aspect, the processing module inputs the updated illumination map of the second image into the super-resolution denoising network, further comprising: acquiring a depth map of the second image and a normal vector map of the second image;

[0035] The depth map of the second image, the normal map of the second image, and the updated illumination map of the second image are fused to obtain a first fusion result; and the first fusion result is input into a super-resolution denoising network.

[0036] In combination with the second aspect, in certain implementations of the second aspect, the processing module obtains an initial interpolated frame image at a target moment based on a super-resolution denoised image of the second image and a super-resolution denoised image of the third image, including: obtaining a motion vector from the third image to the second image; determining a first motion vector from the initial interpolated frame image at the target moment to the second image and a second motion vector from the initial interpolated frame image at the target moment to the third image based on the motion vector from the third image to the second image; and determining the initial interpolated frame image at the target moment based on the super-resolution denoised image of the second image, the super-resolution denoised image of the third image, the first motion vector, and the second motion vector.

[0037] In combination with the second aspect, in certain implementations of the second aspect, the processing module inputs the initial interpolation image into the bidirectional interpolation network, and also includes: obtaining a depth map of the second image, a normal map of the second image, a depth map of the third image, and a normal map of the third image; fusing the depth map of the second image, the normal map of the second image, the depth map of the third image, and the normal map of the third image with the initial interpolation image to obtain a second fusion result; and inputting the second fusion result into the bidirectional interpolation network.

[0038] In combination with the second aspect, in certain implementations of the second aspect, the super-resolution denoising network is a pre-trained neural network model, and the training of the super-resolution denoising network includes: obtaining multiple sets of super-resolution denoising original training data, each set of super-resolution denoising original training data in the multiple sets of super-resolution denoising original training data includes two consecutive frames of images and a standard image corresponding to the latter frame of the two consecutive frames of images; judging that the pixels of the two consecutive frames of images are consistent; obtaining the depth map of the latter frame of the two consecutive frames of images, the normal vector map of the latter frame of the image, and the illumination map of the latter frame of the image, the illumination map of the latter frame of the image is a direct illumination map or an indirect illumination map; updating the color values ​​of the pixels of the latter frame of the image according to the two consecutive frames of images to obtain an updated illumination map of the latter frame of the image; fusing the depth map of the latter frame of the image, the normal vector map of the latter frame of the image, and the updated illumination map of the latter frame of the image to obtain an updated image; and training the super-resolution denoising network based on the updated image and the standard image.

[0039] In combination with the second aspect, in certain implementations of the second aspect, the bidirectional interpolation network is a pre-trained neural network model, and the training of the bidirectional interpolation network includes: obtaining multiple sets of bidirectional interpolation original training data, each set of bidirectional interpolation original training data in the multiple sets of bidirectional interpolation original training data includes a fourth image, a fifth image, and a sixth image, and the fourth image, the fifth image, and the sixth image are three consecutive frames of images; obtaining an interpolation image at an intermediate moment between the fourth image and the sixth image based on the fourth image and the sixth image; and training the bidirectional interpolation network based on the interpolation image at the intermediate moment and the fifth image.

[0040] In a third aspect, a device for image rendering is provided, which includes: a memory for storing programs; a processor for executing the programs stored in the memory, and when the program stored in the memory is executed by the processor, the processor performs part or all of the operations in any one of the methods in the above-mentioned first aspect.

[0041] In a fourth aspect, an electronic device is provided, which includes an image rendering device according to any one of the methods in the second aspect.

[0042] In a fifth aspect, a computer-readable storage medium is provided, which stores a computer program executable by a processor. When the computer program is executed by the processor, the processor performs part or all of the operations in any one of the methods in the first aspect above.

[0043] In a sixth aspect, a chip is provided, which includes a processor, and the processor is used to execute part or all of the operations in the method described in the first aspect.

[0044] In the seventh aspect, a computer program or a computer program product is provided, which includes computer-readable instructions. When the computer-readable instructions are executed by a processor, the processor performs part or all of the operations in any one of the methods in the first aspect above. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 is a schematic block diagram of ray tracing and rasterization of an embodiment of the present application;

[0046] Figure 2 is a schematic structural diagram of a U-Net neural network according to an embodiment of the present application;

[0047] Figure 3 is a schematic block diagram of an electronic device according to an embodiment of the present application;

[0048] Figure 4 is a schematic block diagram of the system architecture of an existing image rendering method based on real-time ray tracing technology in an embodiment of the present application;

[0049] Figure 5 is a schematic block diagram of the system architecture of an image rendering method based on real-time ray tracing technology in an embodiment of the present application;

[0050] Figure 6 is a schematic flow chart of an image rendering method according to an embodiment of the present application;

[0051] Figure 7 is a schematic flow chart of the training of the super-resolution denoising network according to an embodiment of the present application;

[0052] Figure 8 is a schematic flow chart of training a bidirectional interpolation network according to an embodiment of the present application;

[0053] Fig. 9 is a schematic block diagram of an image rendering method according to an embodiment of the present application;

[0054] Fig.10 is a schematic flow chart of obtaining a data set according to an embodiment of the present application;

[0055] Fig.11 is a schematic block diagram of a rasterization process according to an embodiment of the present application;

[0056] Fig.12 is a schematic block diagram of using bilinear interpolation to obtain parameters of pixels of a previous frame according to an embodiment of the present application;

[0057] Fig.13 is a schematic block diagram of performing super-resolution denoising on an image using a super-resolution denoising network in an embodiment of the present application;

[0058] Fig.14is a schematic block diagram of an embodiment of the present application for processing an image using a bidirectional interpolation network;

[0059] Fig.15 is a schematic block diagram of an image rendering device according to an embodiment of the present application;

[0060] Fig.16 is a schematic block diagram of a device for training a super-resolution denoising network according to an embodiment of the present application;

[0061] Fig.17 is a schematic block diagram of a device for training a bidirectional interpolation network according to an embodiment of the present application;

[0062] Fig.18 It is a schematic diagram of the structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0063] The terms used in the following embodiments are only for the purpose of describing specific embodiments, and are not intended to be used as limitations on the present application. As used in the specification and the appended claims of the present application, the singular expressions "one", "a kind of", "said", "above", "the" and "this" are intended to also include expressions such as "one or more", unless there is a clear contrary indication in the context. It should also be understood that in the following embodiments of the present application, "at least one", "one or more" refer to one, two or more. The term "and / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist; for example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship.

[0064] References to "one embodiment" or "some embodiments" etc. described in this specification mean that a particular feature, structure or characteristic described in conjunction with the embodiment is included in one or more embodiments of the present application. Thus, the phrases "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear at different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0065] In order to facilitate understanding of the technical solution of the present application, a brief introduction to the concepts involved in the present application is first given.

[0066] Ray tracing: A special rendering algorithm in 3D computer graphics that starts from the viewpoint and emits a ray through each pixel on the viewing plane and continuously determines the intersection of the ray with the object, while taking into account optical phenomena such as reflection and refraction to render the 3D scene.

[0067] Global illumination (GI): refers to a rendering technology that takes into account both the direct illumination from the light source in the scene and the indirect illumination after reflection from other objects in the scene, showing the combined effect of direct and indirect illumination.

[0068] Rasterization: It is the process of converting vertex data into fragments. It has the function of converting a graph into an image composed of grids. It is a process of converting geometric primitives into a two-dimensional image.

[0069] Rigid body: A solid body of finite size with negligible deformation. The distance between particles inside a rigid body does not change regardless of external forces.

[0070] Image super-resolution: also known as image super-resolution, is a technology that reconstructs an input low-resolution image into a high-resolution image.

[0071] Deep learning: A branch of machine learning, it is an algorithm that uses artificial neural networks as its architecture to represent and learn data.

[0072] The technical solution in this application will be described below in conjunction with the accompanying drawings.

[0073] Figure 1 A schematic block diagram of ray tracing and rasterization in an embodiment of the present application is shown. Both ray tracing and rasterization are rendering technologies, the purpose of which is to project objects in three-dimensional space into two-dimensional screen space for display after computational shading. The difference between ray tracing and rasterization is that ray tracing rendering assumes that each point on the screen is a forward ray, and calculates the distance between these rays and the graphics (such as Figure 1 The positions of the triangles shown in the figure are then calculated, and the texture pixel colors at these positions are then calculated; while rasterization rendering is to first convert the graphics (such as Figure 1 The coordinates of the vertices of the triangle shown in FIG. 1 are transformed, and then the texture is filled inside the triangle on the two-dimensional screen. Compared with rasterization, ray tracing requires more calculation, but the rendering effect is more realistic. The image rendering method of the embodiment of the present application is a rendering method based on ray tracing.

[0074] Then, the convolutional neural network (CNN) U-Net involved in the image rendering method of the embodiment of the present application is introduced. U-Net was initially applied to medical image segmentation tasks. Due to its good effect, it has been widely used in various segmentation tasks. U-Net supports a small amount of data training model, and obtains a higher segmentation accuracy by classifying each pixel. U-Net uses the trained model to segment images quickly. Figure 2 The schematic structure diagram of U-Net is shown below. Figure 2 Give a brief introduction to U-Net. Figure 2 The network structure of U-Net is shown in the figure. The left side is the encoder part, which downsamples the input. Downsampling is achieved through maximum pooling. The right side is the decoder part, which upsamples the encoder output to restore the resolution. Upsampling is achieved through upsampling. The middle part is the skip connection for feature fusion. Since the entire network structure is shaped like a "U", it is called U-Net.

[0075] Among them, upsampling and downsampling can increase the robustness to some small disturbances of the input image, such as image translation and rotation, reduce the risk of overfitting, reduce the amount of calculation and increase the size of the receptive field. The role of upsampling is actually to restore and decode the abstract features to the size of the original image, and finally obtain a clear and noise-free image.

[0076] The image rendering method in the embodiment of the present application can be performed by an electronic device. The electronic device can be a mobile terminal (e.g., a smart phone), a computer, a personal digital assistant, a wearable device, a vehicle-mounted device, an Internet of Things device, or other devices capable of image rendering processing. The electronic device can be a device running an Android system, an IOS system, a Windows system, or other systems.

[0077] The graphics rendering method of the embodiment of the present application can be executed by an electronic device. The specific structure of the electronic device can be as follows: Figure 3 As shown below, combined Figure 3 A detailed introduction to the specific structure of electronic equipment is given.

[0078] In one embodiment, Figure 3 As shown, the electronic device 300 may include: a central processing unit (CPU) 301, a graphics processing unit (GPU) 302, a display device 303 and a memory 304. Optionally, the electronic device 300 may also include at least one communication bus 310 ( Figure 3 ), which is not shown in the figure, is used to realize the connection and communication between various components.

[0079] It should be understood that the various components in the electronic device 300 may also be coupled through other connectors, and the other connectors may include various interfaces, transmission lines or buses, etc. The various components in the electronic device 300 may also be connected in a radial manner centered on the processor 301. In various embodiments of the present application, coupling refers to being electrically connected or connected to each other, including being directly connected or indirectly connected through other devices.

[0080] There are many ways to connect the CPU 301 and the GPU 302, not limited to Figure 3 The central processing unit 301 and the graphics processing unit 302 in the electronic device 300 may be located on the same chip or may be separate chips.

[0081] The functions of the central processing unit 301 , the graphics processing unit 302 , the display device 303 and the memory 304 are briefly introduced below.

[0082] Central processing unit 301: used to run operating system 305 and application 307. Application 307 can be a graphics application, such as a game, a video player, etc. Operating system 305 provides a system graphics library interface, and application 307 generates an instruction stream for rendering graphics or image frames and the required related rendering data through the system graphics library interface and the driver provided by operating system 305, such as graphics library user mode driver and / or graphics library kernel mode driver. Among them, the system graphics library includes but is not limited to: open graphics library for embedded system (OpenGL ES), Khronos platform graphics interface or Vulkan (a cross-platform drawing application interface) and other system graphics libraries. The instruction stream contains a series of instructions, which are usually call instructions for the system graphics library interface.

[0083] Optionally, the central processing unit 301 may include at least one of the following types of processors: an application processor, one or more microprocessors, a digital signal processor (DSP), a microcontroller unit (MCU), or an artificial intelligence processor, etc.

[0084] The CPU 301 may further include necessary hardware accelerators, such as application specific integrated circuits (ASIC), field programmable gate arrays (FPGA), or integrated circuits for implementing logic operations. The processor 301 may be coupled to one or more data buses for transmitting data and instructions between various components of the electronic device 300.

[0085] Graphics processor 302: used to receive the graphics instruction stream sent by processor 301, generate a rendering target through a rendering pipeline, and display the rendering target to display device 303 through a layer synthesis display module of the operating system.

[0086] Alternatively, the graphics processor 302 may include a general-purpose graphics processor that executes software, such as a GPU or other type of dedicated graphics processing unit.

[0087] Display device 303: used to display various images generated by electronic device 300, which may be a graphical user interface (GUI) of an operating system or image data (including still images and video data) processed by graphics processor 302.

[0088] Optionally, the display device 303 may include any suitable type of display screen, such as a liquid crystal display (LCD), a plasma display, or an organic light-emitting diode (OLED) display.

[0089] The memory 304 is a transmission channel between the CPU 301 and the GPU 302 and may be a double data rate synchronous dynamic random access memory (DDR SDRAM) or other types of cache.

[0090] The rendering pipeline is a series of operations that the graphics processor 302 performs sequentially in the process of rendering graphics or image frames. Typical operations include: vertex processing, primitive processing, rasterization, fragment processing, etc.

[0091] In the graphics rendering method of the embodiment of the present application, it involves converting three-dimensional coordinates into two-dimensional coordinates. The following is a brief introduction to the relevant basic concepts.

[0092] The process of converting three-dimensional coordinates to two-dimensional coordinates involves five different coordinate systems.

[0093] Local Space (or Object Space);

[0094] World Space;

[0095] View Space (also called Eye Space);

[0096] Clip Space;

[0097] Screen Space.

[0098] In order to transform coordinates from one coordinate system to another, several transformation matrices are generally needed. The most important transformation matrices are the model, view, and projection matrices. The coordinates of vertex data generally start from the local space, where the coordinates of the local space are called local coordinates. After transformation, the local coordinates will be transformed into world coordinates, view coordinates, clip coordinates, and finally end in the form of screen coordinates.

[0099] In the above coordinate transformation process, the local coordinates are the coordinates of the object relative to the local origin, which is also the coordinates of the object starting from. Next, the local coordinates are transformed into world space coordinates, which are in a larger spatial range. These coordinates are relative to the global origin of the world, and they will be placed relative to the world origin along with other objects. Then the world coordinates are transformed into view space coordinates, so that each coordinate is observed from the perspective of the camera or observer. Once the coordinates arrive in view space, they need to be projected into clip coordinates. Clip coordinates are processed to the range of -1.0 to 1.0 and determine which vertices will appear on the screen. Finally, the clip coordinates are transformed into screen coordinates, and a process called viewport transform is used next. The viewport transform transforms the coordinates in the range of -1.0 to 1.0 into the coordinate range defined by the glViewport function. The final transformed coordinates are sent to the rasterizer, which converts them into fragments (after conversion to fragments, the video image can be displayed based on the fragments).

[0100] In the above process, the reason why vertices are transformed into different spaces is because some operations make sense and are more convenient in a specific coordinate system. For example, when an object needs to be modified, it makes more sense to operate in the local space; if an object needs to be operated relative to the position of other objects, it makes more sense to do this in the world coordinate system, and so on. If we want, we can also define a transformation matrix that transforms directly from local space to clip space, but that will lose a lot of flexibility.

[0101] Next, each coordinate system is introduced in detail.

[0102] Local space:

[0103] Local space is the coordinate space that an object exists in. It is where the object is initially located. Imagine that you create a cube in a modeling software (such as Blender). The origin of the cube you create may be located at (0,0,0), even though it may end up in a completely different position in the program. It is even possible that all the models you create start with (0,0,0) as the initial position (but they will end up in different positions in the world). Therefore, all the vertices of the model you create are in local space: they are local to your object.

[0104] World Space:

[0105] If we import all of our objects into the program, they'll probably all be crammed together at the world's origin (0,0,0), which is not what we want. We want to define a position for each object so we can place it within the larger world. Coordinates in world space are just what the name implies: they are the coordinates of the vertices relative to the (game) world. If you want to scatter objects around in the world (especially if you want to be very realistic), this is the space you want your objects to be transformed to. The coordinates of an object are transformed from local space to world space; this transformation is done with the Model Matrix.

[0106] The model matrix is ​​a transformation matrix that translates, scales, and rotates an object to put it where or how it should be. You can think of it like transforming a house, you need to first scale it down (it's too big in local space), translate it to a small town in the suburbs, and then rotate it a little to the left on the y axis to match the nearby houses. You can also think of the matrix we used in the previous section to place boxes around the scene as roughly a model matrix; we transform the local coordinates of the box to different locations in the scene / world.

[0107] Observation Space:

[0108] The observation space is often referred to as the camera of the cross-platform graphics programming interface (open graphics library, OPENGL) (sometimes also called camera space (Camera Space) or visual space (Eye Space)). The observation space is the result of converting the world space coordinates into the coordinates in front of the user's field of view. Therefore, the observation space is the space observed from the perspective of the camera. This is usually done by a combination of a series of displacements and rotations, translating / rotating the scene so that specific objects are transformed in front of the camera. These combined transformations are usually stored in a view matrix (View Matrix), which is used to transform world coordinates to the observation space. In the next section we will discuss in depth how to create such an observation matrix to simulate a camera.

[0109] Clip Space:

[0110] At the end of a vertex shader run, OpenGL expects all coordinates to fall within a certain range, and any points outside this range should be clipped. The clipped coordinates are ignored, so the remaining coordinates become the fragments visible on the screen. This is where the name Clip Space comes from.

[0111] Because it is not very intuitive to specify all visible coordinates in the range -1.0 to 1.0, we will specify our own coordinate set and transform it back to the normalized device coordinate system, just as OpenGL expects.

[0112] To transform coordinates from view to clip space, we need to define a projection matrix, which specifies a range of coordinates, such as -1000 to 1000 in each dimension. The projection matrix then transforms the coordinates in this specified range to the range of normalized device coordinates (-1.0, 1.0). All coordinates outside the range will not be mapped to the range between -1.0 and 1.0, so they will be clipped. In the range specified by the above projection matrix, the coordinate (1250, 500, 750) will not be visible. This is because its x coordinate is out of range, it is converted to a normalized device coordinate greater than 1.0, so it is clipped.

[0113] For example, if only a portion of a primitive, such as a triangle, exceeds the clipping volume, OpenGL will reconstruct the triangle into one or more triangles to make it fit within the clipping volume.

[0114] Ray tracing obtains accurate global illumination effects such as shadows, reflections, and diffuse reflections by tracing each ray of light emitted from the camera. Therefore, simulating and rendering realistic virtual scenes requires a huge amount of computing and power consumption. Currently, real-time ray tracing based on a resolution of 1920×1080 and a frame rate of 30fps can only provide 1 to 2spp sampling values ​​for each pixel value due to the limitations of GPU hardware conditions. Low sampling values ​​will introduce a lot of noise, which will reduce the quality of the rendered image. For higher resolutions such as 4k or 8k, the sampling value must be lower. Therefore, it is necessary to optimize the rendering effect under low sampling value conditions without increasing hardware costs and maintaining real-time ray tracing, remove noise caused by insufficient sampling, and output stable global illumination images.

[0115] The existing SVGF algorithm combines spatial and temporal information filtering and denoising under 1spp conditions, and simultaneously calculates the variance in spatial and temporal domains to distinguish high-frequency texture information and noise areas, guiding the filter to perform multi-layer filtering. However, this method cannot accurately estimate the motion vectors of non-rigid motion and shadow parts, so the denoising effect of the shadow part is poor; at the same time, this method uses traditional bilateral filtering, which cannot dynamically adjust the filtering weights, and multi-layer filtering takes a long time, so this method has poor timeliness.

[0116] Another existing KPCN algorithm divides the image into specular reflection part and diffuse reflection part, and then uses a neural network to adaptively adjust the filter kernel weights of the specular reflection part and the diffuse reflection part, and finally combines the two parts to obtain a joint denoising result. The disadvantages of this method are that the sampling value is large (usually 32spp), the model structure is large but the effect is single (only has denoising function), the calculation amount is large, the time consumption is long, and the time domain information is not fully utilized for supplementation, so the algorithm can hardly meet the real-time requirements.

[0117] In order to solve the problem of poor denoising effect caused by inaccurate estimation of shadow parts and non-rigid motion vectors, the existing third algorithm uses pixel surface information and shadow information to calculate the gradient change value. The larger the gradient value, the greater the pixel movement, so the corresponding historical information of the pixel is discarded. This method proposes to judge the intensity of movement based on the gradient, which is used to alleviate the ghosting phenomenon caused by the inability to accurately estimate the motion vector due to large displacement, but it cannot be used as a separate denoising module. This method can be combined with the above-mentioned SVGF algorithm, and can also be used in combination with the image rendering method of the embodiment of the present application.

[0118] The power consumption and computing power of existing GPU hardware are limited. Under the condition of high sampling value, the amount of calculation is very large and cannot meet the real-time requirement of 30fps. If only 1 to 2 rays are traced for each pixel, although the amount of calculation is greatly reduced, a lot of noise is introduced. In addition, the noise characteristics of different material surfaces are different. If the same denoising process is used, the denoising effect is not good, which further increases the difficulty of the denoising algorithm under low sampling value. According to the relevant information in the geometry buffer (G-buffer) rendering pipeline, the motion vector of rigid body motion can be accurately obtained. G-buffer refers to a buffer containing color, normal, and world space coordinates. However, the motion vector estimation of non-rigid body and shadow parts is inaccurate, which will cause the rendering effect to degrade. In addition, the real-time performance of the denoising algorithm is further affected by the size of the image resolution. The real-time performance of the ray tracing denoising algorithm at high resolution and high frame rate faces greater challenges.

[0119] Therefore, existing image rendering technology faces the following problems:

[0120] (1) The high sampling value has a huge amount of calculation and cannot meet the real-time requirements, and the low sampling value has serious noise;

[0121] (2) The noise characteristics of different material surfaces are different. If the same denoising process is used, the denoising effect will be poor;

[0122] (3) For game screen rendering, real-time ray tracing is required under high resolution and high frame rate conditions, which is difficult to achieve in real time;

[0123] (4) The motion vector estimation of non-rigid bodies and shadow parts is inaccurate.

[0124] Therefore, an embodiment of the present application proposes a method for image rendering, which, under limited hardware conditions, uses low sampling values ​​and combines time domain information to adopt different optimization strategies for different noise points generated by different materials, so as to achieve real-time ray tracing image rendering with high frame rate and high resolution.

[0125] Figure 4 A schematic block diagram of the system architecture of an existing image rendering method based on real-time ray tracing technology is shown in FIG. Figure 4 As shown, it includes six parts, namely, a model material loading module 401, a ray generation module 402, a ray intersection module 403, a denoising module 404, a post-processing module 405, and a display module 406.

[0126] The first step of image rendering based on real-time ray tracing technology is to load model materials, which mainly involves two parts: the first part is to add the model to be rendered to the scene, and the second part is to add the respective material information and texture information to the model in the scene. This step is implemented by the model material loading module 401.

[0127] Generating rays refers to the process of emitting rays from a light source to an imaging plane. The number of rays emitted for each pixel greatly affects the final rendering effect. A low sampling value results in a blurred image with many noise points; a high sampling value results in a clear image with good effects. However, due to limited hardware conditions, in order to ensure the real-time performance of ray tracing, generally only 1 to 2 rays are emitted for one pixel. This step is implemented by the ray generation module 402.

[0128] Ray tracing splits the rendering task of a scene into considering the impact of several rays emitted from the camera on the scene. These rays do not know each other, but know the information of the entire scene model. Ray intersection refers to tracing the rays emitted by the camera, finding the intersection with the scene model, and obtaining the material, texture and other information of the surface of the scene model based on the intersection position, and calculating the reflected light in combination with the light source information. The calculation of the reflected light is based on Monte Carlo importance sampling. Under the condition of a sampling value of 1spp, only one ray is traced for each intersection. Corresponding to the ray generation part, the sampling value of the reflected light will also affect the final rendering effect. Ray intersection is implemented by generating ray intersection module 403.

[0129] The denoising module 404 is used to reduce the noise generated by low sampling values, thereby ensuring the real-time performance of ray tracing and the rendering effect.

[0130] The post-processing module 405 is used to improve the rendering effect by using tone mapping and temporal antialiasing (TAA) technology. The tone mapping technology is used to map and transform the image color and adjust the grayscale of the image so that the processed image can better express the information and features of the original image; the TAA technology uses color adjustment technology to ease the "jaggies" of the image edge and make the image edge smoother.

[0131] The display module 406 is used to display the final rendered image.

[0132] Figure 5 A schematic block diagram of the system architecture of an image rendering method based on real-time ray tracing technology according to an embodiment of the present application is shown. Figure 5 As shown, it includes seven parts, namely, a model material loading module 501, a downsampling light generation module 502, a light intersection module 503, a denoising module 504, an interpolation module 505, a post-processing module 506, and a display module 507.

[0133] and Figure 4 Different from the existing image rendering method based on real-time ray tracing technology, in the image rendering method based on real-time ray tracing technology in the embodiment of the present application, it is assumed that the size of the final imaging two-dimensional plane is w×h, and the down-sampled image is 1 / 2 of the size of the final imaging plane, then only (1 / 2)w×(1 / 2)h pixels are emitted, which can greatly reduce the amount of calculation for ray intersection.

[0134] Since downsampling is performed when generating light rays, in the image rendering method based on real-time ray tracing technology in the embodiment of the present application, super-resolution technology is integrated into the denoising module 504 to restore the image.

[0135] In addition, a frame insertion module 505 is added after the denoising module 504 to solve the real-time problem in high frame rate scenarios.

[0136] Figure 6 A schematic flow chart of an image rendering method according to an embodiment of the present application is shown. Figure 6 As shown, it includes steps 601 to 607, and these steps are respectively introduced in detail below.

[0137] S601, acquiring the n-1th frame image, the nth frame image, and the n+1th frame image. It should be understood that the n-1th frame image, the nth frame image, and the n+1th frame image are three consecutive frame images, and the consecutive here means that the n-1th frame image is before the nth frame image, and the nth frame image is before the n+1th frame image. Among them, the n-1th frame image, the nth frame image, and the n+1th frame image are Figure 5An image with a low sampling value (eg, 1spp) is generated by the model material loading module 501, the downsampling ray generation module 502, and the ray intersection module 503.

[0138] S602, updating the illumination map of the nth frame image according to the n-1th frame image to obtain an updated illumination map of the nth frame image. This step can be performed by Figure 5 The denoising module 504 in is executed.

[0139] The illumination map includes direct illumination map and indirect illumination map. The direct illumination map is the illumination map obtained when the light source directly shines on the observed object, and the light is reflected from the observed object to the user's eyes. The indirect illumination map is the illumination map obtained when the light source first shines on other objects, and after one or more reflections, the light finally reaches the observed object, and is reflected from the observed object to the user's eyes.

[0140] It should be understood that an image is composed of a plurality of pixels, each of which has a respective color value, and the sum of the color values ​​of all the pixels in an image is the illumination map of the image.

[0141] Specifically, the illumination map includes a direct illumination map and an indirect illumination map. Direct illumination means that the light from the light source directly shines on the object, and indirect illumination means that the light from the light source shines on the object after one or more reflections. The following is explained using the direct illumination map as an example.

[0142] For any pixel in the nth frame image, record it as the first pixel, obtain the pixel corresponding to the first pixel in the n-1th frame image and record it as the second pixel. That is to say, the second pixel is the pixel corresponding to the first pixel in the n-1th frame image. Then, according to the color value of the first pixel and the color value of the second pixel, update the color value of the first pixel. Specifically, the color value of the first pixel can be multiplied by the first coefficient to obtain a first result, and the color value of the second pixel can be multiplied by the second coefficient to obtain a second result, and then the first result is added to the second result to obtain the updated color value of the first pixel. Among them, the first coefficient and the second coefficient can be artificially preset values, and the embodiments of the present application are not specifically limited here.

[0143] Optionally, if the position of the second pixel corresponding to the first pixel in the n-1th frame image is not on the grid node of the n-1th frame image, the color value of the second pixel cannot be directly obtained, and a bilinear interpolation algorithm is required to obtain the color value of the second pixel. Specifically, first find the color values ​​of the four pixels closest to the second pixel, and these four pixels need to be on the grid nodes of the n-1th frame image; then obtain the color values ​​of these four pixels; and use the color values ​​of these four pixels combined with the bilinear interpolation algorithm to calculate the color value of the second pixel.

[0144] Optionally, in order to ensure that the second pixel is indeed the pixel corresponding to the first pixel in the n-1th frame image, before using the color value of the second pixel to update the color value of the first pixel, the method of the embodiment of the present application also includes, performing consistency judgment on the first pixel and the second pixel. Specifically, first obtain the depth value of the first pixel, the normal value of the first pixel, the patch ID of the first pixel, the depth value of the second pixel, the normal value of the second pixel, and the patch ID of the second pixel; if the first pixel and the second pixel meet: the square of the difference between the depth value of the first pixel and the depth value of the second pixel is less than the first threshold, the square of the difference between the normal value of the first pixel and the normal value of the second pixel is less than the second threshold, and the patch ID of the first pixel is equal to the patch ID of the second pixel, then it is considered that the first pixel and the second pixel meet consistency, and the color value of the second pixel can be used to update the color value of the first pixel. If the first pixel and the second pixel do not meet consistency, the color value of the first pixel is not updated with the color value of the second pixel, and the updated color value of the first pixel is set to be the current color value of the first pixel.

[0145] Optionally, if the position of the second pixel corresponding to the first pixel in the n-1th frame image is not on the grid node of the n-1th frame image, the depth value, normal vector value, and face ID of the second pixel cannot be directly obtained. Similar to the above method of obtaining color values, a bilinear interpolation algorithm is required to obtain the depth value, normal vector value, and face ID of the second pixel. Specifically, first find the depth value, normal vector value, and face ID of the four pixels closest to the second pixel. These four pixels need to be on the grid node of the n-1th frame image; then obtain the depth value, normal vector value, and face ID of these four pixels; use the depth value, normal vector value, and face ID of these four pixels in combination with the bilinear interpolation algorithm to calculate the depth value, normal vector value, and face ID of the second pixel.

[0146] After the color value of each pixel in the n-th frame image is updated in the above manner, the updated direct illumination map of the n-th frame image can be obtained.

[0147] In the embodiments of the present application, the direct illumination map and the indirect illumination map are processed in the same manner. The processing manner of the indirect illumination map can refer to the above-mentioned processing manner of the direct illumination map. For the sake of brevity, the embodiments of the present application will not be repeated here.

[0148] S603, input the updated illumination map of the n-th frame image into the super-resolution denoising network to obtain the super-resolution denoising image of the n-th frame image. This step can be performed by Figure 5 The denoising module 504 in is executed.

[0149] It should be understood that the updated illumination map includes an updated direct illumination map and an updated indirect illumination map. Specifically, first obtain the depth map and normal map of the n-th frame image. It should be understood that the depth map of the n-th frame image is the sum of the depth values ​​of all pixels in the n-th frame image, and the normal map of the n-th frame image is the sum of the normal values ​​of all pixels in the n-th frame image; then fuse the updated direct illumination map of the n-th frame image, the updated indirect illumination map, the depth map, and the normal map to obtain a first fusion result, wherein the fusion method may be an existing feature fusion method, such as concate or add, etc., which is not specifically limited in the embodiments of the present application; finally, input the first fusion result into the super-resolution denoising network to obtain a super-resolution denoising image of the n-th frame image. The super-resolution denoising network is a pre-trained neural network model, and the super-resolution denoising network may have the following features: Figure 2 The U-Net network structure shown in Figure 1 and the training process of the super-resolution denoising network are described in detail below.

[0150] S604, updating the illumination map of the n+1th frame image according to the nth frame image to obtain an updated illumination map of the n+1th frame image. This step can be performed by Figure 5 The denoising module 504 in is executed.

[0151] The process of updating the illumination map of the n+1th frame image according to the nth frame image is similar to the process of updating the illumination map of the nth frame image according to the n-1th frame image. Specifically, reference may be made to the above description of the process of updating the illumination map of the nth frame image according to the n-1th frame image to obtain the updated illumination map of the nth frame image. For the sake of brevity, the embodiments of the present application will not be repeated here.

[0152] S605, input the updated illumination map of the n+1th frame image into the super-resolution denoising network to obtain the super-resolution denoising image of the n+1th frame image. This step can be performed by Figure 5 The denoising module 504 in is executed.

[0153] The process of inputting the updated illumination map of the n+1th frame image into the super-resolution denoising network is similar to the process of inputting the updated illumination map of the nth frame image into the super-resolution denoising network. For details, please refer to the above description of the process of inputting the updated illumination map of the nth frame image into the super-resolution denoising network to obtain the super-resolution denoising image of the nth frame image. For the sake of brevity, the embodiments of the present application will not be repeated here.

[0154] S606, obtaining an initial interpolated frame image at a target time according to the super-resolution denoised image of the n-th frame image and the super-resolution denoised image of the n-th frame image, wherein the target time is the time between the n-th frame image and the n+1-th frame image. This step can be performed by Figure 5 The interpolation module 505 in is executed.

[0155] After the super-resolution denoised image of the n-th frame image and the super-resolution denoised image of the n+1-th frame image are obtained according to the above method, the initial interpolated frame image at the target moment is obtained according to the super-resolution denoised image of the n-th frame image and the super-resolution denoised image of the n+1-th frame image, wherein the target moment is the moment between the n-th frame image and the n+1-th frame image, and preferably, the target moment is the middle moment between the n-th frame image and the n+1-th frame image. Specifically, the motion vector from the n+1-th frame image to the n-th frame image is first obtained. It should be understood that each pixel point in the n+1-th frame image has a motion vector to the corresponding pixel point in the n-th frame image, and the sum of the motion vectors of all pixels is the motion vector from the n+1-th frame image to the n-th frame image; then, the first motion vector from the initial interpolated frame image at the target moment to the n-th frame image and the second motion vector from the initial interpolated frame image at the target moment to the n+1-th frame image are determined according to the motion vector from the n+1-th frame image to the n-th frame image. For example, assuming that the motion vector from the n+1-th frame image to the n-th frame image is M 3→2 , the target time is time t, t is a value between (0,1), then the first motion vector from the initial interpolated frame image to the nth frame image at the target time is:

[0156] M t→2 =t×M 3→2

[0157] The second motion vector from the initial interpolated frame image at the target time to the n+1th frame image is:

[0158] M t→3 =-(1-t)×M 3→2

[0159] Finally, the initial interpolated frame image at the target moment can be obtained according to the super-resolution denoised image of the nth frame image, the super-resolution denoised image of the n+1th frame image, the first motion vector and the second motion vector. Assuming that the super-resolution denoised image of the nth frame image is I2 and the super-resolution denoised image of the n+1th frame image is I3, the calculation method of the initial interpolated frame image at the target moment is:

[0160] I t =(1-t)×g(I2,M t→2 )+t×g(I3,M t→3 )

[0161] The function g() represents the mapping operation.

[0162] S607, input the initial interpolation frame image into the bidirectional interpolation frame network to obtain the interpolation frame image at the target moment. This step can be performed by Figure 5 The interpolation module 505 in is executed.

[0163] The method of the embodiment of the present application can directly input the initial interpolation image into the bidirectional interpolation network, but in order to compensate for the problem of inaccurate motion vector estimation of non-rigid motion and shadow motion, the method of the embodiment of the present application also includes: first obtaining the depth map of the n-th frame image, the normal map of the n-th frame image, the depth map of the n+1-th frame image, and the normal map of the n+1-th frame image; then fusing the depth map of the n-th frame image, the normal map of the n-th frame image, the depth map of the third image, and the normal map of the third image with the initial interpolation image to obtain a second fusion result, wherein the fusion method can be an existing feature fusion method, such as concate or add, etc., which is not specifically limited in the embodiment of the present application; finally, inputting the second fusion result into the bidirectional interpolation network. The bidirectional interpolation network is a pre-trained neural network model, and the bidirectional interpolation network can have the following features: Figure 2 The U-Net network structure shown in FIG. 1 and the training process of the bidirectional interpolation network are described in detail below.

[0164] The image rendering method of the embodiment of the present application can process images with low sampling values ​​(for example, 1spp), which greatly reduces the requirements for hardware equipment; the image rendering method of the embodiment of the present application accumulates color values ​​of pixels and updates the illumination map of low sampling values, which can make up for the noise problem caused by insufficient sampling information; the image rendering method of the embodiment of the present application uses a super-resolution denoising network to process the image, which can improve the resolution of the image; the image rendering method of the embodiment of the present application interpolates two consecutive frames of images, and uses a bidirectional interpolation network to process the interpolated image, thereby improving the frame rate of the image and ensuring the smoothness of image rendering.

[0165] Figure 7 A schematic flow chart of the training of the super-resolution denoising network of an embodiment of the present application is shown, as Figure 7 As shown, it includes step 701 to step 706, and these steps are introduced respectively below.

[0166] S701, obtaining multiple groups of super-resolution denoising original training data, wherein each group of super-resolution denoising original training data includes two consecutive frames of images and a standard image corresponding to the latter frame of the two consecutive frames of images.

[0167] Specifically, the two consecutive frames here are images with low sampling values ​​(e.g., 1 spp), and the standard image corresponding to the next frame is the rendering result of the next frame under high sampling value (e.g., 4096 spp). The standard image is used as the training standard for the low sampling value image.

[0168] S702, determining whether the pixels of two consecutive frames of images are consistent.

[0169] Specifically, for each pixel in the next frame image, determine whether the corresponding pixel in the previous frame image is consistent with it. The method for determining the consistency of the pixels can refer to the description in S602 above, and for the sake of brevity, the present embodiment of the application will not be repeated here.

[0170] S703, obtaining a depth map of a later frame of two consecutive frames of images, a normal vector map of the later frame of images, and an illumination map of the later frame of images, wherein the illumination map of the later frame of images is a direct illumination map or an indirect illumination map.

[0171] S704, updating the color values ​​of the pixels of the next frame of image according to the two consecutive frames of image to obtain an updated illumination map of the next frame of image.

[0172] Specifically, for pixels that meet the consistency, the color value of the pixel of the next frame image is updated according to two consecutive frames of images. The method for updating the color value of the pixel can refer to the description in S602 above. For the sake of brevity, the embodiment of the present application will not be repeated here. For pixels that do not meet the consistency, the current color value of the pixel of the next frame image is used as the updated color value of the pixel. After the color value of each pixel in the next frame image is updated, the updated illumination map of the next frame image can be obtained.

[0173] S705 , fusing the depth map of the next frame image, the normal vector map of the next frame image, and the updated illumination map of the next frame image to obtain an updated image.

[0174] The specific fusion method can refer to the above description of S603. For the sake of brevity, the embodiment of the present application will not be repeated here.

[0175] S706: Training a super-resolution denoising network according to the updated image and the standard image.

[0176] It should be understood that the training of the super-resolution denoising network here is the same as the general neural network training method. The high sampling value image is used as the standard so that the training result of the low sampling value image is close to the high sampling value image. When the difference between the training result and the standard image is less than the preset value, the super-resolution denoising network training is considered to be completed.

[0177] Figure 8 A schematic flow chart of the training of the bidirectional interpolation network according to an embodiment of the present application is shown, Figure 8 As shown, it includes step 801 to step 803, and these steps are introduced respectively below.

[0178] S801, obtaining multiple groups of bidirectional interpolation original training data, each group of bidirectional interpolation original training data in the multiple groups of bidirectional interpolation original training data includes a fourth image, a fifth image, and a sixth image, and the fourth image, the fifth image, and the sixth image are three consecutive frames of images.

[0179] The fourth image, the fifth image, and the sixth image may be super-resolution denoised images obtained through the above steps, or may be other images, which is not limited in the embodiment of the present application.

[0180] S802: Acquire an interpolated frame image at a moment between the fourth image and the sixth image according to the fourth image and the sixth image.

[0181] The acquisition of the interpolated frame image at the intermediate moment may refer to the above description of S606, and for the sake of brevity, the embodiment of the present application will not be repeated here.

[0182] S803: Training a bidirectional interpolation network according to the interpolation image at the intermediate moment and the fifth image.

[0183] The fifth image is used as the standard image so that the training result of the interpolation image at the intermediate moment is close to the fifth image. When the difference between the training result and the fifth image is less than a preset value, it is considered that the bidirectional interpolation network training is completed at this time.

[0184] The image rendering method of the embodiment of the present application is mainly aimed at removing noise under low sampling value conditions (such as 1spp) and achieving real-time ray tracing with high resolution and high frame rate. Fig. 9 A schematic block diagram of an image rendering method according to an embodiment of the present application is shown below. Fig. 9 The image rendering method of the embodiment of the present application is introduced in detail.

[0185] The image rendering method of the embodiment of the present application involves a super-resolution denoising network and a bidirectional interpolation network, and the super-resolution denoising network and the bidirectional interpolation network have the above Figure 2 The U-Net network model structure, super-resolution denoising network and bidirectional interpolation network need to be pre-trained.

[0186] Among them, the training of the super-resolution denoising network includes: dividing the acquired lighting information into direct lighting and indirect lighting through ray tracing, combining the motion vector and consistency judgment in the G-buffer, and updating the color information of the direct lighting and the indirect lighting. The updated color information of the direct lighting and the indirect lighting are fused with the corresponding depth information and normal information in the G-buffer, and the fusion method can be a concate method or an add method. The fused direct lighting and the indirect lighting are input into the super-resolution denoising network to obtain the super-resolution denoising results of the direct lighting and the super-resolution denoising results of the indirect lighting respectively. Finally, the super-resolution denoising results of the direct lighting and the super-resolution denoising results of the indirect lighting are fused to obtain the final super-resolution denoising results. The ground truth of the super-resolution denoising network is the ray tracing rendering result of the sampling value 4096app.

[0187] The training of the bidirectional interpolation network includes: recording the three consecutive frames of images output by the super-resolution denoising network as I AI+Denoise_0 ,I AI+Denoise_1 ,I AI+Denoise_2 , combined with G-buffer to obtain I AI+Denoise_0 and I AI+Denoise_1 ,I AI+Denoise_1 and I AI+Denoise_2 The bidirectional motion vector between the two frames is estimated using the interpolation calculation formula to obtain the initial intermediate interpolation result I AI+Denoise_1_calculate . Will I AI+Denoise_1_calculate As the input of the bidirectional interpolation network, the final interpolation result is obtained. The ground truth of the bidirectional interpolation network is I AI+Denoise_1 .

[0188] Fig. 9 The rasterization rendering shown is to map a series of coordinate values ​​of a three-dimensional object to a two-dimensional plane. The process from three-dimensional coordinates to two-dimensional coordinates is usually carried out in steps, requiring multiple coordinate systems for transition, including: local space, world space, observation space, clipping space, plane space, etc. The transformation of coordinates from one coordinate system to another is achieved through a transformation matrix, where the transformation matrix from local space coordinates to world space coordinates is the model matrix M model , the transformation matrix from the world space coordinate system to the observation space coordinate system is the observation matrix M view , the transformation matrix from the observation space coordinate system to the clipping space coordinate system is the projection matrix M projectionFor moving images, the scenes in two adjacent frames are correlated, so the relative offset of the same pixel in two adjacent frames is the motion vector, and the process of solving the motion vector is motion estimation. According to coordinate calculation, the motion vector of the pixel in two consecutive frames can be obtained. In the rasterization process, the depth information, normal information, mesh ID, motion vector, etc. of the image can be obtained, and all this information is stored in the G-buffer.

[0189] like Fig. 9 As shown, the illumination information obtained by ray tracing is divided into direct illumination and indirect illumination. By accessing the historical color buffer and combining the color value of the corresponding pixel in the current frame, the continuous accumulation of color values ​​in the time domain can be achieved. This is because when the sampling value is small, the image will produce more noise. Accumulating the historical color value with the current color value is equivalent to increasing the sampling value. However, due to the inaccuracy of the motion vector estimation of non-rigid bodies such as shadows, it is necessary to perform consistency judgment based on the normal information, depth information and meshid in the G-buffer. The historical information will be accumulated only when and only when the normal information, depth information and meshid of the pixel meet the consistency at the same time. Specifically, according to the motion vector, the position of the pixel in the current frame is projected into the previous frame, and bilinear interpolation is used to obtain the normal information, depth information and meshid of the pixel in the previous frame, and then a consistency judgment is performed, and the color cache of direct illumination and indirect illumination is updated according to the judgment result. Finally, the color information of direct illumination and indirect illumination as well as the corresponding depth information and normal information are fused respectively and input into the super-resolution denoising network to obtain the super-resolution denoising image, which are recorded as frame 0 and frame 1 respectively. Frame 0 and frame 1 are two consecutive frames of images.

[0190] According to the motion vector information in the G-buffer, the bidirectional motion vector corresponding to the intermediate time t between the 0th frame and the 1st frame can be obtained through linear operation. The initial interpolation result can be obtained by combining the super-resolution denoised images of the 0th frame and the 1st frame with the bidirectional motion vector corresponding to the intermediate time t. The initial interpolation result is fused with the corresponding depth information and normal information in the G-buffer, and then input into the bidirectional interpolation network to obtain the final interpolation result, that is, the final tth frame image.

[0191] The image rendering method of the embodiment of the present application combines super-resolution technology and interpolation technology to obtain images with high frame rate and resolution under low sampling value conditions, while reducing rendering time. Fig. 9 The image rendering method of the embodiment of the present application has been introduced. The image rendering method of the embodiment of the present application is further introduced in detail below with reference to specific examples.

[0192] (I) Acquisition of Datasets

[0193] Fig.10 A schematic flow chart of obtaining a data set in an embodiment of the present application is shown, as Fig.10 As shown, the model scene data set used to train the neural network in the embodiment of the present application can be a collection of existing public rendering models, or a collection of model scenes independently developed and constructed. However, in order to ensure the balance of the neural network and the reliability of the training effect, when obtaining the rendering scene data source, different types of rendering scenes should be screened out, such as buildings, cars, homes, games, animals, people, statues and other different scenes. In addition to the richness of the data source content, it is also necessary to ensure the richness of the characteristics of the data itself, including images with different levels of detail texture richness, different materials, and different lighting. The data set should contain smooth areas and complex areas as much as possible, where the difficulty of removing noise in complex areas is greater than that in smooth areas due to the large number of textures. After obtaining data with different contents and different features, the method of the embodiment of the present application also includes a series of operations such as flipping, rotating, stretching and shrinking the acquired image, so as to expand the data set as much as possible.

[0194] (II) Motion Vector Estimation and Back Projection

[0195] Fig.11 A schematic block diagram of the rasterization process of an embodiment of the present application is shown, as shown in FIG. Fig.11 As shown in Figure 1, the process of rasterization is to convert three-dimensional coordinates into two-dimensional coordinates through local space, world space, observation space, clipping space, and screen space. In order to transform coordinates from one coordinate system to another, several transformation matrices are generally required. The most important transformation matrices are the model matrix M model , View matrix M view , Projection matrix M projection Three matrices. The coordinates of vertex data generally start from the local space (LocalSpace), where the coordinates of the local space are called local coordinates (Local Coordinate). After transformation, the local coordinates will be transformed into world coordinates (World Coordinate), view coordinates (View Coordinate), clip coordinates (Clip Coordinate), and finally end in the form of screen coordinates (Screen Coordinate).

[0196] The following describes the calculation process of the motion vector of the same pixel in two consecutive frames of images. Assume that there are two consecutive frames of images I and J, with pixels is a pixel in image I, is the pixel point corresponding to pixel u in image J, then the formal expression of the motion vector is:

[0197] M=(x2-x1,y2-y1)

[0198] The calculation process of getting the motion vector from the rasterized G-buffer is as follows:

[0199] Calculate the previous frame transformation matrix: M mvp_prev =M projection_prev ×M view_prev ×M model_prev ;

[0200] Calculate the current frame transformation matrix: M mvp_cur =M projection_cur ×M view_cur ×M model_cur ;

[0201] Calculate the motion vector: M = M mvp_cur ×aPos-M mvp_prev ×aPos.

[0202] Wherein, aPos represents the three-dimensional coordinates in the local coordinate system.

[0203] The limitation of the above method is that it only targets rigid body motion. Therefore, the method of the embodiment of the present application also needs to use the above calculated motion vector and bilinear interpolation method to find the corresponding pixel point v position of the pixel point u in the current frame image I in the previous frame J, as well as the corresponding depth information, normal vector, meshid and other parameters. Fig.12 As shown in the figure, if the position of the corresponding pixel point v in the previous frame J of the pixel point u in the previous frame image I is not at the vertex position, the depth information, normal vector, meshid and other parameters of the position cannot be directly obtained. Then, the bilinear interpolation method can be used to obtain the normal vector, depth information, meshid and other parameters corresponding to the position P' according to the fixed points P1, P2, P3, and P4 around the pixel point v, as the depth information, normal vector, meshid and other parameters of the pixel point v, which are used for subsequent consistency judgment.

[0204] (III) Consistency judgment

[0205] In the embodiment of the present application, the pixel point u in the current frame is projected to the corresponding position in the previous frame to obtain the pixel point v at the corresponding position, and then the consistency of the pixel points u and v is judged. The formula for judging the consistency is as follows:

[0206] (W z_cur -W z_prev ) 2 <threshold z

[0207] (W n_cur -Wn_prev ) 2 <threshold n

[0208] W id_cur =W id_prev

[0209] Among them, W z_cur Represents the depth value of pixel u, W z_prev Represents the depth value of pixel v. The square of the difference between the two needs to be less than the depth threshold threshold z ; W n_cur Represents the normal value of pixel u, W n_prev Represents the normal value of pixel v. The square of the difference between the two needs to be less than the normal threshold threshold n ; W id_cur Represents the meshid of pixel u, W id_prev Indicates the meshid of pixel v, the two need to be equal. z and normal threshold n It is an empirical value and can be adjusted appropriately according to the rendering results.

[0210] If and only if the above three conditions are met, the pixel is considered to pass the consistency judgment. At this time, the color value of the pixel can be accumulated. The accumulation formula is:

[0211] C update =α×C original +(1-α)×C history

[0212] Among them, C update represents the updated lighting map, C original represents the original lighting map, C history Represents the illumination map in the history cache, α represents the ratio coefficient between the original illumination map and the illumination map in the history cache, and the coefficient can be a manually preset value.

[0213] Optionally, if the pixel point u and the pixel point v do not satisfy consistency, it is considered that no pixel point corresponding to the pixel point u is found in the previous frame, and the current color value of the pixel point u is used as the updated color value.

[0214] (IV) Super-resolution denoising network

[0215] The first part of the data set of the super-resolution denoising network is the direct illumination map obtained from the rendering pipeline. After consistency judgment, the direct illumination color value in the historical cache is accumulated to the current direct illumination map. The formula is as follows:

[0216] C direct_update=α1×C direct_original +(1-α1)×C direct_history

[0217] Among them, C direct_update represents the updated direct lighting map, C direct_original represents the original direct illumination map, C direct_history Represents the direct lighting map in the history cache, and α1 represents the scale factor between the original direct lighting map and the direct lighting map in the history cache.

[0218] The second part of the data set of the super-resolution denoising network is the indirect lighting map obtained from the rendering pipeline. After consistency judgment, the indirect lighting color value in the historical cache is accumulated to the current indirect lighting map. The formula is as follows:

[0219] C indirect_update =α2×C indirect_original +(1-α2)×C indirect_history

[0220] Among them, C indirect_update represents the updated indirect lighting map, C indirect_original represents the original indirect lighting map, C indirect_history Represents the indirect lighting map in the history cache, and α2 represents the scale factor between the original indirect lighting map and the indirect lighting map in the history cache.

[0221] The third part of the super-resolution denoising network dataset is the depth map I of the current frame obtained from the G-buffer depth and normal vector graph I normal_vector .

[0222] In summary, the training dataset of the super-resolution denoising network consists of four parts:

[0223] Dataset = C direct_update +C indirect_update +I depth +I normal_vector

[0224] Fig.13 FIG. 1 is a schematic block diagram showing a method of performing super-resolution denoising on an image using a super-resolution denoising network in an embodiment of the present application. Fig.13 As shown, the processing of the direct illumination map of a certain pixel is taken as an example for explanation. The processing of the indirect illumination map is similar to the processing of the direct illumination map. For details, please refer to the processing of the direct illumination map, which will not be described in detail in this embodiment of the application. Fig.13As shown, first obtain the current frame buffer and the previous frame buffer, wherein the current frame buffer includes the motion vector of the pixel from the current frame to the previous frame, the depth information of the pixel in the current frame, the normal information, meshid and other parameters; the previous frame buffer includes the historical color value of the pixel, the depth information of the pixel in the current frame, the normal information and meshid and other parameters. Then use the motion vector to project the previous frame buffer to the space of the current frame, and perform consistency judgment based on the depth information, normal information and meshid and other parameters. If the judgment result is consistent, the historical color value is accumulated with the current color value to update the color value of the current frame; if the judgment result is inconsistent, the current color value is retained. According to the updated color value, the historical color value is updated. Finally, the updated color value is fused with the depth information and normal information of the current frame, and the fusion result is input into the super-resolution denoising network to obtain the super-resolution denoising image.

[0225] (V) Bidirectional interpolation network

[0226] The acquisition of the data set of the bidirectional interpolation network includes: recording the three consecutive frames of images output by the super-resolution denoising network as I AI+Denoise_0 ,I AI+Denoise_1 ,I AI+Denoise_2 , get I from G-buffer AI+Denoise_1 To I AI+Denoise_0 The motion vector is M 1-0 , get I from G-buffer AI+Denoise_2 To I AI+Denoise_1 The motion vector is M 1-2 , so according to the interpolation formula, the interpolation result can be obtained:

[0227] I AI+Denoise_1_calculate =(1-t)×g(I AI+Denoise_0 ,M t-0 )+t×g(I AI+Denoise_2 ,M t-2 )

[0228] Among them, I AI+Denoise_1_calculate is the interpolation result, t represents the time position of the interpolation result in the 0th frame and the 2nd frame, for example, t can be 0.5, M t-0 Represents the motion vector from time t to frame 0, where M t-0 Equal to M 1-0 , M t-2 Represents the motion vector from time t to the second frame, where M t-2 Equal to M 1-2 .

[0229] Insert the result I AI+Denoise_1_calculate As the input of the bidirectional interpolation network, I AI+Denoise_1As the ground truth of the bidirectional interpolation network, the bidirectional interpolation network can be trained.

[0230] Fig.14 FIG. 4 is a schematic block diagram showing an embodiment of the present application using a bidirectional interpolation network to process an image. 1-0 represents the motion vector from the next frame image to the previous frame image obtained from the G-buffer, t is a coefficient between the interval (0,1), representing the time between the previous frame image I0 and the next frame image I1, then the bidirectional motion vector M at time t can be obtained by linear interpolation calculation t-0 and M t-1 , the calculation formula is as follows:

[0231] M t-0 =t×M 1-0

[0232] M t-1 =(1-t)×M 1-0

[0233] After obtaining the bidirectional motion vector estimation result at time t, mapping operations are performed on the previous frame image I0 and the next frame image I1 as well as the motion vector to obtain the initial interpolation result. The calculation formula is as follows:

[0234] I t_initial =(1-t)×g(I0,M t-0 )+t×g(I1,M t-1 )

[0235] Among them, I t_initial Represents the initial interpolation result, and function g() represents the mapping operation.

[0236] The depth information and normal information of the previous frame and the next frame are obtained from the G-buffer and fused with the initial interpolation result to compensate for the inaccurate motion vector estimation problem of non-rigid motion or shadow motion. The fused result is input into the bidirectional interpolation network to obtain the final interpolation result.

[0237] Combination of the above Figures 7 to 14 The image rendering method of the embodiment of the present application is described in detail. Figures 15 to 18 The graphics rendering device of the embodiment of the present application is described in detail. It should be understood that Figures 15 to 18 The image rendering device can perform each step of the image rendering method of the embodiment of the present application. Figures 15 to 18 When describing the image rendering device shown, repeated descriptions are appropriately omitted.

[0238] Fig.15 is a schematic block diagram of an image rendering device according to an embodiment of the present application, such as Fig.15 As shown, it includes an acquisition module 1501 and a processing module 1502, which are briefly introduced below.

[0239] The acquisition module 1501 is used to acquire a first image, a second image and a third image, where the first image, the second image and the third image are three consecutive frames of images.

[0240] The processing module 1502 is configured to update the illumination map of the second image according to the first image to obtain an updated illumination map of the second image.

[0241] The processing module 1502 is further configured to input the updated illumination map of the second image into a super-resolution denoising network to obtain a super-resolution denoised image of the second image.

[0242] The processing module 1502 is further configured to update the illumination map of the third image according to the second image to obtain an updated illumination map of the third image.

[0243] The processing module 1502 is further configured to input the updated illumination map of the third image into a super-resolution denoising network to obtain a super-resolution denoised image of the third image.

[0244] The processing module 1502 is further configured to obtain an initial interpolated frame image at a target time according to the super-resolution denoised image of the second image and the super-resolution denoised image of the third image, where the target time is a time between the second image and the third image.

[0245] The processing module 1502 is further configured to input the initial interpolation frame image into the bidirectional interpolation frame network to obtain the interpolation frame image at the target moment.

[0246] Optionally, the processing module 1502 is also used to execute the above Figure 6 The steps of S602 to S607 in the method can be specifically referred to above for Figure 6 For the sake of brevity, the embodiments of the present application will not be described in detail here.

[0247] Fig.16 A schematic block diagram of a device for training a super-resolution denoising network according to an embodiment of the present application is shown, Fig.16 As shown, it includes an acquisition module 1601 and a processing module 1602, which are briefly introduced below.

[0248] An acquisition module 1601 is used to acquire multiple sets of super-resolution denoising original training data, each set of super-resolution denoising original training data in the multiple sets of super-resolution denoising original training data includes two consecutive frames of images and a standard image corresponding to the latter frame of the two consecutive frames of images;

[0249] The acquisition module 1601 is further used to acquire a depth map of a later frame of two consecutive frames of images, a normal vector map of the later frame of images, and an illumination map of the later frame of images, where the illumination map of the later frame of images is a direct illumination map or an indirect illumination map;

[0250] Processing module 1602, used to determine whether the pixels of two consecutive frames of images are consistent;

[0251] The processing module 1602 is further used to update the color value of the pixel point of the next frame of image according to two consecutive frames of image, so as to obtain an updated illumination map of the next frame of image;

[0252] The processing module 1602 is further used to fuse the depth map of the next frame image, the normal vector map of the next frame image and the updated illumination map of the next frame image to obtain an updated image;

[0253] The processing module 1602 is also used to train the super-resolution denoising network according to the updated image and the standard image.

[0254] Fig.17 A schematic block diagram of a device for training a bidirectional interpolation network according to an embodiment of the present application is shown, Fig.17 As shown, it includes an acquisition module 1701 and a processing module 1702, which are briefly introduced below.

[0255] An acquisition module 1701 is used to acquire multiple groups of bidirectional interpolation original training data, each group of bidirectional interpolation original training data in the multiple groups of bidirectional interpolation original training data includes a fourth image, a fifth image, and a sixth image, and the fourth image, the fifth image, and the sixth image are three consecutive frames of images;

[0256] A processing module 1702 is used to obtain an interpolated frame image at an intermediate moment between the fourth image and the sixth image according to the fourth image and the sixth image;

[0257] The processing module 1702 is further configured to train the bidirectional interpolation network according to the interpolation image at the intermediate moment and the fifth image.

[0258] Fig.18 It is a schematic diagram of the structure of an electronic device according to an embodiment of the present application.

[0259] It should be understood that Fig.15 The specific structure of the device 1500 shown can be as follows Fig.18 shown.

[0260] Fig.18 The electronic device in the embodiment includes a communication module 3010, a sensor 3020, a user input module 3030, an output module 3040, a processor 3050, a memory 3070 and a power supply 3080. The processor 3050 may include one or more CPUs.

[0261] Fig.18 The electronic device shown can execute the various steps of the graphics rendering method of the embodiment of the present application. Specifically, one or more CPUs in the processor 3050 can execute the various steps of the graphics rendering method of the embodiment of the present application.

[0262] Below Fig.18 A detailed introduction to each module of the electronic equipment is given.

[0263] The communication module 3010 may include at least one module that enables the electronic device to communicate with other electronic devices. For example, the communication module 3010 may include one or more of a wired network interface, a broadcast receiving module, a mobile communication module, a wireless Internet module, a local area communication module, and a location (or positioning) information module.

[0264] For example, the communication module 3010 can obtain the game screen from the game server in real time.

[0265] The sensor 3020 can sense some operations of the user, and the sensor 3020 can include a distance sensor, a touch sensor, etc. The sensor 3020 can sense operations such as the user touching the screen or approaching the screen. For example, the sensor 3020 can sense some operations of the user on the game interface.

[0266] The user input module 3030 is used to receive input digital information, character information or contact touch operation / contactless gesture, and receive signal input related to user settings and function control of the system. The user input module 3030 includes a touch panel and / or other input devices. For example, the user can control the game through the user input module 3030.

[0267] The output module 3040 includes a display panel for displaying information input by the user, information provided to the user, or various menu interfaces of the system.

[0268] Optionally, the display panel may be configured in the form of a liquid crystal display (LCD) or an organic light-emitting diode (OLED). In some other embodiments, the touch panel may cover the display panel to form a touch display screen.

[0269] In addition, the output module 3040 may also include a video output module, an alarm, a tactile module, etc. The video output module may display the game screen after the graphics are rendered.

[0270] The power supply 3080 can receive external power and internal power under the control of the processor 3050 and provide power required by various modules of the entire electronic device when they are running.

[0271] The processor 3050 may include one or more CPUs, and the processor 3050 may also include one or more GPUs.

[0272] When the processor 3050 includes multiple CPUs, the multiple CPUs may be integrated on the same chip or respectively integrated on different chips.

[0273] When the processor 3050 includes multiple GPUs, the multiple GPUs may be integrated on the same chip or respectively integrated on different chips.

[0274] When the processor 3050 includes both a CPU and a GPU, the CPU and the GPU may be integrated on the same chip.

[0275] For example, when Fig.18 When the electronic device shown is a smartphone, the processor of the smartphone generally includes a CPU and a GPU related to image processing. Both the CPU and the GPU may include multiple cores.

[0276] The memory 3070 can store computer programs, including operating system programs 3072 and application programs 3071. Typical operating systems include Microsoft's Windows, Apple's MacOS, and other systems for desktops or notebooks, and Google's macOS. Android Systems such as systems for mobile terminals.

[0277] The memory 3070 may be one or more of the following types: flash memory, hard disk type memory, micro multimedia card type memory, card memory (such as SD or XD memory), random access memory (RAM), static random access memory (SRAM), read only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable ROM (PROM), magnetic memory, magnetic disk or optical disk. In some other embodiments, the memory 3070 may also be a network storage device on the Internet, and the system may perform operations such as updating or reading the memory 3070 on the Internet.

[0278] For example, the above-mentioned memory 3070 can store a computer program (the computer program is a program corresponding to the graphics rendering method of the embodiment of the present application). When the processor 3050 executes the computer program, the processor 3050 can execute the graphics rendering method of the embodiment of the present application.

[0279] The memory 3070 also stores other data 3073 besides the computer program. For example, the memory 3070 may store data in the process of processing the graphics rendering method of the present application.

[0280] Fig.18 The connection relationship between the modules is only an example. The electronic device provided in any embodiment of the present application can also be applied to electronic devices with other connection methods, for example, all modules are connected through a bus.

[0281] The embodiment of the present application further provides a computer-readable storage medium, which stores a computer program executable by a processor. When the computer program is executed by the processor, the processor executes Figures 6 to 8 The method of any one of the above.

[0282] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0283] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0284] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0285] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0286] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0287] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks or optical disks.

[0288] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for image rendering, characterized in that: include: Acquire a first image, a second image, and a third image, wherein the first image, the second image, and the third image are three consecutive frames of images; updating a lighting map of the second image according to the first image to obtain an updated lighting map of the second image; Inputting the updated illumination map of the second image into a super-resolution denoising network to obtain a super-resolution denoised image of the second image; updating the illumination map of the third image according to the second image to obtain an updated illumination map of the third image; Inputting the updated illumination map of the third image into a super-resolution denoising network to obtain a super-resolution denoised image of the third image; Acquire an initial interpolated frame image at a target time according to the super-resolution denoised image of the second image and the super-resolution denoised image of the third image, wherein the target time is a time between the second image and the third image; The initial interpolation frame image is input into a bidirectional interpolation frame network to obtain an interpolation frame image at the target moment.

2. The method according to claim 1, characterized in that The updating of the illumination map of the second image according to the first image to obtain an updated illumination map of the second image includes: Acquire a lighting map of the second image, where the lighting map of the second image includes color values ​​of a plurality of pixels, and the lighting map of the second image is a direct lighting map or an indirect lighting map; Acquire a second pixel point corresponding to a first pixel point in the first image, where the first pixel point is any one of the multiple pixel points; The color value of the first pixel is updated according to the color value of the first pixel and the color value of the second pixel to obtain an updated illumination map.

3. The method according to claim 2, characterized in that When the position of the second pixel point is not on a grid node of the first image, the method further includes: Obtaining color values ​​of four pixels closest to the second pixel, where the four pixels are on grid nodes of the first image; The color value of the second pixel is obtained according to the color values ​​of the four pixel points.

4. The method according to claim 2, characterized in that: Before updating the color value of the first pixel point according to the color value of the first pixel point and the color value of the second pixel point, the method further includes: Determining that the first pixel point and the second pixel point are consistent with each other, wherein determining that the first pixel point and the second pixel point are consistent with each other includes: Obtaining the depth value of the first pixel, the normal vector value of the first pixel, the patch ID of the first pixel, and the depth value of the second pixel, the normal vector value of the second pixel, and the patch ID of the second pixel, The square of the difference between the depth value of the first pixel and the depth value of the second pixel is less than a first threshold, The square of the difference between the normal vector value of the first pixel point and the normal vector value of the second pixel point is less than a second threshold, The patch ID of the first pixel is equal to the patch ID of the second pixel.

5. The method according to claim 2, characterized in that: The updating the color value of the first pixel point according to the color value of the first pixel point and the color value of the second pixel point includes: The updated color value of the first pixel is the sum of the color value of the first pixel multiplied by the first coefficient and the color value of the second pixel multiplied by the second coefficient.

6. The method according to claim 1, characterized in that The step of inputting the updated illumination map of the second image into the super-resolution denoising network further includes: Acquire a depth map of the second image and a normal map of the second image; fusing the depth map of the second image, the normal map of the second image, and the updated illumination map of the second image to obtain a first fusion result; The first fusion result is input into the super-resolution denoising network.

7. The method according to claim 1, characterized in that The step of acquiring the initial interpolated frame image at the target moment according to the super-resolution denoised image of the second image and the super-resolution denoised image of the third image comprises: Acquire a motion vector from the third image to the second image; Determine, according to the motion vector from the third image to the second image, a first motion vector from the initial interpolated frame image at the target moment to the second image, and a second motion vector from the initial interpolated frame image at the target moment to the third image; An initial interpolated frame image at the target moment is acquired according to the super-resolution denoised image of the second image, the super-resolution denoised image of the third image, the first motion vector and the second motion vector.

8. The method according to claim 1, characterized in that The step of inputting the initial interpolation frame image into the bidirectional interpolation frame network further includes: Acquire a depth map of the second image, a normal map of the second image, a depth map of the third image, and a normal map of the third image; fusing the depth map of the second image, the normal map of the second image, the depth map of the third image, the normal map of the third image, and the initial interpolated frame image to obtain a second fusion result; The second fusion result is input into the bidirectional interpolation network.

9. The method according to claim 1, characterized in that: The super-resolution denoising network is a pre-trained neural network model, and the training of the super-resolution denoising network includes: Acquire multiple sets of super-resolution denoising original training data, wherein each set of super-resolution denoising original training data includes two consecutive frames of images and a standard image corresponding to the latter frame of the two consecutive frames of images; Determining whether the pixels of the two consecutive frames of images are consistent; Acquire a depth map of a later frame of the two consecutive frames of images, a normal vector map of the later frame of images, and an illumination map of the later frame of images, wherein the illumination map of the later frame of images is a direct illumination map or an indirect illumination map; Updating the color values ​​of the pixels of the next frame of image according to the two consecutive frames of image to obtain an updated illumination map of the next frame of image; Fusing the depth map of the next frame image, the normal map of the next frame image, and the updated illumination map of the next frame image to obtain an updated image; The super-resolution denoising network is trained according to the updated image and the standard image.

10. The method according to any one of claims 1 to 9, characterized in that The bidirectional interpolation network is a pre-trained neural network model, and the training of the bidirectional interpolation network includes: Acquire multiple groups of bidirectional interpolation original training data, each group of bidirectional interpolation original training data in the multiple groups of bidirectional interpolation original training data includes a fourth image, a fifth image, and a sixth image, and the fourth image, the fifth image, and the sixth image are three consecutive frames of images; Acquire an interpolated frame image at an intermediate moment between the fourth image and the sixth image according to the fourth image and the sixth image; The bidirectional interpolation network is trained according to the interpolation image at the intermediate moment and the fifth image.

11. An image rendering device, characterized in that: include: An acquisition module, used to acquire a first image, a second image and a third image, wherein the first image, the second image and the third image are three consecutive frames of images; a processing module, configured to update the illumination map of the second image according to the first image to obtain an updated illumination map of the second image; The processing module is further used to input the updated illumination map of the second image into a super-resolution denoising network to obtain a super-resolution denoising image of the second image; The processing module is further used to update the illumination map of the third image according to the second image to obtain an updated illumination map of the third image; The processing module is further used to input the updated illumination map of the third image into a super-resolution denoising network to obtain a super-resolution denoising image of the third image; The processing module is further used to obtain an initial interpolated frame image at a target time according to the super-resolution denoised image of the second image and the super-resolution denoised image of the third image, wherein the target time is a time between the second image and the third image; The processing module is further used to input the initial interpolation frame image into a bidirectional interpolation frame network to obtain the interpolation frame image at the target moment.

12. The device according to claim 11, characterized in that The processing module updates the illumination map of the second image according to the first image to obtain an updated illumination map of the second image, including: Acquire a lighting map of the second image, where the lighting map of the second image includes color values ​​of a plurality of pixels, and the lighting map of the second image is a direct lighting map or an indirect lighting map; Acquire a second pixel point corresponding to a first pixel point in the first image, where the first pixel point is any one of the multiple pixel points; The color value of the first pixel is updated according to the color value of the first pixel and the color value of the second pixel to obtain an updated illumination map.

13. The device according to claim 12, characterized in that When the position of the second pixel point is not on a grid node of the first image, the processing module is further configured to: Obtain color values ​​of four pixels closest to the second pixel; The color value of the second pixel is obtained according to the color values ​​of the four pixel points.

14. The device according to claim 12, characterized in that Before the processing module updates the color value of the first pixel according to the color value of the first pixel and the color value of the second pixel, the processing module is further configured to: Determining whether the first pixel point and the second pixel point are consistent, wherein determining whether the first pixel point and the second pixel point are consistent includes: Obtaining the depth value of the first pixel, the normal vector value of the first pixel, the patch ID of the first pixel, and the depth value of the second pixel, the normal vector value of the second pixel, and the patch ID of the second pixel, The square of the difference between the depth value of the first pixel and the depth value of the second pixel is less than a first threshold, The square of the difference between the normal vector value of the first pixel point and the normal vector value of the second pixel point is less than a second threshold, The patch ID of the first pixel is equal to the patch ID of the second pixel.

15. The device according to claim 12, characterized in that The updating the color value of the first pixel point according to the color value of the first pixel point and the color value of the second pixel point includes: The updated color value of the first pixel is the sum of the color value of the first pixel multiplied by the first coefficient and the color value of the second pixel multiplied by the second coefficient.

16. The device according to claim 11, characterized in that The processing module inputs the updated illumination map of the second image into the super-resolution denoising network, and further includes: Acquire a depth map of the second image and a normal map of the second image; fusing the depth map of the second image, the normal map of the second image, and the updated illumination map of the second image to obtain a first fusion result; The first fusion result is input into the super-resolution denoising network.

17. The device according to claim 11, characterized in that The processing module acquires an initial interpolated frame image at a target moment according to the super-resolution denoised image of the second image and the super-resolution denoised image of the third image, including: Acquire a motion vector from the third image to the second image; Determine, according to the motion vector from the third image to the second image, a first motion vector from the initial interpolated frame image at the target moment to the second image, and a second motion vector from the initial interpolated frame image at the target moment to the third image; An initial interpolated frame image at the target moment is determined according to the super-resolution denoised image of the second image, the super-resolution denoised image of the third image, the first motion vector, and the second motion vector.

18. The device according to claim 11, characterized in that The processing module inputs the initial interpolation frame image into a bidirectional interpolation frame network, and further includes: Acquire a depth map of the second image, a normal map of the second image, a depth map of the third image, and a normal map of the third image; fusing the depth map of the second image, the normal map of the second image, the depth map of the third image, the normal map of the third image, and the initial interpolated frame image to obtain a second fusion result; The second fusion result is input into the bidirectional interpolation network.

19. The device according to claim 11, characterized in that The super-resolution denoising network is a pre-trained neural network model, and the training of the super-resolution denoising network includes: Acquire multiple sets of super-resolution denoising original training data, wherein each set of super-resolution denoising original training data includes two consecutive frames of images and a standard image corresponding to the latter frame of the two consecutive frames of images; Determining whether the pixels of the two consecutive frames of images are consistent; Acquire a depth map of a later frame of the two consecutive frames of images, a normal map of the later frame of images, and an illumination map of the later frame of images, wherein the illumination map of the later frame of images is a direct illumination map or an indirect illumination map; Updating the color values ​​of the pixels of the next frame of image according to the two consecutive frames of image to obtain an updated illumination map of the next frame of image; Fusing the depth map of the next frame image, the normal map of the next frame image, and the updated illumination map of the next frame image to obtain an updated image; The super-resolution denoising network is trained according to the updated image and the standard image.

20. The device according to any one of claims 11 to 19, characterized in that The bidirectional interpolation network is a pre-trained neural network model, and the training of the bidirectional interpolation network includes: Acquire multiple groups of bidirectional interpolation original training data, each group of bidirectional interpolation original training data in the multiple groups of bidirectional interpolation original training data includes a fourth image, a fifth image, and a sixth image, and the fourth image, the fifth image, and the sixth image are three consecutive frames of images; Acquire an interpolated frame image at an intermediate moment between the fourth image and the sixth image according to the fourth image and the sixth image; The bidirectional interpolation network is trained according to the interpolation image at the intermediate moment and the fifth image.

21. A computer device, characterized in that: include: Memory, used to store programs; A processor is used to execute the program stored in the memory. When the program stored in the memory is executed by the processor, the computer device executes the method according to any one of claims 1 to 10.

22. An electronic device, characterized in that: The electronic device comprises the image rendering device according to any one of claims 11 to 20.

23. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program that can be executed by a processor. When the computer program is executed by the processor, the processor performs the method according to any one of claims 1 to 10.