Methods and systems for optimizing film and animation materials for real-time rendering
By acquiring and analyzing film and animation material data, generating a set of material features, and dynamically adjusting rendering parameters, the problem of poor rendering effects in existing real-time rendering technologies is solved, achieving efficient and flexible rendering effects.
Patent Information
- Application Number
- CN202510605036.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-12
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2045-05-12
AI Technical Summary
Existing real-time rendering technologies lack systematic analysis and flexibility when processing film and animation materials, resulting in poor rendering effects, color deviations, and unsatisfactory lighting effects, failing to meet the rendering needs of complex scenes.
By acquiring the material data set of the target scene, multi-level feature extraction is performed to generate a material feature set and a rendering-related feature set. These are then matched to generate an optimization strategy set, and rendering parameters are dynamically adjusted to achieve real-time rendering of the material unit.
It improves the quality and realism of rendered images, enhances rendering efficiency and flexibility, and can adaptively optimize based on material characteristics to meet the rendering needs of complex scenes.
Smart Images

Figure CN120612400B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of film and animation rendering technology, and more specifically, to a method and system for optimizing film and animation materials for real-time rendering. Background Technology
[0002] In the field of film and animation production, real-time rendering technology is crucial for improving production efficiency and enabling immediate feedback. Traditional film and animation rendering methods typically employ offline rendering, which, while capable of generating high-quality visuals, is extremely time-consuming and cannot meet the demands of real-time interaction and rapid iteration. With the development of real-time rendering technology, its application in film and animation production is becoming increasingly widespread.
[0003] However, existing real-time rendering technologies have many problems when processing materials in film and animation. On the one hand, the processing of material data for the target scene lacks a systematic approach; often, the material data is simply applied directly to the rendering without in-depth analysis and mining. This material data contains a large number of basic material properties and rendering effect properties, but existing technologies have failed to effectively integrate and utilize this information, resulting in rendering effects that are difficult to achieve the desired state.
[0004] On the other hand, existing real-time rendering methods typically use fixed parameter settings or manual adjustments based on experience when determining rendering parameters. This approach lacks flexibility and specificity, and cannot dynamically optimize according to the characteristics of different materials and the specific needs of the target scene. When encountering complex materials and diverse scenes, the rendering results are prone to distortion, color deviation, and poor lighting effects, seriously affecting the visual quality of film and animation. Summary of the Invention
[0005] In view of the aforementioned problems, and in conjunction with the first aspect of the present invention, the present invention provides a method for optimizing film and television animation materials for real-time rendering, the method comprising:
[0006] Obtain a set of material data for the target scene. The set of material data includes multiple material units, each of which consists of at least one basic material attribute and a corresponding rendering effect attribute.
[0007] Multi-level feature extraction is performed on the material data set to generate a material feature set and a rendering-related feature set for each material unit;
[0008] The material feature set and the rendering associated feature set are matched to generate an optimization strategy set for the material unit;
[0009] The rendering parameter set of the material unit is dynamically adjusted according to the set of optimization strategies to generate the adjusted rendering parameter set.
[0010] Real-time rendering operations are performed based on the adjusted set of rendering parameters to output the rendered image of the target scene.
[0011] In another aspect, the present invention also provides a film and animation material optimization system for real-time rendering, including a processor and a machine-readable storage medium connected to the processor. The machine-readable storage medium is used to store programs, instructions or code, and the processor is used to execute the programs, instructions or code in the machine-readable storage medium to implement the above-mentioned method.
[0012] Based on the above, this invention acquires and merges material datasets of the target scene, performs multi-level feature extraction, generates a material feature set and a rendering-related feature set, and then obtains an optimization strategy set through matching processing. This optimizes the rendering parameter set of the material unit dynamically, and finally performs real-time rendering operations based on the adjusted rendering parameter set to output the rendered image. This achieves a systematic optimization of real-time rendering of film and animation materials. By deeply exploring the correlation between material data and rendering effects, it avoids the problems of poor rendering effects and low efficiency caused by the lack of targeted optimization strategies in traditional real-time rendering, greatly improving the quality and realism of the rendered image and enhancing the visual expressiveness of the target scene. At the same time, the dynamic adjustment of the rendering parameter set enables the rendering process to adaptively optimize according to the material characteristics, significantly improving the efficiency and flexibility of real-time rendering. Attached Figure Description
[0013] Figure 1 This is a schematic diagram of the execution flow of the film and television animation material optimization method for real-time rendering provided in the embodiments of the present invention.
[0014] Figure 2 This is a schematic diagram of exemplary hardware and software components of a film and animation material optimization system for real-time rendering provided in an embodiment of the present invention. Detailed Implementation
[0015] The present invention will now be described in detail with reference to the accompanying drawings. Figure 1 This is a flowchart illustrating a method for optimizing film and animation materials for real-time rendering, provided by an embodiment of the present invention. The following is a detailed description of this method for optimizing film and animation materials for real-time rendering.
[0016] Step S110: Obtain the material data set of the target scene. The material data set includes multiple material units, and each material unit consists of at least one basic material attribute and a corresponding rendering effect attribute.
[0017] In the real-time rendering workflow of film and animation, the first step is to obtain a set of material data for the target scene. Taking the indoor hall scene of a futuristic sci-fi city as an example, in order to obtain the material data set for the indoor hall scene, data needs to be collected from multiple aspects.
[0018] First, 3D modeling software stores a large amount of basic information during scene creation. When creating an indoor lobby of a futuristic sci-fi city, various objects in the scene, such as the lobby's walls, floors, pillars, and display stands, are typically constructed using 3D modeling tools (such as 3ds Max and Maya). The geometry of these objects is precisely defined, and they are also given preliminary material information. From a file perspective, this information is saved in the standard 3D model file formats commonly used in relevant technologies (such as FBX and OBJ).
[0019] For each object's corresponding material unit, the basic material properties reflect its essential characteristics. Taking the metal wall material unit of the hall as an example, the basic material properties include parameters in multiple dimensions. In terms of microstructure, the crystal structure of the metal affects its surface properties; parameters such as grain size and crystal orientation distribution can be obtained through measurement. From an optical perspective, the reflectivity of the metal is a key parameter, reflecting its ability to reflect light. Reflectivity varies with factors such as the wavelength of light and the angle of incidence, so it needs to be measured under different experimental conditions. Furthermore, the refractive index of the metal also affects the propagation of light within it, requiring determination through conventional optical experiments using relevant techniques. In terms of physical properties, parameters such as the metal's density and hardness also affect its rendering performance.
[0020] Rendering effect attributes are the visual effects parameters that manifest during the actual rendering process. For a metal wall material unit, its rendering effect will vary greatly under different lighting conditions. When illuminated by a point light source, the wall surface will produce highlights. The intensity, size, and shape of the highlights depend on the intensity and position of the light source, as well as the reflective properties of the metal. The distribution of shadows is also an important component of rendering effect attributes, and it is affected by the position of the light source, the shape of the object, and the surrounding environment. Color transitions reflect the color changes of the wall in different illuminated areas, such as the color gradient from light to dark.
[0021] To obtain these basic material properties and rendering effect properties, a series of measurement and analysis tools are required. For measuring optical properties, a spectrophotometer can be used to measure reflectivity and transmittance at different wavelengths. For analyzing the microstructure, a scanning electron microscope (SEM) can be used to observe the grain structure of the metal surface. Regarding obtaining rendering effect properties, test renderings under different lighting conditions in a virtual environment can be performed, and then the rendering results can be analyzed and extracted.
[0022] By collecting and organizing the basic material properties and rendering effects of all objects in the interior lobby scene of a futuristic sci-fi city, a complete material dataset can be obtained. This material dataset is stored in a structured manner, such as using a database for management, and each material unit has a unique identifier for easy subsequent processing and querying.
[0023] Step S120: Perform multi-level feature extraction on the material data set to generate a material feature set and a rendering-related feature set for each material unit.
[0024] Multi-level feature extraction is a key step in deeply mining the potential information in material datasets. This step can transform the original material data into a more representative and usable set of features.
[0025] Step S121: Perform physical property analysis on the basic material properties in the material unit to generate a first feature set, which includes a reflection feature subset, a transmission feature subset, and a surface texture feature subset.
[0026] Taking the glass display stand material unit in the indoor hall of a futuristic sci-fi city as an example, we analyze the physical properties of its basic material attributes.
[0027] The generation of a subset of reflection features is based on the reflectivity of glass. The reflectivity of glass is a complex parameter, related not only to its composition but also to the incident angle and wavelength of the light. To obtain the subset of reflection features, the reflectivity of the glass needs to be measured at multiple wavelengths and incident angles. This can be done using a spectrometer and an angle-adjustable light source. The reflectivity of glass exhibits different trends for different wavelengths of light. For example, in the visible light range, glass may have high reflectivity for certain wavelengths and low reflectivity for others. By collecting a large amount of reflectivity data, a reflectivity matrix can be constructed, where rows represent different wavelengths and columns represent different incident angles. This reflectivity matrix is the core of the subset of reflection features. Furthermore, the polarization characteristics of the reflection are also an important component of the subset of reflection features. A polarimeter can be used to measure the polarization state of the light reflected from the glass. Combining this polarization information with the reflectivity matrix yields a more complete subset of reflection features.
[0028] The generation of the transmission feature subset is closely related to the light transmittance of the glass. The transmittance of glass is also affected by wavelength and glass composition. To measure transmittance, a transmission spectrometer can be used, which measures the intensity of light of different wavelengths after passing through the glass. By comparing the incident light intensity and the transmitted light intensity, the transmittance of the glass at different wavelengths can be calculated. Furthermore, the refraction and scattering of light within the glass also need to be considered. Refraction can be described by measuring the refractive index of the glass, which can be measured using a refractometer. Scattering, due to the microscopic inhomogeneities within the glass, needs to be described by measuring the scattering coefficient. The scattering coefficient can be measured using a scattering meter. Integrating information such as transmittance, refractive index, and scattering coefficient yields the transmission feature subset.
[0029] The generation of the surface texture feature subset is based on the microstructure of the glass display stand surface. Even if the glass surface appears smooth, it may actually contain some tiny imperfections, scratches, or textures. Atomic force microscopy (AFM) can be used to measure the microscopic morphology of the glass surface. AFM provides very high-resolution images of the surface topography, and by analyzing these images, feature information about the surface texture can be extracted. For example, parameters such as surface roughness, texture orientation, and frequency can be calculated. These parameters constitute the main content of the surface texture feature subset. Furthermore, optical methods can also be used to measure surface texture, such as inferring surface texture features by measuring the scattering pattern of reflected light.
[0030] Step S122: Perform optical response analysis on the rendering effect attributes to generate a second feature set, which includes a subset of lighting interaction features, a subset of shadow distribution features, and a subset of color transition features.
[0031] Optical response analysis was performed on the rendering effect properties of the glass display stand material unit in the indoor hall of a futuristic sci-fi city.
[0032] The generation of the lighting interaction feature subset needs to consider the interaction between lighting and the glass display stand. In the scene, there may be various types of light sources, such as point lights, spotlights, and ambient light. First, the parameters of each light source need to be determined, such as its position, intensity, and color. Then, ray tracing algorithms are used to simulate the propagation path of light in the scene. When light shines on the glass display stand, phenomena such as reflection, refraction, and transmission occur. By recording information such as the direction and intensity of light reflection and refraction, the interaction of light on the glass surface can be obtained. For example, for a glass display stand illuminated by a point light source, the intensity and direction of reflected light at different locations on the glass surface, as well as the propagation path and exit direction of refracted light inside the glass, can be calculated. Organizing and analyzing this information yields the lighting interaction feature subset. Furthermore, dynamic changes in lighting, such as the flickering or movement of the light source, can be considered. By performing ray tracing simulations at different points in time, the dynamic characteristics of lighting interaction can be obtained.
[0033] The generation of the shadow distribution feature subset is based on the shadows cast by the glass display stand under illumination. Shadow mapping techniques can be used to generate the shadow map. First, the scene is rendered from the light source's perspective, recording the distance of each pixel to the light source. Then, during actual rendering, each point in the scene is compared with its corresponding point in the shadow map. If the distance from that point to the light source is greater than the distance recorded in the shadow map, then that point is in shadow. By analyzing the shadow map, information such as the shape, size, and position of the shadows can be obtained. For glass display stands, due to their translucency, the shadow distribution is relatively complex. Some shadows may be faint, or light may pass through. These special cases require detailed analysis and recording, integrating various shadow feature information to obtain the shadow distribution feature subset.
[0034] Generating a subset of color transition features requires analyzing the color changes of the glass display stand under different lighting conditions. Color space conversion techniques can be used to convert the glass's color under different lighting conditions to a unified color space, such as the RGB color space. In practice, the glass display stand can be rendered under different lighting conditions, and the color value of each pixel can be extracted. Visualizing and analyzing these color values in the RGB color space allows observation of color change trends. For example, during the transition from light to dark areas, the color may gradually deepen, possibly accompanied by changes in hue. Color histograms can be used to describe the color distribution. By comparing and analyzing color histograms under different lighting conditions, characteristic information about color transitions can be obtained, such as the direction and speed of color gradation. Integrating this characteristic information yields the subset of color transition features.
[0035] Step S123: Perform cross-level correlation analysis on the first feature set and the second feature set to generate the material feature set of the material unit.
[0036] After obtaining the first and second feature sets, cross-level correlation analysis needs to be performed on them to generate the material feature set of the material unit. Taking the glass display stand material unit in the indoor hall of a futuristic sci-fi city as an example, the specific correlation analysis process is as follows:
[0037] Step S1231: Perform energy analysis on the reflection feature subset and the illumination interaction feature subset to generate reflection energy distribution features.
[0038] The reflection feature subset contains reflectivity information of the glass at different wavelengths and incident angles, while the illumination interaction feature subset contains the reflection and refraction of light on the glass surface. To generate the reflected energy distribution characteristics, these two subsets need to be correlated. First, based on the illumination intensity and direction information in the illumination interaction feature subset, the energy distribution of light illuminating the glass surface is determined. Then, the reflectivity from the reflection feature subset is applied to the light energy distribution. Specifically, for each combination of wavelength and incident angle, the corresponding reflectivity is multiplied by the light energy in that direction to obtain the reflected light energy. By calculating for all wavelengths and incident angles, the distribution of reflected energy in different directions and wavelengths can be obtained. This distribution is the reflected energy distribution characteristic. During the calculation, the polarization characteristics of the light need to be considered, as the reflectivity of light may differ in different polarization directions. The reflected energy can be corrected based on the polarization information in the reflection feature subset.
[0039] Step S1232: Perform ray tracing simulation processing on the transmission feature subset and the shadow distribution feature subset to generate transmission path optimization features.
[0040] The transmission feature subset contains information such as the glass's transmittance, refractive index, and scattering coefficient, while the shadow distribution feature subset contains the shadow distribution of the glass display stand under illumination. Ray tracing simulation can optimize the light propagation path inside the glass. First, the incident position and direction of the light on the glass surface are determined based on the shadow distribution feature subset. Then, information such as the refractive index and scattering coefficient from the transmission feature subset is used to simulate the propagation of light inside the glass. During the simulation, if the light propagation path leads to unreasonable shadow areas, such as shadows that are too dark or too light, the light propagation path can be optimized by adjusting the transmission parameters. For example, if the shadow in a certain area is too dark, the transmittance of that area can be appropriately increased to allow more light to pass through the glass. Through continuous adjustment and simulation, the optimized light propagation path information is obtained; this light propagation path information is the transmission path optimization feature.
[0041] Step S1233: Perform multi-channel frequency domain decomposition processing based on discrete cosine transform on the subset of surface texture features and the subset of color transition features to extract low-frequency primary color information and high-frequency texture details, and generate texture frequency domain consistency features that match the frequency band energy distribution.
[0042] The surface texture feature subset contains microscopic texture information of the glass surface, while the color transition feature subset contains information on the color changes of the glass under different lighting conditions. Multi-channel frequency domain decomposition processing based on Discrete Cosine Transform (DCT) can transform these two subsets into the frequency domain for analysis. First, the surface texture feature subset and the color transition feature subset are subjected to DCT transformation respectively. DCT transformation decomposes an image or feature data into components of different frequencies; low-frequency components represent primary color information, and high-frequency components represent texture details. Then, the low-frequency and high-frequency components are analyzed separately. For the low-frequency components, primary color information, such as the average color value and standard deviation, is extracted. For the high-frequency components, texture detail information, such as texture frequency and direction, is extracted. By analyzing and matching the energy distribution of the low-frequency and high-frequency components, they are made consistent across frequency bands. For example, if the energy of the low-frequency components is mainly concentrated in a certain frequency band, then the energy of the high-frequency components should also have a reasonable distribution in the corresponding frequency band. The consistency feature obtained through this matching process is the texture frequency domain consistency feature.
[0043] Step S1234: Standardize and align the reflection energy distribution features and texture frequency domain consistency features to generate fused features. Perform parameter boundary verification on the transmission path optimization features through a physical optical constraint model to generate effective state features. Perform dynamic weighted fusion on the fused features and effective state features to generate the material feature set of the material unit. The material feature set includes surface optical joint features and dynamic response features that conform to physical material specifications.
[0044] Standardizing and aligning the reflection energy distribution feature and the texture frequency domain consistency feature ensures consistency in both numerical range and dimension. Normalization methods can be used to normalize the numerical ranges of both features to between 0 and 1. Then, they are concatenated or weighted to obtain the fused feature. The specific weighting coefficients can be adjusted according to the actual situation; for example, if the reflection energy distribution feature has a greater impact on the visual effect of the material, it can be given a higher weight.
[0045] The transmission path optimization features are validated using a physical optics constraint model. This model, based on physical optics principles, defines reasonable ranges for transmission parameters. For example, transmittance cannot exceed 1, and refractive index must fall within a certain physical range. When validating the transmission path optimization features, the transmission parameters are checked to ensure they are within reasonable ranges. If a parameter exceeds the boundary, it can be adjusted to the boundary value or corrected. The resulting features after validation are the valid state features.
[0046] Finally, the fused features and effective state features are dynamically weighted and fused. Dynamic weighted fusion refers to adjusting the weights of the fused features and effective state features according to different scenarios and requirements. For example, in some scenarios, surface optical joint features (represented by fused features) are more important and can be given higher weights; while in other scenarios, dynamic response features (represented by effective state features) are more critical and can be given higher weights. Through this dynamic weighted fusion, the generated material feature set includes both surface optical joint features conforming to physical material specifications and dynamic response features, enabling a more comprehensive description of the characteristics of material units.
[0047] Step S124: Traverse the spatial distribution relationship between all material units in the material data set to generate a spatial association feature set between the material unit and its adjacent material units.
[0048] In the indoor lobby scene of a futuristic sci-fi city, the spatial distribution relationship between material units has a significant impact on the rendering effect. In order to generate a set of spatial association features between material units and their adjacent material units, it is necessary to traverse and analyze the spatial positions of all material units in the material dataset.
[0049] First, obtain the position information of each material unit in 3D space. This position information can be extracted from the 3D model file; each material unit corresponds to an object with its coordinates in the scene. Then, based on this position information, determine the adjacent material units for each material unit. A distance threshold can be set to determine whether two material units are adjacent. For example, if the distance between two material units is less than the set threshold, they are considered adjacent.
[0050] For adjacent material units, it is necessary to analyze their spatial relationship characteristics. For example, the light propagation path characteristic is an important spatial relationship characteristic. When a material unit is illuminated, the light may be reflected or refracted onto adjacent material units, thus affecting the lighting effect of adjacent material units. Ray tracing algorithms can be used to simulate the propagation path of light between adjacent material units, recording information such as the number of reflections and refractions, direction, and intensity of the light. This information constitutes the main content of the light propagation path characteristic.
[0051] Texture continuity is also an important component of spatial correlation features. The textures of adjacent material units should exhibit a certain degree of continuity; otherwise, visual disharmony will occur. Texture continuity can be analyzed by comparing subsets of surface texture features of adjacent material units. For example, check whether parameters such as texture direction, frequency, and roughness of adjacent material units are similar. If the differences are significant, the texture can be adjusted to ensure continuity.
[0052] By traversing and analyzing the spatial distribution relationships among all material units, and integrating spatial correlation features such as light propagation path characteristics and texture continuity characteristics, a set of spatial correlation features between material units and adjacent material units can be obtained.
[0053] Step S125: The spatial association feature set and the material feature set are fused to generate the rendering association feature set, wherein the rendering association feature set includes the light propagation path features and texture continuity features between material units.
[0054] The purpose of fusing the spatial association feature set and the material feature set is to combine the characteristics of the material unit itself with the association information of adjacent material units to generate a more comprehensive rendering association feature set.
[0055] In the fusion process, a weighted fusion method can be used. First, different weights are assigned to the spatially related feature set and the material feature set. The weights can be adjusted according to the actual situation. For example, if the light propagation and texture continuity between adjacent material units have a greater impact on the rendering effect, the spatially related feature set can be given a higher weight; conversely, if the characteristics of the material unit itself are more important, the material feature set can be given a higher weight.
[0056] For the light propagation path features and texture continuity features in the spatial correlation feature set, and the surface optical joint features and dynamic response features in the material feature set, weighted calculations are performed separately. For example, for the light propagation path features, a weighted combination is made with the reflection energy distribution features in the material feature set to obtain a comprehensive light-related feature. For the texture continuity features, a weighted combination is made with the texture frequency domain consistency features in the material feature set to obtain a comprehensive texture-related feature.
[0057] The weighted features are then concatenated to generate a rendering-related feature set. This set includes light propagation path features and texture continuity features between material units, while also incorporating the characteristics of the material units themselves, providing richer and more accurate information for subsequent rendering optimization.
[0058] Step S130: Match the material feature set with the rendering associated feature set to generate an optimization strategy set for the material unit.
[0059] Matching the material feature set with the rendering-related feature set is to find the optimization direction and strategy for the material unit in the rendering process.
[0060] Step S131: Perform feature decoupling processing on the material feature set to generate a core feature subset and an auxiliary feature subset.
[0061] Taking the material unit of a glass display stand in the indoor hall of a futuristic city as an example, we perform feature decoupling on its material feature set. The material feature set includes information from multiple aspects, such as surface optical joint features and dynamic response features. The core feature subset refers to those features that play a key role in the material's main visual effects and physical properties. For the glass display stand, the reflection energy distribution feature and transmission path optimization feature are likely important components of the core feature subset. The reflection energy distribution feature determines the glass's reflection effect under illumination, while the transmission path optimization feature affects the glass's light transmission effect and shadow distribution, directly determining the glass display stand's main visual appearance in the scene.
[0062] Auxiliary feature subsets are those features that assist and complement the visual effect of a material. For glass display stands, texture frequency domain consistency features may fall into the auxiliary feature subset. Although they also affect the appearance of the glass, their impact on the main visual effect is relatively small compared to reflection and transmission features. Texture frequency domain consistency features mainly affect the texture details and color transition smoothness of the glass surface, enhancing the realism and texture of the glass, but they are not the key factors determining the basic visual characteristics of the glass.
[0063] When performing feature decoupling, it's necessary to divide the feature set into core and auxiliary subsets based on the material's physical properties and the importance of its visual effects. This can be achieved by analyzing numerous rendering experiments to observe the impact of each feature on the final rendering result, thus determining the feature's importance level. For example, by changing the parameters of the reflection energy distribution feature, one can observe the changes in the highlights and reflections of glass in the rendered image; similarly, by changing the parameters of the transmission path optimization feature, one can observe the changes in the light transmission and shadow effects of glass. Based on these experimental results, features with a significant impact on the rendering effect are classified as the core feature subset, while features with a smaller impact are classified as the auxiliary feature subset.
[0064] Step S132: Perform spatial topology analysis on the rendering associated feature set to generate a spatial dependency feature subset.
[0065] In the indoor lobby scene of a futuristic sci-fi city, the rendering-related feature set contains information such as the light propagation path characteristics and texture continuity characteristics between material units. Spatial topology analysis is performed on the rendering-related feature set to uncover the spatial dependencies between material units.
[0066] First, a spatial topology graph needs to be constructed to represent the spatial relationships between material units. Taking a glass display stand as an example, it can be considered a node in the graph, and adjacent material units (such as surrounding walls, floors, etc.) can also be considered nodes. The edges between nodes represent their spatial relationships, and the weight of the edges can be determined based on the characteristics of light propagation paths and texture continuity. For example, if the light propagation between two material units is relatively strong, or if the texture continuity is good, then the weight of the edge between them will be relatively large.
[0067] Then, graph analysis algorithms are used to analyze the spatial topology. For example, shortest path algorithms can be used to find the shortest light propagation paths between material units, which reflects the directness of the light influence between material units. Clustering algorithms can also be used to group spatially closely related material units into clusters, where the material units within these clusters have strong interdependencies in terms of lighting and texture.
[0068] These analyses allow for the extraction of a subset of spatial dependency features. This subset includes information such as the spatial distance between material units, the directness of light propagation, and the tightness of texture continuity. For example, the spatial dependency features between a glass display stand and an adjacent wall might include the length of the light propagation path, the attenuation coefficient of light intensity, and the degree of texture matching at the boundaries. These features reflect the spatial interactions and dependencies between material units, providing crucial information for subsequent feature matching and optimization.
[0069] Step S133: The core feature subset and the spatial dependency feature subset are processed by feature embedding alignment through a graph neural network to generate topology-aware features of a unified dimension. Then, bidirectional attention matching is performed on the topology-aware features to generate a feature matching weight set containing spatial relationship constraints.
[0070] After obtaining the core feature subset and the spatial dependency feature subset, they need to be processed by feature embedding alignment to generate topology-aware features of a unified dimension.
[0071] First, a Graph Neural Network (GNN) is constructed. A GNN is a type of neural network specifically designed for processing graph-structured data, effectively capturing the relationships between nodes. In this scenario, a core feature subset and a spatial dependency feature subset are used as inputs to the GNN. The core feature subset can be represented as the feature vector of each material unit (node), while the spatial dependency feature subset can be represented as the features of the graph's edges.
[0072] Graph neural networks typically consist of multiple layers, each transforming and aggregating the input features. In the first layer, a subset of core features and a subset of spatial dependency features are fused. This can be done by concatenating the core feature vectors of nodes with the spatial dependency features of edges, followed by a linear transformation through a fully connected layer to obtain new node features. Next, in subsequent layers, graph convolution operations are used to propagate and aggregate information between nodes. Graph convolution operations weight and sum the features of adjacent nodes according to the weights of the edges between nodes, thereby updating the features of each node.
[0073] Through multi-layer processing of a graph neural network, the topology-aware features of each node are finally obtained. These topology-aware features have a unified dimension and contain the core features of the material unit as well as spatial dependency information with neighboring material units.
[0074] Next, bidirectional attention matching is applied to the topology-aware features. The bidirectional attention mechanism allows the model to simultaneously focus on the relationships between different material units and the features of each material unit itself. Specifically, for each material unit's topology-aware feature, an attention score is calculated between it and the topology-aware features of all other material units. The attention score represents the degree of correlation between two material units. This attention score can be calculated using an attention function, such as the dot product attention function.
[0075] After calculating the attention score, it is normalized so that the sum of all attention scores is 1. Then, based on the normalized attention scores, the topology-aware features are weighted and summed to obtain the weighted feature of each material unit. This weighted feature contains information about the influence of other material units on the current material unit, reflecting the constraints of spatial relationships.
[0076] By performing bidirectional attention matching on all material units, a feature matching weight set is obtained. Each element in this feature matching weight set represents the matching weight between different material units, reflecting their degree of correlation under spatial relationship constraints, and will be used for subsequent dynamic weighted fusion processing of auxiliary feature subsets.
[0077] Step S134: Perform dynamic weighted fusion processing on the auxiliary feature subset according to the feature matching weight set to generate the basic set of optimization strategies.
[0078] After obtaining the feature matching weight set, it is used to perform dynamic weighted fusion processing on the auxiliary feature subset. Taking the glass display stand in the indoor hall of a futuristic city as an example, the auxiliary feature subset includes information such as texture frequency domain consistency features.
[0079] First, each weight in the feature matching weight set is associated with its corresponding auxiliary feature. For the glass display stand, the feature matching weights between it and its adjacent material units represent the degree of association between them. These weights are then applied to the subset of auxiliary features, i.e., each auxiliary feature is weighted. For example, if the feature matching weight between the glass display stand and an adjacent wall is large, it indicates a strong association between them. Therefore, when fusing auxiliary features, the relevant auxiliary features of that adjacent wall (such as associated texture continuity auxiliary information) will have a larger weight in the fusion process.
[0080] The specific weighted fusion process can be implemented as follows: For each feature vector in the auxiliary feature subset, multiply it element-wise with its corresponding feature matching weight. Then, concatenate all the weighted feature vectors. The concatenation can be done by simply linking the first and last elements together, combining feature vectors of different dimensions into a longer vector.
[0081] Through this dynamic weighted fusion process, the spatial relationships and correlations between different material units are fully considered in the fusion of auxiliary features. The final generated optimization strategy base set contains the weighted fusion auxiliary feature information, which integrates the auxiliary features of the material unit itself and the correlation information with adjacent material units, providing a richer and more accurate foundation for subsequent optimization strategy generation.
[0082] Step S135: Perform rendering constraint verification on the basic set of optimization strategies to generate an optimization strategy set that meets the real-time rendering performance requirements. The optimization strategy set includes a material parameter adjustment priority sequence and a rendering resource allocation strategy.
[0083] After obtaining the basic set of optimization strategies, it is necessary to perform rendering constraint verification to ensure that the generated optimization strategies meet the real-time rendering performance requirements.
[0084] Step S1351: Obtain the set of hardware performance parameters of the target rendering device, the set of hardware performance parameters including the video memory capacity threshold, computing unit throughput and real-time frame rate requirements.
[0085] In real-time rendering of a futuristic sci-fi city's indoor lobby scene, different rendering devices have varying hardware capabilities. To obtain the set of hardware performance parameters for the target rendering device, relevant information can be retrieved through system calls or interfaces provided by the device driver.
[0086] The video memory capacity threshold refers to the maximum amount of data that a rendering device's video memory can hold. It determines the size of texture, model, and other data that can be stored simultaneously during the rendering process. The video memory capacity threshold can be obtained by consulting the graphics card's technical specifications or using system monitoring tools.
[0087] Computational unit throughput refers to the amount of computational tasks that a rendering device's computational units (such as GPU cores) can complete per unit of time. It reflects the device's computing power. Computational unit throughput can be measured by running benchmark programs. Benchmark programs simulate actual rendering tasks, record the time required for the computational units to complete the tasks, and thus calculate the throughput.
[0088] Real-time frame rate requirement refers to the number of frames per second that need to be displayed during real-time rendering. Different application scenarios have different requirements for real-time frame rates. For example, game scenarios typically require a frame rate of 60 frames per second or higher to ensure smooth gameplay. The real-time frame rate requirement can be determined based on specific application needs.
[0089] Step S1352: Perform memory usage simulation calculations on the material parameter adjustment priority sequence in the basic set of the optimization strategy to generate the first verification result set.
[0090] The material parameter adjustment priority sequence in the optimization strategy base set lists the material parameters that need to be adjusted and their adjustment priorities. To simulate memory usage using this material parameter adjustment priority sequence, it is necessary to analyze the impact of each material parameter adjustment on memory usage.
[0091] For each material parameter, determine the size of its corresponding texture data or other related data. For example, adjusting the reflection texture parameter of a glass display stand may involve loading reflection textures at different resolutions, and this texture data requires a certain amount of video memory. Calculate the required increase in video memory based on the material parameter adjustments.
[0092] Following the priority sequence of material parameter adjustments, the parameters are simulated sequentially, and the video memory usage is accumulated. During the simulation, the total video memory usage after each adjustment and whether it exceeds the video memory capacity threshold are recorded. If the threshold is exceeded, the adjustment is marked as infeasible.
[0093] This simulation generates a first set of verification results. This set contains feasibility information for adjusting each material parameter, such as whether it would cause memory overflow. This information will be used to tailor the subsequent parameter adjustment priority sequence.
[0094] Step S1353: Perform a computational unit load balancing analysis on the rendering resource allocation strategy to generate a second set of verification results.
[0095] The rendering resource allocation strategy specifies how rendering tasks are distributed to computing units (such as GPU cores). Analyzing the computing unit load balancing of this strategy requires considering the computational complexity of each rendering task and the processing power of the computing unit.
[0096] First, each rendering task in the rendering resource allocation strategy is decomposed, and its computational complexity is analyzed. For example, the rendering task of the glass display stand may include sub-tasks such as lighting calculation, texture mapping, and shadow calculation, each with different computational complexity. Based on the computational complexity, the computational resources required for each task are estimated.
[0097] Then, based on the throughput and number of computing units, the rendering tasks are simulated and allocated to each computing unit. During the allocation process, the load on each computing unit is calculated, i.e., the amount of tasks each computing unit needs to handle. If the load on a computing unit is too high, it may cause a performance bottleneck and affect the real-time frame rate.
[0098] By analyzing the load balancing of the computing units, a second set of verification results is generated. This second set of verification results contains information on the rationality of the allocation of each rendering task, such as whether it will lead to overload of a certain computing unit. This information will be used to adjust subsequent rendering resource allocation strategies.
[0099] Step S1354: Based on the comparison results between the first verification result set and the memory capacity threshold, and combined with the dependency analysis of the light propagation path between material units, dynamically trim low-priority items in the material parameter adjustment priority sequence that do not affect the optical continuity of adjacent material units.
[0100] The first set of verification results is compared with the video memory capacity threshold. If adjusting a certain material parameter causes video memory usage to exceed the threshold, and this parameter adjustment is at a low priority level, then it is necessary to consider whether the adjustment item can be removed.
[0101] During the trimming process, the dependency relationship of light propagation paths between material units is analyzed. If adjusting a certain material parameter does not affect the optical continuity of adjacent material units, that is, it will not have a significant impact on the lighting effects and visual performance of adjacent material units, then it can be trimmed as a low-priority item. For example, for a minor texture parameter adjustment of a glass display stand, if it does not affect the lighting and visual effects of adjacent walls, and the adjustment would lead to excessive video memory usage, then it can be removed from the material parameter adjustment priority sequence.
[0102] Through dynamic trimming, an optimized material parameter adjustment priority sequence is obtained, which can meet the requirements of the video memory capacity threshold and ensure the optical continuity between material units.
[0103] Step S1355: Based on the matching degree between the second verification result set and the throughput of the computing unit, adjust the task scheduling granularity and parallel execution order in the rendering resource allocation strategy using the task dependency graph.
[0104] The second set of verification results is matched with the throughput of the computing units. If the load of a certain computing unit is too high, it indicates that the current rendering resource allocation strategy may be unreasonable and needs to be adjusted.
[0105] Task dependency graphs can be used to adjust the granularity of task scheduling and the order of parallel execution. A task dependency graph represents the dependencies between various rendering tasks; for example, a task can only begin execution after another task has completed. By analyzing the task dependency graph, it can be determined which tasks can be executed in parallel and which tasks need to be executed sequentially.
[0106] If a computing unit experiences excessive load, some of its tasks can be broken down into smaller, more manageable tasks and redistributed to other computing units to achieve load balancing. Simultaneously, based on the task dependency graph, the parallel execution order of tasks can be adjusted to maximize the utilization of computing units without violating task dependencies.
[0107] This adjustment yields an optimized rendering resource allocation strategy that better matches the throughput of computing units, thereby improving the performance of real-time rendering.
[0108] Step S1356: Combine the adjusted material parameter priority sequence with the rendering resource allocation strategy to generate an optimization strategy set that meets the real-time frame rate requirements.
[0109] The process combines a tailored material parameter adjustment priority sequence with a modified rendering resource allocation strategy. The material parameter adjustment priority sequence specifies the material parameters that need to be adjusted during rendering and the order in which they are adjusted, while the rendering resource allocation strategy specifies how rendering tasks are allocated to computation units.
[0110] These two parts are combined to form a complete set of optimization strategies. This set of optimization strategies includes a material parameter adjustment priority sequence and a rendering resource allocation strategy. These strategies work together to ensure that during real-time rendering, both hardware performance constraints (such as memory capacity thresholds and computing unit throughput) and real-time frame rate requirements are met. For example, when rendering a futuristic sci-fi city indoor lobby scene, according to the optimization strategy set, the parameters of material units such as glass display stands are adjusted first according to the material parameter adjustment priority sequence, while the tasks of computing units are rationally allocated according to the rendering resource allocation strategy, thereby achieving efficient and smooth real-time rendering.
[0111] Step S140: Dynamically adjust the rendering parameter set of the material unit according to the optimization strategy set to generate the adjusted rendering parameter set.
[0112] After obtaining the set of optimization strategies, it is necessary to dynamically adjust the set of rendering parameters for the material units based on them in order to generate a set of adjusted rendering parameters that is more suitable for real-time rendering.
[0113] Step S141: Analyze the material parameter adjustment priority sequence in the optimization strategy set to determine the set of parameter update items in the current frame rendering cycle.
[0114] The material parameter adjustment priority sequence in the optimization strategy set lists the material parameters that need to be adjusted and their adjustment priorities. Within the current frame rendering cycle, this material parameter adjustment priority sequence is used to determine which parameters need to be updated.
[0115] First, the material parameter adjustment priority sequence is traversed, and parameters that can be adjusted in this frame are selected based on the rendering requirements and hardware resources of the current frame. For example, if the current video memory capacity is sufficient and the computing unit load is low, more parameters can be adjusted; conversely, if resources are scarce, only higher priority parameters are selected for adjustment.
[0116] For each selected parameter, its parameter name, target adjustment value, and other information are recorded to form a parameter update item set. This parameter update item set contains relevant information for all material parameters that need to be updated within the current frame rendering cycle.
[0117] Step S142: Perform task block processing on the parameter update item set according to the rendering resource allocation strategy to generate a parallel processing task queue.
[0118] The rendering resource allocation strategy specifies how rendering tasks are assigned to computation units. Based on this strategy, the set of parameter update items is processed by task chunking.
[0119] First, analyze the computational complexity and required computational resources for each parameter update item. For example, adjusting the reflectivity parameter of a glass display stand may require complex lighting calculations, while adjusting its color parameter may be relatively simple. Based on computational complexity and resource requirements, divide the parameter update items into different task blocks.
[0120] Then, based on the number of computing units and processing capabilities in the rendering resource allocation strategy, the task blocks are allocated to different computing units. To improve parallel processing efficiency, independent task blocks are allocated to different computing units as much as possible.
[0121] The assigned task blocks are arranged in execution order to form a parallel processing task queue. Each task block in this queue can be executed in parallel on different computing units, thereby improving the efficiency of parameter tuning.
[0122] Step S143: Perform parameter remapping processing on each task block in the parallel processing task queue to generate a subset of local adjustment parameters.
[0123] Step S1431: Obtain the original material parameter range and the target optimization parameter range corresponding to the task block.
[0124] For each task block in the parallel processing task queue, its corresponding original material parameter range and target optimization parameter range need to be determined. Taking a task block of a glass display stand as an example, this task block might be responsible for adjusting the glass's transparency parameter. The original material parameter range refers to the range of values for that parameter before adjustment; for example, the glass transparency might originally be within a specific range. The target optimization parameter range is the range of values that the parameter needs to be adjusted to, based on the target set in the optimization strategy set. The target optimization parameter range can be determined by querying relevant information in the optimization strategy set or based on the rendering effect requirements.
[0125] Step S1432: Based on the reasonable range of reflectivity and refractive index defined by the physical rendering parameter specification, establish a finite-domain nonlinear mapping function from the original material parameter range to the target optimized parameter range.
[0126] Physical rendering parameter specifications define reasonable ranges for parameters such as reflectivity and refractive index. When establishing a mapping function, it's crucial to ensure that the mapped parameter values fall within these reasonable ranges. For the transparency parameter of a glass display stand, according to physical optics principles, the transparency value should range from 0 to 1. By analyzing the characteristics of the original material parameter range and the target optimization parameter range, a finite-domain nonlinear mapping function is established. This finite-domain nonlinear mapping function can be a polynomial function, exponential function, etc., and the specific function form needs to be determined based on the characteristics of the parameters and the mapping requirements. For example, if the goal is to map some values within the original transparency range towards higher transparency, an increasing nonlinear function can be used, allowing lower values in the original range to be mapped closer to higher values in the target range.
[0127] Step S1433: Perform interpolation calculations on the material parameters within the task block under constraints according to the mapping function to generate an intermediate parameter set that conforms to the laws of physical optics.
[0128] After obtaining the mapping function, interpolation calculations are performed on the material parameters within the task block. Interpolation aims to find suitable intermediate values between the original material parameters and the target optimization parameters, making the parameter adjustment process smoother. During the calculation, constraints from physical optics laws must be considered. For example, for the transparency parameter of glass, the interpolation calculation must ensure that the intermediate value does not exceed the physically reasonable transparency range. Linear interpolation, spline interpolation, and other methods can be used for calculation. For each material parameter, based on the mapping function and the current parameter's position within the original interval, the corresponding intermediate parameter value is calculated. For multiple material parameters within a task block, this interpolation calculation is performed sequentially, ultimately obtaining a set of intermediate parameters that conforms to physical optics laws.
[0129] Step S1434: Perform optical correction processing on the intermediate parameter set to eliminate parameter jump anomalies and generate a smooth transition parameter subset.
[0130] After obtaining the intermediate parameter set, there may be instances of abnormal parameter jumps, where the changes between adjacent parameter values are too drastic, leading to unnatural rendering results. To eliminate this anomaly, optical correction processing is required on the intermediate parameter set.
[0131] Optical correction processing can be based on the principles of physical optics, taking into account the interaction between light and materials. Taking the transparency parameter of a glass display stand as an example, if the intermediate transparency parameter values change too much between adjacent values, it may cause obvious abrupt changes in brightness during rendering. This intermediate parameter can be adjusted by analyzing the propagation and attenuation patterns of light in materials with different transparency levels.
[0132] A common approach is to use filtering algorithms, such as Gaussian filtering. Gaussian filtering can smooth the intermediate parameter set, making the changes between adjacent parameter values more gradual. The degree of smoothing can be controlled by adjusting the filter radius and weights. During the filtering process, it is essential to ensure that the parameter values remain within the range allowed by physical optics.
[0133] After optical correction, the abnormal parameter jumps in the intermediate parameter set are eliminated, generating a smooth transition parameter subset. The parameter value changes within this smooth transition parameter subset are more natural, ensuring the continuity and realism of the rendering effect.
[0134] Step S1435: Perform continuity optimization processing on the smooth transition parameter subset and the boundary parameters of adjacent task blocks to generate a local adjustment parameter subset.
[0135] In a parallel processing task queue, each task block may be processed relatively independently, but the parameters between adjacent task blocks need to maintain continuity; otherwise, obvious boundary discontinuities will appear in the rendering result. Therefore, it is necessary to optimize the continuity of the smooth transition parameter subset and the boundary parameters of adjacent task blocks.
[0136] First, determine the boundary parameters of adjacent task blocks. For the transparency parameter task block of the glass display stand, adjacent task blocks might be task blocks responsible for adjusting the transparency of other parts of the glass, or task blocks related to parameters of materials adjacent to the glass. Obtain the parameter values of these adjacent task blocks at their boundaries.
[0137] Then, the smooth transition parameter subset and the boundary parameters of adjacent task blocks are compared and analyzed. If significant discontinuities are found, such as large differences in transparency parameters at the boundaries, interpolation methods can be used for optimization. By interpolating the boundary values of the smooth transition parameter subset and the boundary parameters of adjacent task blocks, a series of transition parameter values are obtained, enabling a smooth transition of parameters at the boundaries.
[0138] Interpolation methods can be linear interpolation or more complex spline interpolation, depending on the requirements for continuity and the characteristics of the parameters. During interpolation, it is essential to ensure that the interpolated parameter values still conform to the laws of physical optics and the requirements of the target optimization parameter range.
[0139] After continuous optimization, a subset of local adjustment parameters is obtained. This subset of local adjustment parameters includes parameters that have undergone optical correction and smooth transition, while also ensuring parameter continuity with adjacent task blocks.
[0140] Step S144: Perform consistency fusion processing on each local adjustment parameter subset according to the spatial distribution order to generate a global adjustment parameter set.
[0141] After obtaining the local adjustment parameter subsets of each task block, they need to be fused in a consistent manner according to their spatial distribution order to generate a global adjustment parameter set.
[0142] In the indoor lobby scene of a futuristic sci-fi city, the subset of local adjustment parameters for each material unit is related to its position in space. First, the spatial position information of each material unit is determined; this information can be obtained from the 3D model file. Based on this spatial position information, the subset of local adjustment parameters is arranged in a predetermined order, such as from left to right, from top to bottom, or according to their distance from the camera.
[0143] During the fusion process, it is essential to ensure consistency among the local adjustment parameter subsets of adjacent material units. Special handling is required for overlapping areas or boundary regions of adjacent material units. For example, for two adjacent glass display stands, the continuity and smooth transition of parameter values at their adjacent boundaries must be guaranteed. A continuity optimization method similar to that in step S1435 can be used to interpolate the parameters at the boundaries, allowing the parameters of adjacent material units to connect naturally at the boundaries.
[0144] Meanwhile, for material units with hierarchical relationships, such as different components inside a glass display stand, they should be reasonably integrated according to their hierarchical structure. For local adjustment parameters of subsets of upper-level components, it may be necessary to comprehensively consider the parameters of lower-level components to ensure the overall rendering effect.
[0145] This consistent fusion process integrates various subsets of local adjustment parameters to generate a global set of adjustment parameters. This global set of adjustment parameters contains the adjusted parameter information for all material units throughout the scene.
[0146] Step S145: Perform rendering pipeline compatibility testing on the global adjustment parameter set to generate an adjusted rendering parameter set that matches the target rendering engine interface.
[0147] After obtaining the global set of adjustment parameters, it is necessary to perform rendering pipeline compatibility testing to ensure that these parameters can match the target rendering engine interface.
[0148] Different rendering engines have different interface specifications and parameter requirements. First, understand the target rendering engine's interface documentation to clarify its requirements for the format, range, and type of rendering parameters. For example, some rendering engines may require reflectivity parameters to be expressed in a format commonly used in the relevant technology, or may have strict limitations on the range of values for transparency parameters.
[0149] Each parameter in the global adjustment parameter set is checked to ensure it meets the requirements of the target rendering engine. If a parameter is found to be non-compliant, it needs to be converted or adjusted accordingly. For example, if the range of the reflectivity parameter in the global adjustment parameter set is inconsistent with the range required by the rendering engine, the parameter value can be converted to the range allowed by the rendering engine using a linear mapping method.
[0150] At the same time, check the correlation and consistency between parameters. Some rendering engines may have specific requirements for the combination of parameters; for example, there may be a certain relationship between reflectivity and refractive index. During the detection process, ensure that the combination of parameters in the global adjustment parameter set meets these requirements.
[0151] For certain parameters, such as texture data, it's necessary to check whether its format and resolution are compatible with the rendering engine. If incompatible, texture compression, format conversion, or other processing may be required.
[0152] After rendering pipeline compatibility testing, the global adjustment parameter set is corrected and adjusted accordingly, generating an adjusted rendering parameter set that matches the target rendering engine interface. The parameters in this set can be directly used by the target rendering engine, providing accurate and effective data support for subsequent real-time rendering operations.
[0153] Step S150: Perform real-time rendering operations based on the adjusted set of rendering parameters to output the rendered image of the target scene.
[0154] After obtaining the adjusted set of rendering parameters, real-time rendering operations can be performed based on these parameters to output the rendered image of the target scene.
[0155] Step S151: Load the adjusted set of rendering parameters into the parameter buffer of the graphics processing unit.
[0156] The Graphics Processing Unit (GPU) is the core hardware for real-time rendering, receiving and processing rendering parameters through a parameter buffer. First, the address and format requirements of the GPU's parameter buffer must be determined. This can be obtained by consulting the GPU's driver documentation or using relevant development libraries.
[0157] The adjusted set of rendering parameters is organized and transformed according to the format requirements of the graphics processing unit parameter buffer. For example, if the parameter buffer requires parameters to be stored in a specific structure, then each parameter in the adjusted set of rendering parameters is arranged according to the order of the structure members.
[0158] The organized set of rendering parameters is loaded into the parameter buffer using interface functions provided by the GPU. These interface functions are typically provided by the GPU manufacturer, such as NVIDIA's CUDA library or AMD's ROCm library. During the loading process, it is crucial to ensure that the parameters are transmitted accurately to avoid data loss or corruption.
[0159] By loading the adjusted set of rendering parameters into the parameter buffer of the graphics processing unit, the necessary data foundation is provided for subsequent rendering calculations.
[0160] Step S152: Dynamically calculate the set of currently visible material units based on the viewpoint position of the scene camera.
[0161] The viewpoint position of the scene camera determines the scene content that can be seen from the current perspective. To improve rendering efficiency, only the currently visible material units need to be rendered.
[0162] First, obtain the viewpoint position and field of view information of the scene camera. This information can be obtained through the scene management system or the camera control module. The viewpoint position represents the camera's coordinates in three-dimensional space, and the field of view includes parameters such as the field of view angle, near clipping plane, and far clipping plane.
[0163] Next, iterate through all material units in the scene, determining whether each material unit is within the camera's field of view. Spatial geometry algorithms, such as ray tracing or bounding box detection, can be used for this determination. For each material unit, calculate its bounding box (e.g., an axis-aligned bounding box) and check if this bounding box intersects with the camera's field of view. If they intersect, the material unit is visible from the current viewpoint.
[0164] All visible material units are collected to form a currently visible material unit set. The material units in this set will be the objects of subsequent rendering operations. By rendering only visible material units, unnecessary calculations can be greatly reduced, improving rendering efficiency.
[0165] Step S153: Perform instantiation rendering instruction generation processing on each material unit in the set of visible material units to generate a multi-threaded rendering instruction queue.
[0166] Step S1531: Generate a subset of geometric transformation instructions based on the spatial location information of the material unit.
[0167] For each material unit in the set of visible material units, its spatial location information determines its specific position and orientation in the scene. Based on this spatial location information, a subset of geometric transformation instructions is generated.
[0168] The spatial position information of a material element includes parameters such as translation, rotation, and scaling. Translation parameters represent the position offset of the material element in 3D space, rotation parameters represent the rotation angle of the material element about a certain axis, and scaling parameters represent the scaling ratio of the material element on each coordinate axis.
[0169] Based on these parameters, corresponding geometric transformation matrices are generated. Translation matrices are used to translate material elements from the origin to a specified position, rotation matrices are used to rotate material elements, and scaling matrices are used to scale material elements. These matrices are multiplied in a predetermined order to obtain the final geometric transformation matrix.
[0170] The geometric transformation matrix is converted into geometric transformation instructions, which tell the graphics processing unit how to transform the geometric data of the material element. For example, the instructions can specify which transformation matrix to use for multiplication of vertex data, thereby realizing the translation, rotation, and scaling of the material element.
[0171] The geometric transformation commands for all material elements are collected into a subset of geometric transformation commands. This subset contains all the commands required to perform geometric transformations on visible material elements.
[0172] Step S1532: Generate a subset of material binding instructions based on the adjusted set of rendering parameters.
[0173] The adjusted set of rendering parameters includes various rendering parameters for each material unit, such as reflectivity, transparency, and texture. Based on these parameters, a subset of material binding instructions is generated.
[0174] For each material unit, determine its corresponding rendering parameters. For example, for a glass display stand, obtain parameters such as reflectivity, transparency, and glass texture from the adjusted set of rendering parameters.
[0175] These parameters are then converted into material binding instructions. Material binding instructions tell the graphics processing unit which material parameters to apply to the corresponding material unit. For example, instructions can specify binding a texture file to the texture sampler of a material unit, or set specific reflectivity and transparency values as properties of the material unit.
[0176] Collect all material binding commands from all material units to form a subset of material binding commands. This subset contains all the commands required to materialize visible material units.
[0177] Step S1533: Generate a subset of shader configuration instructions based on scene lighting conditions.
[0178] Scene lighting conditions have a significant impact on the rendering effect of material units. A subset of shader configuration instructions is generated based on the scene lighting conditions.
[0179] First, determine the lighting type and parameters in the scene. A scene may contain various lighting types such as point lights, spotlights, and ambient light. Each lighting type has its specific parameters, such as the position, intensity, and color of the light source.
[0180] Choose the appropriate shader program based on the type and parameters of lighting. Different lighting conditions may require different shader programs to calculate lighting effects. For example, for point lights, a point light shader may be needed to calculate light intensity and shadows; for ambient light, an ambient light shader may be needed to calculate global illumination effects.
[0181] Generate shader configuration instructions, which tell the graphics processing unit which shader program to use and how to configure the shader parameters. For example, instructions can specify that the position and intensity of the light source be passed to the corresponding variables in the shader program for lighting calculations.
[0182] All lighting-related shader configuration instructions are collected into a subset. This subset contains all the shader configuration instructions required for lighting calculations on visible material units.
[0183] Step S1534: Combine the subset of geometric transformation instructions, the subset of material binding instructions, and the subset of shader configuration instructions according to the rendering pipeline stage order to generate instantiation rendering instructions for a single material unit.
[0184] After obtaining the subsets of geometric transformation instructions, material binding instructions, and shader configuration instructions, they need to be combined in the order of the rendering pipeline stages to generate instantiation rendering instructions for a single material unit.
[0185] The rendering pipeline typically includes stages such as vertex processing, primitive assembly, rasterization, and fragment processing. Geometric transformation commands mainly operate in the vertex processing stage, used to transform the vertex data of material units; material binding commands operate in the fragment processing stage, used to bind corresponding material parameters to material units; and shader configuration commands have an impact throughout the entire rendering process, used to configure the parameters of the shader program.
[0186] Following the order of the rendering pipeline stages, geometric transformation instructions, material binding instructions, and shader configuration instructions are arranged sequentially. For example, geometric transformation instructions are executed first to transform vertex data, then primitive assembly is performed, followed by material parameter binding, and finally, the configured shader program is used for fragment processing.
[0187] These instructions are combined to form the instantiation rendering instructions for a single material unit. This instantiation rendering instruction contains all the steps and parameters required to fully render that material unit.
[0188] Step S1535: Divide the instantiated rendering instructions into tasks according to the number of cores of the graphics processing unit, and generate a multi-threaded rendering instruction queue that matches the computing resources.
[0189] Graphics processing units typically have multiple computing cores. To fully utilize the computing power of these cores, it is necessary to divide the instantiation rendering instructions into tasks and generate a multi-threaded rendering instruction queue.
[0190] First, understand the number of cores in the graphics processing unit (GPU) and the processing power of each core. This information can be obtained by consulting the GPU's technical specifications or using system monitoring tools.
[0191] Based on the number of cores, instantiation rendering instructions are divided according to predefined rules. For example, they can be divided evenly according to the number of material units, with the instantiation rendering instructions for each material unit assigned to different cores for processing; or they can be divided according to the complexity of the rendering task, assigning more complex tasks to cores with stronger processing capabilities.
[0192] The tasks are divided and arranged in execution order to form a multi-threaded rendering instruction queue. Each task in the queue corresponds to a thread, and these threads can be executed in parallel on different cores of the graphics processing unit, thereby improving rendering efficiency.
[0193] Step S154: Execute the rendering instructions in the multi-threaded rendering instruction queue in parallel through the asynchronous computing pipeline. After generating a set of block rendering results, detect the texture continuity and lighting consistency between adjacent task blocks and perform interpolation transition processing on the boundary areas.
[0194] After generating a multi-threaded rendering instruction queue, the rendering instructions in the queue are executed in parallel through an asynchronous compute pipeline. The asynchronous compute pipeline allows the graphics processing unit to perform other operations, such as data transfer and preprocessing, while executing rendering instructions, thereby improving overall computational efficiency.
[0195] Each thread is responsible for executing the rendering instructions for one task block, rendering a portion of the material units in the visible material unit set. During parallel execution, each thread operates independently, performing rendering calculations simultaneously.
[0196] After a period of computation, each thread completes the rendering of its task block, generating a set of block rendering results. Each element in this set of block rendering results corresponds to the rendering result of a task block, which may be a partially rendered image or a set of rendering data.
[0197] After obtaining the set of tiled rendering results, it is necessary to check the texture continuity and lighting consistency between adjacent task tiles. Since each task tile is rendered independently, there may be texture discontinuities or inconsistent lighting between adjacent task tiles, which will cause obvious boundaries in the rendered image.
[0198] For texture continuity detection, texture data at the boundaries of adjacent task blocks can be compared. If significant discontinuities are found in the texture, such as abrupt changes in color or pattern at the boundary, interpolation can be used for transition processing. By performing interpolation calculations between texture data at the boundary, a series of transitional texture data is generated, allowing the texture to transition smoothly at the boundary.
[0199] For detecting lighting consistency, the lighting intensity and color at the boundaries of adjacent task blocks can be compared. If inconsistencies in lighting are found, such as stronger lighting at the boundary of one task block and weaker lighting at the boundary of adjacent task blocks, a smooth transition in lighting can be achieved by adjusting lighting parameters or performing lighting interpolation.
[0200] By performing interpolation transition processing on the boundary areas, discontinuities between adjacent task blocks are eliminated, improving the overall quality of the rendered image.
[0201] Step S155: Perform color space conversion and temporal anti-aliasing-based blending on the block rendering result set after interpolation transition processing to generate the final rendered image data stream.
[0202] After interpolating and transitioning the block rendering result set, it is necessary to perform color space conversion and temporal anti-aliasing-based blending to generate the final rendered image data stream.
[0203] Color space conversion is used to transform rendered results from one color space to another to meet the requirements of display devices. Common color spaces include RGB and YUV. First, determine the color space supported by the target display device, and then convert the color data in the block rendering result set from the current color space to the target color space according to the conversion formula.
[0204] Temporal anti-aliasing (TAA) is a blending process designed to eliminate jagged edges in rendered images and improve image smoothness. TAA is a time-based anti-aliasing method that reduces jagged edges by blending across multiple frames.
[0205] For each rendered block, its state in different frames is recorded. In the current frame, the rendered block of the current frame is weighted and mixed with the corresponding rendered blocks of the previous few frames. The weighting coefficients can be adjusted according to the time interval and changes in the scene. For example, for areas with less change, the rendered results of the previous few frames can be given higher weights; for areas with greater change, the rendered result of the current frame can be given higher weights.
[0206] By combining color space conversion and temporal anti-aliasing, the fragmented rendering results are integrated into a single final rendered image data stream. This final rendered image data stream contains optimized and processed rendered image information.
[0207] Step S156: Output the final rendered image data stream to the display device for image presentation.
[0208] After generating the final rendered image data stream, it is output to the display device for image presentation.
[0209] First, determine the interface type and data format requirements of the display device. Common display device interfaces include HDMI and DisplayPort, and different interfaces have different requirements for data format and transmission rate.
[0210] The final rendered image data stream is formatted and encoded according to the interface requirements of the display device. For example, if the display device supports an HDMI interface, the data stream needs to be converted to the data format specified by the HDMI protocol and then encoded accordingly.
[0211] The formatted and encoded final rendered image data stream is transmitted to the display device using the driver or interface functions provided by the display device. After receiving the data stream, the display device decodes and displays the rendered image to the user.
[0212] By outputting the final rendered image data stream to the display device, the entire real-time rendering process, from material data optimization to final image presentation, is completed, providing users with high-quality film and animation rendering effects.
[0213] Furthermore, for example, after obtaining the material data set of the target scene, the method further includes:
[0214] Step S210: Perform temporal consistency analysis on the material data set to generate material attribute change trajectory features.
[0215] In real-time rendering scenes in film and animation, the material properties of the scene often change over time. Taking the previously mentioned futuristic sci-fi city indoor lobby scene as an example, the material properties of some luminous devices in the lobby, such as brightness and color, will change dynamically over time; the transparency, reflectivity, and other material properties of the glass display stand may also change due to the movement of light or its own special effects.
[0216] To perform temporal consistency analysis on the material dataset, the material properties of each material unit must first be continuously monitored and recorded. Material properties can be sampled at fixed time intervals, determined based on the animation frame rate and the speed of scene changes. For example, if the animation frame rate is 60 frames per second, material properties can be sampled every frame to capture even the most subtle changes.
[0217] For each material unit, the material attribute data sampled at different time points is organized. Assuming a material unit has attribute A, attribute values A1, A2, A3...An are sampled at time points t1, t2, t3...tn respectively. Arranging these attribute values in chronological order yields the sequence of how the attribute changes over time.
[0218] Next, the sequence is analyzed to extract the characteristics of the material property change trajectory. Various methods can be used for analysis, such as difference analysis. The difference between attribute values at adjacent time points is calculated, i.e., ΔA1=A2-A1, ΔA2=A3-A2, ..., ΔAn-1=An-An-1. These differences reflect the amount of change in the attribute between adjacent time points.
[0219] Trend analysis can also be performed, describing the changing trend of attributes over time by fitting curves. Methods such as linear fitting and polynomial fitting can be used. Taking linear fitting as an example, suppose the linear equation of attribute A over time t is obtained by fitting using the least squares method as A = kt + b, where k represents the slope of change, reflecting the rate of attribute change, and b represents the intercept. The slope k and the intercept b are part of the characteristic trajectory of material attribute change.
[0220] For multiple attributes, the above analysis can be performed separately, and then the resulting features can be combined. For example, for a material unit with attributes A, B, and C, their trend characteristics and difference characteristics can be obtained respectively. By concatenating these features, the material attribute change trajectory characteristics of the material unit are formed. This feature set is a multi-dimensional result, containing various change information of the material unit in the time domain.
[0221] Step S220: Detect abrupt change intervals in the material property change trajectory features and perform keyframe marking processing to generate a material update keyframe sequence.
[0222] After obtaining the characteristics of the material property change trajectory, it is necessary to detect the abrupt change intervals within it. An abrupt change interval refers to the time period during which the material properties undergo significant changes within a short period. In a futuristic sci-fi city indoor lobby scene, for example, if a luminous device suddenly changes from weak to strong light, this would cause a sudden change in its brightness property within a short time.
[0223] To detect abrupt change intervals, a threshold detection method can be used. For each attribute's change sequence, a change threshold is set. Taking the difference sequence ΔA of attribute A as an example, a threshold Th is set. When a value in ΔA is greater than Th, a change is considered to exist near that time point.
[0224] After identifying the mutation intervals, these intervals need to be marked with keyframes. Keyframes are frames that are significant in the animation, typically representing major changes in the animation's state. For each mutation interval, one or more representative time points within the interval are selected as keyframes. These keyframes can be the start time of the mutation, the time point where the mutation reaches its peak, or the time point where the mutation ends.
[0225] For example, consider a sudden increase in brightness from time t5 to t8, peaking at time t6. T5, t6, and t8 can be marked as keyframes. Arranging these keyframes for all material units in chronological order generates a material update keyframe sequence. This sequence records the time points when all material properties in the scene undergo significant changes, providing crucial reference for subsequent feature extraction and optimization strategy adjustments.
[0226] Step S230: Dynamically schedule the multi-level feature extraction according to the material update keyframe sequence, increase the feature extraction level density within the keyframe interval and synchronously update the light propagation path data in the spatially associated feature set.
[0227] The material update keyframe sequence reflects the time points when material properties in the scene undergo significant changes. Based on this material update keyframe sequence, multi-level feature extraction can be dynamically scheduled.
[0228] Within keyframe intervals, material properties change significantly, requiring more detailed extraction of material features. Therefore, it's necessary to increase the density of feature extraction layers. Taking a glass display stand in a futuristic city's indoor lobby as an example, its transparency, reflectivity, and other properties may change considerably within keyframe intervals. When performing physical property analysis of basic material properties, the number of sampling points can be increased to more accurately obtain subsets of reflection, transmission, and surface texture features. For instance, when measuring reflectivity, measurements can be taken at more wavelengths and incident angles to obtain a more detailed reflectivity matrix.
[0229] For optical response analysis of rendering effects, the dimensions and precision of the analysis can be increased. During the generation of the lighting interaction feature subset, the number of ray tracing operations is increased to more accurately simulate the reflection, refraction, and scattering of light on the glass display surface. During the generation of the shadow distribution feature subset, the resolution of the shadow map is improved to more clearly record the shape and position of shadows.
[0230] Simultaneously, within the keyframe interval, the lighting propagation path data in the spatially associated feature set needs to be updated synchronously. Since changes in material properties may affect the propagation of light in the scene, the lighting propagation path needs to be recalculated. Ray tracing algorithms can be used to simulate the propagation of light in the scene, starting from the light source, and record the interaction between the light and various material units, including reflection, refraction, and scattering. Based on the new lighting propagation path data, the lighting propagation path features in the spatially associated feature set are updated.
[0231] Within non-keyframe intervals, since the material properties change relatively little, the density of feature extraction layers can be appropriately reduced to decrease computation and improve processing efficiency.
[0232] Step S240: Perform differential and spatial topology consistency verification on the feature extraction results of the non-keyframe intervals and the feature data of the previous keyframe to generate an incrementally updated feature set that matches the geometry of the current scene.
[0233] In non-keyframe intervals, to reduce computational load, complete feature extraction is not required. Instead, the feature extraction results of non-keyframe intervals are compared with the feature data of the previous keyframe and subjected to spatial topology consistency verification.
[0234] First, a difference processing is performed. Taking the material feature set of a certain material unit as an example, the material feature set extracted from the non-keyframe interval is subtracted element-wise from the material feature set of the previous keyframe. Assuming the material feature set of the previous keyframe is F1 and the material feature set extracted from the non-keyframe interval is F2, the difference result ΔF = F2 - F1. This difference result reflects the change in material features from the keyframe to the current non-keyframe.
[0235] Then, spatial topology consistency verification is performed. Spatial topology consistency refers to the requirement that the spatial relationships and connection methods between material units in the scene should remain consistent at different points in time. The difference results are checked to ensure they meet the requirements of spatial topology consistency. For example, in a spatially associated feature set, the light propagation paths and texture continuity between material units should vary within a reasonable range. If the difference results cause unreasonable interruptions in the light propagation paths or significant mismatches in texture continuity, then the difference results need to be corrected.
[0236] Verification can be performed by establishing a spatial topology model. This model describes the spatial relationships and connections between material units in the scene. The difference results are then substituted into the spatial topology model to check if the model's constraints are met. If not, the difference results are adjusted to conform to the requirements of spatial topology consistency.
[0237] After differential and spatial topology consistency verification, an incremental update feature set matching the current scene geometry is obtained. This incremental update feature set only includes the changes in material features from keyframes to the current non-keyframes, reducing the amount of data and improving processing efficiency.
[0238] Step S250: Perform local correction processing on the optimization strategy set according to the incremental update feature set to generate a dynamic optimization strategy that adapts to changes in the time domain.
[0239] After obtaining the incremental update feature set, the optimization strategy set is locally modified based on it to generate a dynamic optimization strategy that adapts to changes in the time domain.
[0240] The optimization strategy set includes a material parameter adjustment priority sequence and rendering resource allocation strategies. First, the material parameter adjustment priority sequence is adjusted based on material feature changes in the incremental update feature set. If the incremental update feature set shows a significant change in a certain attribute of a material unit, the adjustment priority of the material parameter corresponding to that attribute may need to be increased. For example, in a futuristic sci-fi city indoor lobby scene, if the transparency of a glass display stand changes significantly within a non-keyframe range, the priority of adjusting the glass transparency parameter may need to be increased to ensure the accuracy of the rendering.
[0241] The rendering resource allocation strategy is adjusted based on the spatial correlation feature changes in the incrementally updated feature set. If the incrementally updated feature set shows changes in the light propagation path or texture continuity between certain material units, then rendering resources need to be reallocated to ensure that these changes are correctly rendered. For example, if the light propagation path of a certain lighting device changes, additional rendering computing resources are needed for that area to accurately calculate the lighting effects.
[0242] During the correction process, it is necessary to ensure that the adjusted optimization strategy still meets the real-time rendering performance requirements. For example, when adjusting the priority sequence of material parameters, the limitations of video memory capacity thresholds and computing unit throughput should be considered; when adjusting the rendering resource allocation strategy, the load balance of computing units should be ensured.
[0243] After local correction processing, a dynamic optimization strategy is generated to adapt to changes in the time domain. This dynamic optimization strategy can dynamically adjust material parameters and rendering resource allocation according to real-time changes in material properties in the scene, thereby achieving more efficient and accurate real-time rendering.
[0244] Figure 2 The diagram illustrates exemplary hardware and software components of a real-time rendering film and animation material optimization system 100, which implements the inventive ideas of the present invention, according to some embodiments of the present invention. For example, a processor 120 can be used in the real-time rendering film and animation material optimization system 100 and to perform the functions of the present invention.
[0245] The film and animation material optimization system 100 for real-time rendering can be a general-purpose server or a special-purpose server; both can be used to implement the film and animation material optimization method for real-time rendering of this invention. Although only one server is shown in this invention, for convenience, the functions described in this invention can be implemented in a distributed manner on multiple similar platforms to balance the load.
[0246] For example, a film and animation material optimization system 100 for real-time rendering may include a network port 110 connected to a network, one or more processors 120 for executing program instructions, a communication bus 130, and various forms of storage media 140, such as a disk, ROM, or RAM, or any combination thereof. Exemplarily, the film and animation material optimization system 100 for real-time rendering may also include program instructions stored in ROM, RAM, or other types of non-transitory storage media, or any combination thereof. The method of the present invention can be implemented according to these program instructions. The film and animation material optimization system 100 for real-time rendering also includes an I / O interface 150 between the computer and other input / output devices.
[0247] For ease of explanation, only one processor is described in the film and animation material optimization system 100 for real-time rendering. However, it should be noted that the film and animation material optimization system 100 for real-time rendering in this invention may also include multiple processors. Therefore, the steps performed by one processor described in this invention may also be performed jointly by multiple processors or individually. For example, if the processor of the film and animation material optimization system 100 for real-time rendering performs steps A and B, it should be understood that steps A and B may also be performed jointly by two different processors or individually by one processor. For example, the first processor performs step A, the second processor performs step B, or the first processor and the second processor jointly perform steps A and B.
[0248] Furthermore, this embodiment of the invention also provides a readable storage medium, wherein computer-executable instructions are preset in the readable storage medium, and when the processor executes the computer-executable instructions, the above-mentioned method for optimizing film and animation materials for real-time rendering is implemented.
[0249] It should be noted that, in order to simplify the description of the present invention and thus help to understand one or more embodiments of the invention, multiple features may sometimes be grouped into one embodiment, drawing or description thereof in the foregoing description of the embodiments of the present invention.
Claims
1. A method for optimizing a film and television animation material applied to real-time rendering, characterized in that, The method comprises: acquiring a material data set of a target scene, the material data set comprising a plurality of material units, each material unit being composed of at least one basic material attribute and a corresponding rendering effect attribute; performing multi-level feature extraction on the material data set to generate a material feature set and a rendering correlation feature set of each material unit; performing matching processing on the material feature set and the rendering correlation feature set to generate an optimization strategy set of the material unit; performing dynamic adjustment processing on a rendering parameter set of the material unit according to the optimization strategy set to generate an adjusted rendering parameter set; performing real-time rendering operation based on the adjusted rendering parameter set to output a rendered picture of the target scene; the multi-level feature extraction on the material data set to generate a material feature set and a rendering correlation feature set of each material unit comprises: performing physical property analysis processing on the basic material attribute in the material unit to generate a first feature set, the first feature set comprising a reflection feature subset, a transmission feature subset and a surface texture feature subset; performing optical response analysis processing on the rendering effect attribute to generate a second feature set, the second feature set comprising an illumination interaction feature subset, a shadow distribution feature subset and a color transition feature subset; performing cross-level correlation analysis processing on the first feature set and the second feature set to generate the material feature set of the material unit; traversing the spatial distribution relationship between all material units in the material data set to generate a spatial correlation feature set between the material unit and adjacent material units; performing fusion processing on the spatial correlation feature set and the material feature set to generate the rendering correlation feature set, wherein the rendering correlation feature set comprises illumination propagation path features and texture continuity features between material units; the cross-level correlation analysis processing on the first feature set and the second feature set to generate the material feature set of the material unit comprises: performing energy analysis on the reflection feature subset and the illumination interaction feature subset to generate a reflection energy distribution feature; performing ray tracing simulation processing on the transmission feature subset and the shadow distribution feature subset to generate a transmission path optimization feature; performing multi-channel frequency domain decomposition processing based on discrete cosine transform on the surface texture feature subset and the color transition feature subset to extract low-frequency base color information and high-frequency texture details, and generating a texture frequency domain consistency feature with frequency band energy distribution matching; performing standardization alignment processing on the reflection energy distribution feature and the texture frequency domain consistency feature to generate a fusion feature, performing parameter boundary check processing on the transmission path optimization feature through a physical-optical constraint model to generate an effective state feature, and performing dynamic weighted fusion processing on the fusion feature and the effective state feature to generate the material feature set of the material unit, wherein the material feature set comprises surface optical joint features and dynamic response features conforming to physical material specifications.
2. The method of real-time rendered cinematic animation material optimization of claim 1, wherein, The matching processing is performed on the material feature set and the rendering associated feature set to generate an optimization strategy set of the material unit, including: performing feature decoupling processing on the material feature set to generate a core feature subset and an auxiliary feature subset; performing spatial topology analysis processing on the rendering associated feature set to generate a spatial dependency relationship feature subset; performing feature embedding alignment processing on the core feature subset and the spatial dependency relationship feature subset through a graph neural network to generate topology-aware features of a unified dimension, and performing bidirectional attention matching processing on the topology-aware features to generate a feature matching weight set containing spatial relationship constraints; performing dynamic weighted fusion processing on the auxiliary feature subset according to the feature matching weight set to generate an optimization strategy base set; performing rendering constraint condition checking processing on the optimization strategy base set to generate an optimization strategy set meeting real-time rendering performance requirements, the optimization strategy set containing a material parameter adjustment priority sequence and a rendering resource allocation strategy.
3. The method of real-time rendered cinematic animation material optimization of claim 2, wherein, The rendering constraint condition checking processing on the optimization strategy base set to generate an optimization strategy set meeting real-time rendering performance requirements includes: obtaining a hardware performance parameter set of a target rendering device, the hardware performance parameter set including a video memory capacity threshold, a calculation unit throughput, and a real-time frame rate requirement; performing video memory occupancy simulation calculation on the material parameter adjustment priority sequence in the optimization strategy base set to generate a first checking result set; performing calculation unit load balancing analysis on the rendering resource allocation strategy to generate a second checking result set; dynamically clipping low-priority items in the material parameter adjustment priority sequence that do not affect the optical continuity of adjacent material units according to the comparison result of the first checking result set and the video memory capacity threshold, in combination with the dependency relationship analysis of the illumination propagation path between material units; adjusting the task scheduling granularity and parallel execution order in the rendering resource allocation strategy by using a task dependency graph according to the matching degree of the second checking result set and the calculation unit throughput; combining the adjusted material parameter adjustment priority sequence and the rendering resource allocation strategy to generate an optimization strategy set meeting the real-time frame rate requirement.
4. The method of real-time rendered cinematic animation material optimization of claim 2, wherein, The dynamic adjustment processing on the rendering parameter set of the material unit according to the optimization strategy set to generate an adjusted rendering parameter set includes: analyzing the material parameter adjustment priority sequence in the optimization strategy set to determine a parameter update item set in a current frame rendering period; performing task block processing on the parameter update item set according to the rendering resource allocation strategy to generate a parallel processing task queue; performing parameter remapping processing on each task block in the parallel processing task queue to generate a local adjustment parameter subset; performing consistent fusion processing on each local adjustment parameter subset according to a spatial distribution order to generate a global adjustment parameter set; performing rendering pipeline compatibility detection processing on the global adjustment parameter set to generate an adjusted rendering parameter set matched with a target rendering engine interface.
5. The method of real-time rendered cinematic animation material optimization of claim 4, wherein, The parameter remapping processing is performed on each task block in the parallel processing task queue to generate a local adjustment parameter subset, including: Obtaining the original material parameter interval corresponding to the task block and the target optimization parameter interval; Based on the reflectivity and refractivity reasonable interval defined by the physical rendering parameter specification, the finite domain nonlinear mapping function from the original material parameter interval to the target optimization parameter interval is established; According to the mapping function, the interpolation calculation processing of the material parameters in the task block under the constraint condition is performed to generate an intermediate parameter set conforming to the physical optical law; Optical correction processing is performed on the intermediate parameter set to eliminate parameter jump abnormalities to generate a smooth transition parameter subset; The smooth transition parameter subset and the boundary parameter of the adjacent task block are subjected to continuity optimization processing to generate a local adjustment parameter subset.
6. The method of real-time rendered cinematic animation material optimization of claim 1, wherein, The real-time rendering operation is performed based on the adjusted rendering parameter set to output the rendering picture of the target scene, including: Load the adjusted rendering parameter set to the parameter buffer of the graphics processing unit; Dynamically calculate the current visible material unit set according to the viewpoint position of the scene camera; Each material unit in the visible material unit set is subjected to instantiation rendering instruction generation processing to generate a multi-thread rendering instruction queue; After the rendering instruction in the multi-thread rendering instruction queue is executed in parallel through the asynchronous computing pipeline, the texture continuity and lighting consistency between adjacent task blocks are detected, and the interpolation transition processing is performed on the boundary region; The color space conversion and hybrid processing based on time domain anti-aliasing are performed on the block rendering result set after the interpolation transition processing to generate the final rendering picture data stream; The final rendering picture data stream is output to the display device for picture presentation.
7. The method of real-time rendered cinematic animation material optimization of claim 6, wherein, The instantiation rendering instruction generation processing is performed on each material unit in the visible material unit set to generate a multi-thread rendering instruction queue, including: Generate a geometric transformation instruction subset according to the spatial position information of the material unit; Generate a material binding instruction subset according to the adjusted rendering parameter set; Generate a shader configuration instruction subset according to the scene lighting condition; Combine the geometric transformation instruction subset, the material binding instruction subset and the shader configuration instruction subset in sequence according to the rendering pipeline stage to generate the instantiation rendering instruction of a single material unit; According to the number of cores of the graphics processing unit, the instantiation rendering instruction is divided into a multi-thread rendering instruction queue matched with the computing resources.
8. A film and television animation material optimization system applied to real-time rendering, characterized in that, A device includes a processor and a memory, the memory and the processor are connected, the memory is used to store programs, instructions or codes, and the processor is used to execute the programs, instructions or codes in the memory to implement the film and television animation material optimization method applied to real-time rendering in any one of claims 1-7.
Citation Information
Patent Citations
Building information model scene rendering method and system based on parallel computing
CN119888053A
Method of Customizing 3D Computer-Generated Scenes
US20090021513A1