Methods, apparatus, media and equipment for determining reflected illumination and global illumination

By using spherical harmonic transformation and noise filtering, the reflected illumination is determined, which solves the problem of loss of normal details caused by noise filtering in global illumination algorithms and achieves better lighting effects.

CN115272556BActive Publication Date: 2026-04-03GUANGZHOU BOGUAN TELECOMM TECH LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-25
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

Existing global illumination algorithms are prone to losing normal details during the noise reduction process, resulting in poor lighting effects.

Method used

By determining the intersection information of the virtual rays emitted by each pixel with the target object, a spherical harmonic transformation is performed to obtain the initial lighting spherical harmonic coefficients. Noise is filtered out, the incident direction characteristics are preserved, and a new rendering equation is constructed to determine the reflected lighting.

Benefits of technology

It reduces noise while preserving image texture and color details, improving the noise reduction effect of global illumination.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115272556B_ABST
    Figure CN115272556B_ABST
Patent Text Reader

Abstract

This disclosure provides a method, apparatus, medium, and device for determining reflected illumination and global illumination, relating to the field of computer graphics technology. The method for determining reflected illumination includes: determining the intersection point information of virtual rays emitted from each pixel with a target object; performing a spherical harmonic transformation on several intersection point information corresponding to the target pixel in each pixel to obtain initial illumination spherical harmonic coefficients of the incident illumination distribution of the target pixel; performing a spherical harmonic transformation on the incident direction of the virtual rays corresponding to the target pixel to obtain initial direction spherical harmonic coefficients of the target pixel; performing noise filtering on the target pixel based on the initial illumination spherical harmonic coefficients to obtain filtered target illumination spherical harmonic coefficients of the target pixel; and determining the target reflected illumination of the target pixel based on the target illumination spherical harmonic coefficients, the initial direction spherical harmonic coefficients, and the reflectivity of the target object. This solves the technical problem of poor global illumination effects in existing technologies and achieves the technical effect of improving global illumination effects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer graphics technology, and in particular to a method, apparatus, medium, and device for determining reflected lighting and global lighting. Background Technology

[0002] The rendering equation describes the flow of light energy in a scene and can theoretically provide a perfect lighting calculation result. The physical basis of the rendering equation is the law of conservation of energy: at a specific location... and direction , emitted light It is self-luminous The sum of the reflected light and the incident light itself is incident light from all directions. Multiply by surface reflectivity The result of the surface integral of the hemisphere by the dot product of the incident direction and the direction of the normal.

[0003] The process of solving the rendering equation is called the global illumination algorithm. Because it requires calculating the hemispherical surface integral, each pixel needs a large number of sampling directions to make the calculation result converge; otherwise, there will be a lot of noise. Therefore, mainstream global illumination algorithms add a noise reduction process. However, most current noise reduction methods often lose normal details while reducing noise.

[0004] Therefore, the current global illumination effect is not good. Summary of the Invention

[0005] This disclosure provides a method, apparatus, medium, and device for determining reflected illumination and global illumination, thereby improving the global illumination effect.

[0006] In a first aspect, one embodiment of this disclosure provides a method for determining reflected light illumination, including:

[0007] Determine the intersection information of the virtual rays emitted by each pixel with the target object; wherein, the intersection information includes at least the pixel position of the intersection pixel and the illumination parameters of the intersection pixel;

[0008] Perform spherical harmonic transformation on the intersection information of several intersection points corresponding to the target pixel in each pixel to obtain the initial spherical harmonic coefficients of the incident light distribution of the target pixel;

[0009] Perform a spherical harmonic transformation on the incident direction of the virtual ray corresponding to the target pixel to obtain the initial spherical harmonic coefficients of the target pixel;

[0010] Noise filtering is performed on the target pixel based on the initial illumination spherical harmonic coefficient to obtain the target illumination spherical harmonic coefficient after filtering the target pixel.

[0011] For a target pixel, the target reflected illumination is determined based on the target illumination spherical harmonic coefficient, the initial direction spherical harmonic coefficient, and the reflectivity of the target object.

[0012] In one optional embodiment of this disclosure, determining the intersection information of the virtual rays emitted by each pixel with the target object includes:

[0013] Generate a virtual ray of light in any direction, with the target pixel as the source point;

[0014] Determine the position and color of the pixel containing the target object that intersects with the virtual ray in the current scene, and obtain the pixel position and lighting parameters.

[0015] In one optional embodiment of this disclosure, a spherical harmonic transformation is performed on several intersection point information corresponding to the target pixel in each pixel to obtain the initial illumination spherical harmonic coefficients of the incident illumination distribution of the target pixel, including:

[0016] Select at least one pixel from the neighboring pixels of the target pixel as an auxiliary pixel of the target pixel;

[0017] Perform spherical harmonic transformation on the intersection information of the target pixel and the intersection information of the auxiliary pixel to obtain the intersection spherical harmonic function;

[0018] By determining the spherical harmonic coefficients of the intersection spherical harmonic function, the initial illumination spherical harmonic coefficients of the incident illumination distribution of the target pixel are obtained.

[0019] In one optional embodiment of this disclosure, determining the spherical harmonic coefficients of the intersection spherical harmonic function to obtain the initial illumination spherical harmonic coefficients of the incident light distribution of the target pixel includes:

[0020] Determine the current illumination spherical harmonic coefficients of the intersection spherical harmonic function;

[0021] The initial spherical harmonic coefficients of the incident light distribution of the target pixel are obtained by weighted summation of each current illumination spherical harmonic coefficient.

[0022] In one optional embodiment of this disclosure, noise filtering is performed on the target pixel based on the initial illumination spherical harmonic coefficient to obtain the target illumination spherical harmonic coefficient after filtering, including:

[0023] Select at least one pixel from the neighboring pixels of the target pixel as an auxiliary pixel of the target pixel;

[0024] Hole filtering is applied to the initial illumination spherical harmonic coefficients of the target pixel and auxiliary pixels to obtain the target illumination spherical harmonic coefficients after noise reduction.

[0025] In one optional embodiment of this disclosure, for a target pixel, determining the target reflected illumination of the target pixel based on the target illumination spherical harmonic coefficient, the initial orientation spherical harmonic coefficient, and the reflectivity of the target object includes:

[0026] For each target pixel, the initial pixel spherical harmonic coefficient is obtained by multiplying the target illumination spherical harmonic coefficient with the initial orientation spherical harmonic coefficient.

[0027] Calculate the spherical harmonic coefficients of each target and sum them to obtain the spherical harmonic coefficients of the target pixels;

[0028] The diffuse illumination of the target pixel is obtained by summing the spherical harmonic coefficients of each target pixel.

[0029] In one optional embodiment of this disclosure, for a target pixel, determining the target reflected illumination of the target pixel based on the target illumination spherical harmonic coefficient, the initial orientation spherical harmonic coefficient, and the reflectivity of the target object includes:

[0030] Select at least one pixel from the neighboring pixels of the target pixel as an auxiliary pixel of the target pixel;

[0031] The fitting direction of the target pixel is determined based on the incident direction of the virtual light rays corresponding to the target pixel and the auxiliary pixels;

[0032] The fitted incident lighting parameters of the target pixel are determined based on the incident intensity of the virtual light rays corresponding to the target pixel and the auxiliary pixels.

[0033] The specular reflection illumination of the target object is determined based on the reflectivity of the target object, the fitted direction, and the fitted incident intensity.

[0034] In an optional embodiment of this disclosure, the method for determining reflected light illumination further includes:

[0035] Update the intersection information to the rendering target texture corresponding to the current scene.

[0036] Secondly, embodiments of this disclosure provide a method for determining global illumination, including:

[0037] Determine the self-illumination of each target pixel in the current scene to obtain self-illumination information;

[0038] Determine the target reflected illumination of each target pixel to obtain target reflected illumination information; wherein, the target reflected illumination is determined according to any of the above-mentioned reflection illumination determination methods;

[0039] For each target pixel, the target illumination is determined based on the self-emission illumination information and the target reflected illumination information.

[0040] Thirdly, embodiments of this disclosure provide a device for determining reflected light illumination, comprising:

[0041] The first determining module is used to determine the intersection information of the virtual rays emitted by each pixel with the target object; wherein, the intersection information includes at least the pixel position of the intersection pixel and the illumination parameters of the intersection pixel;

[0042] The first transformation module is used to perform spherical harmonic transformation on the intersection information of several intersection points corresponding to the target pixel in each pixel to obtain the initial illumination spherical harmonic coefficients of the incident illumination distribution of the target pixel.

[0043] The second transformation module is used to perform spherical harmonic transformation on the incident direction of the virtual light corresponding to the target pixel to obtain the initial spherical harmonic coefficients of the target pixel.

[0044] The filtering module is used to filter noise from the target pixel based on the initial illumination spherical harmonic coefficient, and obtain the target illumination spherical harmonic coefficient after filtering the target pixel;

[0045] The second determining module is used to determine the target reflected illumination of the target pixel based on the target illumination spherical harmonic coefficient, the initial direction spherical harmonic coefficient, and the reflectivity of the target object.

[0046] Fourthly, embodiments of this disclosure provide a global illumination determination device, comprising:

[0047] The third determining module is used to determine the self-illumination of each target pixel in the current scene and obtain self-illumination information;

[0048] The fourth determination module is used to determine the target reflected illumination of each target pixel and obtain the target reflected illumination information; wherein, the target reflected illumination is determined according to any of the above reflection illumination determination methods;

[0049] The fifth determination module is used to determine the target illumination of each target pixel based on its self-illumination information and the target reflected illumination information.

[0050] Fifthly, one embodiment of this disclosure provides a computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the method described above.

[0051] In a sixth aspect, one embodiment of this disclosure provides an electronic device, including: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform the above-described method by executing the executable instructions.

[0052] The technical solution disclosed herein has the following beneficial effects:

[0053] The aforementioned reflected lighting first acquires the intersection information of virtual rays emitted by each pixel with the target object. Then, spherical harmonic transformation is performed on each intersection information to obtain the initial illumination spherical harmonic coefficients of the pixel lighting and the initial direction spherical harmonic coefficients of the lighting direction. During the noise reduction process, only pixel lighting independent of the viewpoint direction is filtered to obtain the filtered target illumination spherical harmonic coefficients, while the initial direction spherical harmonic coefficients related to the viewpoint direction are retained without filtering. Finally, a rendering equation is constructed based on the filtered target illumination spherical harmonic coefficients, the unfiltered initial direction spherical harmonic coefficients, and the reflectivity of the target pixel. The reflected light obtained through this rendering equation reduces noise, but because it preserves the directional characteristics of the incident light, it retains the texture and color details of the original image, further ensuring image details while reducing noise. This solves the current technical problem of poor global illumination effects and achieves the goal of improving the global illumination noise reduction effect.

[0054] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0055] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure. It is obvious that the drawings described below are merely some embodiments of this disclosure, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.

[0056] Figure 1 This diagram illustrates a flowchart of a method for determining reflected light illumination in this exemplary embodiment;

[0057] Figure 2 This diagram illustrates a flowchart of a method for determining reflected light illumination in this exemplary embodiment;

[0058] Figure 3 This diagram illustrates a flowchart of a method for determining reflected light illumination in this exemplary embodiment;

[0059] Figure 4 This diagram illustrates a flowchart of a method for determining reflected light illumination in this exemplary embodiment;

[0060] Figure 5 This diagram illustrates a flowchart of a method for determining reflected light illumination in this exemplary embodiment;

[0061] Figure 6 This diagram illustrates a flowchart of a method for determining reflected light illumination in this exemplary embodiment;

[0062] Figure 7This diagram illustrates a flowchart of a method for determining reflected light illumination in this exemplary embodiment;

[0063] Figure 8 This diagram illustrates a flowchart of a global illumination determination method in this exemplary embodiment;

[0064] Figure 9 This diagram illustrates the structure of a reflected light illumination determination device according to this exemplary embodiment.

[0065] Figure 10 This diagram illustrates the structure of a global illumination determination device according to this exemplary embodiment.

[0066] Figure 11 A schematic diagram of the structure of an electronic device in this exemplary embodiment is shown. Detailed Implementation

[0067] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided to make this disclosure more comprehensive and complete, and to fully convey the concept of exemplary embodiments to those skilled in the art. The described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a full understanding of embodiments of this disclosure. However, those skilled in the art will recognize that the technical solutions of this disclosure can be practiced with one or more specific details omitted, or other methods, components, apparatus, steps, etc., can be employed. In other instances, well-known technical solutions are not shown or described in detail to avoid obscuring various aspects of this disclosure.

[0068] Furthermore, the accompanying drawings are merely illustrative of this disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted. Some block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.

[0069] The flowchart shown in the attached diagram is merely an illustrative example and does not necessarily include all steps. For example, some steps may be broken down, while others may be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.

[0070] In related technologies, rendering equations are used to describe the flow of light energy in a scene, and can theoretically provide a perfect lighting calculation result. The physical basis of rendering equations is the law of conservation of energy: at a specific location... and direction , emitted light It is self-luminous The superposition of reflected light and reflected light itself results in incident light from all directions. Multiply by surface reflectivity and incident direction w Orientation of the normal The result is the hemispherical surface integral of the dot product. Solving the rendering equation is called the global illumination algorithm. Because it requires calculating the hemispherical surface integral, each pixel needs a large number of incident light samples to converge the calculation result; otherwise, there will be a lot of noise. The frame rate in games is generally 60 FPS. Currently, computers can only handle calculations in one sampling direction per pixel, while mobile devices are even less capable, handling calculations in one sampling direction per 16 pixels. To make the global illumination algorithm run at 60 FPS, a noise reduction process needs to be added to the global illumination algorithm. Current noise reduction methods mainly include temporal filtering, spatial filtering, or a combination of both.

[0071] Temporal filtering involves finding the pixel whose world space location is in the previous frame for each pixel in the current frame, and then proportionally mixing the calculation result of that pixel in the previous frame with the calculation result of the current frame to obtain the current frame's lighting calculation result. This method distributes the calculation of multiple sampling points required for the same frame across multiple frames, significantly improving the solution speed of the rendering equations. Spatial filtering, on the other hand, involves considering the calculation results of neighboring pixels according to certain weights when calculating each pixel in the current frame, thereby reducing noise.

[0072] However, both of the above filtering methods filter the final lighting calculation results of each pixel. This often leads to the loss of normal details while reducing noise, resulting in poor global illumination effects.

[0073] To address the issue of poor global illumination noise reduction performance, this disclosure provides a method for determining reflected illumination and a method for determining global illumination. By determining the intersection point information of virtual rays emitted from each pixel with the target object, a spherical harmonic transformation is performed on several intersection point information corresponding to the target pixel in each pixel to obtain the initial illumination spherical harmonic coefficients of the incident illumination distribution of the target pixel. A spherical harmonic transformation is then performed on the incident direction of the virtual rays corresponding to the target pixel to obtain the initial direction spherical harmonic coefficients of the target pixel. Noise filtering is then applied to the target pixel based on the initial illumination spherical harmonic coefficients to obtain the filtered target illumination spherical harmonic coefficients of the target pixel. Finally, for the target pixel, the target reflected illumination is determined based on the target illumination spherical harmonic coefficients, the initial direction spherical harmonic coefficients, and the reflectivity of the target object. This method preserves normal details while reducing noise, thereby improving the noise reduction effect of global illumination.

[0074] To further enhance understanding of the reflected lighting determination method and the global lighting determination method provided in the embodiments of this disclosure, the content of the rendering equation is briefly introduced below:

[0075] The mathematical expression for the rendering equation is as follows: (1)

[0076] (1)

[0077] In formula (1), Represents pixels x In direction w The intensity of the emitted light at 0; L e represents pixels. x The intensity of self-luminescence; Indicates other virtual rays in the direction of incidence. w Illumination to pixel x The intensity of the incident light; Represents pixels x In the direction of incidence w and the direction of launch w0 Surface reflectivity; Indicates the direction of launch; Indicates the direction of incidence; The normal that indicates the direction of incidence.

[0078] It needs to be explained that each pixel x The emitted light L 0 includes the self-illumination of this pixel. L e And emitted light. Generally, pixels emit their own light. L e It is relatively easy to determine that reflected light comes from various directions. w incident light L i Multiply by the surface reflectivity of the pixelf r and the direction of incidence w With in the incident direction w normals on The result of the dot product of the hemispherical surface integral. Most current rendering methods are based on this rendering equation, and obtain the outgoing light intensity of each pixel by approximating the solution of the rendering equation, thereby obtaining the global illumination in the current scene.

[0079] The following is a brief introduction to the application environments of the reflected light determination method and the global illumination determination method provided in the embodiments of this disclosure:

[0080] This disclosure applies to terminal devices, which can be local devices such as mobile phones, tablets, computers, or any electronic device with a human-computer interaction interface, or client devices in a cloud interaction system, such as servers. This disclosure does not impose specific limitations. However, the terminal device in this disclosure has a display screen composed of multiple pixels. This display screen can be part of the terminal device or exist independently of the main body of the terminal device. This disclosure does not impose specific limitations. During operation, the terminal device can provide a virtual scene through the pixels on the display screen, and adjust the lighting of the virtual scene in different frames using lighting parameters such as the luminous intensity and color of each pixel.

[0081] The following explanation uses the aforementioned terminal device as the execution subject, illustrating how this method for determining reflected light is applied to the terminal device to determine reflected light in the global illumination of a virtual scene. Please refer to [link to relevant documentation]. Figure 1 The method for determining reflected light provided in this embodiment includes the following steps 101-105:

[0082] Step 101: The terminal device determines the intersection information of the virtual rays emitted by each pixel with the target object.

[0083] The terminal device can generate a virtual ray in real time using a first pixel as the source point, and identify the object intersecting with this virtual ray as the target object; alternatively, it can identify the object hit by any one of the multiple virtual rays emitted from the first pixel in the current scene; or any object in the current scene that is not obstructed from the target pixel can be used as the target object. This embodiment does not impose specific limitations. For example, if a virtual ray is emitted in a certain direction from the first pixel as the source point, the object hit by this virtual ray is the target object, and the virtual ray and the target object have an intersection point. The terminal device then determines the intersection point information. It should be explained that the target object can be an element in the virtual scene, such as a leaf, a rock, or a virtual character, but the target object corresponds to one or more pixels on the display screen, and is constructed by the light emitted from that pixel. Among these one or more pixels, the pixel that directly intersects with the virtual ray is the intersection pixel, and the terminal device determines the information of the intersection pixel, such as the pixel position and lighting parameters of the intersection pixel. The lighting parameters can include any parameters used to indicate the current luminous state of a pixel, such as lighting color and lighting intensity. This embodiment does not impose specific limitations and can be selected according to the actual situation.

[0084] Step 102: The terminal device performs spherical harmonic transformation on the intersection information of several intersection points corresponding to the target pixel in each pixel to obtain the initial illumination spherical harmonic coefficients of the incident light distribution of the target pixel.

[0085] The terminal device performs spherical harmonic transformation on each pixel in the current display screen. For example, for a target pixel among multiple pixels, the terminal device first performs spherical harmonic transformation on the target pixel, corresponding to its illumination parameters and illumination distribution function. Projecting onto the k-th order spherical harmonic function yields the corresponding spherical harmonic function. The terminal device can then directly extract the spherical harmonic coefficients corresponding to this spherical harmonic function to obtain the initial illumination spherical harmonic coefficients for the incident light on the target pixel.

[0086] Step 103: The terminal device performs a spherical harmonic transformation on the incident direction of the virtual ray corresponding to the target pixel to obtain the initial spherical harmonic coefficients of the target pixel.

[0087] Corresponding to step 102 above, the terminal device also controls the incident direction. Corresponding direction function Perform spherical harmonic conversion, Projecting onto the k-th order spherical harmonic function yields the corresponding spherical harmonic function. The terminal device can then directly extract the spherical harmonic coefficients corresponding to this spherical harmonic function to obtain the initial direction spherical harmonic coefficients for the incident light on the target pixel.

[0088] Step 104: The terminal device performs noise filtering on the target pixel based on the initial illumination spherical harmonic coefficient to obtain the target illumination spherical harmonic coefficient after filtering the target pixel.

[0089] The terminal device uses spatial filtering, temporal filtering, and other methods to denoise the region corresponding to the target pixel in the current image based on the obtained initial illumination spherical harmonic coefficients, thus obtaining the denoised target illumination spherical harmonic coefficients. It should be noted that this embodiment only denoises the illumination of the target pixel, and does not denoise, for example, the incident direction of the incident light. Noise reduction is performed based on the direction of illumination, preserving the directional details, which in turn preserves the image texture, color, and other details in the original image.

[0090] Step 105: The terminal device determines the target reflected illumination of the target pixel based on the target illumination spherical harmonic coefficient, the initial direction spherical harmonic coefficient, and the reflectivity of the target object.

[0091] For a target pixel, after obtaining the target illumination spherical harmonic coefficient, the initial orientation spherical harmonic coefficient, and the reflectivity of the target object, the terminal device can construct a new rendering equation regarding the illumination spherical harmonic function and the orientation spherical harmonic function based on the basic rendering equation in formula (1) above. Then, the target reflected illumination corresponding to the target pixel is obtained by solving the new rendering equation. The mathematical expression of the constructed new rendering equation can be briefly expressed as follows:

[0092] (2)

[0093] In formula (2), L r Represents pixels x The reflected light, f r Represents pixels x Surface reflectivity, Q 1 represents the spherical harmonic function of the target illumination, and the corresponding coefficients are the spherical harmonic coefficients of the target illumination. Q 2 represents the initial direction spherical harmonic function, and the corresponding coefficients are the initial direction spherical harmonic coefficients.

[0094] Similarly, the terminal device can calculate the target reflected light of other target pixels in the current scene using the formula (2) above.

[0095] This embodiment first obtains the intersection information of virtual rays emitted by each pixel with the target object. Then, it performs spherical harmonic transformation on each intersection information to obtain the initial illumination spherical harmonic coefficients of the pixel illumination and the initial direction spherical harmonic coefficients of the illumination direction. During the noise reduction process, only pixel illumination independent of the viewing direction is filtered to obtain the filtered target illumination spherical harmonic coefficients, while the initial direction spherical harmonic coefficients related to the viewing direction are retained without filtering. Finally, a rendering equation is constructed based on the filtered target illumination spherical harmonic coefficients, the unfiltered initial direction spherical harmonic coefficients, and the reflectivity of the target pixel. The reflected light obtained through this rendering equation reduces noise, but because the directional characteristics of the incident light are preserved, the texture details and color details of the original image are also preserved. This further ensures image details while reducing noise, thereby solving the current technical problem of poor global illumination effect and achieving the goal of improving the global illumination noise reduction effect.

[0096] Please see Figure 2 In an optional embodiment of this disclosure, step 101, in which the terminal device determines the intersection information of the virtual rays emitted by each pixel with the target object, includes the following steps 201-202:

[0097] Step 201: The terminal device generates a virtual ray in any direction, with the target pixel as the source point.

[0098] The terminal device generates and emits a virtual ray of light in any direction, with the target pixel as the source point. It should be noted that the direction in this embodiment is random and without any limitation.

[0099] Step 202: The terminal device determines the position and color of the pixel where the target object intersects with the virtual light in the current scene, and obtains the pixel position and lighting parameters.

[0100] The source point of the virtual ray is the target pixel, and the object hit by the virtual ray is the target object. The virtual object exists within a virtual scene, which is constructed by various elements emitting different lights; that is, each virtual object also corresponds to at least one pixel. The terminal device determines the pixel corresponding to the virtual object as the intersecting pixel, or determines the pixel closest to the virtual ray or the pixel at the center among several pixels corresponding to the virtual object as the intersecting pixel. After determining the intersecting pixel, the terminal device directly determines the position of the intersecting pixel as the pixel position, and determines the light color, light intensity, etc. of the intersecting pixel as lighting parameters.

[0101] This embodiment uses the target pixel as the source point and generates a virtual ray in any direction. Finally, only the position and color of the pixel containing the target object that intersects with the virtual ray in the current scene need to be determined to obtain the pixel position and lighting parameters. The virtual ray in this embodiment is randomly generated in any direction, eliminating the need to select one from countless virtual rays emitted by the target pixel in the current scene for calculation. This significantly reduces the computational load and improves the efficiency of determining reflected lighting provided by this embodiment.

[0102] Please see Figure 3 In an optional embodiment of this disclosure, step 102, in which the terminal device performs spherical harmonic transformation on the intersection information corresponding to several intersection points of the target pixel in each pixel to obtain the initial illumination spherical harmonic coefficients of the incident light distribution of the target pixel, includes the following steps 301-303:

[0103] Step 301: The terminal device selects at least one pixel from the neighboring pixels of the target pixel as an auxiliary pixel of the target pixel.

[0104] In this context, an auxiliary pixel refers to a pixel used to assist the target pixel in noise filtering. It can be any pixel within a preset radius centered on the target pixel. In this embodiment, a pixel adjacent to the target pixel is selected as an auxiliary pixel.

[0105] In one specific embodiment, the auxiliary pixels selected in each frame can be different. For example, in the first frame, the pixels adjacent to the target pixel above, below, and to the left can be selected as auxiliary pixels. In the second frame, the pixels adjacent to the target pixel above, below, and to the right can be selected as auxiliary pixels, and so on. This approach, by introducing different auxiliary pixels in different frames, can significantly improve the matching degree between the initial illumination spherical harmonic coefficient of the target pixel and the actual situation, further enhancing the realism and reliability of the reflected light illumination.

[0106] Step 302: The terminal device performs spherical harmonic conversion on the intersection information of the target pixel and the intersection information of the auxiliary pixel to obtain the intersection spherical harmonic function.

[0107] Step 303: Determine the spherical harmonic coefficients of the intersection spherical harmonic function to obtain the initial illumination spherical harmonic coefficients of the incident light distribution of the target pixel.

[0108] For example, the terminal device can calculate the initial illumination spherical harmonic coefficients of the incident light distribution of the target pixel using the following formula (3):

[0109] (3)

[0110] In formula (3), The initial illumination spherical harmonic coefficient represents the incident light distribution of the target pixel; l Denotes the vertical order in a spherical harmonic function. m This represents the transverse coefficient in a spherical harmonic function; N This represents the total number of target pixels and auxiliary pixels. Indicates other virtual rays in the direction of incidence. w Illumination to pixel x The intensity of the incident light. Of course, in formula (3) Alternatively, it can be replaced with any lighting parameters such as the color of the incident light; this embodiment does not impose any specific limitations.

[0111] This embodiment introduces the intersection information of other auxiliary pixels adjacent to the target pixel during spherical harmonic conversion to obtain the initial illumination spherical coefficient containing other auxiliary pixels. This greatly increases the number of samples for subsequent pixel illumination noise filtering, thereby improving noise reduction efficiency and further improving the noise reduction effect of the current image under the premise of determining the reflected illumination effect.

[0112] Please see Figure 4 In an optional embodiment of this disclosure, step 303, in which the terminal device determines the spherical harmonic coefficients of the intersection spherical harmonic function to obtain the initial illumination spherical harmonic coefficients of the incident light distribution of the target pixel, includes the following steps 401-402:

[0113] Step 401: The terminal device determines the current illumination spherical harmonic coefficients of the intersection spherical harmonic function.

[0114] The terminal device can first project the intersection spherical function of the intersection pixels corresponding to each pixel to the k-th order spherical harmonic function to obtain the current illumination spherical harmonic coefficients of all pixels.

[0115] Step 402: The terminal device performs a weighted summation of each current illumination spherical harmonic coefficient to obtain the initial illumination spherical harmonic coefficient of the incident light distribution of the target pixel.

[0116] After obtaining the current illumination spherical harmonic coefficients of each pixel, corresponding weight coefficients can be configured for each current illumination spherical harmonic coefficient according to the distance from the target pixel or the correlation, etc. Finally, the initial illumination spherical harmonic coefficients of the target pixel can be obtained by weighting and summing all the current illumination spherical harmonic coefficients through each weight coefficient.

[0117] In this embodiment, the current illumination spherical harmonic coefficients of the target pixel and auxiliary pixels are first determined, and then the current illumination spherical harmonic coefficients are weighted and summed to obtain the initial illumination spherical harmonic coefficients of the incident light distribution of the target pixel. The proportion of different pixels in the initial illumination spherical harmonic coefficients is different, so that the obtained initial illumination spherical harmonic coefficients match the actual lighting conditions better, and the final reflected light illumination has higher authenticity, further improving the reliability of the reflected light illumination determined in this embodiment.

[0118] Please see Figure 5 In an optional embodiment of this disclosure, step 104, where the terminal device performs noise filtering on the target pixel based on the initial illumination spherical harmonic coefficient to obtain the target illumination spherical harmonic coefficient after filtering, includes the following steps 501-502:

[0119] Step 501: The terminal device selects at least one pixel from the neighboring pixels of the target pixel as an auxiliary pixel of the target pixel.

[0120] The terminal device can select at least one pixel as an auxiliary pixel of the target pixel in the same way as in step 301 above, which will not be described in detail here.

[0121] Step 502: The terminal device performs hole filtering on the initial illumination spherical harmonic coefficients of the target pixel and the auxiliary pixel to obtain the target illumination spherical harmonic coefficients after noise reduction of the target pixel.

[0122] A-trous filtering is a pixel blending method that uses dilated convolution. In this embodiment, it involves blending target pixels with auxiliary pixels. It's important to note that A-trous convolution increases the receptive field under the same computational conditions and without pooling loss information, allowing each convolution output to contain a wider range of information. The terminal device uses dilated convolution to blend auxiliary pixels near the target object with different weights to obtain noise-filtered pixel illumination, and then uses the denoised illumination function to determine the spherical harmonic coefficients of the target pixel's illumination.

[0123] In this embodiment, at least one pixel is selected from the neighboring pixels of the target pixel as an auxiliary pixel. The initial illumination spherical harmonic coefficients of the target pixel and the auxiliary pixel are then subjected to dilated filtering to obtain the denoised target illumination spherical harmonic coefficients of the target pixel. The obtained target illumination spherical harmonic coefficients contain the intersection information of the auxiliary pixels near the target pixel, making the obtained target illumination spherical harmonic coefficients more consistent with the actual situation. At the same time, the target illumination spherical harmonic coefficients of the target pixel are obtained through dilated convolution, which increases the receptive field and allows each convolution output to contain a larger range of information. This improves the accuracy of the reflected light illumination obtained based on the target illumination spherical harmonic coefficients, making it closer to the real reflected light illumination and increasing reliability.

[0124] The emitted light of a pixel generally includes diffuse reflection and specular reflection. Diffuse reflection maintains the same illumination regardless of the camera's location or the angle of incidence and reflection, provided the ambient light source position is fixed. The diffuse lighting calculation depends only on the incident light direction, surface normal, and surface material, and is independent of the viewing angle. Specular reflection, however, is related to the field of view; the lighting effect varies depending on the angle. Besides the incident light direction, surface normal, and surface material, it also depends on the viewing direction. Therefore, current temporal filtering methods generally only solve for diffuse global illumination through rendering equations, and cannot solve for specular global illumination.

[0125] Please see Figure 6 In an optional embodiment of this disclosure, the specific process for determining diffuse illumination is disclosed: Step 105 above, the terminal device determines the target reflected illumination of the target pixel based on the target illumination spherical harmonic coefficient, the initial direction spherical harmonic coefficient, and the reflectivity of the target object, including the following steps 601-603:

[0126] Step 601: For each target pixel, the terminal device determines the product of the target illumination spherical harmonic coefficient and the initial direction spherical harmonic coefficient to obtain the initial pixel spherical harmonic coefficient.

[0127] Step 602: The terminal device calculates and sums the spherical harmonic coefficients of each target to obtain the spherical harmonic coefficients of the target pixels.

[0128] Step 603: The terminal device calculates the sum of the spherical harmonic coefficients of each target pixel to obtain the diffuse reflection illumination of the target pixel.

[0129] After obtaining the target illumination spherical harmonic coefficient and the initial direction spherical harmonic coefficient, the terminal device can calculate the diffuse reflection illumination of the target pixel using the following formula (4):

[0130] (4)

[0131] In formula (4), L 0-diffuseThis represents the diffuse light intensity of the target pixel. f r-diffuse Represents pixels x The diffuse reflectivity of the surface. The initial illumination spherical harmonic coefficient represents the incident light distribution of the target pixel; l Denotes the vertical order in a spherical harmonic function. m This represents the transverse coefficient in a spherical harmonic function; N This represents the total number of target pixels and auxiliary pixels. The reflectivity of the aforementioned diffuse surface... f r-diffuse =ρ / π, where ρ represents the medium density for virtual ray transmission in the current scene. Of course, in formula (4)... L 0-diffuse The diffuse light intensity of the target pixel can also be replaced by any lighting parameter such as diffuse light color; this embodiment does not impose any specific limitations.

[0132] Formula (4) above is obtained by transforming the reflected light part in the above basic rendering equation (formula (1) above). When performing noise filtering, only the part in formula (4) is filtered. Noise filtering is performed, while noise filtering is applied to components containing directional information. No noise filtering is performed, but normal details are preserved while noise filtering is performed, thereby improving the lighting noise reduction effect.

[0133] The specific derivation process of converting the reflected light part in the above formula (1) to the above formula (4) is as follows:

[0134]

[0135] Take the same number of times i By orthogonality completeness, we can obtain:

[0136]

[0137] Number of times i by l , m Formal representation: i = l ( l +1)+ m and take the previous l = k Rank, obtain

[0138]

[0139] This completes the conversion of the reflected light portion to diffuse reflection illumination. The corresponding specular reflection illumination is handled similarly and will not be listed here.

[0140] Please see Figure 7 In an optional embodiment of this disclosure, step 105, where the terminal device determines the target reflected illumination of the target pixel based on the target illumination spherical harmonic coefficient, the initial direction spherical harmonic coefficient, and the reflectivity of the target object, includes the following steps 701-704:

[0141] Step 701: The terminal device selects at least one pixel from the neighboring pixels of the target pixel as an auxiliary pixel of the target pixel.

[0142] The terminal device can determine the auxiliary pixels in the same way as step 301 above, which will not be repeated here.

[0143] Step 702: The terminal device determines the fitting direction of the target pixel based on the incident direction of the virtual light rays corresponding to the target pixel and the auxiliary pixels.

[0144] The terminal device fits a fitting direction light based on the virtual rays corresponding to the target pixel and the auxiliary pixels, and then determines the main direction of the fitting direction light as the fitting direction of the target pixel.

[0145] Step 703: The terminal device determines the fitted incident illumination parameters of the target pixel based on the incident intensity of the virtual light corresponding to the target pixel and the auxiliary pixel.

[0146] Corresponding to step 702 above, the terminal device determines the illumination parameters of the fitted directional light as the fitted incident illumination parameters of the target pixel. These fitted incident illumination parameters can be any pixel illumination parameters such as light intensity and color; this implementation does not impose specific limitations.

[0147] Step 704: The terminal device determines the specular reflection illumination of the target object based on the reflectivity, fitting direction, and fitting incident intensity of the target object.

[0148] The embodiments disclosed herein only pertain to incident light. Filtering is performed in time and space, while incident light... Since the filtering is only related to the pixel position of pixel x and is independent of the camera position or viewpoint, it preserves the possibility of calculating the global illumination of the specular highlight. This embodiment uses the initial illumination spherical harmonic coefficients of the incident light distribution of the target pixel. Fit the principal direction of incident light to auxiliary pixels near the target pixel. The average incident intensity I of the auxiliary pixels is then calculated by simulating a directional light source with the direction being... The intensity is I, and the approximate global specular light is calculated using the fitted directional light. For example, the terminal device can calculate the specular reflection illumination based on the following formula (5):

[0149] (5)

[0150] In formula (5), L o-spec Indicates the intensity of the specular reflection light of the target pixel. f r-spec This represents the specular reflectivity of pixel x. Indicates the direction of incidence; This indicates the principal direction of the incident light for all auxiliary pixels; The normal line represents the incident direction. Of course, in formula (5)... L o-spec The intensity of the specular reflection light of the target pixel can also be replaced by any lighting parameter such as the color of the specular reflection light; this embodiment does not impose any specific limitations.

[0151] This embodiment first splits the rendering equation for specular reflection into two parts. The terminal device selects at least one pixel from the neighboring pixels of the target pixel as an auxiliary pixel of the target pixel. Then, it fits a fitted directional light based on the virtual rays corresponding to the target pixel and the auxiliary pixel. The fitted direction and fitted incident intensity of this directional light are then determined by the incident directions of the target pixel and the auxiliary pixel. Finally, the specular reflection illumination of the target object is determined by the reflectivity of the target object, the fitted direction, and the fitted incident intensity. This embodiment makes it possible to determine the reflection illumination of specular reflection by fitting a directional light, thereby solving the current technical deficiency that specular reflection cannot be determined, and greatly improving the comprehensiveness and reliability of reflection illumination calculation.

[0152] In an optional embodiment of this disclosure, the above-described method for determining reflected light further includes the following step A:

[0153] Step A: The terminal device updates the intersection information to the rendering target texture corresponding to the current scene.

[0154] After obtaining the intersection information of each pixel in the current image, the terminal device updates the intersection information to the render target map to facilitate information storage and subsequent information collection, thereby improving pixel sampling efficiency and the convenience of subsequent information processing.

[0155] Please see Figure 8 This disclosure provides a global illumination determination method according to one embodiment, characterized by including the following steps 801-803:

[0156] Step 801: The terminal device determines the self-illumination of each target pixel in the current scene and obtains the self-illumination information.

[0157] Among them, self-illumination refers to the light emitted by the pixel itself. The corresponding self-illumination information can include any optical parameters that can characterize the current illumination, such as luminous intensity, luminous color, and luminous direction. These will not be listed exhaustively here, but can be selected according to the actual situation.

[0158] Step 802: The terminal device determines the target reflected light illumination of each target pixel and obtains the target reflected light illumination information.

[0159] The target reflected illumination is determined according to any of the above-mentioned methods for determining reflected illumination. The methods for determining target reflected illumination information and their beneficial effects have been described in detail in the above embodiments and will not be repeated here.

[0160] Step 803: For each target pixel, the terminal device determines the target illumination based on the self-illumination information and the target reflected illumination information.

[0161] For each target pixel, after obtaining its reflected light information and self-emitted light information, the terminal device superimposes the two to obtain the target illumination of that pixel. In other words, solving the corresponding rendering equation yields the actual emitted light of that target pixel. Similarly, the terminal device can determine the target illumination of each pixel in the current image using the same method, and the target illumination of all target pixels constitutes the global illumination of the current scene.

[0162] This embodiment of the disclosure determines the target reflected illumination information through the above-described reflected illumination determination method, and then combines it with the self-emission information of the target pixel to obtain the target illumination of the target pixel, making the global illumination of the current scene more realistic and greatly improving the illumination effect of the global illumination.

[0163] Please see Figure 9 To implement the above-described method for determining reflected light, one embodiment of this disclosure provides an apparatus 900 for determining emitted light. Figure 9 A schematic architectural diagram of an emission illumination determination device 900 is shown. The emission illumination determination device 900 includes: a first determination module 910, a first transformation module 920, a second transformation module 930, a filtering module 940, and a second determination module 950, wherein:

[0164] The first determining module 910 is used to determine the intersection information of the virtual light emitted by each pixel and the target object; wherein, the intersection information includes at least the pixel position of the intersection pixel and the illumination parameters of the intersection pixel;

[0165] The first transformation module 920 is used to perform spherical harmonic transformation on several intersection point information corresponding to the target pixel in each pixel to obtain the initial illumination spherical harmonic coefficients of the incident illumination distribution of the target pixel.

[0166] The second transformation module 930 is used to perform spherical harmonic transformation on the incident direction of the virtual light corresponding to the target pixel to obtain the initial spherical harmonic coefficients of the target pixel.

[0167] The filtering module 940 is used to filter noise from the target pixel based on the initial illumination spherical harmonic coefficient, and obtain the target illumination spherical harmonic coefficient after filtering the target pixel.

[0168] The second determining module 950 is used to determine the target reflected illumination of the target pixel based on the target illumination spherical harmonic coefficient, the initial direction spherical harmonic coefficient, and the reflectivity of the target object.

[0169] In an optional embodiment of this disclosure, the first determining module 910 is specifically used to generate a virtual ray in any direction with the target pixel as the source point; determine the position and color of the pixel of the target object that intersects with the virtual ray in the current scene, and obtain the pixel position and lighting parameters.

[0170] In an optional embodiment of this disclosure, the first transformation module 920 is specifically configured to: select at least one pixel from the neighboring pixels of the target pixel as an auxiliary pixel of the target pixel; perform spherical harmonic transformation on the intersection information of the target pixel and the intersection information of the auxiliary pixel to obtain the intersection spherical harmonic function; determine each spherical harmonic coefficient of the intersection spherical harmonic function to obtain the initial illumination spherical harmonic coefficient of the incident light distribution of the target pixel.

[0171] In one optional embodiment of this disclosure, the first transformation module 920 is specifically used to determine the current illumination spherical harmonic coefficients of the intersection spherical harmonic function; and to perform a weighted summation of each current illumination spherical harmonic coefficient to obtain the initial illumination spherical harmonic coefficients of the incident illumination distribution of the target pixel.

[0172] In an optional embodiment of this disclosure, the filtering module 940 is specifically used to select at least one pixel from the neighboring pixels of the target pixel as an auxiliary pixel of the target pixel; and to perform hole filtering on the initial illumination spherical harmonic coefficients of the target pixel and the auxiliary pixel to obtain the target illumination spherical harmonic coefficients of the target pixel after noise reduction.

[0173] In an optional embodiment of this disclosure, the second determining module 950 is specifically used to: determine the product of each target illumination spherical harmonic coefficient and the initial direction spherical harmonic coefficient for the target pixel to obtain the initial pixel spherical harmonic coefficient; calculate and sum the target spherical harmonic coefficients to obtain the target pixel spherical harmonic coefficients; and calculate the sum of the target pixel spherical harmonic coefficients to obtain the diffuse reflection illumination of the target pixel.

[0174] In an optional embodiment of this disclosure, the second determining module 950 is specifically configured to: select at least one pixel from the neighboring pixels of the target pixel as an auxiliary pixel of the target pixel; determine the fitting direction of the target pixel based on the incident direction of the virtual light rays corresponding to the target pixel and the auxiliary pixel; determine the fitted incident illumination parameters of the target pixel based on the incident intensity of the virtual light rays corresponding to the target pixel and the auxiliary pixel; and determine the specular reflection illumination of the target object based on the reflectivity, fitting direction and fitted incident intensity of the target object.

[0175] In an optional embodiment of this disclosure, the first determining module 910 is further configured to update the intersection information to the rendering target texture corresponding to the current scene.

[0176] Please see Figure 10 To implement the above-described global illumination determination method, one embodiment of this disclosure provides a global illumination determination device 1000. Figure 10 A schematic architecture diagram of a global illumination determination device 1000 is shown. This reflected illumination determination device includes: a third determination module 1010, a fourth determination module 1020, and a fifth determination module 1030, wherein:

[0177] The third determining module 1010 is used to determine the self-illumination of each target pixel in the current scene and obtain self-illumination information;

[0178] The fourth determining module 1020 is used to determine the target reflected illumination of each target pixel and obtain target reflected illumination information; wherein, the target reflected illumination is determined according to any of the above reflected illumination determination methods;

[0179] The fifth determining module 1030 is used to determine the target illumination of each target pixel based on its self-illumination information and target reflected illumination information.

[0180] Exemplary embodiments of this disclosure also provide a computer-readable storage medium that can be implemented as a program product including program code, which, when run on an electronic device, causes the electronic device to perform the steps described in the "Exemplary Methods" section of this specification according to various exemplary embodiments of this disclosure. In one embodiment, the program product can be implemented as a portable compact disc read-only memory (CD-ROM) and include program code, and can run on an electronic device, such as a personal computer. However, the program product of this disclosure is not limited thereto. In this document, the readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0181] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0182] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of sending, propagating, or transmitting programs for use by or in conjunction with an instruction execution system, apparatus, or device.

[0183] The program code contained on the readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.

[0184] Program code for performing the operations of this disclosure can be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java and C++, and conventional procedural programming languages ​​such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider). In embodiments of this disclosure, when the program code stored in the computer-readable storage medium is executed, it can implement any step of the above-described reflected illumination determination method or global illumination determination method.

[0185] Please see Figure 11 Exemplary embodiments of this disclosure also provide an electronic device 1100, which can be a backend server for an information platform. Reference is made below. Figure 11The electronic device 1100 will be described below. It should be understood that... Figure 11 The electronic device 1100 shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments disclosed herein.

[0186] like Figure 11 As shown, the electronic device 1100 is presented in the form of a general-purpose computing device. The components of the electronic device 1100 may include, but are not limited to: at least one processing unit 1110, at least one storage unit 1120, and a bus 1130 connecting different system components (including storage unit 1120 and processing unit 1110).

[0187] The storage unit stores program code, which can be executed by the processing unit 1110 to perform the steps described in the "Exemplary Methods" section of this specification according to various exemplary embodiments of the present invention. For example, the processing unit 1110 can perform actions such as... Figure 1 The methods and steps shown are as follows.

[0188] Storage unit 1120 may include volatile storage units, such as random access memory (RAM) 1121 and / or cache memory 1122, and may further include read-only memory (ROM) 1123.

[0189] Storage unit 1120 may also include a program / utility 1124 having a set (at least one) program module 1125, such program module 1125 including but not limited to: operating system, one or more application programs, other program modules and program data, each or some combination of these examples may include an implementation of a network environment.

[0190] Bus 1130 may include a data bus, an address bus, and a control bus.

[0191] Electronic device 1100 can also communicate with one or more external devices 2000 (e.g., keyboards, pointing devices, Bluetooth devices, etc.) via input / output (I / O) interface 1140. Electronic device 1100 can also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via network adapter 1150. As shown, network adapter 1150 communicates with other modules of electronic device 1100 via bus 1130. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 1100, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0192] In this embodiment of the disclosure, when the program code stored in the electronic device is executed, it can implement any step of the above-described method for determining reflected illumination or global illumination.

[0193] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to exemplary embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.

[0194] Those skilled in the art will understand that various aspects of this disclosure can be implemented as systems, methods, or program products. Therefore, various aspects of this disclosure can be embodied in entirely hardware implementations, entirely software implementations (including firmware, microcode, etc.), or implementations combining hardware and software aspects, collectively referred to herein as “circuit,” “module,” or “system.” Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and embodiments are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the claims.

[0195] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is defined only by the appended claims.

Claims

1. A method for determining reflected light illumination, characterized in that, include: Determine the intersection information of the virtual rays emitted by each pixel with the target object; wherein, the intersection information includes at least the pixel position of the intersection pixel and the illumination parameters of the intersection pixel; Perform spherical harmonic transformation on the intersection information corresponding to the target pixel in each pixel to obtain the initial illumination spherical harmonic coefficients of the incident illumination distribution of the target pixel; Perform a spherical harmonic transformation on the incident direction of the virtual ray corresponding to the target pixel to obtain the initial directional spherical harmonic coefficients of the target pixel; Based on the initial illumination spherical harmonic coefficient, noise filtering is performed on the target pixel to obtain the target illumination spherical harmonic coefficient after filtering the target pixel; For the target pixel, the target reflected illumination of the target pixel is determined based on the target illumination spherical harmonic coefficient, the initial direction spherical harmonic coefficient, and the reflectivity of the target object; The target reflected light of the target pixel includes: diffuse reflected light and specular reflected light; When the target reflected light is the diffuse reflected light, the diffuse reflected light of the target pixel is determined based on the diffuse reflectivity of the target pixel's surface, the spherical harmonic coefficients of each target illumination of the target pixel, and the spherical harmonic coefficients of the initial direction. When the target reflected light is the specular reflected light, the fitting direction and fitting incident intensity of the target pixel are fitted based on the spherical harmonic coefficient of the target light, so as to determine the specular reflected light of the target pixel based on the specular reflective surface reflectivity, fitting direction and fitting incident intensity of the target pixel.

2. The method for determining reflected light illumination according to claim 1, characterized in that, The method for determining the intersection point information between the virtual rays emitted by each pixel and the target object includes: Using the target pixel as the source point, a virtual ray is generated along any direction; Determine the position and color of the pixel containing the target object that intersects with the virtual ray in the current scene, and obtain the pixel position and the lighting parameters.

3. The method for determining reflected light illumination according to claim 1, characterized in that, The step of performing a spherical harmonic transformation on the intersection information corresponding to the target pixel in each pixel to obtain the initial illumination spherical harmonic coefficients of the incident illumination distribution of the target pixel includes: Select at least one pixel from the neighboring pixels of the target pixel as an auxiliary pixel of the target pixel; Perform a spherical harmonic transformation on the intersection information of the target pixel and the intersection information of the auxiliary pixel to obtain the intersection spherical harmonic function; By determining the spherical harmonic coefficients of the intersection spherical harmonic function, the initial illumination spherical harmonic coefficients of the incident illumination distribution of the target pixel are obtained.

4. The method for determining reflected light illumination according to claim 3, characterized in that, The process of determining the spherical harmonic coefficients of the intersection spherical harmonic function to obtain the initial illumination spherical harmonic coefficients of the incident illumination distribution of the target pixel includes: Determine the current illumination spherical harmonic coefficients of the intersection spherical harmonic function; The initial spherical harmonic coefficients of the incident light distribution of the target pixel are obtained by weighted summation of each of the current illumination spherical harmonic coefficients.

5. The method for determining reflected light illumination according to claim 1, characterized in that, The step of filtering noise from the target pixel based on the initial illumination spherical harmonic coefficient to obtain the filtered target illumination spherical harmonic coefficient includes: Select at least one pixel from the neighboring pixels of the target pixel as an auxiliary pixel of the target pixel; Hole filtering is applied to the initial illumination spherical harmonic coefficients of the target pixel and the auxiliary pixel to obtain the target illumination spherical harmonic coefficients after noise reduction.

6. The method for determining reflected light illumination according to claim 1, characterized in that, The target reflected illumination is diffuse illumination. Determining the target reflected illumination of the target pixel based on the target illumination spherical harmonic coefficient, the initial direction spherical harmonic coefficient, and the reflectivity of the target object includes: For the target pixel, the product of each target illumination spherical harmonic coefficient and the initial direction spherical harmonic coefficient is determined to obtain the initial pixel spherical harmonic coefficient; The spherical harmonic coefficients of the target pixel are obtained by summing the initial pixel spherical harmonic coefficients. The diffuse illumination of the target pixel is obtained by summing the spherical harmonic coefficients of each target pixel.

7. The method for determining reflected light illumination according to claim 1, characterized in that, The target reflected illumination is specular reflected illumination. Determining the target reflected illumination of the target pixel based on the target illumination spherical harmonic coefficient, the initial direction spherical harmonic coefficient, and the reflectivity of the target object includes: Select at least one pixel from the neighboring pixels of the target pixel as an auxiliary pixel of the target pixel; The fitting direction of the target pixel is determined based on the incident direction of the virtual light corresponding to the target pixel and the auxiliary pixel; The fitted incident illumination parameters of the target pixel are determined based on the incident intensity of the virtual light corresponding to the target pixel and the auxiliary pixel. When the fitted incident light parameters are the fitted light intensity, the specular reflection light of the target object is determined based on the reflectivity of the target object, the fitted direction, and the fitted incident light intensity.

8. The method for determining reflected light illumination according to claim 1, characterized in that, The method further includes: Update the intersection information to the rendering target texture corresponding to the current scene.

9. A method for determining global illumination, characterized in that, include: Determine the self-illumination of each target pixel in the current scene to obtain self-illumination information; The target reflected illumination of each target pixel is determined to obtain target reflected illumination information; wherein the target reflected illumination is determined according to the reflected illumination determination method as described in any one of claims 1-8; For each target pixel, the target illumination is determined based on the self-illumination information and the target reflected illumination information.

10. A device for determining reflected light illumination, characterized in that, include: The first determining module is used to determine the intersection information of the virtual light rays emitted by each pixel and the target object; wherein, the intersection information includes at least the pixel position of the intersection pixel and the illumination parameters of the intersection pixel; The first transformation module is used to perform spherical harmonic transformation on several intersection point information corresponding to the target pixel in each pixel to obtain the initial illumination spherical harmonic coefficients of the incident illumination distribution of the target pixel. The second transformation module is used to perform spherical harmonic transformation on the incident direction of the virtual light corresponding to the target pixel to obtain the initial directional spherical harmonic coefficients of the target pixel; The filtering module is used to perform noise filtering on the target pixel based on the initial illumination spherical harmonic coefficient to obtain the target illumination spherical harmonic coefficient after filtering the target pixel; The second determining module is used to determine the target reflected illumination of the target pixel based on the target illumination spherical harmonic coefficient, the initial direction spherical harmonic coefficient, and the reflectivity of the target object; wherein the target reflected illumination of the target pixel includes: diffuse reflection illumination and specular reflection illumination; When the target reflected light is the diffuse reflected light, the diffuse reflected light of the target pixel is determined based on the diffuse reflectivity of the target pixel's surface, the spherical harmonic coefficients of each target illumination of the target pixel, and the spherical harmonic coefficients of the initial direction. When the target reflected light is the specular reflected light, the fitting direction and fitting incident intensity of the target pixel are fitted based on the spherical harmonic coefficient of the target light, so as to determine the specular reflected light of the target pixel based on the specular reflective surface reflectivity, fitting direction and fitting incident intensity of the target pixel.

11. A global illumination determination device, characterized in that, include: The third determining module is used to determine the self-illumination of each target pixel in the current scene and obtain self-illumination information; The fourth determining module is used to determine the target reflected illumination of each target pixel to obtain target reflected illumination information; wherein the target reflected illumination is determined according to the reflected illumination determination method as described in any one of claims 1-8; The fifth determining module is used to determine the target illumination of each target pixel based on the self-illumination information and the target reflected illumination information.

12. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method according to any one of claims 1 to 9.

13. An electronic device, characterized in that, include: processor; as well as Memory for storing the executable instructions of the processor; The processor is configured to execute the method of any one of claims 1 to 9 by executing the executable instructions.

Citation Information

Patent Citations

  • Illumination method based on picture level images

    CN104268923A

  • Interactive rendering method, device and system

    CN108235053A