Image rendering method and device, electronic equipment and storage medium
Through the fusion method of environment map combining direct lighting and random shadow rendering, the problems of blurred shadow details and insufficient rendering efficiency in the prior art are solved, and high-quality and efficient image rendering effects are achieved.
Patent Information
- Application Number
- CN202510586292.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-07
- Publication Date
- 2025-08-12
AI Technical Summary
The existing image rendering technology has shortcomings in shadow detail blur and rendering efficiency, especially the introduction of noise, irradiance cache algorithm, shadow detail blur, pre-integration and separation summing algorithm cannot perform the desired shadow effect.
The image rendering method based on environment map is adopted, through the fusion of direct illumination rendering and random shadow rendering results, combined with the pre-integration algorithm and simplified ray tracing algorithm, the direct illumination and shadow effects of the target point are obtained, and the rendering efficiency is improved through importance sampling and filtering processing.
Improve the quality and efficiency of the overall image rendering results, retain sufficient delicate shadow details and have physical correctness, reduce noise and improve user experience.
Smart Images

Figure CN120472080A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to an image rendering method, device, electronic device, and storage medium. Background Art
[0002] In the field of computer technology, especially in the field of image processing, image-based lighting (IBL) is a widely used image rendering technology, which allows the use of an environment map (Environment Map) surrounding the entire three-dimensional scene to illuminate objects in the three-dimensional scene and obtain an overall image rendering result for the three-dimensional scene. Summary of the Invention
[0003] The present disclosure provides an image rendering method, an apparatus, an electronic device, and a storage medium.
[0004] In a first aspect, the present disclosure provides an image rendering method, comprising:
[0005] Based on the multiple light source information points included in the environment map, a direct lighting rendering result for the target point is obtained; wherein the target point is each pixel point in the scene to be rendered;
[0006] Based on a target number of rendering reference points selected from multiple light source information points, a random shadow rendering result for the target point is obtained;
[0007] The direct lighting rendering results and random shadow rendering results are fused to obtain the single-point image rendering results for the target point;
[0008] Based on the single-point image rendering result of the target point, the overall image rendering result of the scene to be rendered is obtained.
[0009] In a second aspect, the present disclosure provides an image rendering device, comprising:
[0010] A direct lighting rendering result acquisition unit is used to obtain a direct lighting rendering result for a target point based on multiple light source information points included in the environment map; wherein the target point is each pixel point in the scene to be rendered;
[0011] A random shadow rendering result obtaining unit, configured to obtain a random shadow rendering result for a target point based on a target number of rendering reference points selected from a plurality of light source information points;
[0012] A single-point image rendering result acquisition unit is used to fuse the direct illumination rendering result and the random shadow rendering result to obtain a single-point image rendering result for the target point;
[0013] The overall image rendering result acquisition unit is used to obtain the overall image rendering result of the scene to be rendered based on the single-point image rendering result of the target point.
[0014] According to a third aspect, an electronic device is provided, including:
[0015] at least one processor; and
[0016] a memory communicatively connected to the at least one processor; wherein,
[0017] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform any method in the embodiments of the present disclosure.
[0018] In a fourth aspect, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute any method according to the embodiments of the present disclosure.
[0019] By adopting the present disclosure, after taking each pixel point in the scene to be rendered as the target point, a direct lighting rendering result for the target point is obtained based on a plurality of light source information points included in the environment map, so as to reflect the direct lighting effect formed at the target point based on the plurality of light source information points, and a random shadow rendering result for the target point is obtained based on a target number of rendering reference points selected from the plurality of light source information points, so as to reflect the shadow effect generated when the target point is blocked by an obstruction under the illumination of the plurality of light source information points. Thereafter, the direct lighting rendering result and the random shadow rendering result are compared. The results are fused to obtain a single-point image rendering result for the target point. Therefore, the single-point image rendering result can not only reflect the direct lighting effect formed at the target point based on multiple light source information points, but also reflect the shadow effect caused by the target point being blocked by the obstruction under the lighting effect of multiple light source information points. In this way, after obtaining the overall image rendering result for the scene to be rendered based on the single-point image rendering result of the target point, the overall image rendering result can retain enough delicate shadow details and at the same time have a certain physical correctness, thereby improving the quality of the overall image rendering result.
[0020] Moreover, when obtaining the random shadow rendering result for the target point, it is not based on the multiple light source information points included in the environment map (that is, the full amount of light source information points), but is based on the target number of rendering reference points selected from the multiple light source information points. Therefore, it can improve the efficiency of obtaining the random shadow rendering result, thereby improving the efficiency of obtaining the overall image rendering result.
[0021] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In the accompanying drawings, unless otherwise specified, the same reference numerals throughout the multiple drawings represent the same or similar components or elements. These drawings are not necessarily drawn to scale. It should be understood that these drawings only depict some embodiments provided in accordance with the present disclosure and should not be regarded as limiting the scope of the present disclosure.
[0023] Figure 1 A schematic flowchart of an image rendering method provided in an embodiment of the present disclosure;
[0024] Figure 2 An auxiliary illustration of an image rendering method provided in an embodiment of the present disclosure;
[0025] Figure 3 A complete flowchart illustrating an image rendering method provided by an embodiment of the present disclosure;
[0026] Figure 4 A schematic diagram of an IBL result obtained when the integral simplification technique is not used according to an embodiment of the present disclosure;
[0027] Figure 5 A schematic diagram of an IBL result obtained by using the integral simplification technique provided in an embodiment of the present disclosure;
[0028] Figure 6 A schematic diagram of an IBL result obtained when the importance clipping technique is not used according to an embodiment of the present disclosure;
[0029] Figure 7 A schematic diagram of an IBL result obtained by using importance clipping technology provided by an embodiment of the present disclosure;
[0030] Figure 8 A schematic diagram of an IBL result obtained when the sampling point optimization technology is not used according to an embodiment of the present disclosure;
[0031] Figure 9 A schematic diagram of an IBL result obtained when a sampling point optimization technique is used according to an embodiment of the present disclosure;
[0032] Figure 10 Schematic diagram of IBL results obtained using existing IBL technology;
[0033] Figure 11 A schematic diagram of an IBL result obtained by using the image rendering technology provided by an embodiment of the present disclosure;
[0034] Figure 12 A schematic structural block diagram of an image rendering device provided in an embodiment of the present disclosure;
[0035] Figure 13 A schematic structural block diagram of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0036] The present disclosure will be described in further detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise indicated.
[0037] In addition, numerous specific details are provided in the following detailed description to better illustrate the present disclosure. Those skilled in the art will appreciate that the present disclosure can be practiced without certain specific details. In some instances, methods, means, components, circuits, etc. well known to those skilled in the art are not described in detail in order to highlight the main purpose of the present disclosure.
[0038] As mentioned above, IBL is a widely used image rendering technique in the field of computer technology, especially image processing. It allows objects in a 3D scene to be illuminated using an environment map that encompasses the entire scene, resulting in an overall image rendering result for the 3D scene. Currently, commonly used image rendering methods for implementing IBL include ray tracing algorithms, irradiance caching (e.g., irradiance caching), pre-integration algorithms, and split sum algorithms.
[0039] However, the inventors have found that if only the ray tracing algorithm is used, obvious noise will be introduced, thereby reducing the quality of the overall image rendering result, and the rendering efficiency will also be low; if only the irradiance cache algorithm is used, although it can improve the rendering efficiency to a certain extent, there will be a problem of blurred shadow details in the overall image rendering result, which will still reduce the quality of the overall image rendering result; if only the pre-integration algorithm or the separate summation algorithm is used, it will still reduce the quality of the overall image rendering result because it cannot express the shadow rendering effect expected by IBL.
[0040] In this regard, the present disclosure proposes an image rendering method to solve or alleviate one or more technical problems in the prior art.
[0041] Specifically, Figure 1This is a schematic flow chart of an image rendering method provided by an embodiment of the present disclosure, which can be applied to electronic devices, such as conventional computers (e.g., desktop computers, laptops, tablet computers, etc.), smart phones, personal digital assistants, or other similar computing devices. In addition, Figure 1 The image rendering method shown may include at least part of the following contents, and Figure 1 Although a certain logical order is shown in the figure, in some cases, it can also be executed in other orders. Figure 1 Steps shown or described.
[0042] Step S101: obtaining a direct lighting rendering result for a target point based on a plurality of light source information points included in an environment map.
[0043] Among them, the environment map can be a cube map in high dynamic range (HDR) format, which can be obtained from a related image resource website, generated using an online generation tool, or obtained through custom shooting. The embodiments of the present disclosure do not limit this.
[0044] In addition, it should be noted that in the embodiments of the present disclosure, the environment map can be adapted to the scene to be rendered. For example, if the scene to be rendered is an indoor scene, the environment map can be an indoor environment map; for another example, if the scene to be rendered is an outdoor scene, the environment map can be an outdoor environment map. The environment map can include multiple light source information points, and each of the multiple light source information points includes a brightness value and a visibility parameter. The brightness value is used to characterize the brightness and / or color of the light source information point; the visibility parameter is used to characterize the visibility of the light source information point.
[0045] Please combine Figure 2 It should also be noted that in the disclosed embodiments, the target point can be each pixel in the scene to be rendered. That is, when executing step S101, the scene to be rendered can be wrapped with an environment map, and each pixel in the scene to be rendered can be used as a target point. Then, based on the multiple light source information points included in the environment map, a direct lighting rendering result for the target point is obtained. The scene to be rendered can be a three-dimensional scene, and the direct lighting rendering result is used to reflect the direct lighting effect formed at the target point based on the multiple light source information points.
[0046] Step S102 : obtaining a random shadow rendering result for a target point based on a target number of rendering reference points selected from a plurality of light source information points.
[0047] The target number can be a pre-set fixed number or a variable number obtained in real time, and the embodiments of the present disclosure do not limit this. In addition, it should be noted that when the target number is a pre-set fixed number, it can be set according to application requirements, and the embodiments of the present disclosure do not limit this.
[0048] After selecting a target number of rendering reference points from the plurality of light source information points, a random shadow rendering result for the target point can be obtained based on the target number of rendering reference points. The random shadow rendering result is used to reflect the shadow effect produced by the target point being blocked by an obstruction under the illumination of the plurality of light source information points.
[0049] Step S103 , fusing the direct illumination rendering result and the random shadow rendering result to obtain a single-point image rendering result for the target point.
[0050] Among them, the single-point image rendering result can not only reflect the direct lighting effect formed at the target point based on multiple light source information points, but also reflect the shadow effect caused by the target point being blocked by obstructions under the lighting effect of multiple light source information points.
[0051] Step S104 : obtaining an overall image rendering result for the scene to be rendered based on the single-point image rendering result of the target point.
[0052] For example, if a scene to be rendered includes N pixels, then after obtaining N single-point image rendering results corresponding one-to-one to the N pixels, the N single-point image rendering results can be used as the overall image rendering result for the scene to be rendered, that is, the IBL result for the scene to be rendered. Where N ≥ 1 and is an integer.
[0053] The image rendering method provided by the embodiment of the present disclosure can obtain a direct lighting rendering result for the target point after taking each pixel point in the scene to be rendered as the target point based on the multiple light source information points included in the environment map, so as to reflect the direct lighting effect formed at the target point based on the multiple light source information points, and obtain a random shadow rendering result for the target point based on a target number of rendering reference points selected from the multiple light source information points, so as to reflect the shadow effect caused by the target point being blocked by the occluder under the illumination of the multiple light source information points. Thereafter, the direct lighting rendering result and the random shadow rendering result are compared. The shadow rendering results of the machine are fused to obtain the single-point image rendering result for the target point. Therefore, the single-point image rendering result can not only reflect the direct lighting effect formed at the target point based on multiple light source information points, but also reflect the shadow effect caused by the target point being blocked by the obstruction under the lighting effect of multiple light source information points. In this way, after obtaining the overall image rendering result for the scene to be rendered based on the single-point image rendering result of the target point, the overall image rendering result can retain enough delicate shadow details and at the same time have a certain physical correctness, thereby improving the quality of the overall image rendering result.
[0054] Moreover, when obtaining the random shadow rendering result for the target point, it is not based on the multiple light source information points included in the environment map (that is, the full amount of light source information points), but is based on the target number of rendering reference points selected from the multiple light source information points. Therefore, it can improve the efficiency of obtaining the random shadow rendering result, thereby improving the efficiency of obtaining the overall image rendering result.
[0055] For step S101, in the embodiment of the present disclosure, a pre-integration algorithm or a separate sum algorithm can be used to obtain a direct lighting rendering result for the target point based on multiple light source information points included in the environment map. Based on this, in some optional embodiments, step S101, that is, "obtaining a direct lighting rendering result for the target point based on multiple light source information points included in the environment map" may include:
[0056] Each of the multiple light source information points is used as a target information point, and a bidirectional reflectance distribution function (BRDF) is used to obtain a light reflection result generated by the target information point at the target point.
[0057] Based on the brightness value and light reflection result of the target information point, a single point lighting rendering result based on the target information point at the target point position is obtained;
[0058] The multiple single-point lighting rendering results corresponding to the multiple light source information points are integrated to obtain the direct lighting rendering result for the target point.
[0059] The light reflection result can be obtained using BRDF. Here, the light reflection result is used to reflect how the irradiance (Irradiance) in the incident light direction related to the target point affects the radiance (Radiance) in the outgoing light direction related to the target point. That is, the light reflection result can be the ratio of the radiance in the outgoing light direction to the irradiance in the incident light direction.
[0060] After obtaining the light reflection result, we can obtain the single-point lighting rendering result based on the target information point's brightness value and light reflection result. We can also integrate multiple single-point lighting rendering results corresponding to multiple light source information points to obtain the direct lighting rendering result for the target point. This process can be characterized as follows:
[0061] S1=∫ Ω BRDF1×Light 1
[0062] Among them, S1 is used to represent the direct lighting rendering result for the target point; Ω is used to represent the hemispherical integral domain; BRDF1 is used to represent the light reflection result generated by the target information point at the target point when a light source information point among multiple light source information points is used as the target information point; Light1 is used to represent the brightness value of the target information point when a light source information point among multiple light source information points is used as the target information point.
[0063] Through the above method, in the embodiment of the present disclosure, each of the multiple light source information points can be used as a target information point, and BRDF is used to obtain the light reflection result generated by the target information point at the target point, and based on the brightness value and light reflection result of the target information point, a single-point lighting rendering result based on the target information point at the target point is obtained, and then the multiple single-point lighting rendering results corresponding to the multiple light source information points are integrated to obtain the direct lighting rendering result for the target point. This process does not involve a complex algorithm flow, which not only saves computing resources, but also further improves the efficiency of obtaining the overall image rendering results. The calculation results here (that is, direct lighting rendering results) can be converted into a lookup table through discretization processing, or stored by projecting them as coefficients of any spherical basis function, and reused in the subsequent calculation process of multiple pixel points to improve the rendering efficiency of the system.
[0064] In step S102, in the disclosed embodiment, integral simplification technology can be used, specifically a simplified ray tracing algorithm. Based on this, in some optional implementations, step S102, i.e., "obtaining a random shadow rendering result for a target point based on a target number of rendering reference points selected from a plurality of light source information points," can include:
[0065] Based on the visibility parameter integration results of a target number of rendering reference points selected from multiple light source information points, a random shadow rendering result for the target point is obtained.
[0066] The visibility parameter integration result of the target number of rendering reference points can be a calculation result obtained by integrating the visibility parameters of the target number of rendering reference points. Based on this, "obtaining a random shadow rendering result for a target point based on the visibility parameter integration result of the target number of rendering reference points selected from multiple light source information points" can be represented as:
[0067] S2=∫ Ω Visibility 1
[0068] Among them, S2 is used to represent the random shadow rendering result for the target point; Ω is used to represent the hemispherical integration domain; Visibility1 is used to represent the visibility parameter when a rendering reference point among the target number of rendering reference points is used as the current integration point.
[0069] Through the above approach, in the disclosed embodiment, random shadow rendering results for a target point can be obtained simply by integrating the visibility parameters of a target number of rendering reference points. This significantly reduces the computational effort required to obtain the random shadow rendering results, further improving the efficiency of obtaining the overall image rendering results.
[0070] In one example, “obtaining a random shadow rendering result for a target point based on a visibility parameter integration result of a target number of rendering reference points selected from a plurality of light source information points” may include:
[0071] (1) Perform single sampling on multiple light source information points to obtain at least one rendering reference point.
[0072] The at least one rendering point may be one or more, and this embodiment of the present disclosure does not limit this.
[0073] In a specific example, a single sampling of multiple light source information points can be performed using a random sampling method to obtain at least one rendering reference point. For example, an importance sampling algorithm can be used to single-sample multiple light source information points to obtain at least one rendering reference point. Specifically, an importance sampling algorithm can be used to single-sample multiple light source information points according to the sampling principle of treating light source information points with larger brightness values as important information points and light source information points with smaller brightness values as secondary information points to obtain at least one rendering reference point.
[0074] (2) Based on the visibility parameter integration result of at least one rendering reference point, an intermediate shadow rendering result for the target point is obtained.
[0075] The visibility parameter integration result of the at least one rendering reference point may be a calculation result obtained by integrating the visibility parameter of the at least one rendering reference point.
[0076] In addition, it should be noted that in the embodiment of the present disclosure, when "at least one rendering reference point" is a rendering reference point obtained by performing a single sampling of multiple light source information points for the first time, the visibility parameter integration result of the at least one rendering reference point can be used as the intermediate shadow rendering result for the target point; when "at least one rendering reference point" is not a rendering reference point obtained by performing a single sampling of multiple light source information points for the first time, the intermediate shadow rendering result obtained based on the previous round of simple sampling can be updated based on the visibility parameter integration result of the at least one rendering reference point to obtain a new intermediate shadow rendering result. It can also be understood that the visibility parameter integration results of all rendering reference points that have been obtained are used as the new intermediate shadow rendering result. Among them, the visibility parameter integration results of all rendering reference points can be the calculation result obtained by integrating the visibility parameters of all rendering reference points.
[0077] (3) When the intermediate shadow rendering result satisfies the preset convergence condition, the total number of rendering reference points obtained is used as the target number, and the intermediate shadow rendering result is used as the random shadow rendering result.
[0078] The preset convergence condition may be that the intermediate shadow rendering result tends to be stable, or that the intermediate shadow rendering result reaches a preset expected value. Here, the preset expected value may be set according to application requirements, and the embodiments of the present disclosure do not limit this.
[0079] (4) When the intermediate shadow rendering result does not meet the preset convergence condition, the step of performing single sampling on multiple light source information points is performed again to obtain at least one rendering reference point.
[0080] That is, a single sampling is performed on the multiple light source information points again to obtain at least one rendering reference point, and based on the visibility parameter integration result of the at least one rendering reference point, an intermediate shadow rendering result for the target point is obtained.
[0081] In the above example, after a single sampling of multiple light source information points is performed each time to obtain at least one rendering reference point, an intermediate shadow rendering result for the target point is obtained based on the visibility parameter integration result of the at least one rendering reference point. Based on this, in the embodiment of the present disclosure, after obtaining the intermediate shadow rendering result, the direct illumination rendering result and the intermediate shadow rendering result can be fused first to obtain an intermediate single-point image rendering result for the target point, and based on the intermediate single-point image rendering result of the target point, an intermediate overall image rendering result for the scene to be rendered is obtained and displayed to the user in a timely manner, thereby achieving real-time rendering (which can also be understood as rendering in stages), reducing the user's viewing waiting time, and improving the user experience.
[0082] Furthermore, in the above example, a single sampling of multiple light source information points can be performed in the following manner to obtain at least one rendering reference point:
[0083] Get point filtering conditions;
[0084] Evaluate multiple light source information points and determine multiple preliminary reference points that meet the point screening conditions;
[0085] A single sampling is performed on the multiple pre-selected reference points to obtain at least one rendering reference point.
[0086] The point screening condition may be that the brightness value is greater than or equal to a brightness threshold. Here, the brightness threshold may be a pre-set fixed value or a variable value dynamically acquired in real time, and the present disclosure does not limit this.
[0087] In a specific example, when obtaining a point screening condition, the light source information point with the largest brightness value among multiple light source information points can be used as a threshold dependent point, and the brightness value of the threshold dependent point can be used as a target brightness value. A target ratio value is obtained, and then a brightness threshold is obtained based on the target brightness value and the target ratio value, so as to obtain the point screening condition based on the brightness threshold. The target ratio value can be a pre-set fixed value, such as a preset ratio value, or a variable value obtained in real time and dynamically, and the embodiment of the present disclosure is not limited to this. The preset ratio value can be 2% or 5%, and the embodiment of the present disclosure is not limited to this. In addition, in this example, when the target ratio value is a variable value obtained in real time and dynamically, a first ratio value that is negatively correlated with the reference duration can be obtained as the target ratio value (i.e., the shorter the reference duration, the larger the target ratio value obtained; correspondingly, the longer the reference duration, the smaller the target ratio value obtained); or a second ratio value that is negatively correlated with the reference quantity can be obtained as the target ratio value (i.e., the smaller the reference quantity, the larger the target ratio value obtained; correspondingly, the larger the reference quantity, the smaller the target ratio value obtained). The reference duration is the total time it takes to sample multiple light source information points in a single pass during the random shadow rendering process, while the reference number is the total number of rendering reference points obtained during the random shadow rendering process. This can accelerate the convergence of intermediate shadow rendering results, further improving the efficiency of obtaining overall image rendering results.
[0088] In addition, it should be noted that, in the embodiment of the present disclosure, after the target brightness value and the target ratio value are obtained, the product of the target brightness value and the target ratio value may be calculated as the brightness threshold.
[0089] After obtaining the point screening conditions and evaluating multiple light source information points to determine multiple preliminary reference points that meet the point screening conditions, a single sampling can be performed on the multiple preliminary reference points to obtain at least one rendering reference point. In particular, when performing a single sampling on multiple preliminary reference points, a single sampling can be performed on multiple preliminary reference points by random sampling to obtain at least one rendering reference point. For example, an importance sampling algorithm can be used to perform a single sampling on multiple preliminary reference points to obtain at least one rendering reference point. Specifically, an importance sampling algorithm can be used to perform a single sampling on multiple preliminary reference points according to the sampling principle of taking preliminary reference points with larger brightness values as important information points and taking preliminary reference points with smaller brightness values as secondary information points to obtain at least one rendering reference point.
[0090] In the above example, a point filtering condition (for example, a brightness value greater than or equal to a brightness threshold) is obtained, and multiple light source information points are evaluated to determine multiple preliminary reference points that meet the point filtering condition. These preliminary reference points are then sampled once to obtain at least one rendering reference point. This results in a random shadow rendering result with less noise, which in turn reduces the amount of noise in the overall image rendering result, further improving the overall image rendering quality.
[0091] In the embodiment of the present disclosure, step S102 can also be implemented using non-integral simplification technology. Based on this, in some optional implementations, step S102, that is, "obtaining a random shadow rendering result for a target point based on a target number of rendering reference points selected from multiple light source information points" can also be represented as:
[0092]
[0093] Among them, S2 is used to characterize the random shadow rendering result for the target point; Ω is used to characterize the hemispherical integration domain; BRDF2 is used to characterize the light reflection result generated at the target point based on the current integration point when a rendering reference point among the target number of rendering reference points is used as the current integration point; Light2 is used to characterize the brightness value of the current integration point when a rendering reference point among the target number of rendering reference points is used as the current integration point; Visibility1 is used to characterize the visibility parameter when a rendering reference point among the target number of rendering reference points is used as the current integration point.
[0094] In addition, it should be noted that in the embodiment of the present disclosure, when obtaining the random shadow rendering result for the target point in accordance with the above method, the real-time rendering method as described above (which can also be understood as step-by-step rendering in stages) can also be adopted to reduce the user's viewing waiting time and improve the user experience.
[0095] Based on the above, in the embodiment of the present disclosure, after obtaining the direct illumination rendering result for the target point in step S101 and the random shadow rendering result for the target point in step 102, the direct illumination rendering result and the random shadow rendering result can be fused by pixel-by-pixel multiplication to obtain a single-point image rendering result for the target point. This process can be characterized as follows:
[0096] S=S1×S2={∫ Ω BRDF1×Light 1}×{∫ Ω Visibility
[0097] Among them, S is used to characterize the single-point image rendering result for the target point; S1 is used to characterize the direct lighting rendering result for the target point; S2 is used to characterize the random shadow rendering result for the target point; Ω is used to characterize the hemispherical integration domain; BRDF1 is used to characterize the light reflection result generated by the target information point at the target point when a certain light source information point among multiple light source information points is used as the target information point; Light1 is used to characterize the brightness value of the target information point when a certain light source information point among multiple light source information points is used as the target information point; Visibility1 is used to characterize the visibility parameter when a certain rendering reference point among the target number of rendering reference points is used as the current integration point.
[0098] It can also be characterized as:
[0099]
[0100] Among them, S is used to characterize the single-point image rendering result for the target point; S1 is used to characterize the direct lighting rendering result for the target point; S2 is used to characterize the random shadow rendering result for the target point; Ω is used to characterize the hemispherical integral domain; BRDF1 is used to characterize the light reflection result generated at the target point based on the target information point when a certain light source information point among multiple light source information points is used as the target information point; Light1 is used to characterize the brightness value of the target information point when a certain light source information point among multiple light source information points is used as the target information point; BRDF2 is used to characterize the light reflection result generated at the target point based on the current integration point when a certain rendering reference point among the target number of rendering reference points is used as the current integration point; Light2 is used to characterize the brightness value of the current integration point when a certain rendering reference point among the target number of rendering reference points is used as the current integration point; Visibility1 is used to characterize the visibility parameter of a certain rendering reference point among the target number of rendering reference points when it is used as the current integration point.
[0101] In some optional implementations, before executing step S102, the image rendering method further includes:
[0102] Using sampling point optimization technologies such as blue noise or jittered sampling, multiple available information points are selected from multiple light source information points.
[0103] Sampling point optimization technology is an optimized sampling point generation method. Its core goal is to generate uniformly distributed and random sampling points while avoiding the aggregation of low-frequency components. Based on this, it can be understood that the purpose of using sampling point optimization technology in the embodiments of the present disclosure is to perform preliminary sampling of multiple light source information points to obtain multiple usable information points, ensuring that the multiple usable information points have a more uniform distribution and a certain degree of randomness.
[0104] Based on this, in the embodiment of the present disclosure, step S102 may also be:
[0105] Based on a target number of rendering reference points selected from multiple available information points, a random shadow rendering result for the target point is obtained.
[0106] In one example, a random shadow rendering result for a target point can be obtained based on the visibility parameter integration results of a target number of rendering reference points selected from multiple available information points. The specific implementation and examples of this process can be found in the aforementioned description of "Obtaining a random shadow rendering result for a target point based on the visibility parameter integration results of a target number of rendering reference points selected from multiple light source information points," and will not be repeated here.
[0107] Through the above approach, in the disclosed embodiments, any sampling point optimization technique can be employed to perform preliminary sampling on multiple light source information points to obtain multiple usable information points, thereby ensuring a more even distribution of the multiple usable information points while retaining a certain degree of randomness. Thus, when executing step S102, a random shadow rendering result can be obtained for the target point based on a target number of rendering reference points selected from the multiple usable information points, thereby reducing the noise level of the random shadow rendering result and further improving the quality of the overall image rendering result.
[0108] In some optional implementations, before executing step S103, the image rendering method further includes:
[0109] The random shadow rendering result is filtered to obtain a filtered random shadow rendering result.
[0110] In one example, the random shadow rendering result can be filtered using the continuity of adjacent regions in time or space to obtain a filtered random shadow rendering result. In a specific example, the random shadow rendering result can be filtered using any spatiotemporal filter to obtain a filtered random shadow rendering result.
[0111] Based on this, in the embodiment of the present disclosure, step S103 may also be:
[0112] The direct lighting rendering result and the filtered random shadow rendering result are fused to obtain the single-point image rendering result for the target point.
[0113] Through the above method, in the embodiment of the present disclosure, the random shadow rendering result can be filtered to obtain the filtered random shadow rendering result, so as to achieve noise reduction of the random shadow rendering result, and then the direct lighting rendering result and the filtered random shadow rendering result are fused to obtain the single-point image rendering result for the target point, thereby improving the quality of the single-point image rendering result, so as to further improve the quality of the overall image rendering result.
[0114] The following will be combined Figure 3 , the complete process of an image rendering method provided by an embodiment of the present disclosure is described.
[0115] After masking the scene to be rendered with the environment map and taking each pixel in the scene to be rendered as the target point, the IBL result for the target point can be determined based on the mathematical method of the ratio estimate. The IBL result of the target point is decomposed into an analytical solution and a non-analytical solution. The analytical solution is the direct lighting rendering result for the target point, which is used to reflect the direct lighting effect formed at the target point based on multiple light source information points; the non-analytical solution is the random shadow rendering result for the target point, which is used to reflect the shadow effect caused by the target point being blocked by the occluder under the illumination of multiple light source information points.
[0116] The above process can be characterized as:
[0117]
[0118] Among them, the analytical solution part is in the left curly brackets; the non-analytical solution part is in the right curly brackets; S is used to characterize the IBL result; Ω is used to characterize the hemispherical integration domain; BRDF3 is used to characterize the light reflection result generated by the target information point at the target point when a light source information point among multiple light source information points is used as the target information point; Light3 is used to characterize the brightness value of the target information point when a light source information point among multiple light source information points is used as the target information point; Visibility2 is used to characterize the visibility parameter of a light source information point among multiple light source information points when it is used as the current integration point.
[0119] For the analytical solution part, in the embodiment of the present disclosure, any real-time IBL method can be used to obtain it, for example, a pre-integration algorithm or a separate sum algorithm can be used for solution.
[0120] For the non-analytical solution part, in the embodiment of the present disclosure, it can be obtained by "using a ray tracing algorithm to perform shadow sampling, and then using an arbitrary spatiotemporal filter method to perform noise reduction", or by "using a ray tracing algorithm based on importance sampling (Importance Sampling) to perform shadow sampling, and then using an arbitrary spatiotemporal filter method to perform noise reduction". It can be understood that in the embodiment of the present disclosure, for the non-analytical solution part, when it is obtained by "using a ray tracing algorithm to perform shadow sampling, and then using an arbitrary spatiotemporal filter method to perform noise reduction", the non-analytical solution part is actually obtained by processing multiple light source information points; for the non-analytical solution part, when it is obtained by "using a ray tracing algorithm based on importance sampling to perform shadow sampling, and then using an arbitrary spatiotemporal filter method to perform noise reduction", the non-analytical solution part is actually obtained by processing the target number of sampling points (i.e., rendering reference points) obtained by using the importance sampling algorithm, rather than by processing the entire amount of light source information points (i.e., multiple light source information points).
[0121] After obtaining the analytical solution part and the non-analytical solution part, the calculation formula of the ratio estimator can be used to merge the two to achieve a combination of solutions.
[0122] In some optional implementations, the execution efficiency of the image rendering method may be improved by:
[0123] (1) Integration simplification technology
[0124] The ratio estimator is a biased estimator, but it is a good enough consistent estimator for graphics rendering. Therefore, based on the formula of the ratio estimator, to ensure high consistency, the IBL result must include the right curly brace part, that is:
[0125]
[0126] Among them, S is used to characterize the IBL result; Ω is used to characterize the hemispherical integration domain; BRDF3 is used to characterize the light reflection result generated by the target information point at the target point when a certain light source information point among multiple light source information points is used as the target information point; Light3 is used to characterize the brightness value of the target information point when a certain light source information point among multiple light source information points is used as the target information point; Visibility2 is used to characterize the visibility parameter of a certain light source information point among multiple light source information points when it is used as the current integration point.
[0127] At this time, the IBL results are as follows Figure 4 shown.
[0128] If you want to sacrifice some consistency in exchange for the execution efficiency of the image rendering method without affecting the quality of the IBL result, you can replace the right curly brackets with the visibility parameter integration result of the target number of rendering reference points obtained based on the importance sampling algorithm. In this case, we have:
[0129] S={∫ Ω BRDF3×Light3}×{∫ΩVisibility3}
[0130] Among them, S is used to characterize the IBL result; Ω is used to characterize the hemispherical integration domain; BRDF3 is used to characterize the light reflection result generated by the target information point at the target point when a certain light source information point among multiple light source information points is used as the target information point; Light3 is used to characterize the brightness value of the target information point when a certain light source information point among multiple light source information points is used as the target information point; Visibility3 is used to characterize the visibility parameter when a certain rendering reference point among the target number of rendering reference points is used as the current integration point.
[0131] At this time, the IBL results are as follows Figure 5 shown.
[0132] Obviously, Figure 5 In the IBL results shown, the noise is significantly reduced and compared to Figure 4 As for the IBL results shown, there is no noticeable brightness difference.
[0133] (2) Importance Culling Technology
[0134] Since the brightness ranges of multiple light source information points in the environment map vary greatly (for example, some brightness ranges vary as much as 0.0 to 65535.0), this will generate a lot of noise when performing importance sampling. Figure 6 shown.
[0135] Based on this, in the disclosed embodiment, the light source information point with the largest brightness value among multiple light source information points can be used as the threshold-dependent point, and the brightness value of the threshold-dependent point can be used as the target brightness value. A preset ratio value of 5% can be obtained as the target ratio value. Based on the target brightness value and the target ratio value, a brightness threshold can be obtained, and the point screening condition can be obtained based on the brightness threshold. Thereafter, the multiple light source information points can be evaluated to determine multiple preliminary reference points that meet the point screening condition. These multiple preliminary reference points can be sampled to obtain a target number of rendering reference points. The non-analytical solution can be obtained based on the visibility parameter integration results of the target number of rendering reference points.
[0136] At this time, the IBL results are as follows Figure 7 shown.
[0137] Obviously, relative to Figure 6 The IBL results shown are Figure 7 In the IBL results shown, the noise is significantly reduced, and the pressure on the subsequent spatiotemporal filter is also relieved.
[0138] (3) Sampling point optimization technology
[0139] In the disclosed embodiments, sampling point optimization techniques can be employed to select multiple available information points from multiple light source information points. This allows the non-analytical solution to be obtained based on a target number of rendering reference points selected from the multiple available information points. The core of this process is to generate uniformly distributed and random sampling points while avoiding the aggregation of low-frequency components.
[0140] Please combine Figure 8 and Figure 9 ,in, Figure 8 This is the IBL result obtained when the sampling point optimization technology is not used; Figure 9 This is the IBL result after using the sampling point optimization technology. Obviously, the latter has a smaller noise level.
[0141] Finally, please combine Figure 10 and Figure 11 ,in, Figure 10 To use the existing IBL technology, the IBL results are obtained; Figure 11 This is the IBL result obtained using the image rendering method provided by the embodiment of the present disclosure. Obviously, the latter can reflect the light entering from the window in the environment map, that is, after the object is illuminated, it can produce sufficient fine shadow details, which significantly enhances the realism of the IBL result.
[0142] In summary, the image rendering method provided by the embodiments of the present disclosure has the following technical effects:
[0143] Able to meet the needs of real-time rendering;
[0144] It can achieve rapid convergence of the non-analytical solution while ensuring the quality of the non-analytical solution;
[0145] Preserve enough fine shadow details while maintaining a certain degree of physical correctness;
[0146] Supports dynamic scenes and supports both online and offline rendering, thus meeting diverse user needs.
[0147] Easy to integrate into existing image rendering systems.
[0148] The embodiments of the present disclosure also provide an image rendering device that can be integrated into an electronic device, such as a conventional computer (eg, a desktop computer, a laptop computer, a tablet computer, etc.), a smart phone, a personal digital assistant, or other similar computing devices.
[0149] like Figure 12 As shown, the image rendering device 1200 includes:
[0150] The direct lighting rendering result acquisition unit 1201 is used to obtain the direct lighting rendering result for the target point based on the multiple light source information points included in the environment map; wherein the target point is each pixel point in the scene to be rendered;
[0151] The random shadow rendering result obtaining unit 1202 is configured to obtain a random shadow rendering result for a target point based on a target number of rendering reference points selected from a plurality of light source information points;
[0152] The single-point image rendering result acquisition unit 1203 is used to fuse the direct illumination rendering result and the random shadow rendering result to obtain the single-point image rendering result for the target point;
[0153] The overall image rendering result obtaining unit 1204 is configured to obtain an overall image rendering result for the scene to be rendered based on the single-point image rendering result of the target point.
[0154] In some optional implementations, the random shadow rendering result obtaining unit 1202 is configured to:
[0155] Based on the visibility parameter integration results of a target number of rendering reference points selected from multiple light source information points, a random shadow rendering result for the target point is obtained.
[0156] In some optional implementations, the random shadow rendering result obtaining unit 1202 is configured to:
[0157] Performing single sampling on multiple light source information points to obtain at least one rendering reference point;
[0158] Obtaining an intermediate shadow rendering result for a target point based on a visibility parameter integration result of at least one rendering reference point;
[0159] When the intermediate shadow rendering result satisfies a preset convergence condition, the total number of rendering reference points obtained is used as the target number, and the intermediate shadow rendering result is used as the random shadow rendering result;
[0160] Alternatively, when the intermediate shadow rendering result does not meet the preset convergence condition, the step of performing single sampling on the multiple light source information points is performed again to obtain at least one rendering reference point.
[0161] In some optional implementations, the random shadow rendering result obtaining unit 1202 is configured to:
[0162] Get point filtering conditions;
[0163] Evaluate multiple light source information points and determine multiple preliminary reference points that meet the point screening conditions;
[0164] A single sampling is performed on the multiple pre-selected reference points to obtain at least one rendering reference point.
[0165] In some optional implementations, the random shadow rendering result obtaining unit 1202 is configured to:
[0166] The light source information point with the largest brightness value among the multiple light source information points is used as the threshold dependent point, and the brightness value of the threshold dependent point is used as the target brightness value;
[0167] Get the target ratio value;
[0168] Based on the target brightness value and the target ratio value, a brightness threshold is obtained;
[0169] Based on the brightness threshold, the point screening conditions are obtained.
[0170] In some optional implementations, the random shadow rendering result obtaining unit 1202 is used for one of the following:
[0171] Get the preset ratio value as the target ratio value;
[0172] Obtaining a first ratio value that is negatively correlated with a reference duration as a target ratio value; wherein the reference duration is the total duration used for single sampling of multiple light source information points in the process of obtaining a random shadow rendering result;
[0173] A second ratio value that is negatively correlated with a reference number is obtained as a target ratio value; wherein the reference number is the total number of rendering reference points obtained in the process of obtaining the random shadow rendering result.
[0174] In some optional implementations, the image rendering apparatus 1200 further includes a pre-sampling unit configured to:
[0175] Adopt sampling point optimization technology to select multiple available information points from multiple light source information points;
[0176] In this case, the random shadow rendering result obtaining unit 1202 is used to:
[0177] Based on a target number of rendering reference points selected from multiple available information points, a random shadow rendering result for the target point is obtained.
[0178] In some optional implementations, the image rendering apparatus 1200 further includes a filtering unit configured to:
[0179] Performing filtering on the random shadow rendering result to obtain a filtered random shadow rendering result;
[0180] In this case, the single-point image rendering result obtaining unit 1203 is used to:
[0181] The direct lighting rendering result and the filtered random shadow rendering result are fused to obtain the single-point image rendering result for the target point.
[0182] In some optional implementations, the direct lighting rendering result acquisition unit 1201 is configured to:
[0183] Each of the multiple light source information points is used as a target information point, and the BRDF is used to obtain the light reflection result generated by the target information point at the target point.
[0184] Based on the brightness value and light reflection result of the target information point, a single point lighting rendering result based on the target information point at the target point position is obtained;
[0185] The multiple single-point lighting rendering results corresponding to the multiple light source information points are integrated to obtain the direct lighting rendering result for the target point.
[0186] In the embodiment of the present disclosure, the specific functions and examples of each unit of the image rendering device 1200 can be found in the description of the relevant steps in the aforementioned method embodiment corresponding to the image rendering device 1200, and will not be repeated here.
[0187] In the technical solutions disclosed herein, the acquisition, storage, and application of user personal information involved comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0188] Figure 13 This is a structural block diagram of an electronic device provided by an embodiment of the present disclosure. Figure 13As shown, the electronic device includes: a memory 1301 and a processor 1302. The memory 1301 stores a computer program that can be executed on the processor 1302. The number of memories 1301 and processor 1302 can be one or more. The memory 1301 can store one or more computer programs. When the one or more computer programs are executed by the electronic device, the electronic device performs the method provided by the aforementioned method embodiment. The electronic device may also include: a communication interface 1303 for communicating with external devices and performing data exchange.
[0189] If the memory 1301, processor 1302, and communication interface 1303 are implemented independently, the memory 1301, processor 1302, and communication interface 1303 can be connected to each other via a bus and communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 13 Only one thick line is used in the diagram, but this does not mean that there is only one bus or one type of bus.
[0190] Optionally, in a specific implementation, if the memory 1301, the processor 1302 and the communication interface 1303 are integrated on a chip, the memory 1301, the processor 1302 and the communication interface 1303 can communicate with each other through an internal interface.
[0191] It should be understood that the aforementioned processor may be a central processing unit (CPU), or may be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. It is worth noting that the processor may be a processor that supports the Advanced RISC Machines (ARM) architecture.
[0192] Furthermore, optionally, the aforementioned memory may include a read-only memory and a random access memory, and may also include a non-volatile random access memory. The memory may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may include a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may include a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available. For example, static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct memory bus random access memory (DR RAM).
[0193] In the foregoing embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, the process or function described in accordance with the embodiment of the present disclosure is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, Bluetooth, microwave, etc.) method. The computer-readable storage medium can be any available medium that a computer can access, or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, or a magnetic tape), an optical medium (e.g., a digital versatile disc (DVD)), or a semiconductor medium (e.g., a solid-state drive (SSD)). It is worth noting that the computer-readable storage medium mentioned in the present disclosure may be a non-volatile storage medium, in other words, a non-transient storage medium.
[0194] Those skilled in the art will understand that all or part of the steps of implementing the aforementioned embodiments may be accomplished by hardware, or may be accomplished by instructing the relevant hardware through a program, and the program may be stored in a computer-readable storage medium, and the aforementioned storage medium may be a read-only memory, a disk, or an optical disk, etc.
[0195] In the description of the embodiments of the present disclosure, the reference terms "one embodiment," "some embodiments," "example," "specific example," or "some examples" mean that the specific features, structures, materials, or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present disclosure; furthermore, the specific features, structures, materials, or characteristics described may be combined in any appropriate manner in any one or more embodiments or examples. In addition, those skilled in the art may combine and integrate different embodiments or examples described in this specification, as well as features of different embodiments or examples, unless there is any contradiction.
[0196] In the description of the embodiments of the present disclosure, unless otherwise specified, " / " means or. For example, A / B can mean A or B. "And / or" in this document is only a description of the association relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.
[0197] In the description of the embodiments of the present disclosure, the terms "first," "second," and "third" are used for descriptive purposes only and should not be understood to indicate or imply relative importance or implicitly specify the number of the technical features indicated. Thus, a feature defined as "first," "second," or "third" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present disclosure, unless otherwise specified, "plurality" means two or more.
[0198] The above description is merely an exemplary embodiment of the present disclosure and is not intended to limit the present disclosure. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present disclosure shall be included in the scope of protection of the present disclosure.
Claims
1. An image rendering method, comprising: Based on the multiple light source information points included in the environment map, a direct lighting rendering result for the target point is obtained; wherein the target point is each pixel point in the scene to be rendered; Based on a target number of rendering reference points selected from the plurality of light source information points, obtaining a random shadow rendering result for the target point position; Fusing the direct illumination rendering result and the random shadow rendering result to obtain a single-point image rendering result for the target point; Based on the single-point image rendering result of the target point, an overall image rendering result for the scene to be rendered is obtained.
2. The method according to claim 1, wherein The step of obtaining a random shadow rendering result for the target point based on a target number of rendering reference points selected from the plurality of light source information points includes: Based on the visibility parameter integration results of a target number of rendering reference points selected from the multiple light source information points, a random shadow rendering result for the target point position is obtained.
3. The method according to claim 2, wherein: The step of obtaining a random shadow rendering result for the target point based on the visibility parameter integration results of a target number of rendering reference points selected from the multiple light source information points includes: Performing a single sampling on the plurality of light source information points to obtain at least one rendering reference point; Obtaining an intermediate shadow rendering result for the target point based on a visibility parameter integration result of the at least one rendering reference point; In a case where the intermediate shadow rendering result satisfies a preset convergence condition, taking the total number of the rendering reference points obtained as the target number, and taking the intermediate shadow rendering result as the random shadow rendering result; Alternatively, when the intermediate shadow rendering result does not meet the preset convergence condition, the step of performing single sampling on the multiple light source information points to obtain at least one rendering reference point is performed again.
4. The method according to claim 3, wherein: The performing a single sampling on the plurality of light source information points to obtain at least one rendering reference point includes: Get point filtering conditions; Evaluate the multiple light source information points to determine multiple preliminary reference points that meet the point screening conditions; Perform a single sampling on the multiple preliminarily selected reference points to obtain the at least one rendering reference point.
5. The method according to claim 4, wherein The acquisition point screening conditions include: Using the light source information point with the largest brightness value among the multiple light source information points as a threshold dependent point, and using the brightness value of the threshold dependent point as a target brightness value; Get the target ratio value; Obtaining a brightness threshold based on the target brightness value and the target ratio value; Based on the brightness threshold, the point screening condition is obtained.
6. The method according to claim 5, wherein: The obtaining of the target ratio value includes one of the following: Obtaining a preset ratio value as the target ratio value; Obtaining a first ratio value that is negatively correlated with a reference duration as the target ratio value; wherein the reference duration is the total duration used for single sampling of the plurality of light source information points in the process of obtaining the random shadow rendering result; A second proportion value that is negatively correlated with a reference number is obtained as the target proportion value; wherein the reference number is the total number of the rendering reference points that have been obtained in the process of obtaining the random shadow rendering result.
7. The method according to any one of claims 1 to 6, further comprising: Using sampling point optimization technology to select multiple available information points from the multiple light source information points; The step of obtaining a random shadow rendering result for the target point based on a target number of rendering reference points selected from the plurality of light source information points includes: Based on a target number of rendering reference points selected from the multiple available information points, a random shadow rendering result for the target point position is obtained.
8. The method according to any one of claims 1 to 6, further comprising: Performing filtering on the random shadow rendering result to obtain a filtered random shadow rendering result; The fusing of the direct illumination rendering result and the random shadow rendering result to obtain a single-point image rendering result for the target point includes: The direct illumination rendering result and the filtered random shadow rendering result are fused to obtain a single-point image rendering result for the target point.
9. The method according to any one of claims 1 to 6, wherein The method of obtaining a direct lighting rendering result for a target point based on multiple light source information points included in the environment map includes: Taking each of the plurality of light source information points as a target information point, and using a bidirectional reflectance distribution function, obtaining a light reflection result generated by the target information point at the target point; Based on the brightness value of the target information point and the light reflection result, obtaining a single-point lighting rendering result based on the target information point at the target point; Integrate the multiple single-point lighting rendering results corresponding to the multiple light source information points one by one to obtain a direct lighting rendering result for the target point.
10. An image rendering device, comprising: A direct lighting rendering result acquisition unit is used to obtain a direct lighting rendering result for a target point based on a plurality of light source information points included in the environment map; wherein the target point is each pixel point in the scene to be rendered; a random shadow rendering result obtaining unit, configured to obtain a random shadow rendering result for a target point based on a target number of rendering reference points selected from the plurality of light source information points; a single-point image rendering result acquisition unit, configured to fuse the direct illumination rendering result and the random shadow rendering result to obtain a single-point image rendering result for the target point; The overall image rendering result obtaining unit is used to obtain the overall image rendering result for the scene to be rendered based on the single-point image rendering result of the target point.
11. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor. The instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 9.
12. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 9.