Real-time illumination rendering optimization method and system for mobile game scene
By extracting lighting features and adjusting probe layout in real time on mobile devices, the problem of light spot discontinuity in dynamic lighting rendering on mobile devices was solved, achieving efficient lighting rendering effects and a smooth gaming experience.
Patent Information
- Application Number
- CN202511130634.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-13
- Publication Date
- 2025-11-14
AI Technical Summary
On mobile devices, existing technologies struggle to achieve high-quality dynamic lighting rendering under limited computing resources, and insufficient probe density can easily lead to light spot defects, affecting the visual experience.
By extracting illumination features from the target scene, an initial probe layout scheme is generated. The probe position and density are adjusted in real time based on the device operation status to build a probe resource pool. The probe layout is adaptively adjusted using distance weight, illumination similarity weight, and gradient consistency weight. The probe scheme of local areas is extracted in real time for illumination rendering.
It effectively avoids light spot tearing, optimizes the visual experience, improves device rendering efficiency, ensures smooth and realistic lighting transitions, and reduces computing resource consumption.
Smart Images

Figure CN120953466A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of this application relate to the field of artificial intelligence, and more specifically, the embodiments of this application relate to a real-time lighting rendering optimization method and system for mobile game scenes. Background Technology
[0002] As applications such as games and virtual reality increasingly demand higher visual effects, developers urgently need to achieve high-quality rendering in environments with limited computing resources. Currently, pre-baked lighting technology is widely used in scene building due to its efficiency. By pre-calculating and storing static lighting information, it can significantly reduce runtime computational pressure. However, this technology struggles to adapt to lighting changes of dynamic objects in the scene. When characters move or props interact, the lighting effects lack real-time synchronization with the environment, resulting in a significant reduction in the realism of the visuals.
[0003] While real-time ray tracing technology can accurately simulate light propagation and reflection at a physical level, supporting realistic lighting calculations for dynamic objects, the simulation of multiple light bounces consumes enormous computing resources. Especially on mobile devices, limited by chip computing power and energy consumption, it's difficult to achieve physically accurate rendering effects; even with degradation processing, smooth operation is still unattainable. To address this, light probes have been introduced, which collect lighting data by deploying probes in the scene and perform lighting interpolation calculations on dynamic objects at runtime. However, this approach has significant limitations. When the probe density is insufficient, the lighting transition on object surfaces becomes uneven, resulting in light spot defects and affecting the overall visual experience. Therefore, a novel technical solution is urgently needed to address these issues. Summary of the Invention
[0004] In this context, the embodiments of this application aim to provide a real-time lighting rendering optimization method and system for mobile game scenes, which can solve the light spot toning phenomenon caused by insufficient probe density and optimize the visual experience.
[0005] In a first aspect of the embodiments of this application, a method for optimizing real-time lighting rendering in a mobile game scene is provided, comprising: Lighting features are extracted from the target scene to obtain the scene lighting features of the target scene: the scene lighting features include at least: lighting gradient value, geometric complexity, material reflection characteristics, and material reflection characteristics; The device operation status of the terminal associated with the target scene is detected, and a probe layout scheme is generated in stages according to the device operation status. Specifically, in the offline stage, an initial probe layout scheme for the target scene is generated based on the scene lighting characteristics. In the running stage, the probe position and probe density of the target scene are adjusted in real time based on the scene lighting characteristics to obtain an optimized second probe layout scheme. Based on the initial probe layout scheme and / or the second probe layout scheme, a probe resource pool for the target scenario is constructed locally on the device. The distance weight, illumination similarity weight, and gradient consistency weight of each probe in the probe resource pool are calculated. Combined with the motion state of dynamic objects in the target scene, the probe position and local probe density in the local area of the probe resource pool are adaptively adjusted. During device operation, the target probe layout scheme corresponding to the local area is extracted from the probe resource pool in real time for real-time illumination rendering of the local area in the target scene.
[0006] In a second aspect of the embodiments of this application, a real-time lighting rendering optimization system for mobile game scenes is provided, comprising: An extraction unit is used to extract lighting features from a target scene to obtain scene lighting features of the target scene: the scene lighting features include at least: lighting gradient value, geometric complexity, material reflection characteristics, and material reflection characteristics; The generation unit is used to detect the device operation status of the terminal associated with the target scene and generate a probe layout scheme in stages according to the device operation status. Specifically, in the device offline stage, an initial probe layout scheme for the target scene is generated based on the scene lighting characteristics. In the device operation stage, the probe position and probe density of the target scene are adjusted in real time based on the scene lighting characteristics to obtain an optimized second probe layout scheme. The construction unit, based on the initial probe layout scheme and / or the second probe layout scheme, constructs a probe resource pool for the target scene locally on the device; The optimization unit is used to calculate the distance weight, illumination similarity weight, and gradient consistency weight of each probe in the probe resource pool. Combined with the motion state of dynamic objects in the target scene, it adaptively adjusts the probe position and local probe density in the local area of the probe resource pool. During device operation, it extracts the target probe layout scheme corresponding to the local area from the probe resource pool in real time for real-time illumination rendering of the local area in the target scene.
[0007] In a third aspect of the embodiments of this application, a terminal device is provided, the terminal device comprising: at least one processor, a memory, and an input / output unit; wherein the memory is used to store a computer program, and the processor is used to invoke the computer program stored in the memory to execute the real-time lighting rendering optimization method for mobile game scenes as described in the first aspect.
[0008] In a fourth aspect of the embodiments of this application, a computer-readable storage medium is provided, which includes instructions that, when executed on a computer, cause the computer to perform the real-time lighting rendering optimization method for a mobile game scene as described in the first aspect.
[0009] In a fifth aspect of the embodiments of this application, a computer program product is provided, including a computer program that, when executed by a processor, implements the real-time lighting rendering optimization method for a mobile game scene as described in the first aspect.
[0010] According to the real-time lighting rendering optimization method and system for mobile game scenes according to the embodiments of this application, the lighting features of the target scene are extracted to obtain the scene lighting features of the target scene. The scene lighting features include at least: lighting gradient value, geometric complexity, material reflection characteristics, and material reflection characteristics. The device operation status of the terminal associated with the target scene is detected, and a probe layout scheme is generated in stages according to the device operation status. In the offline stage, an initial probe layout scheme of the target scene is generated according to the scene lighting features. In the running stage, the probe position and probe density of the target scene are adjusted in real time according to the scene lighting features to obtain an optimized second probe layout scheme. Based on the initial probe layout scheme and / or the second probe layout scheme, a probe resource pool of the target scene is built locally on the device. The distance weight, lighting similarity weight, and gradient consistency weight of each probe in the probe resource pool are calculated. Combined with the motion state of dynamic objects in the target scene, the probe position and local probe density of local areas in the probe resource pool are adaptively adjusted. During device operation, the target probe layout scheme corresponding to the local area is extracted from the probe resource pool in real time for real-time lighting rendering of local areas in the target scene. The implementation method of this application adopts a phased probe layout construction scheme based on the device operation status and dynamically adjusts the probe layout in the probe resource pool. While protecting the smooth operation of the device, it effectively avoids the light spot toning phenomenon caused by insufficient probe density, realizes the smooth transition of lighting on the object surface, optimizes the real-time rendering effect of the scene, and improves the device rendering efficiency. Attached Figure Description
[0011] Figure 1 A flowchart illustrating a real-time lighting rendering optimization method for a mobile game scene provided in an embodiment of this application; Figure 2 A schematic diagram of the structure of a real-time lighting rendering optimization system for a mobile game scene provided in an embodiment of this application; Figure 3 A schematic diagram of the structure of a medium according to an embodiment of this application is shown. Detailed Implementation
[0012] The following is for reference. Figure 1 , Figure 1 This is a flowchart illustrating a real-time lighting rendering optimization method for mobile game scenes according to an embodiment of this application. It should be noted that the implementation methods of this application can be applied to game rendering scenes on any applicable terminal device.
[0013] Figure 1 The flowchart of a real-time lighting rendering optimization method for mobile game scenes provided in an embodiment of this application, as shown, includes: Step S101: Extract lighting features from the target scene to obtain the scene lighting features of the target scene.
[0014] In this embodiment, the scene lighting features include at least: lighting gradient value, geometric complexity, material reflection characteristics, and material reflection properties. Here, the lighting gradient value is the rate of change of light intensity per unit space in the scene, essentially reflecting the intensity of light and shadow transitions. For example, the lighting gradient value is usually high at the edge of the beam of sunlight passing through a window, or at the boundary between a character's shadow and the ground. This feature guides the dense placement of probes in areas sensitive to lighting changes, avoiding light and shadow breaks during interpolation calculations. It is typically obtained by calculating the lighting difference between adjacent points (such as the Euclidean distance in the RGB color space) within a discretized grid cell of the scene, or by solving for the gradient vector of the lighting function using the finite difference method.
[0015] Geometric complexity refers to the degree of surface undulation and structural detail density of a scene model. For example, the foliage layer in a forest scene or the relief texture of a building model are areas of high geometric complexity. Its purpose is to measure the level of detail required for lighting sampling on the scene surface. The more geometrically complex the area, the more frequently light changes due to occlusion and reflection, requiring a denser array of probes to capture lighting details. Acquisition methods include calculating the curvature distribution of the model's triangular faces (e.g., using the Laplacian operator), analyzing the rate of change of the normal vectors of mesh vertices, or calculating pixel-level geometric gradients using the depth buffer in screen space.
[0016] Material reflection characteristics encompass the physical properties of a material, such as reflection, refraction, and scattering of light. Examples include the specular reflection intensity of metallic materials, the diffuse reflection coefficient of plastic materials, and the refractive index of transparent materials. This characteristic directly affects the propagation path and energy distribution of light in a scene. For instance, highly reflective material surfaces require probes to accurately record incident light information to ensure the realism of the reflection effect. Acquisition methods primarily involve analyzing the parameter configurations of scene materials (such as BaseColor, Metallic, and Roughness maps in PBR materials) or sampling the reflection spectrum of the material surface in real time during rendering using ray tracing technology. However, the latter is often indirectly simulated on mobile devices using pre-calculated reflection probes or lighting probes.
[0017] For example, in step S101, the extraction of lighting features in the target scene can be achieved through a combination of computer graphics and deep learning techniques. For instance, for lighting gradient values, the rendering engine can calculate the difference in lighting intensity between adjacent vertices in the scene mesh, or a convolutional neural network can be used to perform edge detection on the lightmap to capture the drastic changes in lighting. The extraction of geometric complexity can be based on the number of triangles, curvature distribution, or mesh subdivision of the scene model, such as using OBB bounding boxes to analyze the model's concave and convex regions, or using a screen-space geometry shader to calculate the pixel-level rate of geometric change in real time. The acquisition of material reflection characteristics can be achieved by parsing model material parameters (such as metallicity, roughness, and reflectivity texture), or by using a BRDF (Bidirectional Reflectance Distribution Function) model in the physical rendering pipeline to simulate the interaction between light and the material surface. These operations can be completed offline during the preprocessing stage or dynamically calculated in real-time rendering using the GPU pipeline.
[0018] Therefore, the core value of extracting scene lighting features lies in providing data-driven decision-making basis for probe placement. By quantifying lighting gradient values, key areas of light and shadow changes (such as shadow boundaries and reflective highlights) can be accurately located, avoiding redundant deployment of probe resources in areas with gentle lighting. Geometric complexity analysis can help identify parts of the model with rich details (such as carved walls and vegetation), ensuring that probe density matches geometric sampling requirements. Acquiring material reflection characteristics can guide the focused placement of probes near highly reflective materials (such as mirrors and water surfaces), thereby capturing the effects of light reflection and refraction more realistically during rendering. Overall, the blind placement of probes can be transformed into intelligent allocation based on scene physical features, improving the accuracy of lighting rendering while reducing the overhead of invalid probes by 30% to 50%, which is especially suitable for real-time optimization in scenarios with limited computing power, such as mobile devices.
[0019] As an optional embodiment, in step S101, Haar wavelet and spherical harmonic basis function are used to decompose the target scene at multiple scales and extract the illumination gradient value, geometric complexity, material reflection characteristics and material reflection characteristics in the target scene as the scene illumination features.
[0020] Understandably, employing Haar wavelets and spherical harmonic basis functions to decompose the target scene at multiple scales can extract illumination-related features from different dimensions and with varying precision. In terms of implementation, the target scene is first divided into spatial regions. Haar wavelets are then used to process the scene's illumination intensity data in layers, similar to decomposing an image into detail and approximation layers of different resolutions. This captures the differences in illumination intensity across multiple scales, allowing for the calculation of illumination gradient values. For geometric complexity, Haar wavelets are also used to perform multi-scale analysis of the scene's geometric model vertex data. By observing the fluctuations in vertex positions at different scales, the geometric complexity of local areas within the scene is determined. The spherical harmonic basis functions then play a role in processing material reflection characteristics. They project the scene's illumination and material reflection information onto a spherical harmonic space, representing the distribution of illumination and reflection in different directions in a compact form. By analyzing the spherical harmonic coefficients, the material's reflection characteristics are extracted.
[0021] This feature extraction method, combining Haar wavelets and spherical harmonic basis functions, uses multi-scale decomposition to capture both macroscopic trends in lighting and geometry within a scene while preserving microscopic details, avoiding the omission of key features. In lighting gradient extraction, multi-scale analysis accurately locates light and shadow transition areas, accurately acquiring gradient information for both large-area soft lighting changes and small-scale strong contrasts, providing a basis for the rational placement of lighting probes. For geometric complexity extraction, multi-scale processing identifies fine structures in complex models, guiding the increase of probe density in these areas to ensure that lighting rendering realistically reflects geometric details. In material reflection characteristic extraction, the application of spherical harmonic basis functions makes reflection information processing more efficient, storing rich reflection direction and intensity information with less data, reducing computational resource consumption, and improving the accuracy of reflection effects. Scene lighting features extracted in this way effectively improve the quality and efficiency of lighting rendering, achieving near-realistic lighting effects even on resource-constrained mobile devices, optimizing the user's visual experience.
[0022] Step S102: Detect the device operation status of the terminal associated with the target scene, and generate a probe layout scheme in stages according to the device operation status.
[0023] In this embodiment, during the offline phase, an initial probe layout scheme for the target scene is generated based on the scene lighting characteristics. During the operational phase, the probe positions and density of the target scene are adjusted in real time based on the scene lighting characteristics to obtain an optimized second probe layout scheme.
[0024] As an optional embodiment, step S102, detecting the device operation status of the terminal associated with the target scene, can be achieved by combining system-level parameter acquisition with application-layer performance monitoring. At the system level, terminal devices typically provide hardware monitoring interfaces, which can acquire key parameters such as CPU frequency, GPU load, memory usage, and battery temperature in real time.
[0025] For example, in Android systems, CPU core utilization and thread scheduling can be analyzed by reading system process data under the proc file system. In iOS systems, the Metal framework can be used to monitor GPU rendering queue pressure. Application-level monitoring focuses on performance metrics during game runtime, such as using a frame rate counter to count the number of frames rendered per second, combining this with stuttering detection algorithms to identify dropped frames, or tracking the time spent on vertex shading, fragment shading, and other stages in the rendering pipeline to accurately pinpoint performance bottlenecks. Simultaneously, machine learning prediction models can be introduced to predict the device's resource capacity for subsequent rendering tasks based on historical performance data and current hardware status, proactively identifying potential performance risks.
[0026] This multi-dimensional device operation detection mechanism provides solid data support for the dynamic generation of probe layout schemes. On low-performance devices, when CPU throttling or GPU overheating is detected, the system can immediately reduce probe density to prioritize stable game frame rates and avoid screen stuttering caused by excessive pursuit of lighting precision. On high-performance devices, the number of probes is dynamically increased based on ample computing resources to achieve more refined lighting rendering. By adapting to device performance in real time, game power consumption can be reduced, while crashes caused by excessive hardware load can be minimized. In addition, predictive monitoring can help the system plan probe resources in advance. For example, before a character enters a complex lighting scene, the required probe data can be preloaded to avoid momentary stuttering caused by ad-hoc calculations, significantly improving the smoothness and visual experience of the game on different devices.
[0027] As an optional embodiment, in step S102, a probe layout scheme is generated in stages according to the device's operating status, including: When the device is offline, the target scene is a static scene. The Monte Carlo ray tracing algorithm is used to pre-calculate the light transmission path in the static scene based on the scene's lighting characteristics to generate the initial probe layout scheme. When the device is running, a probe layout model constructed using an LSTM network is used to predict the movement of objects and changes in light sources in the target scene based on the scene's lighting characteristics. The probe positions and density in the target scene are adjusted in real time based on the prediction results to obtain the second probe layout scheme.
[0028] Specifically, during the offline phase, when generating the initial probe layout scheme using the Monte Carlo ray tracing algorithm, the geometric model, material properties, and lighting conditions of the static scene can be fully defined first, dividing the scene space into multiple small mesh units. It's worth noting that the Monte Carlo ray tracing algorithm randomly emits a large number of rays from the light source, and these rays interact with object surfaces in the scene. By calculating the reflection, refraction, and absorption of the light, it simulates the light transmission path in the real world. During the light propagation process, it records the energy distribution and light intensity changes at different locations. For areas with drastic lighting changes and complex energy distributions, such as shadow boundaries and areas with high light reflection, the algorithm identifies these areas with high demand for lighting sampling, thus marking key areas where probes need to be placed. Finally, based on the results of extensive ray tracing, and considering both the completeness of lighting information and the economy of probe quantity, the initial probe layout scheme for the entire static scene is determined.
[0029] Taking an indoor living room scene containing glass windows, wooden furniture, and metal ornaments as an example, this illustrates the pre-computation process of the Monte Carlo ray tracing algorithm offline: Assuming the living room window is the primary light source (sunlight), and the room contains a reflective glass coffee table and a set of dark wood sofas, the offline pre-computation phase first inputs the scene's 3D model (including the geometry of walls and furniture), material properties (transmittance of glass, diffuse reflection coefficient of wood, specular reflection characteristics of metal), and light source parameters (sun position, light intensity) into the algorithm. The entire scene space is then divided into multiple millimeter-level mesh units, serving as the basic unit for ray tracing.
[0030] The Monte Carlo algorithm randomly emits a large number of light rays (e.g., 1 million) from the location of a solar light source, with each ray propagating through the scene according to physical laws. When a ray first encounters a glass window, the algorithm calculates the angle at which the ray enters the room and the energy attenuation based on the glass's refractive properties. Once inside, if the ray hits a wooden sofa surface, it undergoes diffuse reflection, scattering in multiple random directions. At this point, the algorithm records the light intensity and energy distribution at that location. If the ray hits a metal ornament, it follows the laws of specular reflection, reflecting at a specific angle onto a wall or other object, creating a highlight area. During ray tracing, the Monte Carlo algorithm focuses on areas with dramatic changes in lighting. For example, the shadow transition zone at the edge of a glass window, the highlight reflection points of metal ornaments, and the corner shadows formed by the sofa back and the floor—these locations exhibit significant differences in light energy distribution and require dense sampling. The algorithm automatically identifies "light-critical areas" by statistically analyzing the transmission paths and energy attenuation of a large number of rays in these areas and marks probe placement points in these areas. For instance, high-density probes are placed at the reflective focal points of a glass coffee table to capture precise lighting from mirror reflections; the number of probes is increased at the shadow boundaries under the sofa to avoid jagged shadows during runtime.
[0031] Ultimately, after millions of ray tracing iterations, the Monte Carlo algorithm generates a layout scheme containing probe positions and densities. This scheme accurately records the lighting transmission characteristics of each area in the scene, such as the shape of sunlight spots formed on the ground through windows and the indirect lighting transmission paths between furniture. When the device is running, this pre-computed probe data can be directly used for lighting rendering without repeating complex ray tracing calculations, improving the lighting rendering efficiency of this living room scene by approximately 50%. It also ensures that dynamic objects (such as moving characters) receive accurate lighting information in real time when passing through probe areas, avoiding lighting banding or computational delays in the image.
[0032] In this offline pre-computation method, because the Monte Carlo ray tracing algorithm can accurately simulate light transmission based on physical principles, the generated initial probe layout can accurately capture various complex lighting effects in the scene, including indirect lighting and soft shadows. During subsequent device operation, these pre-deployed probes can directly provide the basic data for lighting calculations, significantly reducing real-time computation. For some large open-world game scenes, offline pre-computation probe layout can reduce the time spent on lighting calculations by approximately 40% during runtime, enabling the game to run smoothly on mid-to-low-end devices while ensuring that the lighting quality of the image is close to realistic effects, greatly improving game compatibility and user experience.
[0033] In particular, compared to traditional Monte Carlo ray tracing algorithms, this application dynamically combines offline pre-computation with runtime dynamic adjustment, breaking the limitation of traditional algorithms that rely solely on real-time computation. Traditional Monte Carlo ray tracing algorithms, when processing dynamic scenes, require repeated ray emission and tracing for each frame, resulting in extremely high computational load and time consumption. This can easily lead to device lag, especially in complex lighting environments (for example, when rendering a scene with 100 dynamic light sources, the frame rate may drop sharply from 60fps to 20fps). This application, however, utilizes the Monte Carlo algorithm to pre-compute the lighting transmission path of static scenes offline and generates an initial probe layout, storing the lighting information in the probes. At runtime, it predicts dynamic changes through an LSTM network, adjusting only the probe layout in real time, without repeatedly performing global ray tracing. Taking an open-world game as an example, traditional methods require approximately 200ms of computational resources per second to render the lighting of a forest scene. This application, by combining pre-computation and dynamic adjustment, can reduce computational resource consumption to 80ms, significantly improving device operating efficiency.
[0034] Furthermore, when the device enters operational mode, the probe placement model built using the LSTM network comes into play. First, real-time scene lighting features, such as changes in the position of dynamic objects, and variations in light intensity and direction, are input into the LSTM network in time-series format. Leveraging its unique gating mechanism, the LSTM network can effectively process time-series data, uncovering historical patterns and potential trends in object movement and light source changes. For example, when a game character continuously moves in a certain direction, the LSTM network can predict the area the character might enter next based on its previous movement trajectory. For dynamic light sources, such as flickering torches, the LSTM network can analyze the patterns of change in light intensity and direction, predicting lighting changes in the near future. Based on these predictions, the system can adjust the probe positions and density in the target scene in real time. In areas where an object is predicted to enter, the probe density is increased in advance to ensure accurate lighting calculations when the object arrives. In areas with stable lighting and no dynamic changes, the number of probes is appropriately reduced to save computational resources.
[0035] For example, the probe layout model constructed by the LSTM network in this application can be based on a hybrid temporal-spatial feature model. In terms of architecture design, LSTM is combined with a graph convolutional network (GCN). LSTM processes time-series data (such as device performance changes), while GCN models the spatial topology of the scene (such as the illumination correlation between probes). In complex scenes (such as indoor multi-light source environments), probe layout optimization efficiency is improved, and illumination consistency error is reduced.
[0036] For example, this application utilizes an LSTM network to predict dynamic changes in the scene (such as character movement trajectories) and adjust probe density and position in advance. For instance, increasing probe density along the character's movement path to capture real-time shadow changes reduces sampling by more than 30% compared to traditional static probe layouts, which also helps to further improve real-time rendering speed and reduce computational overhead.
[0037] This real-time adjustment method based on LSTM networks provides an efficient and intelligent solution for lighting rendering in dynamic scenes. It allows the game to adapt to various dynamic changes in the scene in real time, maintaining the consistency and realism of lighting effects even in complex scenes with fast-moving characters and frequent changes in light sources. Compared to traditional fixed probe layouts, this method can reduce lighting errors in dynamic scenes by approximately 30%, while avoiding resource waste caused by unreasonable probe layouts. It effectively improves game performance while ensuring high-quality rendering, providing players with a smoother and more realistic gaming experience.
[0038] Step S103: Based on the initial probe layout scheme and / or the second probe layout scheme, construct a probe resource pool for the target scene locally on the device.
[0039] As an optional embodiment, in step S103, based on the probe layout scheme of the initial probe layout scheme and / or the probe layout scheme of the second probe layout scheme, the probe positions and probe densities of different regions in the target scene are spatially divided and stored to construct the probe resource pool. Each block of the probe resource pool includes at least: probe position, color, probe density, and attenuation coefficient.
[0040] Specifically, when constructing the probe resource pool, the spatial structure characteristics of the target scene are flexibly divided, deconstructing the scene into multiple regular or irregular blocks. Taking an open-world game scene as an example, its vast and complex environment places high demands on resource management. In this case, a quadtree or octree structure is used to hierarchically divide the scene into blocks. Each block serves as an independent probe resource unit, carrying lighting information for a specific area. This division method lays the foundation for subsequent resource scheduling.
[0041] For example, the probe information stored within each block covers multiple key dimensions. The probe positions precisely record their coordinates in 3D space, which are either strictly aligned with the scene mesh or cleverly distributed around key geometric feature points to ensure accurate capture of lighting changes. Color and brightness information are encoded and stored in HDR format, fully preserving the high dynamic range details of ambient lighting, faithfully rendering both dazzling sunlight and dim shadows. Probe density is flexibly set according to regional characteristics. In areas with frequent dynamic object movement, such as a market where characters move about, 10 probes are placed per cubic meter to capture rapidly changing light and shadow, while in static background areas, such as distant mountains, only 1 probe is set per cubic meter to save resources. The attenuation coefficient is used through an exponential function or a custom curve to reasonably control the rate of attenuation of lighting information with distance, avoiding excessive interference from distant probes with the rendering effect.
[0042] Taking the actual construction process of a certain open-world game as an example, the entire grand scene is first divided into three layers according to the viewing distance: foreground, midground, and background. Different layers correspond to different observation distances and detail requirements. For example, the foreground area is precisely set to 5m×5m×5m, allowing for focused shooting of the main subject. Within this area, the probe density is as high as 8 probes per cubic meter, accurately recording the texture of walls and the reflected light and shadow when vegetation sways. The background area is expanded to 100m×100m×100m, corresponding to the blurred scene seen by the human eye in the distance. The probe density is then significantly reduced to 1 probe per cubic meter, retaining only the lighting information of the skybox and the outline of the main buildings. During game operation, the system intelligently judges based on the camera's field of view and only loads probe data for areas visible to the player. When the character enters a city street, the foreground probes of surrounding buildings are quickly loaded, while the background probes of distant forests are temporarily unloaded, as if the lighting rendering is tailored to the player's visual focus.
[0043] This probe resource pool construction method, in terms of memory usage optimization, completely changes the traditional mode of loading all-scenario probe data at once through its block storage and dynamic loading strategy. It can handle 10km probe data on mobile devices. 2In urban scenes, memory usage is drastically reduced from 2GB using traditional methods to less than 300MB. This reduced memory space is sufficient to accommodate multiple other applications, significantly alleviating storage pressure on the device. Rendering efficiency also sees a qualitative leap thanks to this method. Adaptive probe density adjustment within blocks allows for high-precision lighting calculations in high-priority areas such as around the character, while significantly reducing computational load in low-priority areas. While maintaining the same image quality, the game frame rate doubles from 30FPS to 60FPS, delivering a smooth and fluid visual experience. The advantages of this method become even more pronounced when facing dynamic scene changes, such as buildings collapsing. The system only needs to quickly update probe data for the affected blocks, with new probes generated and inserted within 50ms. Compared to the long stuttering caused by global illumination reconstruction in traditional methods, this achieves almost seamless transitions. In terms of cross-device compatibility, this method demonstrates strong adaptability. Low-end devices can automatically reduce tile resolution or merge adjacent tiles, combining 5m tiles into 20m tiles. Simultaneously, a clever interpolation algorithm maintains natural and smooth lighting transitions, ensuring a good gaming experience on devices with varying performance levels. Through the organic combination of spatial tile division and attribute layering management, this solution achieves fine-grained scheduling of probe resources, significantly reducing hardware load while ensuring rendering quality, making it an effective tool for improving performance in mobile and cloud gaming scenarios.
[0044] Optionally, after constructing the probe resource pool for the target scene locally on the device in step S103, probe layout data related to the location, motion state, and / or trajectory of dynamic objects in the target scene can be extracted from the probe resource pool to establish a probe cache pool associated with the dynamic objects. Furthermore, probe cache pools associated with different dynamic objects are maintained independently, and similar probe layout data in the different dynamic object-associated probe cache pools are reused using GPU Instancing technology. Finally, the motion state of different dynamic objects is monitored in real time, and probe management strategies corresponding to different probe cache pools are set.
[0045] In this embodiment, a sparse probe management strategy is used for dynamic objects moving at high speeds. A dense probe management strategy is used for dynamic objects moving at low speeds. A stepped density management strategy is used for dynamic objects against a changing lighting background.
[0046] For example, after building a probe resource pool locally on the device, lighting rendering optimization for dynamic objects can be achieved by establishing a probe cache pool and a dynamic management strategy. Taking an open-world game as an example, when a player-controlled character moves through a city, probe layout data within a 5-meter radius around the character is extracted in real time, including reflection probes on building walls and illumination probes from streetlights, forming a dedicated probe cache pool. For vehicles traveling at a distance, the system extracts probe data within 10 meters on both sides of their path, establishing an independent cache pool. The cache pools for different dynamic objects reuse similar data through GPU Instancing technology. For example, probe cache pools for multiple vehicles of the same model can share common illumination probes on the street surface, retaining only differentiated probe data related to vehicle body reflections to avoid duplicate storage.
[0047] To address the motion characteristics of dynamic objects, the system implements differentiated probe management strategies. When a character rides a horse at high speed across a grassland, a sparse probe strategy is used due to the rapid change in position. The probe density is reduced from 8 probes per cubic meter to 4, while the influence radius of the probes is expanded to ensure smooth lighting transitions even during rapid movement. When a character is piloting a slow-moving vehicle patrolling an urban area, a dense probe strategy is automatically switched to, increasing the probe density around the vehicle to 12 probes per cubic meter to accurately capture the dynamic shadows cast by the vehicle's headlights and the reflection changes of the vehicle's metallic material. For dynamic objects under changing lighting conditions, such as NPCs walking in the shade, a stepped density strategy is employed: in the area of sunlight filtering through leaves, the probe density decreases in a stepped manner from the center of the light patch outwards, with 10 probes per cubic meter in the central area and 5 probes per cubic meter in the edge transition area, ensuring natural changes in brightness and controllable computational costs as the light patch moves.
[0048] This dynamic object probe management mechanism achieves multi-dimensional optimization through a hierarchical strategy and intelligent scheduling. In memory management, it leverages GPU instantiation technology to reuse similar probe data. For dynamic objects of the same type (such as groups of NPCs or vehicles of the same model), only differentiated probe layout data is stored, avoiding resource waste caused by redundant storage and achieving efficient control over memory usage in principle. The improved rendering efficiency stems from adaptive probe density adjustment. A sparse probe strategy is used for high-speed moving objects, expanding the influence range of a single probe while reducing density to decrease GPU computation; for low-speed objects, a high-density probe is maintained to ensure accuracy. This on-demand allocation mechanism matches computational resources to the object's motion characteristics, avoiding unnecessary computation. Regarding dynamic adaptability, the stepped density strategy dynamically adjusts the probe distribution based on the gradient of light and shadow changes, achieving a stepped transition in density in areas of abrupt lighting changes (such as tree shadows and light spots). This eliminates jagged edges in light and shadow caused by uneven probe distribution in principle, making the lighting transition more physically consistent. In addition, the mechanism dynamically adjusts the probe management strategy through device performance awareness. Low-end devices can reduce the probe refresh frequency or simplify the cache pool update logic, so as to ensure the basic rendering effect while avoiding the impact of computational overload on smoothness and achieve performance balance across devices.
[0049] Step S104: Calculate the distance weight, illumination similarity weight, and gradient consistency weight of each probe in the probe resource pool. Combined with the motion state of dynamic objects in the target scene, adaptively adjust the probe position and local probe density in the local area of the probe resource pool. During device operation, extract the target probe layout scheme corresponding to the local area from the probe resource pool in real time for real-time illumination rendering of the local area in the target scene.
[0050] As an optional embodiment, step S104, calculating the distance weight, illumination similarity weight, and gradient consistency weight of each probe in the probe resource pool, includes: The process involves identifying interpolation points in the target scene whose probe sparsity reaches a set sparsity threshold, and projecting these points from the scene's physical space into the probe resource pool. The physical distances from the interpolation points to each probe in the resource pool are calculated to obtain the distance weights of each probe. The similarity of illumination features between the location of the interpolation point and the probe locations of each probe is calculated to obtain the illumination similarity weights. The similarity between the location distribution of the interpolation points and the illumination gradient change trends of the corresponding regions in the probe resource pool is calculated to obtain the gradient consistency weights. A fuzzy mean enhancement fusion function is used to fuse the distance weights, illumination similarity weights, and gradient consistency weights of each probe to obtain the local probe weight coefficients corresponding to different regions in the probe resource pool.
[0051] For example, in the virtual city scenes of mobile games, when a player character enters a city block, a spatial discretization algorithm is used to identify interpolation points in sparse probe areas such as building corners and street light projections. These areas suffer from insufficient sampling due to complex light transmission paths (such as multiple reflections and penumbra transitions). Based on a 3D coordinate mapping mechanism, the interpolation points are projected from the scene's world coordinate system onto the spatial index structure of the probe resource pool, thus completing the spatial localization of the sparse areas.
[0052] During the weight calculation phase, three types of weight quantification analysis are performed. For example, distance weight calculation can be implemented using an Euclidean distance quantization model. The three-dimensional spatial distance from the interpolation point to each probe is calculated, and distance weights are generated through an inverse distance weighting model, giving near-end probes a higher weight ratio in the interpolation calculation. For example, the calculation process for illumination similarity weight can be as follows: extract the illumination feature vectors (including parameters such as illumination intensity, spectral distribution, and direction vector) of the interpolation point and probe positions, calculate the feature matching degree between the two through cosine similarity, and form the illumination similarity weight to characterize the degree of difference between different illumination states. For example, the calculation process for gradient consistency weight can be as follows: analyze the illumination gradient field of the neighborhood of the interpolation point and the gradient direction vector of the region where the probe is located, quantify the directional consistency between the two through the cosine value of the vector angle, and generate gradient consistency weight to measure the degree of matching of illumination change trends.
[0053] In the weight fusion stage, a fuzzy C-means enhancement fusion function can be used to dynamically adjust the influence factors of each weight through a membership function. This function, based on fuzzy set theory, uses three types of weights as input variables and iteratively optimizes the optimal weight coefficients for each probe in the interpolation calculation. Specifically, the function automatically adjusts the weight aggregation rules according to the scene's lighting complexity. In dynamic, densely populated square areas, gradient consistency weights are enhanced to capture rapidly changing light and shadow transitions. In static building wall areas, distance weights are increased to optimize interpolation efficiency, achieving dynamic reallocation of probe resources.
[0054] For example, fuzzy C-means (FCM) is used to enhance the fusion function for nonlinear aggregation of the three types of weights. The fuzzy membership function is defined. Indicates probe Belongs to cluster center To what extent, the minimum value of the following objective function is found through iterative optimization. : ; in, For the number of probes, The fuzzy index is usually set to 2. The number of clusters, To generate probes using the inverse distance weighted (IDW) method Distance weights, The probe obtained by cosine similarity calculation Illumination similarity weights, probe Gradient consistency weights, , , The first The triple weight values of each cluster center , , These are the importance coefficients for each weight value, dynamically determined by the scene's lighting complexity. Further, optionally, the probe... Gradient consistency weights The calculation process is as follows: calculate the interpolation point. Neighborhood illumination gradient vector and probe The gradient vector of the region is then used to obtain the probe by cosine quantization of the vector direction to achieve consistency between the two. Gradient consistency weights .
[0055] Furthermore, by iteratively updating the membership function and cluster centers, the fused probe is finally obtained. Local probe weight coefficients for: .in, This represents the optimized comprehensive weighted cluster center. The local probe weight coefficients are used to guide the dynamic adjustment of the probe resource pool, achieving high accuracy and efficiency in illumination interpolation calculations.
[0056] Thus, through precise calculation and fusion of multi-dimensional weights, aliasing in lighting rendering is effectively suppressed, improving the transition accuracy of the light-dark boundary line of buildings, and ensuring that the halo diffusion of dynamic light sources conforms to the laws of physical lighting. Based on the adaptive adjustment of weight coefficients, the probe density is dynamically optimized, ensuring sampling accuracy in key areas (such as the character's activity range) while reducing the probe computation in non-critical areas, thereby reducing GPU load. Through the rapid adaptation of the weight model to different lighting environments, the stability of lighting rendering can be maintained under complex lighting conditions such as direct midday light and diffused evening light, ensuring the continuity and realism of lighting changes when dynamic objects move.
[0057] As an optional embodiment, in step S104, the probe position and local probe density in a local area of the probe resource pool are adaptively adjusted based on the motion state of dynamic objects in the target scene, including: Using a temporal convolutional Transformer model, candidate motion trajectories of dynamic objects are predicted based on real-time motion information of dynamic objects in the target scene. The spatial correlation between the candidate motion trajectories of dynamic objects and each grid cell in the target scene is determined. A fusion model based on reinforcement learning and genetic algorithm is adopted to genetically encode the probe position, local probe density, and local probe weight coefficient of each probe in the probe resource pool, iteratively construct an optimized solution set, and combine the spatial correlation to learn the scene change characteristics caused by the motion of dynamic objects, adjust the genetic operation parameters to guide the search direction of the optimized solution set, so as to obtain the optimal probe position and optimal local probe density of each probe in the probe resource pool.
[0058] In the above steps, firstly, a temporal convolutional Transformer model is used to predict candidate motion trajectories of dynamic objects based on their real-time motion information in the target scene. Optionally, when predicting candidate motion trajectories, a temporal convolutional layer can be used to extract local features from the real-time motion information of the dynamic object to capture its real-time motion change patterns. Then, using a Transformer layer and a multi-head attention mechanism, the correlation between real-time motion change patterns at different historical times is globally analyzed to obtain the potential trend features of the dynamic object's historical motion trajectories. Based on these potential trend features, predictive inference is performed on the real-time motion change patterns to obtain the candidate motion trajectories of the dynamic object.
[0059] For example, in the virtual city scenes of mobile games, when a character-controlled vehicle drives on the road or pedestrians move through the streets, the real-time motion information of these dynamic objects (such as position coordinates, velocity vectors, acceleration directions, etc.) forms a data stream in chronological order. The temporal convolutional Transformer model first processes this data. The temporal convolutional layer extracts local features of motion information within a continuous time window by setting a convolutional kernel of a specific size. Taking vehicle turning as an example, the temporal convolutional layer can capture local motion features such as changes in the vehicle's directional deflection angle and speed reduction within a short period of time, forming a real-time motion change pattern of the vehicle. For pedestrians' sudden acceleration or deceleration, the temporal convolutional layer can also extract speed change information at adjacent time points in a timely manner, accurately depicting their motion state transition.
[0060] The data then flows to the Transformer layer. At this layer, the multi-head attention mechanism comes into play, taking the real-time motion change patterns extracted from different historical times by the temporal convolutional layer as input and analyzing the correlations between them from multiple dimensions. When a vehicle is driving on urban roads, the multi-head attention mechanism comprehensively considers the vehicle's driving direction and speed changes over multiple past moments, as well as the current road environment (such as intersections and curves), to uncover potential trend characteristics in the vehicle's historical trajectory. For example, even if the vehicle performs complex actions such as temporarily avoiding pedestrians, the Transformer layer can, based on the multi-head attention mechanism, connect these seemingly discrete motion change patterns to analyze the vehicle's overall driving intention and potential motion trends. Similarly, for pedestrians who frequently change their routes, the Transformer layer can also grasp their motion patterns by capturing the correlations between their historical motion change patterns.
[0061] Based on the potential change trend features obtained from the Transformer layer, the model predicts and infers the current real-time motion change pattern. When a vehicle is about to enter a complex intersection, the model predicts multiple driving options the vehicle might take at the intersection based on the previously learned potential change trends of historical motion trajectories and the current real-time motion state, generating multiple candidate motion trajectories, such as going straight, turning left, and turning right. For pedestrians moving freely on the street, the model can also predict their next possible direction and path based on their historical motion patterns and potential change trends. These candidate motion trajectories not only consider the short-term patterns of dynamic object motion but also take into account long-term change trends, providing a reliable motion prediction basis for the lighting calculation of dynamic objects and the dynamic adjustment of probe positions during subsequent lighting rendering. This ensures that the lighting effects can change in real time and accurately follow the movement of objects, improving the realism of the game scene and rendering efficiency.
[0062] Furthermore, in the above steps, the spatial correlation between the candidate motion trajectory of the dynamic object and each grid cell in the target scene is determined.
[0063] For example, in a virtual city scene of a mobile game, when determining the spatial correlation between candidate motion trajectories of dynamic objects and scene grid cells, the system first divides the target scene into regular three-dimensional grid cells according to its spatial structure, with each grid cell corresponding to a specific area in the scene. Taking the movement of a character in a city street as an example, after the TemporalConvolutional Transformer model predicts multiple candidate motion trajectories of the character (such as going straight through an intersection, turning left into an alley, turning right towards a square, etc.), spatial analysis is performed on each trajectory: for a straight trajectory, the sequence of grid cells traversed by its path in three-dimensional space is analyzed. For a turning trajectory, the spatial intersection range between its motion path and each grid cell is calculated.
[0064] The quantification of spatial correlation is based on the geometric relationship and temporal coverage characteristics of the trajectory and grid cells. The system evaluates the probability that a candidate trajectory will pass through each grid cell in the future. For example, a straight trajectory of a character will inevitably cross consecutive grid cells in front, and these grid cells are assigned a higher correlation value; while a turning trajectory may only have a brief intersection with the grid cells to the side, and its correlation value is relatively low. At the same time, the system adjusts the temporal weight of the correlation value by combining the motion state of dynamic objects (such as velocity and acceleration). For example, the instantaneous crossing of grid cells by the trajectory of a high-speed moving object will be assigned a lower correlation value, while the trajectory area of a slow-moving or stationary object will receive a higher correlation value.
[0065] The innovation of the above mechanism lies primarily in the precise scheduling of probe resources. By calculating spatial correlation, the system can identify high-probability areas of dynamic object movement. For example, street grid cells frequently traversed by characters have high correlation, requiring the deployment of high-density probes to capture continuous lighting changes; while grid cells on secondary paths have low correlation, allowing for reduced probe density to save resources. In complex scenes, such as when a character drives a vehicle between urban expressways and alleyways, spatial correlation calculation can dynamically adjust the probe layout, maintaining probe density in high-correlation expressway grid cells and reducing the number of probes in low-correlation alleyway areas. This ensures the accuracy of dynamic object lighting rendering while reducing the computational overhead of probes in non-critical areas, achieving a balance between rendering quality and performance.
[0066] Further optionally, in the above steps, the probe positions, local probe densities, and local probe weight coefficients of each probe in the probe resource pool are genetically encoded, an optimized solution set is iteratively constructed, and the scene change features caused by the motion of dynamic objects are learned in combination with the spatial correlation degree. The genetic operation parameters are adjusted to guide the search direction of the optimized solution set, so as to obtain the optimal probe positions and optimal local probe densities of each probe in the probe resource pool, including: By combining local probe density and local probe weight coefficient, the probe position of each probe in the probe resource pool is genetically encoded to obtain the genetic chromosome of each probe. An initial genetic population is randomly generated; a certain number of genetic chromosomes are randomly selected from the current genetic population using a tournament selection method for comparison, and the genetic chromosome with the highest fitness is selected to enter the next generation of genetic population. Using the spatial correlation degree and the scene lighting features as state vectors, a genetic operation strategy space is defined based on a reinforcement learning algorithm. Using the genetic operation strategy space, the crossover probability, mutation intensity, and selection pressure parameters in the genetic operation strategy are adjusted in real time to learn the optimal genetic operation strategy under different scene changes. For the abnormal chromosome with the highest fitness, the following genetic operations are performed based on the genetic manipulation strategy to obtain the next generation of genetic population: perform a crossover operation on any two genetic chromosomes; add random perturbations to the probe position genes of the genetic chromosomes to perform probe position mutations to simulate fine-tuning of probe positions; add random perturbations to the probe density genes of the genetic chromosomes to perform probe density mutations to simulate fine-tuning of probe density. Starting from the step of randomly selecting a certain number of genetic chromosomes from the current genetic population through the tournament selection method, comparing them, and selecting the genetic chromosome with the highest fitness to enter the next generation of genetic population, the aforementioned steps are repeated until the maximum number of iterations or the preset convergence condition is reached. The optimal solution in the current genetic population is then used as the best probe position and the best local probe density for each probe.
[0067] For example, in the lighting rendering scene of a virtual city in a mobile game, the above optimization process is carried out using the dynamic movement of a character causing changes in lighting as an example. First, the position coordinates of each probe in the probe resource pool, the local probe density of its area, and the weight coefficients are converted into an encoding form that can be processed by a genetic algorithm, forming a genetic chromosome similar to a biological gene chain. These chromosomes carry key information about the probe layout and constitute the initial set of probe layout schemes.
[0068] Next, an initial genetic population is randomly generated, with each individual representing a probe layout scheme. A tournament selection process is used to choose a subset of individuals from the population for comparison, selecting those with better lighting rendering and more efficient resource utilization in the current scene to advance to the next generation. For example, in a street area the character is about to pass through, individuals whose probe layouts can more accurately capture changes in the character's shadows without excessively consuming computational resources are selected due to their higher fitness.
[0069] To enable the genetic algorithm to better adapt to dynamic scene changes, the spatial correlation between candidate motion trajectories of dynamic objects and grid cells, as well as scene lighting features, are used as state vectors and input into the reinforcement learning algorithm. Based on this, the reinforcement learning algorithm defines a genetic operation strategy space, dynamically adjusting parameters such as crossover probability, mutation intensity, and selection pressure. When a character moves from an open square into a narrow alley in a city, the scene lighting changes complexly. The reinforcement learning algorithm increases the crossover probability, encouraging more exchange of advantageous genes between different probe layout schemes, while simultaneously increasing the mutation intensity to explore new probe layout possibilities. In areas with stable lighting, the selection pressure is reduced, retaining the currently superior layout scheme.
[0070] Furthermore, the selected high-fit individuals will undergo genetic operations to generate the next generation population. Crossover operations combine the probe layout genes of two different individuals, for example, crossing an individual with excellent probe layout in the shaded area with another individual with good performance in the bright area to generate a new individual that combines the advantages of both; mutation operations introduce small perturbations into the probe position and density genes, simulating fine-tuning of the probe layout to explore potential better solutions near the current scheme.
[0071] Throughout the process, the system continuously selects superior individuals from the current population, performs genetic operations, and adjusts parameters until the preset maximum number of iterations is reached, or the fitness of individuals in the population no longer significantly improves, thus reaching the convergence condition. At this point, the probe layout scheme represented by the optimal individual in the population becomes the best position and optimal local density of each probe. It can accurately match the scene's lighting changes during character movement, efficiently utilize computing resources, and significantly reduce unnecessary computational overhead while ensuring rendering quality, thereby improving the game's smoothness and visual effects on mobile devices.
[0072] Optionally, in the above steps, before selecting the genetic chromosome with the highest fitness to enter the next generation of the genetic population, a first fitness function based on minimizing illumination error and a second fitness function for calculating the minimization of resource consumption can be constructed. The first fitness function and the second fitness function are used to calculate the first fitness and second fitness of each genetic chromosome. The device operating status and scene type associated with the target scene are identified, fitness fusion weights are determined, and based on the first fitness and second fitness of each genetic chromosome, the target fitness of each genetic chromosome is fused to assist in the optimized selection of genetic chromosomes.
[0073] During probe resource pool optimization, a dual fitness function fusion mechanism can achieve a dynamic balance between lighting quality and computational resources. Taking the lighting rendering of a virtual city in a mobile game as an example, the system first defines two types of core fitness functions: the first fitness function focuses on minimizing lighting errors and quantifies the accuracy of probe layout in capturing the lighting of dynamic object movement trajectories, such as evaluating the continuity and realism of shadow transitions when a character moves; the second fitness function aims to minimize computational resource consumption, measuring the comprehensive cost of probe density, memory usage, and GPU computational overhead.
[0074] When the genetic algorithm performs fitness evaluation, it simultaneously calculates the dual fitness value for each chromosome. At this point, the device's operating status and scene type become the key factors for weight adjustment: if the device is detected as a high-end model in a complex urban scene (such as a street with intersecting light and shadow at noon), the weight of the first fitness is automatically increased, making lighting accuracy the dominant selection factor and ensuring the rendering quality of details such as building shadows and vehicle reflections; if the device is a low-end model in a simple scene (such as an empty square at night), the weight of the second fitness is increased, prioritizing the reduction of the number of probes to lower power consumption.
[0075] Therefore, on high-end devices, dynamically increasing the weight of lighting errors can improve the lighting rendering accuracy of complex scenes by approximately 30%, making shadow changes during character movement more physically accurate. On low-end devices, a weight allocation that emphasizes resource consumption can reduce probe computation by 40%, preventing stuttering caused by overload. Furthermore, adaptive adjustments for different scene types ensure optimal performance of the same algorithm in both open-world and indoor scenes. For example, it automatically enhances lighting details in urban scenes and intelligently reduces probe density in underground cave scenes, implementing an on-demand resource allocation strategy. Ultimately, while maintaining visual quality, it significantly improves cross-device compatibility and operational efficiency.
[0076] In this embodiment, a phased probe layout scheme is adopted based on the device operation status, and the probe layout in the probe resource pool is dynamically adjusted. While protecting the smooth operation of the device, the light spot toning phenomenon caused by insufficient probe density is effectively avoided, so as to achieve a smooth transition of lighting on the object surface, optimize the real-time rendering effect of the scene, and improve the device rendering efficiency.
[0077] After introducing the methods of exemplary embodiments of this application, the following references are made. Figure 2 This application describes an exemplary embodiment of a real-time lighting rendering optimization system for a mobile game scene, the system comprising: An extraction unit is used to extract lighting features from a target scene to obtain scene lighting features of the target scene: the scene lighting features include at least: lighting gradient value, geometric complexity, material reflection characteristics, and material reflection characteristics; The generation unit is used to detect the device operation status of the terminal associated with the target scene and generate a probe layout scheme in stages according to the device operation status. Specifically, in the device offline stage, an initial probe layout scheme for the target scene is generated based on the scene lighting characteristics. In the device operation stage, the probe position and probe density of the target scene are adjusted in real time based on the scene lighting characteristics to obtain an optimized second probe layout scheme. The construction unit, based on the initial probe layout scheme and / or the second probe layout scheme, constructs a probe resource pool for the target scene locally on the device; The optimization unit is used to calculate the distance weight, illumination similarity weight, and gradient consistency weight of each probe in the probe resource pool. Combined with the motion state of dynamic objects in the target scene, it adaptively adjusts the probe position and local probe density in the local area of the probe resource pool. During device operation, it extracts the target probe layout scheme corresponding to the local area from the probe resource pool in real time for real-time illumination rendering of the local area in the target scene.
[0078] The above system can implement the steps described in the above method implementation, and the specific implementation of each step will not be repeated here.
[0079] After introducing the methods and systems of exemplary embodiments of this application, the following describes a terminal device of an exemplary embodiment of this application. This terminal device is used to extract lighting features from a target scene to obtain scene lighting features of the target scene. The scene lighting features include at least: lighting gradient value, geometric complexity, material reflection characteristics, and material reflection properties. It detects the device operation status of the terminal associated with the target scene and generates a probe layout scheme in stages according to the device operation status. Specifically, during the device offline stage, an initial probe layout scheme for the target scene is generated based on the scene lighting features. During the device operation stage, the probe positions and probe densities of the target scene are adjusted in real time based on the scene lighting features to obtain an optimized second probe layout scheme. Based on the initial probe layout scheme and / or the second probe layout scheme, a probe resource pool for the target scene is constructed locally on the device. The distance weight, lighting similarity weight, and gradient consistency weight of each probe in the probe resource pool are calculated. Combined with the motion state of dynamic objects in the target scene, the probe positions and local probe densities of local areas in the probe resource pool are adaptively adjusted. During device operation, the target probe layout scheme corresponding to the local area is extracted from the probe resource pool in real time for real-time lighting rendering of local areas in the target scene. The aforementioned terminal device can implement each step described in the above method implementation method, and the specific implementation method of each step will not be repeated here.
[0080] After introducing the methods, systems, and terminal devices of exemplary embodiments of this application, the following references will be made. Figure 3 The computer-readable storage medium of exemplary embodiments of this application will be described, please refer to... Figure 3 The computer-readable storage medium shown is an optical disc 30, on which a computer program (i.e., a program product) is stored. When the computer program is run by a processor, it implements the steps described in the above method embodiments. The specific implementation methods of each step will not be repeated here.
[0081] It should be noted that examples of the computer-readable storage medium may also include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory, or other optical and magnetic storage media, which will not be elaborated here. The above-described embodiments are merely specific implementations of this application, used to illustrate the technical solutions of this application, and are not intended to limit it. The scope of protection of this application is not limited thereto. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the scope of the technology disclosed in this application, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for optimizing real-time lighting rendering in mobile game scenes, characterized in that, The method includes: Lighting features are extracted from the target scene to obtain the scene lighting features of the target scene: the scene lighting features include at least: lighting gradient value, geometric complexity, material reflection characteristics, and material reflection characteristics; The device operation status of the terminal associated with the target scene is detected, and a probe layout scheme is generated in stages according to the device operation status. Specifically, in the offline stage, an initial probe layout scheme for the target scene is generated based on the scene lighting characteristics. In the running stage, the probe position and probe density of the target scene are adjusted in real time based on the scene lighting characteristics to obtain an optimized second probe layout scheme. Based on the initial probe layout scheme and / or the second probe layout scheme, a probe resource pool for the target scenario is constructed locally on the device. The distance weight, illumination similarity weight, and gradient consistency weight of each probe in the probe resource pool are calculated. Combined with the motion state of dynamic objects in the target scene, the probe position and local probe density in the local area of the probe resource pool are adaptively adjusted. During device operation, the target probe layout scheme corresponding to the local area is extracted from the probe resource pool in real time for real-time illumination rendering of the local area in the target scene.
2. The real-time lighting rendering optimization method for mobile game scenes according to claim 1, characterized in that, The step of extracting illumination features from the target scene to obtain the scene illumination features of the target scene includes: Haar wavelet and spherical harmonic basis function are used to decompose the target scene at multiple scales and extract the illumination gradient value, geometric complexity, material reflection characteristics and material reflection characteristics in the target scene as the illumination features of the scene; The step-by-step generation of probe layout schemes according to equipment operation status includes: When the device is offline, the target scene is a static scene. The Monte Carlo ray tracing algorithm is used to pre-calculate the light transmission path in the static scene based on the scene's lighting characteristics to generate the initial probe layout scheme. During device operation, the probe layout model constructed by combining the LSTM network predicts the movement of objects and changes in light sources in the target scene based on the scene lighting characteristics, and adjusts the probe position and probe density in the target scene in real time based on the prediction results to obtain the second probe layout scheme.
3. The real-time lighting rendering optimization method for mobile game scenes according to claim 1, characterized in that, The step of constructing a probe resource pool for the target scene locally on the device based on the initial probe layout scheme and / or the second probe layout scheme includes: Based on the initial probe layout scheme and / or the probe layout in the second probe layout scheme, the probe positions and probe densities in different areas of the target scene are stored in spatial blocks to construct the probe resource pool; wherein, each block of the probe resource pool contains at least: probe position, color, probe density, and attenuation coefficient. After building the probe resource pool for the target scene locally on the device, the method further includes: For dynamic objects in the target scene, probe layout data in the area associated with the location, motion state and / or motion trajectory of the dynamic object is extracted from the probe resource pool, and a probe cache pool associated with the dynamic object is established. Independently maintain probe cache pools associated with different dynamic objects, and reuse similar probe layout data in the probe cache pools associated with different dynamic objects through GPU Instancing technology; The motion state of different dynamic objects is monitored in real time, and probe management strategies are set for different probe cache pools. Specifically, a sparse probe management strategy is used for dynamic objects that move at high speeds, a dense probe management strategy is used for dynamic objects that move at low speeds, and a stepped density management strategy is used for dynamic objects with changing light and shadow backgrounds.
4. The real-time lighting rendering optimization method for mobile game scenes according to claim 1, characterized in that, The calculation of the distance weight, illumination similarity weight, and gradient consistency weight of each probe in the probe resource pool includes: Identify the interpolation points in the target scene whose probe sparsity reaches a set sparsity threshold, and project the interpolation points from the scene physical space into the probe resource pool; Calculate the physical distance from the interpolation point in the probe resource pool to each probe to obtain the distance weight of each probe; Calculate the similarity of illumination features between the location of the point to be interpolated and the probe locations of each probe to obtain the illumination similarity weight; The similarity between the location distribution of the points to be interpolated and the illumination gradient change trend of the corresponding region in the probe resource pool is calculated to obtain the gradient consistency weight; A fuzzy mean enhancement fusion function is used to fuse the distance weight, illumination similarity weight, and gradient consistency weight of each probe to obtain the local probe weight coefficients corresponding to different regions in the probe resource pool.
5. The real-time lighting rendering optimization method for mobile game scenes according to claim 4, characterized in that, The adaptive adjustment of probe positions and local probe densities in local areas of the probe resource pool, based on the motion states of dynamic objects in the target scene, includes: Using the temporal convolutional Transformer model, candidate motion trajectories of dynamic objects are predicted based on real-time motion information of dynamic objects in the target scene. Determine the spatial correlation between candidate motion trajectories of dynamic objects and each grid cell in the target scene; A fusion model based on reinforcement learning and genetic algorithm is adopted to genetically encode the probe position, local probe density, and local probe weight coefficient of each probe in the probe resource pool, iteratively construct an optimal solution set, and combine the spatial correlation to learn the scene change features caused by the motion of dynamic objects, adjust the genetic operation parameters to guide the search direction of the optimal solution set, so as to obtain the optimal probe position and optimal local probe density of each probe in the probe resource pool.
6. The real-time lighting rendering optimization method for mobile game scenes according to claim 5, characterized in that, The method of predicting candidate motion trajectories of dynamic objects based on real-time motion information of dynamic objects in the target scene using a temporal convolutional Transformer model includes: By using a temporal convolutional layer, local features are extracted from the real-time motion information of dynamic objects to capture their real-time motion change patterns. By using the Transformer layer and a multi-head attention mechanism, the correlation between real-time motion change patterns at different historical times is analyzed globally to obtain the potential trend characteristics of the historical motion trajectory of dynamic objects. Based on the potential change trend characteristics, predictive reasoning is performed on the real-time motion change pattern to obtain candidate motion trajectories of dynamic objects.
7. The real-time lighting rendering optimization method for mobile game scenes according to claim 5, characterized in that, The process of genetically encoding the probe positions, local probe densities, and local probe weight coefficients of each probe in the probe resource pool, iteratively constructing an optimized solution set, and combining the spatial correlation to learn the scene change features caused by the motion of dynamic objects, adjusting the genetic operation parameters to guide the search direction of the optimized solution set, so as to obtain the optimal probe positions and optimal local probe densities of each probe in the probe resource pool, includes: By combining local probe density and local probe weight coefficient, the probe position of each probe in the probe resource pool is genetically encoded to obtain the genetic chromosome of each probe. An initial genetic population is randomly generated; a certain number of genetic chromosomes are randomly selected from the current genetic population using a tournament selection method for comparison, and the genetic chromosome with the highest fitness is selected to enter the next generation of genetic population. Using the spatial correlation degree and the scene lighting features as state vectors, a genetic operation strategy space is defined based on a reinforcement learning algorithm. Using the genetic operation strategy space, the crossover probability, mutation intensity, and selection pressure parameters in the genetic operation strategy are adjusted in real time to learn the optimal genetic operation strategy under different scene changes. For the abnormal chromosome with the highest fitness, the following genetic operations are performed based on the genetic manipulation strategy to obtain the next generation of genetic population: perform a crossover operation on any two genetic chromosomes; add random perturbations to the probe position genes of the genetic chromosomes to perform probe position mutations to simulate fine-tuning of probe positions; add random perturbations to the probe density genes of the genetic chromosomes to perform probe density mutations to simulate fine-tuning of probe density. Starting from the step of randomly selecting a certain number of genetic chromosomes from the current genetic population through the tournament selection method, comparing them, and selecting the genetic chromosome with the highest fitness to enter the next generation of genetic population, the aforementioned steps are repeated until the maximum number of iterations or the preset convergence condition is reached. The optimal solution in the current genetic population is then used as the best probe position and the best local probe density for each probe.
8. The real-time lighting rendering optimization method for mobile game scenes according to claim 7, characterized in that, Before selecting the genetic chromosome with the highest fitness to enter the next generation of the genetic population, the process also includes: Construct a first fitness function based on minimizing illumination error, and a second fitness function for calculating the minimum resource consumption; The first fitness function and the second fitness function are used to calculate the first fitness and the second fitness of each genetic chromosome; Identify the device operating status and scene type associated with the target scene, determine the fitness fusion weight, and based on the first fitness and second fitness of each genetic chromosome, fuse them to obtain the target fitness of each genetic chromosome, which is used to assist in the optimization and screening of genetic chromosomes.
9. A real-time lighting rendering optimization system for mobile game scenes, characterized in that, The system includes: An extraction unit is used to extract lighting features from a target scene to obtain scene lighting features of the target scene: the scene lighting features include at least: lighting gradient value, geometric complexity, material reflection characteristics, and material reflection characteristics; The generation unit is used to detect the device operation status of the terminal associated with the target scene and generate a probe layout scheme in stages according to the device operation status. Specifically, in the device offline stage, an initial probe layout scheme for the target scene is generated based on the scene lighting characteristics. In the device operation stage, the probe position and probe density of the target scene are adjusted in real time based on the scene lighting characteristics to obtain an optimized second probe layout scheme. The construction unit, based on the initial probe layout scheme and / or the second probe layout scheme, constructs a probe resource pool for the target scene locally on the device; The optimization unit is used to calculate the distance weight, illumination similarity weight, and gradient consistency weight of each probe in the probe resource pool. Combined with the motion state of dynamic objects in the target scene, it adaptively adjusts the probe position and local probe density in the local area of the probe resource pool. During device operation, it extracts the target probe layout scheme corresponding to the local area from the probe resource pool in real time for real-time illumination rendering of the local area in the target scene.
10. A terminal device, characterized in that, The terminal device includes: at least one processor, a memory, and an input / output unit; wherein the memory is used to store a computer program, and the processor is used to call the computer program stored in the memory to execute the real-time lighting rendering optimization method for mobile game scenes according to any one of claims 1 to 8.