Global illumination methods and systems for mobile devices

By using spherical occlusion and proxy light source technology on mobile devices, a visibility factor is generated and low-intensity light sources are eliminated. A proxy light source is constructed to perform secondary light bounce, which solves the problem of real-time global illumination of dynamic light sources and scenes on mobile devices, and achieves efficient and natural lighting effects.

CN122492912APending Publication Date: 2026-07-31HANGZHOU ELECTRONICS SOUL NETWORK TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HANGZHOU ELECTRONICS SOUL NETWORK TECH
Filing Date
2026-07-06
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Real-time global illumination of dynamic light sources and dynamic scenes on mobile devices faces challenges such as high computational costs, discontinuous illumination, and hard edge occlusion. Existing technologies struggle to meet the requirements of high frame rates and low latency under limited computing power.

Method used

By placing spherical occluders to generate visibility factors, static virtual point light sources with radiation intensity below a threshold are eliminated, and proxy light sources are constructed to perform secondary light bounce. Combined with Lambert's law of diffuse reflection and the inverse square law of distance attenuation, radiation intensity is calculated to achieve soft occlusion effect and efficient lighting rendering.

Benefits of technology

While reducing computing power consumption, it solves the problems of sparse VPL lighting breakage and hard edge occlusion, and achieves natural dynamic indirect lighting and material coloring effects, meeting the high frame rate and low latency requirements of mobile devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122492912A_ABST
    Figure CN122492912A_ABST
Patent Text Reader

Abstract

This application relates to a global illumination method for mobile devices. The method includes: placing a spherical occluder; generating a visibility factor based on the light path from a main light source to static virtual point light sources to simulate a soft occlusion effect; calculating the radiant intensity of each static virtual point light source in the current frame based on the spatial relationship between the main light source and each static virtual point light source, and using the spatial relationship and visibility factor; removing static virtual point light sources with radiant intensities below a preset intensity threshold; performing a weighted summation of the radiant intensities of all retained static virtual point light sources; constructing a proxy light source based on the weighted summation result; using the proxy light source to simulate secondary light bounce; and illuminating shading points in the scene together with the retained static virtual point light sources to output a global illumination rendering. This application solves the problem of not being able to achieve global illumination supporting dynamic light sources and dynamic scenes under limited computing power.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of intelligent control technology, and in particular to global lighting methods and systems for mobile devices. Background Technology

[0002] Real-time global illumination (GI) is a crucial technique in computer graphics, used to simulate the multiple bounces and energy transfer of light within a scene, thereby generating realistic lighting and shadow effects. However, implementing real-time GI on mobile devices, especially wireless virtual reality (VR) platforms, faces significant challenges. These devices are subject to extremely stringent limitations in terms of computing power, power consumption, and heat dissipation. Traditional high-fidelity GI methods, such as path tracing or radiosity caching, are computationally expensive and struggle to meet the stringent requirements of VR for high frame rates (e.g., above 72fps) and low latency (e.g., below 20ms).

[0003] Currently, a common alternative for mobile devices is "static baking," which involves pre-calculating and storing lighting information for the scene. While this method has low runtime overhead, it is completely unable to respond to dynamic changes: when the light source moves (e.g., a flashlight shines on a wall in a different direction) or the geometry changes (e.g., a door is opened or an object is moved), the pre-baked lighting cannot provide immediate lighting and shadow feedback, severely limiting the realism and immersion of the interactive scene. Therefore, how to achieve real-time global illumination that supports dynamic light sources and dynamic scenes under the limited computing power of mobile devices has become a pressing technical problem to be solved in this field.

[0004] To address the aforementioned issues, existing technologies have developed approximate GI methods based on Virtual Point Lights (VPLs). By pre-setting several VPLs as "reflection proxies" in the scene and dynamically calculating the radiation contribution of the main light source to each VPL, indirect lighting can be simulated to some extent. However, if dense VPL coverage is used, the computational load remains excessive; if sparse VPLs are used, obvious lighting discontinuities (such as isolated bright spots) are easily generated. Furthermore, accurately calculating the shadow maps or ray detection required for ray occlusion is also costly on mobile devices. Summary of the Invention

[0005] This application provides a global illumination method, system, electronic device, and storage medium for mobile devices, to at least solve the problem in related technologies that global illumination supporting dynamic light sources and dynamic scenes cannot be achieved under limited computing power.

[0006] In a first aspect, embodiments of this application provide a global illumination method for a mobile device, the method comprising: By placing a spherical occluder, a visibility factor is generated based on the light path from the main light source to the static virtual point light source to simulate a soft occlusion effect. The static virtual point light source is predefined on the scene surface, and each static virtual point light source stores the material color and normal information of the corresponding position. Based on the spatial positional relationship between the main light source and each of the static virtual point light sources, and based on the spatial positional relationship and the visibility factor, the radiation intensity of each static virtual point light source in the current frame is calculated, and static virtual point light sources with radiation intensity lower than a preset intensity threshold are removed. The radiation intensity of all retained static virtual point light sources is weighted and summed. A proxy light source is constructed based on the weighted summation result. The proxy light source is used to simulate the secondary bounce of light and together with the retained static virtual point light sources, illuminate the shading points in the scene and output a global illumination rendering.

[0007] In some embodiments, generating a visibility factor by placing a spherical occluder based on the light path from the main light source to the static virtual point light source includes: Calculate the shortest distance between the light path from the main light source to the static virtual point light source and the center of the spherical occlusion. A visibility factor between 0 and 1 is generated based on the ratio of the shortest distance to the radius of the spherical occluder. In the presence of multiple spherical occluders, the visibility factors calculated for each spherical occluder are multiplied together to obtain the final visibility factor.

[0008] In some embodiments, calculating the radiant intensity of each static virtual point light source in the current frame based on the spatial positional relationship between the main light source and each of the static virtual point light sources, and based on the spatial positional relationship and the visibility factor, includes: Based on the spatial relationship between the main light source and each static virtual point light source, we obtain the inverse square distance attenuation and the cosine attenuation of the incident angle. The radiation intensity of the static virtual point light source in the current frame is obtained based on the inverse squared attenuation of distance, the cosine attenuation of incident angle, the visibility factor, the material albedo, the representative area weight, and the intensity of the main light source.

[0009] In some embodiments, the step of weighted summing of the radiant intensities of all retained static virtual point light sources and constructing a proxy light source based on the weighted summation result includes: The position of the proxy light source is obtained by weighted average of the radiation intensity of each retained static virtual point light source position; The normal direction of the proxy light source is obtained by weighted average of the radiation intensity in the normal direction of each retained static virtual point light source. The radiation intensity of the proxy light source is obtained based on the total radiation intensity of each retained static virtual point light source, the estimated environmental albedo, and the distance from the proxy light source to the irradiated surface.

[0010] In some embodiments, the formula for calculating the radiation intensity of the proxy light source includes:

[0011] Among them, I sec To measure the radiation intensity of the proxy light source, For the total radiation intensity, ρ ave For environmental albedo estimation, d sec The distance from the proxy light source to the irradiated surface is denoted as .

[0012] In some embodiments, generating a visibility factor by placing a spherical occluder based on the light path from the main light source to the static virtual point light source includes: Obtain the original visibility factor calculated for the current frame, and read the historical visibility factor corresponding to the same static virtual point light source in the previous frame from the cache; The original visibility factor of the current frame and the historical visibility factor are weighted and averaged according to a preset weighting coefficient to obtain the smooth visibility factor of the current frame. Replace the original visibility factor with the smooth visibility factor.

[0013] In some embodiments, the method further includes: Obtain the original radiation intensity of the proxy light source, and statistically analyze the radiation intensity distribution of all retained static virtual point light sources in the current frame, including the maximum, minimum, and average values ​​of the radiation intensity. When the ratio of the original radiation intensity of the proxy light source to the average radiation intensity of the static virtual point light source exceeds a preset ratio threshold, it is determined that the current frame has a risk of energy overexposure. In response to the risk of energy overexposure, the original radiation intensity of the proxy light source is nonlinearly compressed according to a preset compression curve, so that the ratio of the compressed proxy light source radiation intensity to the average value of the static virtual point light source radiation intensity is reduced to below the ratio threshold. The compressed surrogate light source radiation intensity is used for the final scene shading, and gradually restored to the original radiation intensity over multiple consecutive frames to simulate the human eye's adaptation process to brightness changes.

[0014] Secondly, embodiments of this application provide a global illumination system for a mobile device, the system comprising: The visibility analysis module is used to generate a visibility factor based on the light path from the main light source to the static virtual point light source by placing a spherical occluder to simulate a soft occlusion effect. The static virtual point light source is predefined on the scene surface, and each static virtual point light source stores the material color and normal information of the corresponding position. The elimination module is used to calculate the radiation intensity of each static virtual point light source in the current frame based on the spatial positional relationship between the main light source and each of the static virtual point light sources, and based on the spatial positional relationship and the visibility factor, and eliminate static virtual point light sources whose radiation intensity is lower than a preset intensity threshold. The rendering module is used to perform a weighted summation of the radiation intensity of all retained static virtual point light sources, construct a proxy light source based on the weighted summation result, and use the proxy light source to simulate the secondary bounce of light, so as to illuminate the shading points in the scene together with the retained static virtual point light sources, and output a global illumination rendering screen.

[0015] Thirdly, embodiments of this application provide a computer device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the global illumination method for a mobile device as described in the first aspect above.

[0016] Fourthly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the global illumination method for a mobile device as described in the first aspect above.

[0017] Compared to related technologies, the global illumination method for mobile devices provided in this application simulates soft occlusion by placing a spherical occluder and generating a visibility factor based on the light path from the main light source to the static virtual point light source. Based on the spatial relationship between the main light source and each static virtual point light source, and using the spatial relationship and visibility factor, the radiant intensity of each static virtual point light source in the current frame is calculated. Static virtual point light sources with radiant intensities below a preset intensity threshold are removed. The radiant intensities of all retained static virtual point light sources are weighted and summed. A proxy light source is constructed based on the weighted summation result. This proxy light source simulates the secondary bounce of light and, together with the retained static virtual point light sources, illuminates the shading points in the scene, outputting a global illumination rendering. This solves the problem of not being able to achieve global illumination supporting dynamic light sources and dynamic scenes under limited computing power.

[0018] By using predefined static virtual point light sources and spherical occlusion bodies to achieve soft occlusion, intensity threshold culling, and weighted merging of proxy light sources to simulate secondary bounce, this method significantly reduces the computing power consumption of mobile devices, ensures high frame rates and low latency, and effectively solves problems such as sparse VPL lighting breaks and hard edge occlusion. It achieves more natural dynamic indirect lighting and material coloring effects, combining excellent performance, realistic image effects, and efficient engineering implementation. Attached Figure Description

[0019] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1 This is a flowchart of a global illumination method for a mobile device according to an embodiment of this application; Figure 2 This is a schematic diagram of a spherical shielding body placed according to an embodiment of this application; Figure 3 This is a schematic diagram illustrating a visibility situation according to an embodiment of this application; Figure 4 This is a structural block diagram of a global illumination system for a mobile device according to an embodiment of this application; Figure 5 This is a schematic diagram of the internal structure of an electronic device according to an embodiment of this application. Detailed Implementation

[0020] To make the objectives, technical solutions, and advantages of this application clearer, the application is described and illustrated below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application. All other embodiments obtained by those skilled in the art based on the embodiments provided in this application without inventive effort are within the scope of protection of this application.

[0021] Obviously, the accompanying drawings described below are merely some examples or embodiments of this application. Those skilled in the art can apply this application to other similar scenarios based on these drawings without any inventive effort. Furthermore, it is understood that although the efforts made in this development process may be complex and lengthy, for those skilled in the art related to the content disclosed in this application, any changes to design, manufacturing, or production based on the technical content disclosed in this application are merely conventional technical means and should not be construed as insufficient disclosure of the content of this application.

[0022] In this application, the reference to "embodiment" means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment that is mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments without conflict.

[0023] Unless otherwise defined, the technical or scientific terms used in this application shall have the ordinary meaning understood by one of ordinary skill in the art to which this application pertains. The terms “a,” “an,” “an,” “the,” and similar words used in this application do not indicate quantity limitation and may indicate singular or plural. The terms “comprising,” “including,” “having,” and any variations thereof used in this application are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units not listed, or may include other steps or units inherent to these processes, methods, products, or devices. The terms “connected,” “linked,” “coupled,” and similar words used in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. “Multiple” used in this application refers to two or more. “And / or” describes the relationship between related objects, indicating that three relationships may exist; for example, “A and / or B” can represent: A alone, A and B simultaneously, and B alone. The character " / " generally indicates that the preceding and following objects are in an "or" relationship. The terms "first," "second," and "third" used in this application are merely to distinguish similar objects and do not represent a specific ordering of the objects.

[0024] This embodiment provides a global illumination method for mobile devices. Figure 1 This is a flowchart of a global illumination method for a mobile device according to an embodiment of this application, such as... Figure 1 As shown, the process includes the following steps: Step S101: By placing a spherical occluder, a visibility factor is generated based on the light path from the main light source to the static virtual point light source to simulate a soft occlusion effect. The static virtual point light source is predefined on the scene surface, and each static virtual point light source stores the material color and normal information of the corresponding position.

[0025] To avoid calculating expensive shadow maps, this embodiment allows the placement of spherical blockers. By detecting the distance between the light path and these spheres, a non-binary soft occlusion effect is calculated to simulate a scenario where light is blocked by an object and there is global illumination (GI).

[0026] Figure 2 This is a schematic diagram of a spherical shielding body placed according to an embodiment of this application, such as... Figure 2 As shown, there is a red wall in the scene, and the main light source shines on this wall. A spherical occluder is placed between the light source and the wall. (1) is the effect of no occlusion. (2) is the wrong effect. The occluded area becomes completely black, and the red color of the red wall disappears completely. (3) is the right effect. The blocked area should not be completely black, but should have a little bit of red (the color of the material). This is similar to the GI effect.

[0027] The spherical occlusion algorithm does not perform physical collision detection via raycasting at runtime; instead, it places spherical occlusions in the scene to simulate obstacles. The algorithm detects distances from the main light source (y) to the static virtual point light source (x). i The line segment connecting the center b of the sphere j The visibility is not black and white, but rather decreases smoothly with distance. If the light path passes through the center of the sphere, the energy drops to 0; if the light path passes close to the edge of the sphere, the energy is partially reduced.

[0028] In some embodiments, step S101 includes: Step S1011: Calculate the shortest distance between the light path from the main light source to the static virtual point light source and the center of the spherical occlusion.

[0029] Step S1012: Generate a visibility factor between 0 and 1 based on the ratio of the shortest distance to the radius of the spherical occluder.

[0030] Step S1013: In the case of multiple spherical occluders, the visibility factors calculated for each spherical occluder are multiplied together to obtain the final visibility factor.

[0031] The formula for calculating the visibility factor is as follows:

[0032] Where V(x,y) is the visibility factor, d seg (y,x i ,b j (b) is the center of the ball. j To the light path segment (y, x) i The shortest distance, r j Let N be the radius of the spherical shielding body. blockersThis represents the number of spherical occluders. If multiple occluders overlap, their occlusion effects will combine, allowing for the creation of more complex shapes to approximate irregular walls.

[0033] Figure 3 This is a schematic diagram illustrating a visibility situation according to an embodiment of this application, such as... Figure 3 As shown, the yellow line clearly passes through the purple ball, so there must have been some obstruction, but it didn't hit the center of the ball. The red dotted line d... seg It has a certain length, which is 60% of the sphere's radius. The visibility factor is calculated to be 0.6. The final effect: the progress bar at the bottom displays "~0.6 (Partial)". This means that only 60% of the light energy reaches the static virtual point light source. On the screen, the point on the wall will not be as bright, thus creating a soft penumbra effect instead of a harsh, completely black shadow.

[0034] This solution calculates the visibility factor by pre-placing spherical occluders, avoiding runtime ray detection and expensive shadow mapping calculations. This significantly reduces the computing power and bandwidth consumption of mobile devices. The calculation process only requires simple distance and ratio operations, which are low in complexity and highly efficient. It can well meet the requirements of mobile / VR devices for high frame rate and low latency. At the same time, multiple occluders are superimposed by multiplication, which can flexibly combine to approximate complex obstacle shapes to adapt to different scene requirements.

[0035] This scheme generates a visibility factor that varies continuously between 0 and 1, achieving a smooth, non-binary soft occlusion effect. It avoids harsh, completely black occlusion areas, preserves the material's original color and indirect lighting characteristics, and presents penumbra and global illumination effects that are closer to the real physical world. This effectively improves the naturalness and realism of the rendered image and solves the visual discontinuity problem caused by traditional binary occlusion.

[0036] Step S102: Based on the spatial positional relationship between the main light source and each static virtual point light source, and based on the spatial positional relationship and visibility factor, calculate the radiation intensity of each static virtual point light source in the current frame, and remove static virtual point light sources with radiation intensity lower than a preset intensity threshold.

[0037] Each frame dynamically calculates how much light each static virtual point light source should reflect based on the spatial relationship between the main light source (such as the sun or a flashlight) and these static virtual point light sources. If the intensity of a static virtual point light source is below a threshold, it is directly discarded to save costs.

[0038] In some embodiments, calculating the radiant intensity of each static virtual point light source in the current frame in step S102 includes: Step S1021: Based on the spatial positional relationship between the main light source and each static virtual point light source, obtain the inverse square distance attenuation and the cosine attenuation of the incident angle.

[0039] Step S1022: Based on the inverse square distance attenuation, the cosine attenuation of the incident angle, the visibility factor, the material albedo, the representative area weight, and the intensity of the main light source, the radiation intensity of the static virtual point light source in the current frame is obtained.

[0040] The objective of this embodiment is to calculate the radiation intensity I that each static virtual point light source should emit in the current frame. i Its mathematical model is based on Lambert's law of diffuse reflection and distance attenuation:

[0041] d(x i ,y) 2 The energy loss is determined by the inverse square of the distance between the light source and the VPL, which is a factor of distance attenuation.

[0042] cosθ x As an incident angle response, it follows Lambert's cosine law; the more perpendicular the light rays are to the surface, the higher the rebound intensity.

[0043] ρ(x i The albedo is the material's reflectivity, which, as mentioned earlier, determines the color of the reflected light.

[0044] A i To represent the area weight, this is a predefined weighting factor that represents the surface area covered by the static virtual point light source.

[0045] V(x,y) is the visibility factor, used to determine whether light is blocked.

[0046] I i This represents the radiation intensity of the main light source (transmitter) in the direction pointing towards the static virtual point light source.

[0047] To achieve extremely high performance on mobile devices, the algorithm performs rigorous elimination. Preferably, the elimination intensity threshold I... cull Set to 0.01 W / sr, if the calculated intensity is lower than this value (e.g., the light source moves behind a wall, or is too far away), the static virtual point light source will be turned off directly in this frame.

[0048] Based on Lambert's law of diffuse reflection and inverse square distance attenuation, combined with material albedo, representative area weight, and visibility factor, a physically accurate radiation intensity calculation model is constructed. This model can dynamically update the reflected light intensity of static virtual point light sources according to the position of the main light source. It can ensure the physical realism and color accuracy of indirect lighting, and adapt to dynamic scenes such as light source movement, thus overcoming the limitation of traditional baking lighting that cannot respond to dynamic changes.

[0049] By performing real-time culling of static virtual point light sources through preset intensity thresholds, low-contribution and meaningless computational tasks are directly filtered out, significantly reducing the rendering overhead per frame on mobile devices, significantly reducing computing power and power consumption, and stably meeting the stringent requirements of mobile / VR platforms for high frame rates and low latency, achieving ultimate performance optimization while ensuring lighting effects.

[0050] Step S103: The radiation intensity of all retained static virtual point light sources is weighted and summed. A proxy light source is constructed based on the weighted summation result. The proxy light source is used to simulate the secondary bounce of light and together with the retained static virtual point light sources, it illuminates the shading points in the scene and outputs the global illumination rendering.

[0051] When the number of virtual point light sources is limited (sparse), the indirect light generated by the first bounce often forms several isolated bright spots on the ground or wall, like a flashlight beam, while the areas between these bright spots remain completely black. The core function of secondary bounces is to fill these light gaps by redistributing energy.

[0052] For example, if only three static virtual point light sources are activated on the floor, they can only illuminate the area covered by their respective emission hemispheres. Because the static virtual point light sources are sparse, the beams cannot cover the entire room, resulting in a noticeable visual discontinuity. This embodiment does not calculate the independent bounce of these three points, but instead combines all their energy to create a virtual super fill light. This super fill light is usually located on the ceiling or opposite wall, and its emission cone is very large, producing a large area of ​​uniform diffuse reflection. This is like turning on a dim ambient light in the room, filling in all the dark gaps not illuminated by the static virtual point light sources.

[0053] In some embodiments, step S103 involves weighted summation of the radiant intensities of all retained static virtual point light sources, and constructing a proxy light source based on the weighted summation result, including: Step S1031: Obtain the position of the proxy light source based on the weighted average of the radiation intensity of each retained static virtual point light source position.

[0054] Step S1032: Obtain the normal direction of the proxy light source based on the weighted average of the radiation intensity in the normal direction of each retained static virtual point light source.

[0055] Step S1033: Based on the total radiation intensity of each retained static virtual point light source, the estimated environmental albedo, and the distance from the proxy light source to the irradiated surface, the radiation intensity of the proxy light source is obtained.

[0056] The weighted average position and orientation are determined because multiple static virtual point lights in a scene may be simultaneously illuminated by the main light source (e.g., sunlight illuminating a large area of ​​the floor). The system will merge these active static virtual point lights into a single proxy light source. The formula for calculating the proxy light source's position is:

[0057] Where, x sec For the position of the proxy light source, I i x i It is the position of the i-th static virtual point light source.

[0058] The formula for calculating the normal direction of the proxy light source is:

[0059] Where, n sec For the normal direction of the proxy light source, I i n i It is the normal direction of the i-th static virtual point light source.

[0060] The direction of the normal to the proxy light source determines the main direction of the secondary reflected light. If most of the illuminated surface is the floor (where the floor normal points upwards), the normal will be biased upwards.

[0061] The merged intensity is no longer the intensity of a single point, but a scaling of the global energy. The formula for calculating the surrogate light source's radiant intensity includes:

[0062] I sec The radiation intensity of the proxy light source.

[0063] The total radiation intensity is the sum of the intensities of all active static virtual point light sources in the current scene, representing the total energy of the first hop.

[0064] ρ ave The environmental albedo is estimated using a preset empirical value to simulate the energy loss of light after it hits a wall.

[0065] d sec The distance from the proxy light source to the illuminated surface is the most critical attenuation term. Even when combined, the light still needs to cross d... sec The distance to illuminate the other side must be such that it conforms to the inverse square law.

[0066] By constructing proxy light sources through weighted summation of radiation intensity of the retained static virtual point light sources, a single proxy light source is used to simulate the secondary bounce of light. This eliminates the need to calculate the secondary bounce separately for each VPL, reducing the computational complexity from O(N) to O(1). It maintains extremely low computational overhead under sparse VPL conditions, perfectly adapts to the performance limitations of mobile devices and VR platforms, and ensures efficient and stable lighting calculations.

[0067] This method can redistribute the dispersed indirect light energy evenly, and use proxy light sources to achieve large-area soft supplementary lighting. It effectively solves the problems of isolated light spots, dead black in dark areas, and discontinuous lighting caused by sparse VPL, fills the gaps in scene lighting, makes indirect light smoother and more natural, and greatly improves the overall effect and realism of global illumination.

[0068] Through the above steps, a predefined static virtual point light source is used in conjunction with a spherical occlusion body to calculate the visibility factor, avoiding runtime ray detection and expensive shadow mapping calculations. A smooth soft occlusion effect is achieved with extremely simple distance and ratio calculations, which not only preserves the material color and indirect lighting characteristics and eliminates the visual discontinuity of hard black, but also greatly reduces the computing power consumption of mobile devices, meeting the requirements of high frame rate and low latency for VR devices.

[0069] Based on Lambert's law of diffuse reflection and inverse squared attenuation, the VPL radiation intensity is dynamically calculated by combining parameters such as visibility factor and material albedo. Invalid light sources are eliminated by intensity thresholding, and only high-contribution VPLs are retained for calculation. While ensuring the physical realism and dynamic adaptability of indirect lighting, the rendering overhead per frame is further reduced, balancing image quality and performance.

[0070] By constructing a proxy light source through weighted merging of active VPLs to simulate the secondary bounce of light, the calculation of secondary bounce of multiple light sources is simplified to the calculation of a single light source. This completely solves the problems of isolated light spots, completely black shadows, and discontinuous lighting caused by sparse VPLs, and achieves uniform and soft indirect light filling, significantly improving the realism of global lighting.

[0071] In some embodiments, generating visibility factors based on the ray path from the main light source to the static virtual point light source by placing a spherical occluder includes: Obtain the original visibility factor calculated for the current frame, and read the historical visibility factor corresponding to the same static virtual point light source in the previous frame from the cache; The original visibility factor and the historical visibility factor of the current frame are weighted and averaged according to preset weight coefficients to obtain the smoothed visibility factor of the current frame. Replace the original visibility factor with a smoothed visibility factor.

[0072] By performing a weighted average of the visibility factors of the current frame and the previous frame to achieve temporal smoothing filtering, it is possible to effectively eliminate lighting flicker and jitter caused by abrupt changes in visibility, making soft occlusion transitions smoother and more natural. At the same time, it requires only minimal caching and computational overhead to significantly improve the stability of lighting rendering and image quality on mobile devices.

[0073] In some embodiments, the method further includes: Obtain the original radiation intensity of the proxy light source, and statistically analyze the radiation intensity distribution of all retained static virtual point light sources in the current frame, including the maximum, minimum, and average values ​​of the radiation intensity. When the ratio of the original radiation intensity of the proxy light source to the average radiation intensity of the static virtual point light source exceeds a preset ratio threshold, it is determined that there is a risk of energy overexposure in the current frame. In response to the risk of energy overexposure, the original radiation intensity of the proxy light source is nonlinearly compressed according to the preset compression curve, so that the ratio of the compressed proxy light source radiation intensity to the average value of the static virtual point light source radiation intensity is reduced to below the ratio threshold. The compressed surrogate light source radiance is used for the final scene shading and gradually restored to the original radiance over multiple consecutive frames to simulate the human eye's adaptation to changes in brightness.

[0074] By monitoring the ratio of the radiation intensity of the proxy light source to the average radiation intensity of the static virtual point light source, the problem of energy overexposure can be accurately identified and suppressed. Combined with the non-linear compression curve and multi-frame progressive recovery mechanism, it can avoid the excessive secondary rebound light that causes the image to become washed out and lose details. It can also simulate the human eye's adaptation effect to make the brightness change smooth and natural. While improving the stability of lighting and the sense of image layering, it does not add extra computational burden and adapts to the real-time rendering needs of mobile devices.

[0075] It should be noted that the steps shown in the above process or in the flowchart of the accompanying figures can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.

[0076] This embodiment also provides a global illumination system for a mobile device, which implements the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the terms "module," "unit," "subunit," etc., can refer to a combination of software and / or hardware that performs a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0077] Figure 4 This is a structural block diagram of a global illumination system for a mobile device according to an embodiment of this application, such as... Figure 4 As shown, the system includes: The visibility analysis module 41 is used to generate a visibility factor based on the light path from the main light source to the static virtual point light source by placing a spherical occlusion body to simulate the soft occlusion effect. The static virtual point light source is predefined on the scene surface, and each static virtual point light source stores the material color and normal information of the corresponding position.

[0078] The elimination module 42 is used to calculate the radiation intensity of each static virtual point light source in the current frame based on the spatial position relationship between the main light source and each static virtual point light source, and based on the spatial position relationship and visibility factor, and eliminate static virtual point light sources with radiation intensity lower than a preset intensity threshold.

[0079] The rendering module 43 is used to perform a weighted summation of the radiation intensity of all retained static virtual point light sources, construct a proxy light source based on the weighted summation result, use the proxy light source to simulate the secondary bounce of light, and together with the retained static virtual point light sources, illuminate the shading points in the scene to output a global illumination rendering image.

[0080] In some embodiments, the visibility analysis module 41 includes: The distance calculation module is used to calculate the shortest distance between the light path from the main light source to the static virtual point light source and the center of the spherical occlusion.

[0081] The single occlusion analysis module generates a visibility factor between 0 and 1 based on the ratio of the shortest distance to the radius of the spherical occlusion.

[0082] The multiple occlusion analysis module is used to multiply the visibility factors calculated by each spherical occluder together to obtain the final visibility factor when multiple spherical occluders exist.

[0083] In some embodiments, the rejection module 42 includes: The factor calculation module is used to obtain the inverse square distance attenuation and the cosine attenuation of the incident angle based on the spatial positional relationship between the main light source and each static virtual point light source.

[0084] The radiation intensity determination module is used to obtain the radiation intensity of a static virtual point light source in the current frame based on inverse square distance attenuation, cosine attenuation of incident angle, visibility factor, material albedo, representative area weight, and main light source intensity.

[0085] In some embodiments, the rendering module 43 includes: The location calculation module is used to obtain the location of the proxy light source based on the weighted average of the radiation intensity of each retained static virtual point light source location.

[0086] The normal calculation module is used to obtain the normal direction of the proxy light source based on the weighted average of the radiation intensity of the normal directions of each retained static virtual point light source.

[0087] The intensity calculation module is used to obtain the radiation intensity of the proxy light source based on the total radiation intensity of each retained static virtual point light source, the estimated environmental albedo, and the distance from the proxy light source to the irradiated surface.

[0088] In some embodiments, the formula for calculating the radiant intensity of the proxy light source includes:

[0089] Among them, I sec To measure the radiation intensity of the proxy light source, For the total radiation intensity, ρ ave For environmental albedo estimation, d sec The distance from the proxy light source to the irradiated surface is denoted as .

[0090] In some embodiments, the visibility analysis module 41 includes: a smoothing module, used to obtain the original visibility factor calculated in the current frame, and read the historical visibility factor corresponding to the same static virtual point light source in the previous frame from the cache; to perform a weighted average of the original visibility factor and the historical visibility factor of the current frame according to a preset weight coefficient to obtain the smoothed visibility factor of the current frame; and to replace the original visibility factor with the smoothed visibility factor.

[0091] In some embodiments, the system also includes a module for suppressing energy overexposure, used for: Obtain the original radiation intensity of the proxy light source, and statistically analyze the radiation intensity distribution of all retained static virtual point light sources in the current frame, including the maximum, minimum, and average values ​​of the radiation intensity. When the ratio of the original radiation intensity of the proxy light source to the average radiation intensity of the static virtual point light source exceeds a preset ratio threshold, it is determined that there is a risk of energy overexposure in the current frame. In response to the risk of energy overexposure, the original radiation intensity of the proxy light source is nonlinearly compressed according to the preset compression curve, so that the ratio of the compressed proxy light source radiation intensity to the average value of the static virtual point light source radiation intensity is reduced to below the ratio threshold. The compressed surrogate light source radiance is used for the final scene shading and gradually restored to the original radiance over multiple consecutive frames to simulate the human eye's adaptation to changes in brightness.

[0092] The system described above uses a predefined static virtual point light source combined with a spherical occlusion body to calculate the visibility factor, avoiding runtime ray detection and expensive shadow mapping calculations. It achieves a smooth soft occlusion effect with extremely simple distance and ratio calculations, which not only preserves the material color and indirect lighting characteristics and eliminates the visual discontinuity of hard black, but also greatly reduces the computing power consumption of mobile devices, meeting the requirements of high frame rate and low latency for VR devices.

[0093] Based on Lambert's law of diffuse reflection and inverse squared attenuation, the VPL radiation intensity is dynamically calculated by combining parameters such as visibility factor and material albedo. Invalid light sources are eliminated by intensity thresholding, and only high-contribution VPLs are retained for calculation. While ensuring the physical realism and dynamic adaptability of indirect lighting, the rendering overhead per frame is further reduced, balancing image quality and performance.

[0094] By constructing a proxy light source through weighted merging of active VPLs to simulate the secondary bounce of light, the calculation of secondary bounce of multiple light sources is simplified to the calculation of a single light source. This completely solves the problems of isolated light spots, completely black shadows, and discontinuous lighting caused by sparse VPLs, and achieves uniform and soft indirect light filling, significantly improving the realism of global lighting.

[0095] It should be noted that the above modules can be functional modules or program modules, and can be implemented through software or hardware. For modules implemented through hardware, the above modules can reside in the same processor; or the above modules can be located in different processors in any combination.

[0096] This embodiment also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.

[0097] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.

[0098] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program: S1, by placing a spherical occluder, generates a visibility factor based on the light path from the main light source to the static virtual point light source to simulate a soft occlusion effect. The static virtual point light source is predefined on the scene surface, and each static virtual point light source stores the material color and normal information of the corresponding position.

[0099] S2, based on the spatial positional relationship between the main light source and each static virtual point light source, and based on the spatial positional relationship and visibility factor, calculate the radiation intensity of each static virtual point light source in the current frame, and remove static virtual point light sources with radiation intensity lower than the preset intensity threshold.

[0100] S3 performs a weighted summation of the radiation intensity of all retained static virtual point light sources, constructs a proxy light source based on the weighted summation result, and uses the proxy light source to simulate the secondary bounce of light, which together with the retained static virtual point light sources illuminates the shading points in the scene, outputting a global illumination rendering.

[0101] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated here.

[0102] In one embodiment, Figure 5 This is a schematic diagram of the internal structure of an electronic device according to an embodiment of this application, such as... Figure 5 As shown, an electronic device is provided, which can be a server, and its internal structure diagram can be as follows. Figure 5 As shown, the electronic device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database stores data. The network interface communicates with external terminals via a network connection. When executed by the processor, the computer program implements a global illumination method for a mobile device.

[0103] Those skilled in the art will understand that Figure 5 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the electronic device to which the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.

[0104] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0105] Those skilled in the art should understand that the technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments have been described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0106] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A global illumination method for a mobile device, characterized in that, The method includes: By placing a spherical occluder, a visibility factor is generated based on the light path from the main light source to the static virtual point light source to simulate a soft occlusion effect. The static virtual point light source is predefined on the scene surface, and each static virtual point light source stores the material color and normal information of the corresponding position. Based on the spatial positional relationship between the main light source and each of the static virtual point light sources, and based on the spatial positional relationship and the visibility factor, the radiation intensity of each static virtual point light source in the current frame is calculated, and static virtual point light sources with radiation intensity lower than a preset intensity threshold are removed. The radiation intensity of all retained static virtual point light sources is weighted and summed. A proxy light source is constructed based on the weighted summation result. The proxy light source is used to simulate the secondary bounce of light and together with the retained static virtual point light sources, illuminate the shading points in the scene and output a global illumination rendering.

2. The method according to claim 1, characterized in that, The process of generating a visibility factor by placing a spherical occluder, based on the light path from the main light source to the static virtual point light source, includes: Calculate the shortest distance between the light path from the main light source to the static virtual point light source and the center of the spherical occlusion. A visibility factor between 0 and 1 is generated based on the ratio of the shortest distance to the radius of the spherical occluder. In the presence of multiple spherical occluders, the visibility factors calculated for each spherical occluder are multiplied together to obtain the final visibility factor.

3. The method according to claim 1, characterized in that, The step of calculating the radiant intensity of each static virtual point light source in the current frame based on the spatial positional relationship between the main light source and each of the static virtual point light sources, and based on the spatial positional relationship and the visibility factor, includes: Based on the spatial relationship between the main light source and each static virtual point light source, we obtain the inverse square distance attenuation and the cosine attenuation of the incident angle. The radiation intensity of the static virtual point light source in the current frame is obtained based on the inverse squared attenuation of distance, the cosine attenuation of incident angle, the visibility factor, the material albedo, the representative area weight, and the intensity of the main light source.

4. The method according to claim 1, characterized in that, The step of weighted summing of the radiant intensities of all retained static virtual point light sources and constructing a proxy light source based on the weighted summation result includes: The position of the proxy light source is obtained by weighted average of the radiation intensity of each retained static virtual point light source position; The normal direction of the proxy light source is obtained by weighted average of the radiation intensity in the normal direction of each retained static virtual point light source. The radiation intensity of the proxy light source is obtained based on the total radiation intensity of each retained static virtual point light source, the estimated environmental albedo, and the distance from the proxy light source to the irradiated surface.

5. The method according to claim 4, characterized in that, The formula for calculating the radiation intensity of the proxy light source includes: Among them, I sec To measure the radiation intensity of the proxy light source, For the total radiation intensity, ρ ave For environmental albedo estimation, d sec The distance from the proxy light source to the irradiated surface is denoted as .

6. The method according to claim 2, characterized in that, The process of generating a visibility factor by placing a spherical occluder, based on the light path from the main light source to the static virtual point light source, includes: Obtain the original visibility factor calculated for the current frame, and read the historical visibility factor corresponding to the same static virtual point light source in the previous frame from the cache; The original visibility factor of the current frame and the historical visibility factor are weighted and averaged according to a preset weighting coefficient to obtain the smooth visibility factor of the current frame. Replace the original visibility factor with the smooth visibility factor.

7. The method according to claim 1, characterized in that, The method further includes: Obtain the original radiation intensity of the proxy light source, and statistically analyze the radiation intensity distribution of all retained static virtual point light sources in the current frame, including the maximum, minimum, and average values ​​of the radiation intensity. When the ratio of the original radiation intensity of the proxy light source to the average radiation intensity of the static virtual point light source exceeds a preset ratio threshold, it is determined that the current frame has a risk of energy overexposure. In response to the risk of energy overexposure, the original radiation intensity of the proxy light source is nonlinearly compressed according to a preset compression curve, so that the ratio of the compressed proxy light source radiation intensity to the average value of the static virtual point light source radiation intensity is reduced to below the ratio threshold. The compressed surrogate light source radiation intensity is used for the final scene shading, and gradually restored to the original radiation intensity over multiple consecutive frames to simulate the human eye's adaptation process to brightness changes.

8. A global illumination system for a mobile device, characterized in that, The system includes: The visibility analysis module is used to generate a visibility factor based on the light path from the main light source to the static virtual point light source by placing a spherical occluder to simulate a soft occlusion effect. The static virtual point light source is predefined on the scene surface, and each static virtual point light source stores the material color and normal information of the corresponding position. The elimination module is used to calculate the radiation intensity of each static virtual point light source in the current frame based on the spatial positional relationship between the main light source and each of the static virtual point light sources, and based on the spatial positional relationship and the visibility factor, and eliminate static virtual point light sources whose radiation intensity is lower than a preset intensity threshold. The rendering module is used to perform a weighted summation of the radiation intensity of all retained static virtual point light sources, construct a proxy light source based on the weighted summation result, and use the proxy light source to simulate the secondary bounce of light, so as to illuminate the shading points in the scene together with the retained static virtual point light sources, and output a global illumination rendering screen.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the global illumination method for the mobile device as described in any one of claims 1 to 7.

10. A storage medium having a computer program stored thereon, characterized in that, When executed by the processor, the program implements the global illumination method for the mobile device as described in any one of claims 1 to 7.