3D animation real-time rendering optimization method and system based on physical rendering

By scanning the light source change rate and dynamically demarcating the calculation area, the problems of screen tearing and frame rate drops caused by excessive calculation in high-energy sudden light source scenes are solved, achieving efficient hardware resource utilization and stable rendering effects.

CN120472054BActive Publication Date: 2025-09-12XIANGTAN GUTIAN NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510965266.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-14
Publication Date
2025-09-12
Estimated Expiration
2045-07-14

AI Technical Summary

Technical Problem

Traditional physically rendered 3D animations experience exponential growth in computational complexity in high-energy, sudden light source scenarios, leading to screen tearing and sudden drops in frame rates. Existing strategies are unable to dynamically allocate computing power, resulting in low hardware resource utilization.

Method used

By scanning the light intensity change rate of the light source, a list of high-energy mutation light sources is generated, the light propagation path is traced, the cross-regional precise calculation area is dynamically delineated and the physical optical calculation channel is activated, the low-frequency stable lighting area is identified, and a simplified calculation channel is used to dynamically inject resources in real time to release the calculation area marking status.

Benefits of technology

The frame rate stability of high-energy sudden light source scenes has been improved, high-precision lighting and shadow effects have been maintained, screen tearing and frame rate drops have been avoided, CPU resource utilization has been improved, and cross-platform real-time rendering has been supported.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120472054B_ABST
    Figure CN120472054B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of 3D animation real-time rendering optimization, and specifically discloses a 3D animation real-time rendering optimization method and system based on physical rendering, including: high-energy sudden light source scanning, light path correlation marking, precise calculation area delineation, physical optical calculation, low-frequency stable area identification, simplified calculation channel activation, dynamic resource injection, and marking state release. The present invention solves the dynamic lighting performance bottleneck by scanning the high-energy sudden light source in real time and dynamically delineating the precise calculation area, only performing complete light reflection and refraction calculations on objects on its path, and activating the simplified calculation channel for the low-frequency stable lighting area. A spatial dimensionality reduction projection model is used to generate the light field distribution, and CPU resources are released for injection into the physical optical channel. The system can adaptively schedule resources, adjust the number of threads according to the processor idle ratio, and recycle threads to prevent overload through a self-termination release mechanism. In complex lighting scenes, the system can improve frame rate stability and reduce load, and is suitable for multiple fields.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of 3D animation real-time rendering optimization, and relates to a 3D animation real-time rendering optimization method and system based on physical rendering. Background Art

[0002] Physically-based rendering for 3D animation faces a core performance bottleneck in dynamic lighting scenarios. When high-energy, sudden changes in light sources occur within a scene, traditional global physical optics calculations must process the reflection and refraction paths of light throughout the entire scene, resulting in an exponential increase in computational complexity. This is especially true for transient, intense light events like explosions or arc flashes, where fixed block rendering mechanisms struggle to adapt to the dynamic propagation characteristics of light paths, often leading to image tearing and sudden frame rate drops. Real-time rendering systems must balance physical accuracy and smoothness within limited hardware resources, a tension particularly acute in complex interactive scenes.

[0003] The industry generally adopts two strategies to alleviate performance pressure: static spatial partitioning, which pre-divides the scene into fixed grid cells and performs physics calculations only on areas directly illuminated by light sources; and global simplification and degradation, which uniformly reduces the ray tracing sampling rate for non-focal areas or replaces them with pre-baked lightmaps. The former relies on preset spatial partitioning rules, while the latter sacrifices visual consistency in exchange for freeing up computing power. Both attempt to constrain the calculation scope through spatial or precision dimensions, but neither establishes a dynamic mechanism for linking sudden changes in lighting with resource allocation.

[0004] Traditional solutions still suffer from the following drawbacks: static blocking schemes cannot adapt to the dynamic propagation path of light penetrating objects. When strong light crosses the boundaries of the pre-divided grid, the delay in data synchronization between blocks causes light and shadow to break. Global simplification rules indiscriminately reduce the accuracy of non-focal areas, resulting in noticeable visual jumps when sudden changes in lighting affect a wide area. More importantly, both solutions use rigid resource allocation strategies and are unable to dynamically allocate computing power based on the rate of change of light intensity. In scenes with sudden strong light, global performance will still be dragged down by local overload. Low hardware resource utilization has become a fundamental obstacle to the implementation of real-time physical rendering. Summary of the Invention

[0005] In view of this, in order to solve the problems raised in the above background technology, a 3D animation real-time rendering optimization method and system based on physical rendering are proposed.

[0006] The objectives of the present invention can be achieved through the following technical solutions: The first aspect of the present invention provides a 3D animation real-time rendering optimization method based on physical rendering, including: S1, high-energy mutation light source scanning: scanning the light intensity change rate of all light sources in the current 3D scene to generate a high-energy mutation light source list.

[0007] S2. Light path relevance marking: tracking the actual propagation paths of the light sources in the high-energy mutation light source list, marking the light path relevance of the illuminated object, and generating a structure nested list.

[0008] S3. Delineation of precise calculation areas: Dynamically delineate cross-region precise calculation areas based on the structure nested list to generate closed contour data.

[0009] S4. Physical optics operation: starting a physical optics operation channel for the cross-region precise calculation area corresponding to the closed contour data, and performing complete light reflection and refraction calculations.

[0010] S5. Identify low-frequency stable areas: synchronously detect a background space set in the scene except the cross-region precise calculation area, and identify low-frequency stable illumination areas.

[0011] S6. Starting a simplified operation channel: starting a simplified operation channel for the low-frequency stable illumination area, using a spatial dimension reduction projection model for processing, and generating a simplified light field distribution data array.

[0012] S7. Dynamic injection of resources: injecting the computing power released by the simplified computing channel into the physical optics computing channel in real time.

[0013] S8. Marking state release: when it is monitored that the light intensity change rate of the light sources in the high-energy sudden change light source list returns to the stable value range, the marking state of the cross-region precise calculation area is released.

[0014] The second aspect of the present invention provides a 3D animation real-time rendering optimization system based on physical rendering, including: a high-energy sudden change light source scanning module, which scans the light intensity change rate of all light sources in the current 3D scene and generates a high-energy sudden change light source list.

[0015] The light path correlation marking module tracks the actual propagation path of the light sources in the high-energy mutation light source list, marks the light path correlation of the illuminated object, and generates a structure nested list.

[0016] The precise calculation area delineation module dynamically delineates cross-region precise calculation areas according to the structure nested list and generates closed contour data.

[0017] The physical optics operation module starts the physical optics operation channel for the cross-region precise calculation area corresponding to the closed contour data, and performs complete light reflection and refraction calculation.

[0018] The low-frequency stable area identification module synchronously detects a background space set in the scene except the cross-region precise calculation area, and identifies a low-frequency stable illumination area.

[0019] The simplified operation channel starting module starts the simplified operation channel for the low-frequency stable illumination area, adopts the spatial dimension reduction projection model for processing, and generates a simplified light field distribution data array.

[0020] The resource dynamic injection module injects the computing power released by the simplified computing channel into the physical optical computing channel in real time.

[0021] The marking state releasing module releases the marking state of the cross-region precise calculation zone when monitoring that the light intensity change rate of the light sources in the high-energy sudden change light source list returns to a stable value range.

[0022] Compared with the prior art, the embodiments of the present invention have at least the following advantages or beneficial effects: (1) The present invention transforms the traditional global physical optical calculation amount from exponential growth to linear growth through the real-time scanning of high-energy mutation light sources and dynamic calculation area demarcation technology, thereby improving the frame rate stability of instantaneous strong light scenes such as explosions and arc flashes, while maintaining high-precision light and shadow effects, and solving the core problems of screen tearing and frame rate drops.

[0023] (2) The present invention improves the CPU resource utilization by creating a collaborative operation mechanism between the cross-region precise calculation area and the low-frequency stable illumination area, combined with the dynamic resource injection technology, and avoids the data synchronization delay caused by the static blocking method due to the light penetrating the grid boundary, and the visual jump caused by the global simplification method due to the indifferent reduction of the accuracy of the non-focal area.

[0024] (3) The present invention achieves low-latency processing on mainstream graphics cards through a spatial dimensionality reduction projection model (simplified light field distribution). The algorithm complexity is linearly related to the number of objects in the scene. It supports cross-platform real-time rendering requirements from mobile to PC, significantly reducing the hardware threshold.

[0025] (4) The present invention dynamically removes the calculation area mark through continuous frame scanning and stable judgment window period, combined with dynamic thread allocation technology, to prevent local overload and global performance collapse caused by rigid resource allocation strategy. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0027] Figure 1 Schematic diagram of the method steps of the present invention.

[0028] Figure 2 It is a schematic diagram of the system structure connection of the present invention.

[0029] Figure 3 A flow chart is generated for the structured nested list of the present invention. DETAILED DESCRIPTION

[0030] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0031] See also Figure 1 As shown, the first aspect of the present invention provides a 3D animation real-time rendering optimization method based on physical rendering, including: S1, high-energy mutation light source scanning: scanning the light intensity change rate of all light sources in the current 3D scene to generate a high-energy mutation light source list.

[0032] In a specific embodiment of the present invention, the specific method of generating the high-energy sudden change light source list is: obtaining the initial light intensity value of each visible light source in the current 3D scene.

[0033] The light intensity value sequence of each visible light source is continuously collected at a preset fixed time interval.

[0034] The ratio of the absolute value of the difference between adjacent data in the light intensity numerical sequence to the time interval is calculated to generate an instantaneous measurement value.

[0035] It should be noted that the specific method of generating the instantaneous measurement value is: continuously obtaining the initial light intensity value of each visible light source in the 3D scene in the current picture frame, setting this value as the reference benchmark for the detection starting point, and continuously collecting the light intensity value of the visible light source at fixed time intervals within a pre-set time period. The corresponding moment is recorded each time the collection is performed, and the ratio of the absolute value of the difference between the light intensity at each moment in the time period and the initial light intensity to the corresponding time interval is calculated, and this ratio is defined as the instantaneous measurement value of the light intensity change rate.

[0036] The instantaneous measured value is compared with a preset change threshold to screen the source of the light intensity mutation.

[0037] It should be noted that the specific method of screening the light intensity mutation source is: continuously comparing the size relationship between all instantaneous measurement values ​​and the preset change threshold. If a visible light source has an instantaneous measurement value that exceeds the preset change threshold, then the visible light source is identified as a light intensity mutation source, thereby screening out the light intensity mutation source.

[0038] Integrate the attribute data and time series tags of all light intensity mutation sources to generate a list of high-energy mutation light sources.

[0039] It should be noted that the specific method of generating the list of high-energy mutation light sources is: organizing the attribute data of all identified light intensity mutation sources into a record set with time series marks, and after completely traversing all light sources in the scene, outputting the record set as a structured data array to obtain the list of high-energy mutation light sources.

[0040] It should be further explained that the initial light intensity value refers to the measured value of the light energy output of the light source at the beginning of the detection cycle, which is obtained by calling the real-time lighting query interface of the graphics engine. The fixed time interval is dynamically set according to the refresh rate of the display device. The preset change threshold is determined by counting the light intensity amplitude when common explosion special effects flash, and its value is set to the critical point where the total amount of light intensity change per second exceeds 80% of the rated output of the light source. The timing mark includes the frame number and duration of the sudden change peak. The structured data array is sorted by the spatial coordinates of the light source, and each entry contains the light source identifier and the maximum instantaneous measured value recorded.

[0041] For example, when a dynamic arc light source appears in the scene, the initial light intensity of the visible light source is obtained as 2500 lumens at the start frame of the detection cycle, and then 8 frames of data are continuously collected at an interval of 16 milliseconds per frame, and recorded as 2510, 2520, 3600, 4800, 4900, 3200, 2530, and 2520 lumens respectively; when calculating the change rate of the third frame relative to the start frame, the absolute value of the difference 1100 lumens (3600-2500) is divided by the time increment 48 milliseconds (2 x 16 milliseconds), obtaining an instantaneous measured value of 22,916 lumens per second. This value is compared with the preset threshold of 20,000 lumens per second. Because the measured value exceeds the threshold, the arc light source is identified as a source of sudden light intensity fluctuations. After the system continues to detect adjacent objects such as laser light sources, it ultimately outputs a structured data array. The arc light source entry records the position coordinates (X35, Y82, Z15), the peak measured value of 22,916 lumens per second, and a duration marker that occurs between frames 3 and 5. Upon completion of this record set, the system automatically clears the cached data from the detection period and enters the next detection cycle preparation state.

[0042] S2. Light path relevance marking: tracking the actual propagation paths of the light sources in the high-energy mutation light source list, marking the light path relevance of the illuminated object, and generating a structure nested list.

[0043] See also Figure 3 As shown, in a specific embodiment of the present invention, the specific method of generating the structure nested list is: reading the spatial coordinates of the light source and the peak value data of the light intensity change rate in the high-energy sudden change light source list.

[0044] A virtual detection ray beam covering a preset divergence angle is emitted with the light source coordinates as the starting point.

[0045] Detect the material penetration behavior mark of the object that the ray contacts, calculate the remaining energy ratio of the ray and record the object identifier.

[0046] Terminates or advances the ray path based on the material penetration behavior flags, generating a complete penetration sequence starting from the light source.

[0047] Integrate the penetration sequences of all light sources to generate a nested list of structures.

[0048] It should be noted that after receiving the generated high-energy mutation light source list, the spatial coordinates and light intensity change rate peak data of the light sources in the list are read one by one; starting from the coordinates of each light source, a virtual detection beam of rays is emitted along its main irradiation direction, and the initial angle of the ray covers the actual divergence range of the light source; when the ray contacts the surface of the scene object, the light penetration behavior mark in the material setting of the object is detected. If the material mark allows partial penetration of the light, the remaining energy ratio of the ray is calculated based on the material transparency value, and the identifier of the current irradiated object is recorded at the same time, and the ray continues to move forward along the original path direction; if the material mark is completely opaque, the current ray path is terminated and the end object identifier is recorded; after the final disappearance position of all ray beams is determined, the ray emitted by the same light source passing through the object identifiers are connected in series in the order of contact to form a complete penetration sequence starting from the light source; after traversing all light sources in the list, all penetration sequences are integrated into a structural nested list.

[0049] It should be further explained that the number of virtual detection ray beams is determined by dividing the divergence angle value of the light source by the preset minimum angular resolution. The light penetration behavior mark is called in real time from the object material configuration library, which contains preset light transmittance properties of materials such as metal or glass. The remaining energy ratio is obtained by multiplying the current ray energy value by the material transparency coefficient, where the coefficient takes a closed interval from zero to one. The complete penetration sequence is stored in a dynamic pointer linked list structure, and each node in the linked list contains the unique object code and the ray contact moment. The structure nested list is indexed by the light source identification code, and each index is mounted with the linked list head pointer of the corresponding penetration sequence.

[0050] For example, when processing an arc light source with coordinates (X35, Y82, Z15) in the high-energy sudden light source list, because its divergence angle is 45 degrees, 9 virtual detection rays are emitted with a minimum angular resolution of 5 degrees; among them, ray No. 3 first hits the high-transmittance glass curtain wall object at position X41, obtains its transparency coefficient 0.92 from the material configuration library, calculates the remaining energy as 95% of the initial value, records the object code OBJ_Glass001 and continues to advance; the attenuated ray passes through the glass and hits the metal instrument panel object on the back, the material penetration behavior is marked as opaque, the ray is terminated and the object code OBJ_Metal045 is recorded; the system generates a penetration sequence linked list: the starting node points to OBJ_Glass001 (contact time 16ms), and the next node points to OBJ_Metal045 (contact time 34ms); at the same time, ray No. 5 stops after directly hitting the concrete wall, forming an independent sequence single node. After processing all nine rays from the source, the resulting nested list is registered as follows: the coordinates of source S35 correspond to two linked lists of penetration sequences, where sequence A contains two object nodes and sequence B contains a single object node. All sequence data is output as light path associations for the next process to call.

[0051] S3. Delineation of precise calculation areas: Dynamically delineate cross-region precise calculation areas based on the structure nested list to generate closed contour data.

[0052] In a specific embodiment of the present invention, the specific method of generating closed contour data is: parsing the complete penetration sequence linked list in the structure nested list and extracting the object unique code.

[0053] Calculate the actual spatial distance between the object and the light source, and filter out objects whose distance is less than the preset dynamic area boundary threshold.

[0054] Detect the angle between the normal direction of the object surface and the incident light of the light source, and filter out objects whose angle falls within the preset effective reflection angle range.

[0055] The fixed block boundaries of the scene are broken by connecting the spatial coordinates of the filtered objects to generate closed contour data.

[0056] It should be noted that after receiving the output structure nested list data, the complete penetration sequence linked list corresponding to each light source in the list is parsed item by item; the unique code of the object recorded in all nodes of the linked list is extracted, and the objects with the same code are merged into a set of targets to be processed; the actual spatial connection distance between each object in the set and the emitting light source is calculated, and when the distance value is less than the preset dynamic area boundary threshold, the mark is initially included in the set of targets to be processed; at the same time, the surface normal direction of each object in the set and the angle between the incident light of the light source are detected, and if the angle falls within the preset effective reflection angle range, the mark is included in the set of targets to be processed; the spatial range finally formed breaks the original grid division constraints of the scene, and its boundary is determined by the spatial coordinate connection line of the outermost marked object; the spatial range data is stored as a closed contour composed of polygon vertex coordinates.

[0057] It should also be noted that the formula for calculating the actual spatial distance between each object in the set and the light source is: ,in, represents the light source coordinates, Represents the object coordinates.

[0058] It should be further explained that the dynamic area boundary threshold is taken as the ratio coefficient of the length of the line connecting the light source and the object, and the coefficient is set by the statistical value of the common object size. In a specific embodiment of the present invention, the coefficient can be taken as 0.3; the effective reflection angle range is fixedly set to the difference between the normal direction and the incident angle between negative fifteen degrees and positive fifteen degrees; the vertex coordinate data of the closed contour are sorted in a clockwise sequence to generate a boundary array; if the adjacent objects outside the polygon range are at a distance from the range lower than the preset distance buffer value, they are synchronously included in the spatial range, and the distance buffer value is calculated by multiplying the average size of the scene objects by a correction factor, wherein the correction factor is a coefficient greater than 1, which is used to expand the distance buffer range based on the average size of the object. In a specific embodiment of the present invention, the correction factor can be taken as 1.5.

[0059] For example, when processing the nested list structure corresponding to arc light source S35, sequence A is parsed to contain two object codes: OBJ_Glass001 and OBJ_Metal045. The distance between OBJ_Glass001 and light source S35 is calculated to be 5.2 meters. When the preset dynamic region boundary threshold is 30% of the light source distance, the 1.56-meter boundary value is met, so the object is included. The angle between the surface normal of OBJ_Glass001 and the incident light is detected to be 8 degrees, falling within the valid reflection range, and the marker is confirmed. Similarly, after processing OBJ_Metal045, the spatial bounding box coordinates of the two objects are obtained. Calculations show that the object OBJ_Wall003 on the right, while not in the sequence, is only 0.3 meters away from the bounding box, which is lower than the set distance buffer of 0.5 meters, and is therefore included. Finally, an octagonal closed contour is generated based on the positions of the four objects (including the automatically included objects), with the coordinate range exceeding the XYZ range of the original scene block. The area covered by this contour is output as a cross-region precision calculation area for subsequent steps.

[0060] S4. Physical optics operation: starting a physical optics operation channel for the cross-region precise calculation area corresponding to the closed contour data, and performing complete light reflection and refraction calculations.

[0061] In a specific embodiment of the present invention, the specific method of performing the complete light reflection and refraction calculation is: loading the geometric structure of the object in the area corresponding to the closed contour data.

[0062] Call the surface reflectivity and refractive index values ​​of objects in the material configuration library.

[0063] The emission angle of the reflected ray and the remaining energy ratio are calculated based on the surface reflectivity value.

[0064] It should be noted that the emission angle of the reflected ray is determined by the symmetry of the angle between the incident light and the normal of the object surface (that is, the incident angle is equal to the reflection angle); the residual energy ratio is directly given by the surface reflectivity value (for example, if the reflectivity is 0.08, the residual energy is 8% of the incident energy).

[0065] Calculate the refraction path and energy attenuation value based on the refractive index value.

[0066] It should be noted that when calculating the refraction path based on the refraction coefficient value, according to Snell's law, the refraction angle By the angle of incidence , refractive index of the incident medium and the refractive index of the refractive medium Jointly decided, the specific relationship is The refractive angle of the refracted light relative to the normal can be solved by knowing the incident angle and the refractive index of the two media. , thereby determining the propagation direction of the refracted light.

[0067] It should also be noted that the calculation process of the energy attenuation value is as follows: 1) Energy distribution model: light is reflected and refracted at the refractive interface at the same time, and the energy distribution is determined by the Fresnel equation. for: ,2) Total energy attenuation value: considering the interface refraction loss and medium absorption, the total transmitted light intensity is: , the attenuation value is ,in is the medium absorption coefficient, which has no direct mathematical relationship with the refractive index, but can be obtained through experimental data correlation. is a natural constant, is the original light intensity of the light source, Indicates the propagation distance.

[0068] The new ray path is iteratively calculated until the energy ratio is lower than the preset termination threshold, generating the full-path light energy distribution data.

[0069] It should also be noted that after receiving the generated closed contour data of the cross-region precise calculation area, the geometric structure of all objects in the specified area in the three-dimensional space is loaded according to the contour vertex coordinate array; the light action parameters registered in the material configuration library for each object in the area are actively called, including the surface reflectivity value and the refractive index value; the high-energy mutation light source in step S1 is used as the starting point to emit optical operation rays to the target object, and when the ray reaches the surface of the object, the emission angle and the residual energy ratio of the reflected ray are calculated based on the current material reflectivity value, and the refractive path and energy attenuation value of the penetrating object are calculated based on the refractive index value; the above-mentioned action calculation is repeated for other objects on the new ray path until the ray energy ratio is lower than the preset termination threshold or leaves the closed contour of the calculation area; the full-path light energy distribution calculation from all light sources in the area to the irradiated object is completed within a single frame time.

[0070] It should be further explained that the light effect parameters are obtained through the material unique coding index database, the reflectivity value range is in a closed interval from zero to one, and the reflection direction is determined by the symmetrical relationship between the incident angle and the normal angle; the termination threshold is the preset lower limit of light energy attenuation, which is set to one percent of the total energy output of the original light source; the full-path light energy distribution calculation results are stored as the final light intensity array of the sampling points on the surface of each object.

[0071] For example, when processing the cross-region precise calculation area corresponding to the arc light source S35, first load the OBJ_Glass001 high-transmittance glass and OBJ_Metal045 metal panel objects within the closed contour; query the material library to obtain the glass refractive index of 1.5, the reflectivity of 0.08, and the metal reflectivity of 0.85; emit the main ray from the light source S35 to hit the OBJ_Glass001 surface, and calculate the reflection angle of 60 degrees based on the incident angle of 60 degrees and the normal direction to generate a reflected ray, and at the same time, generate a penetrating ray with a refraction angle of 35 degrees based on the refractive index calculation; the reflected ray carries 8% of the initial energy and disappears after hitting the adjacent wall, and the penetrating ray retains 83% of the energy to reach the OBJ_Metal045 surface; because its metal material triggers a 70-degree reflection ray, the ray does not touch other objects within the closed contour and terminates; finally, OBJ_Glass001 records the direct light intensity value, and OBJ_Metal045 records the reflected light superposition value, and the two data are entered into the surface sampling array. After processing other light sources in the area, the light energy distribution results are submitted to the rendering pipeline.

[0072] In one specific embodiment of the present invention, the optical parameters and calculation methods described in the example are supported by both theoretical and experimental evidence: the glass refractive index of 1.5 and the metal reflectivity of 0.85 conform to the physical properties of ordinary glass (refractive index around 1.5) and the experimentally measured value of aluminum (reflectivity 0.85-0.90), respectively. The reflection angle strictly adheres to the law of reflection (the angle of incidence equals the angle of reflection), and the refraction angle is calculated using Snell's law (with an error of only 0.26°). Energy distribution is based on the reflectivity model of the Fresnel equations. While the glass reflectivity of 0.08 is close to the theoretical upper limit (4%) for normal incidence, it remains within a reasonable range for actual optical materials due to surface treatment and wavelength variations (such as in the infrared range). The overall solution, validated by both physical laws and experimental data, demonstrates both scientific validity and engineering feasibility.

[0073] S5. Identify low-frequency stable areas: synchronously detect a background space set in the scene except the cross-region precise calculation area, and identify low-frequency stable illumination areas.

[0074] In a specific embodiment of the present invention, the specific method of identifying the low-frequency stable illumination area is: dividing the background space set into equally spaced grid sampling points.

[0075] Record the light intensity value sequence of the sampling point within the preset time period.

[0076] The ratio of the sum of the absolute values ​​of the light intensity differences between adjacent data points to the initial total light intensity value is calculated to generate the relative rate of change per second.

[0077] The relative rate of change per second is compared with the preset stability judgment threshold and the stable point is marked.

[0078] The proportion of stable points in the sub-area is counted, and the areas where the proportion exceeds the preset critical value are filtered to generate a low-frequency stable illumination area.

[0079] It should be noted that, while performing the physical optical operation in step S4, the closed contour coverage of the cross-region precise calculation area marked in step S3 is eliminated from the three-dimensional scene space data to obtain a background space set to be detected; grid sampling points are divided into equally spaced grids within this background space set, and each sampling point is associated with the surface of an object within a preset distance around it; the light intensity value sequence of all sampling points in the previous full second is continuously recorded, and this sequence contains at least the same number of data points as the display refresh rate; the absolute value of the light intensity difference between two adjacent data points is calculated, and the sum of all the absolute values ​​of the difference is divided by the initial total light intensity value to obtain the relative change rate per second; this value is compared with a preset stability judgment threshold, and if the relative change rate per second is lower than this threshold, the corresponding grid point is marked as a stable point; the proportion of stable points in each sub-area is counted, and if the proportion exceeds the preset critical value, the entire sub-area is marked as a low-frequency stable illumination area.

[0080] It should be further explained that the preset distance is twice the size of the largest object in the scene to ensure that the sampling points cover the effective surface; the initial total light intensity value is the sum of the intensity values ​​of all sampling points in the first frame; the preset stability judgment threshold is fixed at 5% per second, which is set according to the upper limit of the fluctuation of the natural lighting environment; the preset critical value is set to 75%, indicating that more than three-quarters of the sampling points in the area meet the stability conditions; the sub-area division method uses the scene basic grid unit, and each unit contains a fixed number of sampling points.

[0081] For example, when the cross-region precision calculation area covers the center of the scene, a 5×5 grid in the northern region is selected as the background space set. A 60-frame light intensity sequence at a sampling point is recorded at a 60Hz refresh rate (frame 1: 1200 lumens, frame 2: 1202 lumens, ... frame 60: 1218 lumens). The sum of the adjacent frame differences is calculated as 108 lumens, which is divided by the initial total light intensity of 72,000 lumens to obtain a relative rate of change of 0.15% per second. Because it falls below the 5% threshold, it is marked as a stable point. Of the 24 sampling points in this subregion, 19 are marked, representing 79% that exceeds the 75% threshold, marking the entire northern grid as a low-frequency stable illumination zone. Meanwhile, a southern grid containing a flashing neon sign, with a sampling point change rate of 7.2%, is not marked. After completing the inspection of all subregions, a list of low-frequency zone coordinates is generated and transmitted to subsequent processes.

[0082] S6. Starting a simplified operation channel: starting a simplified operation channel for the low-frequency stable illumination area, using a spatial dimension reduction projection model for processing, and generating a simplified light field distribution data array.

[0083] In a specific embodiment of the present invention, the specific method of generating the simplified light field distribution data array is: loading the object surface grid structure in the low-frequency stable illumination area.

[0084] Select the projection plane base direction that is perpendicular to the primary lighting angle of incidence.

[0085] Project the object's vertex coordinates and normal data onto the reference plane and compress them into a set of two-dimensional coordinate points.

[0086] Construct a density distribution map of the point set, and merge adjacent points whose density exceeds the preset grid merging threshold into grid units.

[0087] The constant light intensity of the grid cells is calculated based on the incident illumination angle and the average reflectivity value of the object, and a simplified light field distribution data array is generated.

[0088] It should be noted that the specific method of calculating the constant light intensity of the grid unit is: obtaining the cosine value of the incident light angle, multiplying the cosine value of the incident light angle with the original light intensity of the light source and the average reflectivity of the object to obtain the constant light intensity.

[0089] It should also be noted that after receiving the low-frequency stable illumination area coordinate list output by step S5, the sub-area position information marked in the list is parsed, and the object surface mesh structure and texture map of these sub-areas are loaded from the three-dimensional scene data; a projection plane reference direction is selected as a reference plane based on the spatial orientation and shape characteristics of each sub-area, and the direction is perpendicular to the main illumination incident angle of the area; the vertex coordinates and normal data of all objects in the sub-area are projected onto the reference plane, and the three-dimensional mesh model is compressed into a two-dimensional coordinate point set, retaining only the plane projection position and the initial normal projection vector; the adjacent relationship of each point in the projected point set is detected to construct a density distribution map, where the density value is obtained by calculating the inverse of the average value of the point spacing; when the density value exceeds the preset mesh merging threshold, the adjacent points are automatically merged into mesh units.

[0090] It should be further explained that the reference direction of the projection plane is adjusted according to the illumination angle of the main light source identified in step S5. If the incident light comes from the south, the horizontal plane due south is selected; the coordinates of the object vertex are obtained from the scene geometry database through a unique identifier; the normal projection vector is the component representation of the original three-dimensional normal on the projection plane; the density distribution map is generated by calculating the number of projection points per square unit area, and the unit area is set by the global size ratio of the scene; the grid merging threshold is one-fifth of the average point distance, and this value is optimized by testing the simplification effect of the object model; the grid unit is formed by a core point representing multiple adjacent points; the simplified illumination model uses a fixed direction illumination calculation formula, relying on the stable light intensity mean recorded in step S5 as input; the light field distribution data array stores the final illumination value and unit boundary coordinates of each grid unit.

[0091] For example, when processing the northwest corner sub-region marked by the low-frequency stable illumination zone, the coordinate list is parsed to determine that the region is a 5m x 5m square. The mesh data for a building wall within the region, totaling 120 vertices, is loaded. Because the primary light source is located in the southeast, the east horizontal plane is selected as the projection plane reference direction. All vertex coordinates are projected to form a 400-point two-dimensional map, where the average distance between adjacent points is 0.1m, and the density of the region is calculated to be 100 points per square meter. After detecting that the point density exceeds the grid merging threshold of 20 per square meter, points with a spacing less than 0.05m are grouped into 32 grid cells. For each cell, the average vertex position and normal are taken, and a constant light intensity of 580 lumens is calculated based on an incident angle of 30 degrees and an average reflectivity of 0.7. The final output light field distribution data array contains 32 records, each with the cell center, the calculated light intensity, and the cell coverage radius of 0.1m. This data is transferred to the subsequent steps as the simplified calculation result.

[0092] S7. Dynamic injection of resources: injecting the computing power released by the simplified computing channel into the physical optics computing channel in real time.

[0093] In a specific embodiment of the present invention, the specific method of injecting the computing power released by the simplified computing channel into the physical optical computing channel in real time is: collecting the CPU core occupancy information of the simplified computing channel and calculating the average processor idle ratio.

[0094] Gets the number of pending optical path calculation requests for the physical optics computation channel.

[0095] The product of the average processor idle ratio and the number of grid units is defined as the transferable computing resource value.

[0096] The number of newly added threads is calculated based on the value of transferable computing resources and the standard value of single-thread computing capacity.

[0097] Assign new threads to the critical ray path calculation task in the cross-region precise calculation area.

[0098] It should be noted that the CPU core occupancy information of the spatial dimensionality reduction projection model processing process of each simplified operation channel in step S6 is collected in real time, and this information is directly read from the operating system-level resource monitor; the number of pending light path calculation requests in the current task queue of the physical optics operation channel in step S4 is synchronously obtained, and this data is provided by the rendering pipe thread scheduler; the average processor idle ratio of each channel in step S6 in the previous complete frame cycle is calculated, and the product of this ratio and the number of grid units in the corresponding area is defined as the transferable computing resource value; according to the processor core load balancing rules set by the device platform, the upper limit of the number of parallel computing threads available to the physical optics operation channel is dynamically adjusted, specifically, the transferable computing resource value is divided by the single-thread computing capacity standard value and the integer is rounded as the number of new threads; the task scheduler will directionally allocate the new threads to the key light path calculation task in the cross-regional precise calculation area of ​​step S4, and this directional allocation is performed with reference to the light path relevance priority marked in step S3.

[0099] It should be further explained that the CPU core occupancy information includes the logical core number and its actual workload percentage; the number of pending optical path calculation requests counts all reflection and refraction calculation tasks waiting to be assigned; the processor idle ratio is obtained by reverse calculation based on the core occupancy data, and when the core occupancy is 80%, the idle ratio is 20%; the single-thread computing capacity standard value is obtained through calibration of the standard test scenario, and this value represents the number of light intersection calculations that can be completed by a single thread per second; the rounding rule when calculating the number of newly added threads is to round up if the value after the decimal point exceeds 0.5; the optical path relevance priority follows the order of the nodes in the penetration sequence linked list established in step S2.

[0100] For example, when the simplified computing channel in the low-frequency area in the northwest corner is monitored during the spatial dimensionality reduction projection processing, the CPU core occupancy rate remains at 25%; the 32 grid units divided in the area correspond to an idle ratio of 75%; the value of the transferable computing resources is calculated to be 0.75 multiplied by 32, which is 24 resource units; according to the preset single-thread standard value of 2 million calculations per second, 1.2 new threads are required and rounded up to 2 threads; at this time, the number of pending requests in the arc light source actuarial area of ​​step S4 is 15; the task scheduler allocates all the new 2 threads to the area, and immediately processes the three groups of refraction path calculation tasks corresponding to the OBJ_Glass001 node, thereby increasing the computing throughput of the area from 12 million times per second to 16 million times; the new threads remain valid until it is detected that the processor core occupancy rate exceeds the balance threshold and is automatically recycled.

[0101] S8. Marking state release: when it is monitored that the light intensity change rate of the light sources in the high-energy sudden change light source list returns to the stable value range, the marking state of the cross-region precise calculation area is released.

[0102] In a specific embodiment of the present invention, the specific method of releasing the marking state of the cross-region precise calculation area is: establishing a continuous frame scanning queue for the high-energy sudden change light source list.

[0103] A sequence of instantaneous measured values ​​of the light source is collected within a preset stability determination window.

[0104] A steady-state light source is marked when the maximum instantaneous measured value of the sequence is continuously below the set threshold.

[0105] The proportion of stable light sources is counted, and a release command is triggered when the proportion exceeds a preset critical point.

[0106] Send a region unsealing signal to the cross-region precise computing area and reclaim the allocated additional computing threads.

[0107] It should be noted that the real-time updated data of the high-energy mutation light source list generated by step S1 is continuously received, and a continuous frame scanning queue is established for each light source in the list; all instantaneous measurement value sequences of the light source are collected within the preset stability judgment window period, and when the maximum instantaneous measurement value in this sequence is lower than the set threshold for a duration exceeding the stability judgment window period, it is automatically marked as a stable state light source; the proportion of all light sources marked as stable in the list is counted, and if the proportion exceeds the preset proportion critical point, the release instruction is triggered; when the instruction is executed, a regional unblocking signal is sent to the spatial range of the cross-regional precise calculation area divided by step S3, and a calculation mode downgrade command is sent to the physical optics calculation channel of step S4; after all channels are downgraded, the additional calculation threads allocated by the integration step S7 are recovered through the dynamic resource transfer engine, and the corresponding area in step S5 is removed from the low-frequency stable illumination area list.

[0108] It should be further explained that the continuous frame scanning queue caches the measured value data of the most recent frame in a first-in-first-out structure; the stable judgment window period is a preset fixed time length of the continuous frame set, and its length is set to fifteen frames based on the human eye's perception delay of light intensity changes; the threshold value is set to be consistent with the original threshold value when the mutation is first determined in step S1; the proportional critical point is set to eighty percent of the total number of light sources in the list; the area unblocking signal is a binary instruction containing the coordinates of the released area; the calculation mode downgrade command triggers the switching of the complete light reflection and refraction calculation to the simplified lighting model; the dynamic resource transfer engine reclaims idle thread resources through operating system calls.

[0109] For example, when monitoring the arc light source S35 in the list in step S1, its instantaneous measured values ​​per second are continuously recorded (frame 1: 18900, frame 2: 18500, ... frame 15: 2050). Detection reveals that all values ​​for fifteen consecutive frames are below the original threshold of 20,000 lumens per second. This light source is marked as a stable light source. Four of the five light sources in the current list have reached a stable state, meaning the percentage has reached 80%. After triggering a release command, an unblocking signal is sent to the cross-region precise calculation zone at coordinates (X35, Y82, Z15). The actuarial channel in step S4 switches to simple illumination mode. The dynamic resource transfer engine reclaims the two computation threads added in step S7. Simultaneously, the list in step S5 is modified to delete the record for this zone. All changes are completed within three frame periods, and the original actuarial zone returns to normal scene grid processing.

[0110] Reference Figure 2 As shown, the second aspect of the present invention provides a 3D animation real-time rendering optimization system based on physical rendering, including: a high-energy mutation light source scanning module, an optical path correlation marking module, a precise calculation area demarcation module, a physical optical operation module, a low-frequency stable area identification module, a simplified operation channel startup module, a resource dynamic injection module and a marking state release module and a material configuration library.

[0111] It should be noted that the present invention also includes a material configuration library for storing surface reflectivity values ​​and refractive index values ​​of objects, storing registered light action parameters of objects, and storing preset light transmittance properties of materials such as metal or glass.

[0112] The high-energy mutation light source scanning module is connected to the light path correlation marking module and the marking state release module, the light path correlation marking module is connected to the precise calculation area demarcation module, the precise calculation area demarcation module is connected to the physical optical operation module, the low-frequency stable area identification module is connected to the simplified calculation channel startup module, the physical optical operation module and the simplified calculation channel startup module are connected through the resource dynamic injection module, and both the light path correlation marking module and the physical optical operation module are connected to the material configuration library.

[0113] The high-energy sudden change light source scanning module scans the light intensity change rate of all light sources in the current 3D scene and generates a high-energy sudden change light source list.

[0114] The light path relevance marking module tracks the actual propagation paths of the light sources in the high-energy mutation light source list, marks the light path relevance of the illuminated object, and generates a structure nested list.

[0115] The precise calculation area delineation module dynamically delineates cross-region precise calculation areas according to the structure nested list and generates closed contour data.

[0116] The physical optics operation module starts a physical optics operation channel for the cross-region precise calculation area corresponding to the closed contour data, and performs complete light reflection and refraction calculations.

[0117] The low-frequency stable area identification module synchronously detects a background space set in the scene except the cross-region precise calculation area, and identifies a low-frequency stable illumination area.

[0118] The simplified operation channel activation module activates the simplified operation channel for the low-frequency stable illumination area, and uses a spatial dimension reduction projection model for processing to generate a simplified light field distribution data array.

[0119] The resource dynamic injection module injects the computing power released by the simplified computing channel into the physical optics computing channel in real time.

[0120] The marking state releasing module releases the marking state of the cross-region precise calculation zone when monitoring that the light intensity change rate of the light sources in the high-energy sudden change light source list returns to a stable value range.

[0121] The above contents are merely examples and explanations of the concept of the present invention. Those skilled in the art may make various modifications or additions to the described specific embodiments or replace them in a similar manner. As long as they do not deviate from the concept of the invention or exceed the scope defined by the present invention, they should all fall within the scope of protection of the present invention.

Claims

1. A 3D animation real-time rendering optimization method based on physical rendering, characterized in that: include: S1. High-energy sudden change light source scanning: Scan the light intensity change rate of all light sources in the current 3D scene and generate a list of high-energy sudden change light sources; S2. Light path relevance marking: tracking the actual propagation paths of the light sources in the high-energy mutation light source list, marking the light path relevance of the illuminated objects, and generating a structure nested list; S3. Delineation of precise calculation areas: Dynamically delineating cross-region precise calculation areas based on the structure nested list to generate closed contour data; S4, physical optics operation: starting a physical optics operation channel for the cross-region precise calculation area corresponding to the closed contour data, and performing complete light reflection and refraction calculation; S5. Low-frequency stable area identification: synchronously detecting a background space set in the scene except the cross-region precise calculation area, and identifying a low-frequency stable illumination area; S6. Starting a simplified calculation channel: Starting a simplified calculation channel for the low-frequency stable illumination area, using a spatial dimension reduction projection model to generate a simplified light field distribution data array; S7, dynamic resource injection: injecting the computing power released by the simplified computing channel into the physical optics computing channel in real time; S8. Release the marking state: when it is monitored that the light intensity change rate of the light sources in the high-energy sudden change light source list returns to the stable value range, release the marking state of the cross-region precise calculation area.

2. The 3D animation real-time rendering optimization method based on physical rendering according to claim 1, characterized in that: The specific method of generating the high-energy mutation light source list is: Get the initial light intensity value of each visible light source in the current 3D scene; Continuously collecting a sequence of light intensity values ​​of each visible light source at a preset fixed time interval; Calculate the ratio of the absolute value of the difference between adjacent data in the light intensity numerical sequence to the time interval to generate an instantaneous measurement value; Comparing the instantaneous measured value with a preset change threshold to screen the source of the light intensity mutation; Integrate the attribute data and time series tags of all light intensity mutation sources to generate a list of high-energy mutation light sources.

3. The method for optimizing 3D animation real-time rendering based on physical rendering according to claim 1, characterized in that: The specific method of generating the structure nested list is: Read the spatial coordinates and peak value data of light intensity change rate of the light source in the high-energy mutation light source list; A virtual detection ray beam covering a preset divergence angle is emitted with the light source coordinates as the starting point; Detect the material penetration behavior mark of the object the ray contacts, calculate the remaining energy ratio of the ray and record the object identifier; According to the material penetration behavior mark, terminate or advance the ray path to generate a complete penetration sequence starting from the light source; Integrate the penetration sequences of all light sources to generate a nested list of structures.

4. The method for optimizing 3D animation real-time rendering based on physical rendering according to claim 1, characterized in that: The specific method of generating closed contour data is: Parse the complete penetrating sequence list in the structure nested list and extract the unique code of the object; Calculate the actual spatial distance between the object and the light source, and filter out objects whose distance is less than the preset dynamic area boundary threshold; Detect the angle between the normal direction of the object surface and the incident light of the light source, and select objects whose angle falls within the preset effective reflection angle range; The fixed block boundaries of the scene are broken by connecting the spatial coordinates of the filtered objects to generate closed contour data.

5. The 3D animation real-time rendering optimization method based on physical rendering according to claim 1, characterized in that: The specific method of performing the complete light reflection and refraction calculation is as follows: Load the object geometry within the area corresponding to the closed contour data; Call the surface reflectivity and refractive index values ​​of objects in the material configuration library; Calculate the emission angle and residual energy ratio of reflected rays based on the surface reflectivity value; Calculate the refraction path and energy attenuation value based on the refraction coefficient; The new ray path is iteratively calculated until the energy ratio is lower than the preset termination threshold, generating the full-path light energy distribution data.

6. The 3D animation real-time rendering optimization method based on physical rendering according to claim 1, characterized in that: The specific method of identifying the low-frequency stable illumination area is: Divide the background space set into equally spaced grid sampling points; Record the light intensity value sequence of the sampling point within a preset time period; Calculate the ratio of the sum of the absolute values ​​of the light intensity differences between adjacent data points to the initial total light intensity value to generate the relative change rate per second; Compare the relative rate of change per second with the preset stability determination threshold and mark the stable point; The proportion of stable points in the sub-area is counted, and the areas where the proportion exceeds the preset critical value are filtered to generate a low-frequency stable illumination area.

7. The method for optimizing 3D animation real-time rendering based on physical rendering according to claim 1, characterized in that: The specific method of generating the simplified light field distribution data array is: Load the object surface grid structure in the low-frequency stable illumination area; Select the projection plane reference direction perpendicular to the main light incidence angle; Project the object's vertex coordinates and normal data onto the reference plane and compress them into a set of two-dimensional coordinate points; Construct a density distribution map of the point set, and merge adjacent points whose density exceeds the preset grid merging threshold into grid cells; The constant light intensity of the grid cells is calculated based on the incident illumination angle and the average reflectivity value of the object, and a simplified light field distribution data array is generated.

8. The method for optimizing 3D animation real-time rendering based on physical rendering according to claim 1, characterized in that: The specific method of injecting the computing power released by the simplified computing channel into the physical optics computing channel in real time is: Collect the CPU core occupancy information of the simplified computing channel and calculate the average processor idle ratio; Get the number of pending optical path calculation requests of the physical optics operation channel; The product of the average processor idle ratio and the number of grid units is defined as the value of transferable computing resources; Calculate the number of newly added threads based on the value of transferable computing resources and the standard value of single-thread computing capacity; Assign new threads to the critical ray path calculation task in the cross-region precise calculation area.

9. The 3D animation real-time rendering optimization method based on physical rendering according to claim 1, characterized in that: The specific method of removing the marking status of the cross-region precise calculation zone is: Establish a continuous frame scanning queue for the high-energy sudden change light source list; Collecting a sequence of instantaneous measured values ​​of the light source within a preset stability determination window; When the maximum instantaneous measured value of the sequence is continuously lower than the set threshold, the stable state light source is marked; Count the proportion of stable light sources and trigger a release command when the proportion exceeds a preset critical point; Send a region unsealing signal to the cross-region precise computing area and reclaim the allocated additional computing threads.

10. A 3D animation real-time rendering optimization system based on physical rendering, characterized by: include: High-energy sudden change light source scanning module, which scans the light intensity change rate of all light sources in the current 3D scene and generates a list of high-energy sudden change light sources; A light path correlation marking module, which tracks the actual propagation path of the light sources in the high-energy mutation light source list, marks the light path correlation of the illuminated object, and generates a structure nested list; A precise calculation area delineation module dynamically delineates cross-region precise calculation areas based on the structure nested list and generates closed contour data; A physical optics operation module activates a physical optics operation channel for the cross-region precise calculation area corresponding to the closed contour data, and performs complete light reflection and refraction calculations; A low-frequency stable area recognition module is configured to synchronously detect a background space set in the scene excluding the cross-region precise calculation area and identify a low-frequency stable illumination area; A simplified operation channel activation module activates a simplified operation channel for the low-frequency stable illumination area, uses a spatial dimension reduction projection model for processing, and generates a simplified light field distribution data array; A resource dynamic injection module injects the computing power released by the simplified computing channel into the physical optical computing channel in real time; The marking state releasing module releases the marking state of the cross-region precise calculation zone when monitoring that the light intensity change rate of the light sources in the high-energy sudden change light source list returns to a stable value range.

Citation Information

Patent Citations

  • Cone tracing dynamic global illumination method based on cascaded texture

    CN108537869A

  • Illumination rendering method and device, computer equipment and storage medium

    CN112927341A