Dynamic texture atlas reorganization compression method and system based on spatial sparsity
By using spatial sparsity analysis and differentiated compression strategies, an optimized texture atlas layout and partitioned compression strategy are generated, which solves the limitations of dynamic texture atlas compression in existing technologies and achieves efficient, globally optimal compression results and good rendering compatibility.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHENGDU LIBI TECH CO LTD
- Filing Date
- 2026-03-12
- Publication Date
- 2026-05-08
AI Technical Summary
Existing technologies do not fully exploit the comprehensive compression potential of texture units in the compression of dynamic texture atlases, resulting in a lack of targeted compression strategies, difficulty in achieving globally optimal layout and compression combinations, low cache access efficiency, poor decompression and rendering compatibility, and fixed compression algorithm selection, which cannot adapt to the content characteristics of different regions.
A collaborative decision-making mechanism is adopted, which combines spatial sparsity analysis and differentiated compression strategies. An initial compressibility potential model is generated through multi-dimensional feature vectors. An iterative collaborative decision-making process is executed to generate an optimized texture atlas layout and partitioned compression strategy mapping table. Differential compression is performed and the data is integrated and encapsulated into a self-interpreting compressed data stream.
It achieves efficient compression of dynamic texture atlases, improves the overall compression rate, preserves the visual quality of textures, optimizes decompression time and rendering performance on the decoding end, and improves cache access efficiency.
Smart Images

Figure CN121810824B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data compression technology, and in particular to a method and system for dynamic texture atlas reconstruction and compression based on spatial sparsity. Background Technology
[0002] In modern computer graphics and real-time rendering applications, dynamic textures play a crucial role, bringing vivid visual effects to scenes, such as flowing liquids, fluttering flags, or the expressions of animated characters. To manage and efficiently utilize these texture resources, developers typically organize multiple independent texture sequence units into one or more large texture atlases. Because dynamic texture atlases contain pixel data that changes over time, they often occupy significant amounts of storage space and memory bandwidth; therefore, efficient compression of these atlases is a key step in improving application performance.
[0003] Among related technologies, Chinese invention patent CN120047590B discloses an adaptive texture atlas compression system and method based on the Unity engine, including: a texture resource import module converting PNG to DYN files and generating configuration data; a texture resource setting module adopting a double-buffered configuration management mechanism, detecting hash value differences and asynchronously and synchronously changing fields through a modified CityHash algorithm; an atlas construction module performing edge detection, polygon generation and rasterization processing, using an active edge table algorithm to output pixel data; a layout unit implementing mutually exclusive pixel data layout and outputting a UV coordinate mapping table based on multi-threaded parallel computing; and an atlas setting module dynamically modifying configuration parameters and triggering pipeline updates. Geometric accuracy is ensured through vertex count and texture area verification, and expansion offset and step size parameters are dynamically adjusted to adapt to different resolutions. An integrated breakpoint resume mechanism ensures the integrity of the transaction log.
[0004] However, the aforementioned existing technical solutions have the following technical shortcomings. First, the feature analysis dimension is too narrow, failing to fully exploit the comprehensive compression potential of texture units: Existing technologies only focus on the basic attributes or single-dimensional features of texture resources, without systematically analyzing the multi-dimensional features of texture units in terms of spatial consistency and neighborhood correlation. This makes it impossible to accurately characterize the differences in dynamic changes, internal pixel distribution, and neighborhood associations among different texture units, resulting in a lack of specificity in subsequent compression strategies, difficulty in identifying texture clusters with high compression potential, and an inability to maximize compression gain. Second, the layout and compression strategies lack synergistic optimization, easily falling into local optima: Existing technologies separate atlas layout construction and compression algorithm selection into independent processes. Layout design focuses only on the compactness of pixel arrangement, without introducing a feedback mechanism for compression effects; the selection of compression algorithms is also not dynamically adjusted according to layout characteristics. This separate decision-making leads to the inability to form a globally optimal "layout-compression" combination, potentially resulting in layouts that meet arrangement efficiency but have high compression redundancy, or compression algorithms with poor adaptability but layout limitations restricting the optimization space, thus limiting overall compression efficiency. The compression algorithm selection is fixed, failing to achieve differentiated and precise compression: Existing technologies use a uniform or limited compression algorithm to process the entire texture atlas, without adapting differentiated algorithms to the content characteristics of different regions within the texture atlas. For sparse regions with high compression potential, their spatial sparsity cannot be utilized to achieve extreme compression; for complex and detailed regions, general algorithms are prone to excessive quality loss or insufficient compression ratio, making it difficult to balance compression efficiency and visual fidelity. Cache access efficiency and decompression rendering compatibility are not adequately considered: The layout design of existing technologies does not simulate the cache access logic during texture sampling, resulting in a disconnect between the physical location of the reconstructed atlas and the logical sampling requirements during rendering—logically adjacent texture units may be physically separated, leading to low cache hit rates and directly impacting real-time rendering performance. Simultaneously, the data encapsulation format lacks optimized design for the decompression process, failing to form a self-interpreting metadata and compressed data integration structure, unable to support parallel decompression, and the complex conversion mechanism between logical and physical coordinates increases decompression latency and rendering overhead. Summary of the Invention
[0005] To address the aforementioned issues, this invention provides a dynamic texture atlas recombination and compression method and system based on spatial sparsity. By employing a collaborative decision-making mechanism and combining spatial sparsity analysis with differentiated compression strategies, it can achieve efficient compression of dynamic texture atlases.
[0006] The above objectives can be achieved through the following approach:
[0007] A dynamic texture atlas recombination and compression method based on spatial sparsity includes: acquiring a dynamic texture sequence; performing feature analysis on the texture units to generate multi-dimensional feature vectors; constructing an initial compressibility potential model for each texture unit based on the multi-dimensional feature vectors; executing an iterative collaborative decision-making process with the initial compressibility potential model as input to generate an optimized texture atlas layout and a partitioned compression strategy mapping table; performing differential compression on the texture data arranged according to the optimized texture atlas layout based on the partitioned compression strategy mapping table to generate compressed texture data; and integrating and encapsulating the layout information of the optimized texture atlas layout, the partitioned compression strategy mapping table, and the compressed texture data to generate a compressed data stream.
[0008] Optionally, generating their respective multidimensional feature vectors includes: calculating the pixel distribution complexity within the texture unit to generate a spatial consistency feature; quantifying the correlation between the texture unit and other units in its spatiotemporal neighborhood to generate a neighborhood correlation feature; and fusing the spatial consistency feature and the neighborhood correlation feature into their respective multidimensional feature vectors.
[0009] Optionally, constructing the initial compressibility potential model includes: obtaining a set of candidate neighborhood environment templates representing typical neighborhood environments; combining the multidimensional feature vector of the texture unit with each of the candidate neighborhood environment templates to form a set of combined feature vectors; obtaining the potential compression gain coefficient corresponding to each combined feature vector based on the set of combined feature vectors; and mapping and associating the candidate neighborhood environment templates with the corresponding potential compression gain coefficients to form an initial compressibility potential model.
[0010] Optionally, the iterative collaborative decision-making process includes: generating an initial atlas layout draft based on the initial compressibility potential model; performing a joint decision-making loop on the initial atlas layout draft, wherein the joint decision-making loop generates an estimated compression result through simulated compression and calculates a joint efficiency score based on the estimated compression result; adjusting the initial atlas layout draft according to the joint efficiency score to generate an updated atlas layout draft; repeating the joint decision-making loop and adjustment steps until the joint efficiency score meets a preset convergence condition, and using the updated atlas layout draft and the corresponding compression strategy as the mapping table between the optimized texture atlas layout and the partition compression strategy.
[0011] Optionally, the calculation of the joint efficiency score includes: calculating the data compression degree from the estimated compression result and generating a compression ratio factor; evaluating the difference in fidelity between the estimated compression result and the texture data and generating a quality loss factor; simulating the texture sampling process of the initial atlas layout draft, evaluating its cache access efficiency, and generating a sampling efficiency factor; and weighting the compression ratio factor, quality loss factor, and sampling efficiency factor according to preset weight coefficients to obtain the joint efficiency score.
[0012] Optionally, the differential compression includes: parsing the partition compression strategy mapping table to identify a first region and a second region in the optimized texture atlas layout, wherein the first region corresponds to a first compression algorithm and the second region corresponds to a second compression algorithm; applying the first compression algorithm to encode the texture data in the first region to generate compressed texture data, wherein the first region is a highly homogeneous sparse cluster; and applying the second compression algorithm to encode the texture data in the second region to generate compressed texture data.
[0013] Optionally, the step of encoding the texture data in the first region using the first compression algorithm includes: calculating the average value of all pixels in the high homogeneity sparse cluster to obtain a representative base value; calculating the difference between each pixel value in the high homogeneity sparse cluster and the representative base value to generate a difference matrix; and performing entropy encoding on the representative base value and the difference matrix respectively to generate compressed texture data of the first region.
[0014] Optionally, generating the compressed data stream includes: converting the layout information of the optimized texture atlas layout into a layout index table; converting the partition compression strategy mapping table into a strategy instruction sequence; creating a metadata block and storing the layout index table and the strategy instruction sequence therein; and concatenating the metadata block with the compressed texture data to form a compressed data stream.
[0015] Optionally, the method further includes: parsing the compressed data stream to separate the metadata block and the compressed texture data; decompressing the compressed texture data in parallel according to the policy instruction sequence in the metadata block to reconstruct the optimized texture atlas; and during rendering sampling, using the layout index table in the metadata block to convert the logical sampling coordinates from the original texture sequence into physical sampling coordinates on the optimized texture atlas in real time.
[0016] Based on the same inventive concept, this invention also provides a dynamic texture atlas recombination and compression system based on spatial sparsity. The system includes: a texture feature analysis module for acquiring dynamic texture sequences and performing feature analysis on texture units within the dynamic texture sequences to generate their respective multidimensional feature vectors; a potential model modeling module for constructing an initial compressibility potential model for each texture unit based on the multidimensional feature vectors, wherein the initial compressibility potential model characterizes the compression potential of the texture unit in different neighborhood environments; a collaborative decision-making and layout optimization module for executing an iterative collaborative decision-making process using the initial compressibility potential model as input, synchronously generating an optimized texture atlas layout and a matching partitioned compression strategy mapping table during the process; a differential compression module for performing differential compression on texture data arranged according to the optimized texture atlas layout based on the partitioned compression strategy mapping table to generate compressed texture data; and a data encapsulation module for integrating and encapsulating the layout information of the optimized texture atlas layout, the partitioned compression strategy mapping table, and the compressed texture data to generate a compressed data stream.
[0017] Compared with the prior art, the present invention has the following advantages:
[0018] This invention performs in-depth feature analysis on dynamic texture sequences and establishes a compressibility potential model for each texture unit, enabling it to proactively predict compression benefits under different layout combinations. Based on this model, an iterative collaborative decision-making process automatically explores and converges to a globally optimal combination of atlas layout and partitioned compression strategy, avoiding the complexity of manual tuning and the limitations of local optima in traditional methods, thus achieving intelligent generation of compression schemes.
[0019] This invention proposes a differentiated compression execution mechanism that applies the most suitable compression algorithm to regions with different content characteristics based on the optimized atlas layout and matching compression strategy. For the highly homogeneous sparse clusters formed after recombination, a specialized encoding scheme is used to achieve an extremely high compression ratio, while algorithms with better fidelity are employed for complex regions. This refined partitioning approach breaks through the bottleneck of traditional single-algorithm compression, improving the overall compression rate while largely preserving the visual quality of the texture.
[0020] This invention integrates optimized layout information, partitioned compression strategies, and compressed data into a self-interpreting compressed data stream. This encapsulation method not only facilitates data storage and transmission, but more importantly, it provides clear and efficient parsing and reconstruction guidance for the decoding end. The decoder can perform parallel decompression based on metadata, significantly shortening texture reconstruction time. Simultaneously, during rendering, real-time coordinate transformation is performed using the layout index table, ensuring efficient sampling transparent to upper-layer applications and optimizing the performance of dynamic textures throughout their entire lifecycle from compression to application.
[0021] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures pointed out in the description, claims and drawings. Attached Figure Description
[0022] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0023] Figure 1 This is a flowchart illustrating the dynamic texture atlas recombination and compression method based on spatial sparsity according to an embodiment of the present invention.
[0024] Figure 2 This is a multi-dimensional feature vector radar map according to an embodiment of the present invention.
[0025] Figure 3 This is a mapping diagram of the compressibility potential model according to an embodiment of the present invention.
[0026] Figure 4 This is a schematic diagram of the structure of the dynamic texture atlas recombination and compression system based on spatial sparsity according to an embodiment of the present invention. Detailed Implementation
[0027] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0028] Reference Figure 1 One embodiment of the present invention proposes a dynamic texture atlas recombination and compression method based on spatial sparsity. By adopting a collaborative decision-making mechanism and combining spatial sparsity analysis with a differentiated compression strategy, it can achieve efficient compression of dynamic texture atlases.
[0029] The method described in this embodiment specifically includes:
[0030] S1. Obtain the dynamic texture sequence, and perform feature analysis on the texture units in the dynamic texture sequence to generate their respective multi-dimensional feature vectors;
[0031] Optionally, generating the respective multidimensional feature vectors includes:
[0032] Calculate the pixel distribution complexity within the texture unit to generate a consistent feature in the spatial domain;
[0033] The correlation between the texture unit and other units in its spatiotemporal neighborhood is quantified to generate neighborhood correlation features;
[0034] The spatial consistency feature and the neighborhood correlation feature are fused into their respective multidimensional feature vectors.
[0035] Specifically, the system generates spatial consistency features to assess the complexity of pixel distribution within texture units. Regions with high consistency are typically composed of large flat areas or gradient color blocks, exhibiting higher compression potential. The system measures the spatial complexity of a texture unit by calculating the average gradient magnitude within the texture unit. This feature is calculated using the following formula: in This represents the consistency characteristics within the spatial domain. The smaller the value, the smoother the texture is and the higher the consistency. Indicates the width of the texture unit. Indicates the height of the texture unit and They are pixels The gradients in the horizontal and vertical directions are typically calculated on the current frame using the Sobel or Prewitt operators.
[0036] The system generates a neighborhood correlation feature, quantifying the content similarity between a texture unit and its neighboring texture units in the original atlas layout. High correlation means that placing these units physically adjacent in the reconstructed atlas can form a larger homogeneous region, which is beneficial for subsequent region compression. The system calculates the normalized cross-correlation coefficient between the target texture unit and each unit in its 4-connected or 8-connected neighborhood and takes the average value. This feature is expressed by the formula... The calculation shows that: ,in This represents the relevance of the neighborhood; the closer the value is to 1, the higher the degree of correlation with the neighborhood. Represents the current texture unit. Representing its first Neighborhood units, The total number of neighboring units. The normalized cross-correlation function is used to measure the similarity between two texture unit image patches, and its representation is as follows: , For the current texture unit The average value of all pixels within the range. Neighborhood texture unit The average value of all pixels within the range; Represents the target texture unit The Middle line, number The brightness or color component values of the column pixels; Represents neighborhood texture units The Middle line, number The brightness value or color component value of a column pixel.
[0037] The independently calculated feature values are then fused to form the final multi-dimensional feature vector of this texture unit, creating a standardized, multi-dimensional descriptor. To eliminate differences in units and numerical ranges between different features, the system first... Normalization is performed to map it to a uniform interval of 0 to 1, resulting in... Subsequently, depending on the specific application scenario and the emphasis on compression ratio, image quality, and sampling efficiency, the system adopts a weighted combination method to fuse the normalized features into a multi-dimensional feature vector. Its form is: ,in The preset weighting coefficients satisfy... This is used to adjust the influence of different features in subsequent decision-making. This multidimensional feature vector... This will be used as output, accurately describing the comprehensive characteristics of the texture unit in the spatial domain and its neighborhood relationships. Multidimensional feature vector radar, for example... Figure 2 As shown.
[0038] For example, in the process of performing feature analysis on texture units in a dynamic texture sequence and generating multidimensional feature vectors, the selected temporal analysis window is 2 frames, and the width of the texture unit is... and height All pixels are 2 pixels. Spatial consistency features are calculated to evaluate pixel distribution complexity. Taking the first frame as an example, if the gradients of each pixel in the horizontal and vertical directions are calculated using operators... and If both are 1, then according to the formula It can be calculated Next, the unit is quantized. Its neighboring units The degree of correlation, setting the number of neighborhoods The value is 1, and the neighboring unit pixel distribution is 11, 21, 11, 21. The mean value of the current unit can be calculated. Neighborhood unit mean Substitute into the normalized cross-correlation calculation formula The correlation coefficient was found to be 1.0, and then the formula was used... Obtain neighborhood correlation features Finally, these feature values are normalized. Let the normalized features be... And set weighting coefficients. According to the formula The fusion process is performed to ultimately generate a multidimensional feature vector for the texture unit. .
[0039] S2. Based on the multidimensional feature vector, construct an initial compressibility potential model for each texture unit. The initial compressibility potential model is used to characterize the compressibility potential of the texture unit in different neighborhood environments.
[0040] Optionally, the construction of the initial compressibility potential model includes:
[0041] Obtain a set of candidate neighborhood environment templates that represent typical neighborhood environments;
[0042] The multidimensional feature vector of the texture unit is combined with each of the candidate neighborhood environment templates to form a set of combined feature vectors;
[0043] Based on the set of combined feature vectors, the potential compression gain coefficient corresponding to each combined feature vector is obtained;
[0044] The candidate neighborhood environment templates are mapped and associated with the corresponding potential compression gain coefficients to form an initial compressibility potential model.
[0045] Specifically, a set of candidate neighborhood environment templates needs to be loaded or generated to establish a finite and representative set of neighborhood features to simulate various neighboring environments that texture units may encounter. This set of templates is obtained through offline feature extraction and clustering analysis of massive texture data. For example, the K-Means algorithm is used to cluster the multidimensional feature vectors of tens of thousands of texture units, and the resulting 8 to 32 cluster centers are defined as candidate neighborhood environment templates. Each template... It is itself a vector with the same dimension as the texture unit feature vector, representing a typical type of texture feature.
[0046] The multidimensional feature vector of the texture unit to be analyzed With each candidate neighborhood environment template The features are combined to construct the input features for prediction. This combination typically involves concatenating feature vectors to generate a set of combined feature vectors. The operation is as follows: ,
[0047] in It is the combined feature vector. It is the multidimensional feature vector of the current texture unit. It is the first A candidate neighborhood environment template. This is achieved through splicing. It simultaneously encodes the characteristics of the texture unit itself as well as the characteristics of its hypothetical neighborhood.
[0048] Using a pre-trained prediction model, for each combined feature vector The corresponding potential compression gain coefficient is calculated to quantify the compression benefit achievable under specific neighborhood combinations. This predictive model, such as a lightweight gradient boosting decision tree or a small neural network, is trained offline through supervised learning. Its training data contains a large number of combined feature vectors and their corresponding real compression experimental results. Potential compression gain coefficient The formula is: ,in This represents the prediction function of the pre-trained function, with the input being the combined feature vector. The output is a scalar value. This coefficient It is usually normalized to between 0 and 1; the higher the value, the more it indicates that the texture unit is associated with the feature. The greater the increase in compression ratio or reduction in mass loss that can be achieved by placing neighboring units together, the greater the benefit of regional compression. Predictive Model It is a lightweight supervised learning model trained offline: ,in For the first Decision trees for input The predicted values are continuous values, ranging from [0,1]. The learning rate controls the contribution weight of each tree. Use the Sigmoid activation function to ensure the final output Strictly normalize to [0,1]; Let be the total number of decision trees, satisfying 20 ≤ ≤50.
[0049] All candidate neighborhood environment templates Its corresponding potential compression gain coefficient Perform mapping associations to form an initial compressibility potential model for this texture unit. The compressibility potential model is mapped as follows: Figure 3 As shown, a structured data body is constructed to facilitate fast querying and retrieval by subsequent algorithms. This model is essentially a lookup table or dictionary structure. Its form is: The key is the neighborhood template vector, and the value is the predicted compression gain. This model fully describes the compression adaptability of the current texture unit to different neighborhood environments, providing a quantitative basis for its optimal location decision in atlas reconstruction.
[0050] For example, when constructing an initial compressibility potential model for a specific texture unit, the system first obtains a set of candidate neighborhood environment templates representing typical neighborhood environments. Two neighborhood feature templates are determined through offline feature extraction and cluster analysis of the texture data. and Then the multidimensional feature vector of the texture unit is... Each of these is concatenated with one of the two candidate neighborhood environment templates to form a set of combined feature vectors. The first set of combined feature vectors... The second set of combined feature vectors Then, a pre-trained supervised learning prediction model is used. To obtain the potential compression gain coefficients corresponding to each combined feature vector. Set the total number of decision trees in the prediction model parameters. for And learning rate for .against Vector, if the predicted output values of all decision trees All According to the formula Perform calculations, where Using the Sigmoid activation function, the resulting potential compression gain coefficients .against Vector, if the decision tree predicts the value All Through formula Calculation Finally, the candidate neighborhood environment templates are mapped and associated with the corresponding potential compression gain coefficients to form the initial compressibility potential model of the texture unit. .
[0051] S3. Using the initial compressibility potential model as input, perform an iterative collaborative decision-making process, during which an optimized texture atlas layout and a matching partition compression strategy mapping table are generated synchronously.
[0052] Optionally, the iterative collaborative decision-making process includes:
[0053] Based on the initial compressibility potential model, an initial atlas layout draft is generated;
[0054] A joint decision-making loop is performed on the initial atlas layout draft. The joint decision-making loop generates an estimated compression result through simulated compression and calculates a joint efficiency score based on the estimated compression result.
[0055] Based on the joint efficiency score, the initial atlas layout draft is adjusted to generate an updated atlas layout draft;
[0056] Repeat the joint decision-making loop and adjustment steps until the joint efficiency score meets the preset convergence condition, and use the updated atlas layout draft and the corresponding compression strategy as the mapping table of the optimized texture atlas layout and the partition compression strategy.
[0057] Specifically, based on the initial compressibility potential models of each texture unit generated in the previous steps, an initial atlas layout draft is generated. This provides a well-founded starting point for iteration, superior to random arrangement. When generating this draft, a greedy algorithm is used to prioritize grouping texture units with high similarity in multidimensional feature vectors and high compression gain predicted by each other in the initial compressibility potential model, quickly constructing a preliminary layout targeting highly homogeneous regions.
[0058] A joint decision-making loop is initiated for the initial atlas layout draft. This loop is the core of the entire collaborative decision-making process. Within an iteration cycle, simulated compression is first performed to quickly and cost-effectively assess the compression potential of the current layout draft, rather than performing a full, time-consuming compression operation. The draft is scanned to identify clusters composed of texture units with similar features. Then, based on a pre-defined compression strategy library, an estimated compression ratio and quality loss value are matched for each cluster. These estimates are based on a performance lookup table built from offline test data, thereby quickly generating a predicted compression result. Based on this predicted compression result, a quantified joint efficiency score is calculated. Multiple key performance indicators of the layout are combined into a single evaluation value to guide the iteration direction.
[0059] The atlas layout draft is adjusted based on the calculated joint efficiency score to explore a better layout scheme. This adjustment step employs stochastic optimization strategies such as simulated annealing or mutation operators in genetic algorithms. For example, two texture units or two unit blocks are randomly selected and their positions are swapped to generate a new atlas layout draft. If the joint efficiency score of the new draft is higher than the current score, the adjustment is accepted. If it is lower than the current score, the adjustment is accepted with a certain probability, which decreases with the number of iterations, aiming to help the algorithm escape local optima.
[0060] Repeat the joint decision-making loop and adjustment steps described above. The termination condition for this iterative process is preset to be that the growth rate of the joint efficiency score is below a threshold, such as 0.1%, in consecutive iterations, for example, between 50 and 100 iterations, or that the total number of iterations reaches an upper limit, for example, between 500 and 2000 iterations. The iteration terminates when the convergence condition is met. At this point, the atlas layout draft with the highest joint efficiency score retained in the system is adopted as the final optimized texture atlas layout, and the combination of region compression strategies used to calculate the highest score under this layout is solidified into a matching partition compression strategy mapping table.
[0061] For example, during the iterative collaborative decision-making process, the system first uses a greedy algorithm to aggregate units with high mutual measurement gains in the initial compressibility potential model of each texture unit, thereby generating an initial atlas layout draft. The total data size of the original uncompressed texture atlas is set to 2000, and the total number of original adjacency relationships is set to 100. During the joint decision-making loop for this layout, highly homogeneous clusters are identified by scanning and matched against a performance lookup table, estimating the total compressed data size to be 600, thus obtaining a compression ratio factor of 0.7. In the fidelity difference evaluation stage, the idealized maximum quality score is set to 100, and the weighted average of the estimated quality scores of texture units under the current layout is 85, resulting in a quality loss factor of 0.85. Statistical analysis reveals that the number of logically adjacent but physically separated pairs in the initial layout is 20, calculating a sampling efficiency factor of 0.8. The weighting coefficients for the compression ratio factor, quality loss factor, and sampling efficiency factor are set to 0.4, 0.3, and 0.3, respectively, and the initial joint efficiency score is calculated to be 0.775 through weighted calculation. The system then enters the adjustment phase, using the mutation operator in the random optimization strategy to swap the positions of the two texture units, generating an updated layout draft. Further evaluation revealed that under the new layout, the estimated total data size after compression was reduced to 550, and the physical partition logarithm was reduced to 15. Correspondingly, the compression ratio factor increased to 0.725, and the sampling efficiency factor increased to 0.85, while the quality loss factor remained at 0.85, resulting in an updated joint efficiency score of 0.8. Since the new score was higher than the old score and the 3.225% growth rate exceeded the preset 0.1% convergence threshold, the system accepted the adjustment and continued iterating until the score stabilized, at which point it output the optimized texture atlas layout and partition compression strategy mapping table.
[0062] Optionally, the calculation of the joint efficiency score includes:
[0063] The degree of data compression is calculated from the estimated compression results to generate a compression ratio factor;
[0064] The difference in fidelity between the estimated compression result and the texture data is evaluated to generate a quality loss factor.
[0065] Simulate the texture sampling process of the initial atlas layout draft, evaluate its cache access efficiency, and generate a sampling efficiency factor;
[0066] The compression ratio factor, quality loss factor, and sampling efficiency factor are weighted and combined according to preset weighting coefficients to obtain a joint efficiency score.
[0067] Specifically, the degree of data compression is calculated from the estimated compression results to generate a compression ratio factor. This factor measures the effectiveness of the current atlas layout draft in eliminating spatial data redundancy. The compression ratio factor does not directly use the compression ratio, but rather converts it into a normalized score with a positive incentive. This factor is calculated using the following formula: ,in It is the compression ratio factor, with a value range between 0 and 1. The closer it is to 1, the better the compression effect. It is the estimated total size of the compressed data generated based on simulated compression. This is the total data size of the original, uncompressed texture atlas. Both data sizes are obtained by summing the estimated sizes of all texture units in the atlas, with the unit being bytes or kilobytes.
[0068] The difference in fidelity between the estimated compression result and the original texture data is assessed to generate a quality loss factor. This quantifies the potential impact of the compression process on visual quality, preventing over-compression from causing unacceptable image distortion. The quality loss factor is typically calculated based on widely accepted image quality assessment metrics such as peak signal-to-noise ratio or structural similarity index. To standardize the scoring format, this factor is calculated as follows: ,in It is the quality loss factor, and its value range is between 0 and 1. The higher the value, the smaller the quality loss and the higher the fidelity. It is the weighted average of the estimated quality scores of all texture units under the current layout draft. The weights can be set according to the importance of the texture unit in the scene or its screen share. It is an idealized maximum quality score reference value.
[0069] By simulating the texture sampling process, the cache access efficiency of the current atlas layout draft is evaluated, and a sampling efficiency factor is generated. Considering the friendliness of the reorganized atlas layout to the GPU texture caching mechanism, an efficient layout should ensure that logically adjacent texture samples during rendering also fall into physically adjacent memory addresses as much as possible, thereby improving cache hit rate. The sampling efficiency factor is quantified by analyzing the principle of locality of reference in the layout. The system counts the number of logarithmic separations of adjacent texture units in the original texture sequence into non-adjacent physical locations in the current draft. The sampling efficiency factor is calculated using the formula: ,in It is a sampling efficiency factor, with a value range between 0 and 1. The closer it is to 1, the better the locality of the layout and the higher the caching efficiency. It is the theoretically largest possible number of partition logarithms, i.e., the total number of original adjacency relationships, used for normalization.
[0070] The three independently calculated factors mentioned above, namely the compression ratio factors quality loss factor and sampling efficiency factor The scores are weighted and combined according to preset weighting coefficients to obtain the final joint efficiency score. The importance of different performance indicators is balanced based on the specific needs of the application scenario. The score is calculated as follows: ,in This is used to determine the final joint efficiency score. These are preset weighting coefficients, the sum of which is 1. For example, in projects with extremely high image quality requirements, they can be set to [0.2, 0.6, 0.2], while in mobile platform projects that are extremely sensitive to storage space, they can be set to [0.6, 0.2, 0.2]. This is the final scalar score. This accurately reflects the overall performance of the current draft layout and directly drives subsequent adjustment decisions.
[0071] For example, during the iterative collaborative decision-making process, the system needs to quantitatively evaluate the currently generated initial atlas layout draft to guide subsequent adjustments. Assume the total data size of the original uncompressed texture atlas... It is 2048KB, and the total number of original adjacency relationships is 2048KB. The value is 120. The system first performs simulated compression, which involves scanning the layout draft, identifying homogeneous clusters, and matching them with a performance lookup table to obtain the estimated total data size after compression. The value is 512KB, and the compression factor is calculated according to the formula. Next, the fidelity differences were assessed, and an idealized maximum quality score was set. The value is 100, calculated as the weighted average of the estimated quality scores of all texture units under the current layout. The value is 90, and the quality loss factor is obtained according to the formula. Subsequently, the texture sampling process was simulated, and statistics showed that the number of adjacent texture units in the original sequence were separated into non-adjacent physical locations in the current layout was [number missing]. The value is 18. The sampling efficiency factor is calculated using the formula. Finally, weighting coefficients are preset according to the application scenario. It is 0.5. It is 0.3. The value is 0.2. A weighted combination is performed using a formula to calculate the joint efficiency score of this layout draft. This score, as a feedback signal, directly determines whether the system accepts the current layout adjustment, thereby driving the collaborative decision-making process towards the global optimal solution.
[0072] S4. Based on the partition compression strategy mapping table, perform differential compression on the texture data arranged according to the optimized texture atlas layout to generate compressed texture data;
[0073] Optionally, performing differential compression includes:
[0074] Parse the partition compression strategy mapping table to identify a first region and a second region in the optimized texture atlas layout, wherein the first region corresponds to a first compression algorithm and the second region corresponds to a second compression algorithm;
[0075] The first compression algorithm is applied to the texture data in the first region to encode compressed texture data, and the first region is a highly homogeneous sparse cluster.
[0076] The second compression algorithm is applied to the texture data within the second region to encode it, generating compressed texture data.
[0077] Specifically, the partition compression strategy mapping table is parsed. This mapping table is a two-dimensional data structure whose dimensions are completely consistent with the optimized texture atlas layout. Each entry in the table specifies the compression algorithm identifier that should be used for the pixel block at the corresponding atlas location. The system scans this mapping table sequentially or in parallel to identify the regions that require different processing strategies.
[0078] During the parsing process, one or more specific blocks marked as first regions are identified. An optimized compression scheme is applied to these highly homogeneous regions. These first regions are technically defined as high-homogeneity sparse clusters, deliberately aggregated by the system during the layout optimization phase. A typical engineering parameter for classifying a region as a high-homogeneity sparse cluster is that the standard deviation of the luminance or chrominance components of all pixels within it is below a preset threshold, for example, below 3.0 to 5.0 in 8-bit representation. When the system identifies a region in the mapping table designated for the application of the first compression algorithm, it isolates the original texture data corresponding to that region and initiates the first compression algorithm to encode it. This algorithm is a lightweight encoder specifically designed for low-information-entropy data, aiming to accurately or approximately reconstruct the flat region with minimal bitrate overhead.
[0079] All remaining regions are identified and collectively referred to as a second region. A more general and robust compression algorithm is used to process these atlas portions containing rich details, edges, and complex textures. These regions are assigned the identifier of the second compression algorithm in the partitioned compression strategy map. This second compression algorithm is typically an industry-standard block compression algorithm that supports real-time hardware decompression, such as ASTC or BC7. These algorithms can provide stable compression ratios for complex image content within acceptable quality loss, and their internal encoding mode selection can adaptively handle various textures ranging from smooth gradients to high-frequency noise. The specified second compression algorithm is applied to the texture data within the second region for encoding. Through the above partitioning process, the original optimized texture atlas data is divided into multiple parts, each encoded by an algorithm best suited to its content characteristics. The compressed data blocks generated after all encoding operations are collected and combined into a complete compressed texture data. This data is heterogeneous, with different segments following different encoding formats, requiring information from the partitioned compression strategy map for correct decoding.
[0080] For example, when performing differential compression on texture data arranged according to the optimized texture atlas layout, the system first parses the partition compression strategy mapping table to identify the first and second regions in the layout. To reproduce the compression method for highly homogeneous sparse clusters, the system extracts a block marked as the first region and obtains its original pixel values. The system calculates the average value of the pixels in this region and quantizes it into an 8-bit integer to obtain a representative base value. Subsequently, the system iterates through and calculates the difference between each pixel value and the base value to generate the corresponding difference matrix. For the first region, the system further performs entropy encoding operations on the representative base value and the obtained difference matrix respectively, utilizing the sparse characteristic that the difference is highly concentrated near zero to generate efficient compressed texture data for the first region. For the second region, which contains complex details and is identified in the mapping table, the system applies a second compression algorithm for independent encoding processing. Finally, the system integrates and encapsulates the entropy-encoded data block generated for the first region and the compressed data generated for the second region, outputting the final heterogeneous compressed texture data, realizing a differential compression scheme that selects the optimal algorithm based on local features under the same atlas layout.
[0081] Optionally, the step of encoding the texture data within the first region using the first compression algorithm includes:
[0082] Calculate the average value of all pixels within the highly homogeneous sparse cluster to obtain a representative base value;
[0083] Calculate the difference between each pixel value within the highly homogeneous sparse cluster and the representative base value to generate a difference matrix;
[0084] Entropy encoding is performed on the representative base value and the difference matrix respectively to generate compressed texture data for the first region.
[0085] Specifically, the average value of all pixels within a highly homogeneous sparse cluster is calculated to obtain a representative baseline value. Macroscopic color or brightness information for this region is then extracted. For a given region containing... A single-channel region of 1 pixel, with a representative base value of: ,in As a representative base value, For the first in the region The pixel value of each pixel. To ensure calculation accuracy and ease of subsequent processing, the calculated... It is typically quantized to the nearest 8-bit integer. For multi-channel texture data, such as RGBA four-channel, this calculation is applied independently to each channel, generating a representative base vector containing the four components.
[0086] Based on this representative base value, a difference matrix is generated, transforming the original pixel information into a more easily compressible, zero-centered sparse data representation. Then, for each pixel within a highly homogeneous sparse cluster, the difference between its pixel value and the representative base value is calculated. ,in It is the first in the difference matrix The element at position 1 These are the original pixel values. These are the representative base values calculated in the previous step. Due to the high homogeneity of this cluster, the vast majority of element values in the difference matrix will be concentrated near zero. For example, their numerical range is likely distributed within a very small interval from -3 to +3, forming a highly sparse data distribution.
[0087] Entropy encoding is performed on the representative base values and the difference matrix to generate the final compressed texture data for the first region. Statistical redundancy is utilized to represent the data with the fewest possible bits. The representative base values, as a single value or a group of values, contain very little information and are typically represented directly using a fixed-length code. The core focus is on encoding the difference matrix. First, the frequency of each difference value in the difference matrix is statistically analyzed to construct a symbol probability model. Based on this model, an efficient entropy encoding algorithm, such as Huffman coding or arithmetic coding, is used to assign extremely short codewords to high-frequency differences, especially zero, while assigning longer codewords to low-frequency differences. The output of the entire encoding process is a bitstream, which is composed of the encoded representative base values and the encoded difference matrix data, together forming the compressed texture data for the first region.
[0088] For example, when reproducing and verifying the high homogeneity sparse clusters in the first region using the first compression algorithm, the system first extracts the four original pixel values contained in the region and sets them as follows: The system operates according to the formulas defined in the instruction manual. The specific process for calculating the average value of all pixels within this highly homogeneous sparse cluster is as follows: After quantification, representative base values are obtained. The system then uses the formula The difference between each pixel value within a cluster and a representative base value is calculated to generate a difference matrix. The result is... =150-151=-1, =152-151=1, =149-151=-2, =151-151=0. Finally, the system performs entropy encoding operations on the obtained representative base value 151 and the difference matrix composed of four difference elements, and uses the statistical redundancy characteristics of the difference distribution to generate compressed texture data of the first region.
[0089] S5. Integrate and encapsulate the layout information of the optimized texture atlas layout, the partition compression strategy mapping table, and the compressed texture data to generate a compressed data stream.
[0090] Optionally, generating the compressed data stream includes:
[0091] The layout information of the optimized texture atlas layout is converted into a layout index table;
[0092] Convert the partition compression policy mapping table into a policy instruction sequence;
[0093] Create a metadata block and store the layout index table and the strategy instruction sequence therein;
[0094] The metadata block is concatenated with the compressed texture data to form a compressed data stream.
[0095] Specifically, the optimized texture atlas layout information is transformed into a compact and easily queried data structure: a layout index table. This table provides a direct mapping from the logical coordinates of the original texture units to the physical coordinates of the reconstructed atlas at runtime. Each original texture unit in the dynamic texture sequence is assigned a unique integer ID, and an array indexed by these IDs is created. Each element of the array stores the starting coordinates of that texture unit in the optimized texture atlas layout, for example, a structure containing two 16-bit unsigned integers representing the X and Y coordinates of the new position.
[0096] The partitioned compression policy map is converted into a policy instruction sequence. The two-dimensional policy map is compressed into a one-dimensional instruction set more suitable for streaming processing, reducing metadata size and simplifying decoding logic. Run-length encoding is used to process this map. It scans the map in a predetermined order, such as from left to right or from top to bottom. When consecutive regions using the same compression algorithm are encountered, the system does not record them one by one, but generates an instruction containing two parts: an identifier for the compression algorithm and a data block length indicating the consecutive application of the algorithm, typically in bytes or pixels. This ultimately forms an instruction list, such as (algorithm A, length X), (algorithm B, length Y), (algorithm A, length Z)..., constituting the policy instruction sequence.
[0097] A centralized metadata block is created, integrating all non-pixel bootstrap information into a unified area at the beginning of the data stream, facilitating one-time loading and initialization by the parser. A clear data structure is defined to organize the metadata, which may include a file identifier, version number, the total width and height of the optimized texture atlas, and the previously generated layout index table and strategy instruction sequence. The system writes this data into a memory buffer according to a predetermined order and byte alignment rules, forming the metadata block.
[0098] The metadata blocks are concatenated with the compressed texture data to form the final compressed data stream, completing the final encapsulation and generating a complete, distributable file or data package. This operation is a direct data appending process. The metadata block generated in the previous step is used as the header of the data stream. Then, all the compressed texture data blocks generated by the differential compression step are appended sequentially after the metadata block, according to their order of appearance in the policy instruction sequence. This results in a single, continuous data stream containing all the information needed to reconstruct and use the dynamic texture atlas.
[0099] For example, during the integration and encapsulation of the compressed data stream, the system first converts the optimized texture atlas layout information into a layout index table, assigns unique identifiers to the two original texture units in the dynamic texture sequence, and records their physical coordinates in the atlas. The starting coordinates of texture unit one are set to 0,0, and the starting coordinates of texture unit two are set to 64,64. Subsequently, the system converts the partitioned compression strategy mapping table into a strategy instruction sequence, scans the mapping table using run-length encoding, and generates corresponding strategy instructions with algorithm identifier one and length value 256 for the first 256 pixel blocks of the atlas, thus completing the construction of the instruction list. Next, the system creates a metadata block, writing the generated layout index table, strategy instruction sequence, and the total width (1024) and total height (1024) of the atlas into a memory buffer. Finally, the system uses this metadata block as the header of the data stream and splices it with the compressed texture data blocks generated in the differential compression step. Since the size of the compressed data block in the first region is calculated to be 128 bytes and the data block in the second region is 512 bytes, the system appends them in order to form a compressed data stream with a total length of metadata length plus 640 bytes.
[0100] Optionally, the method further includes:
[0101] The compressed data stream is parsed to separate the metadata block and the compressed texture data;
[0102] Based on the strategy instruction sequence in the metadata block, the compressed texture data is decompressed in parallel to reconstruct the optimized texture atlas;
[0103] During rendering sampling, the layout index table in the metadata block is used to convert the logical sampling coordinates from the original texture sequence into physical sampling coordinates on the optimized texture atlas in real time.
[0104] Specifically, the compressed data stream is parsed to separate metadata and payload, preparing instructions and data for subsequent processing. When the client receives the compressed data stream, the decoder first reads a fixed-length metadata block at the beginning of the file. By parsing this metadata block, the decoder can obtain global information about the atlas, such as its size, and extract the core policy instruction sequence and layout index table. The data following the metadata block is then identified as compressed texture data.
[0105] Parallel decompression of compressed texture data is performed according to a policy instruction sequence. Leveraging the capabilities of modern multi-core processors, the compressed data is quickly restored to a pixel-level optimized texture atlas. The decoder parses the policy instruction sequence, which precisely specifies the length of each segment in the compressed texture data stream and its corresponding decompression algorithm. For example, the first instruction might be (algorithm A, length X). The decoder then allocates a worker thread to call the decoder for algorithm A, decompressing X bytes from the current position in the data stream. Simultaneously, other threads can process subsequent instructions. Because the instruction sequence explicitly divides the data blocks and algorithms, there are no data dependencies between the decompression tasks, enabling high parallelism and shortening reconstruction time. All decompressed pixel blocks are written to a pre-allocated memory block in the order of the instructions, ultimately reconstructing a complete optimized texture atlas.
[0106] During the real-time rendering sampling phase, the layout index table in the metadata block is used to perform coordinate transformation. This seamlessly redirects sampling requests based on the original texture sequence to the correct physical location on the reconstructed atlas, remaining transparent to the upper-level rendering logic. When the renderer needs to sample a specific texture unit in the original dynamic texture sequence, it provides the logical sampling coordinates for that unit, which typically include the texture unit's ID and the UV coordinates within the unit. The system's texture sampling middleware intercepts this request. Using the texture unit's ID as an index, it queries the layout index table to instantly obtain the physical reference coordinates of that unit on the optimized texture atlas. Then, through a simple coordinate addition operation, it combines the UV coordinates within the unit from the logical sampling coordinates with the retrieved physical reference coordinates to generate the final physical sampling coordinates on the optimized texture atlas, which are then submitted to the GPU for texture picking. This process is executed dynamically with each sampling request, ensuring rendering correctness.
[0107] For example, in the process of reproducing and verifying the parsing, parallel decompression, and real-time sampling coordinate transformation of the compressed data stream, the decoder first reads the metadata block in the file header and separates the payload, obtaining the total width and total height of the atlas (1024). The system parses the policy instruction sequence in the metadata block. If the first instruction is recorded as an algorithm identifier and has a length of 128 bytes, the decoder immediately allocates a worker thread to call the first compression algorithm to decompress the first 128 bytes of the compressed texture data stream, and writes the restored pixel blocks sequentially into a pre-allocated memory buffer to reconstruct the optimized texture atlas. When entering the rendering sampling stage, the system uses the layout index table in the metadata block to convert the logical sampling coordinates of the original texture sequence into physical sampling coordinates in real time. The ID of the original texture unit to be sampled is set to 5, and its logical UV coordinates within the unit are 0.2, 0.3. By querying the layout index table, the physical reference coordinates of this unit on the optimized texture atlas are obtained as 512, 256. The system performs coordinate addition, combining the logical sampling coordinates with the physical reference coordinates to calculate the final physical sampling coordinates (512.2, 256.3) on the optimized texture atlas, which are then submitted to the GPU for texture picking. This process is executed dynamically with each sampling request, ensuring the correctness and efficiency of the dynamic texture atlas based on the reorganized layout during rendering.
[0108] Based on the same inventive concept, such as Figure 4 As shown, the present invention also provides a dynamic texture atlas reassembly and compression system based on spatial sparsity, the system comprising:
[0109] The texture feature analysis module is used to acquire dynamic texture sequences and perform feature analysis on the texture units in the dynamic texture sequences to generate their respective multidimensional feature vectors.
[0110] The potential model modeling module is used to construct an initial compressibility potential model for each texture unit based on the multidimensional feature vector. The initial compressibility potential model is used to characterize the compressibility potential of the texture unit in different neighborhood environments.
[0111] The collaborative decision-making and layout optimization module is used to perform an iterative collaborative decision-making process with the initial compressibility potential model as input, and to synchronously generate an optimized texture atlas layout and a matching partition compression strategy mapping table during the process.
[0112] The differential compression module is used to perform differential compression on the texture data arranged according to the optimized texture atlas layout based on the partition compression strategy mapping table, and generate compressed texture data.
[0113] The data encapsulation module is used to integrate and encapsulate the layout information of the optimized texture atlas layout, the partition compression strategy mapping table, and the compressed texture data to generate a compressed data stream.
[0114] It should be noted that the electrical connections between the various units described above do not necessarily represent direct or indirect connections. Any indirect connection method can be applied to the embodiments of the present invention as long as it achieves the purpose of the present invention. The above descriptions are merely exemplary embodiments of the present invention and should not be construed as limiting the scope of the present invention.
[0115] All equivalent changes and modifications made in accordance with the teachings of this invention are still within the scope of this invention. Those skilled in the art will readily conceive of other embodiments of this invention upon considering the specification and the disclosure of practical truth. This application is intended to cover any variations, uses, or adaptations of this invention that follow the general principles of this invention and include common knowledge or conventional techniques in the art not described herein.
Claims
1. A dynamic texture atlas reconstructing and compression method based on spatial sparsity, characterized in that, The method includes: A dynamic texture sequence is acquired, and feature analysis is performed on the texture units in the dynamic texture sequence to generate their respective multidimensional feature vectors. This includes: calculating the pixel distribution complexity within the texture unit to generate spatial consistency features; quantifying the correlation between the texture unit and other units in its spatiotemporal neighborhood to generate neighborhood correlation features; and fusing the spatial consistency features and the neighborhood correlation features into their respective multidimensional feature vectors. Based on the multidimensional feature vector, an initial compressibility potential model is constructed for each texture unit. The initial compressibility potential model is used to characterize the compressibility potential of the texture unit in different neighborhood environments. Using the initial compressibility potential model as input, an iterative collaborative decision-making process is executed, during which an optimized texture atlas layout and a matching partitioned compression strategy mapping table are generated simultaneously. This includes: generating an initial atlas layout draft based on the initial compressibility potential model; performing a joint decision-making loop on the initial atlas layout draft, whereby the joint decision-making loop generates an estimated compression result through simulated compression and calculates a joint efficiency score based on the estimated compression result; adjusting the initial atlas layout draft according to the joint efficiency score to generate an updated atlas layout draft; repeating the joint decision-making loop and adjustment steps until the joint efficiency score meets a preset convergence condition, and using the updated atlas layout draft and the corresponding compression strategy as the optimized texture atlas layout and the partitioned compression strategy mapping table. Based on the partition compression strategy mapping table, differential compression is performed on the texture data arranged according to the optimized texture atlas layout to generate compressed texture data. This includes: parsing the partition compression strategy mapping table to identify a first region and a second region in the optimized texture atlas layout, wherein the first region corresponds to a first compression algorithm and the second region corresponds to a second compression algorithm; encoding the texture data in the first region using the first compression algorithm to generate compressed texture data, wherein the first region is a high homogeneity sparse cluster; and encoding the texture data in the second region using the second compression algorithm to generate compressed texture data. The layout information of the optimized texture atlas, the partition compression strategy mapping table, and the compressed texture data are integrated and encapsulated to generate a compressed data stream.
2. The dynamic texture atlas reassembly and compression method based on spatial sparsity according to claim 1, characterized in that, The construction of the initial compressibility potential model includes: Obtain a set of candidate neighborhood environment templates that represent typical neighborhood environments; The multidimensional feature vector of the texture unit is combined with each of the candidate neighborhood environment templates to form a set of combined feature vectors; Based on the set of combined feature vectors, the potential compression gain coefficient corresponding to each combined feature vector is obtained; The candidate neighborhood environment templates are mapped and associated with the corresponding potential compression gain coefficients to form an initial compressibility potential model.
3. The dynamic texture atlas reconstructing and compression method based on spatial sparsity according to claim 1, characterized in that, The calculation of the joint efficiency score includes: The degree of data compression is calculated from the estimated compression results to generate a compression ratio factor; The difference in fidelity between the estimated compression result and the texture data is evaluated to generate a quality loss factor. Simulate the texture sampling process of the initial atlas layout draft, evaluate its cache access efficiency, and generate a sampling efficiency factor; The compression ratio factor, quality loss factor, and sampling efficiency factor are weighted and combined according to preset weighting coefficients to obtain a joint efficiency score.
4. The dynamic texture atlas reassembly and compression method based on spatial sparsity according to claim 1, characterized in that, The step of encoding the texture data within the first region using the first compression algorithm includes: Calculate the average value of all pixels within the highly homogeneous sparse cluster to obtain a representative base value; Calculate the difference between each pixel value within the highly homogeneous sparse cluster and the representative base value to generate a difference matrix; Entropy encoding is performed on the representative base value and the difference matrix respectively to generate compressed texture data for the first region.
5. The dynamic texture atlas reconstructing and compression method based on spatial sparsity according to claim 1, characterized in that, The generation of the compressed data stream includes: The layout information of the optimized texture atlas layout is converted into a layout index table; Convert the partition compression policy mapping table into a policy instruction sequence; Create a metadata block and store the layout index table and the strategy instruction sequence therein; The metadata block is concatenated with the compressed texture data to form a compressed data stream.
6. The dynamic texture atlas reconstructing and compression method based on spatial sparsity according to claim 5, characterized in that, The method further includes: The compressed data stream is parsed to separate the metadata block and the compressed texture data; Based on the strategy instruction sequence in the metadata block, the compressed texture data is decompressed in parallel to reconstruct the optimized texture atlas; During rendering sampling, the layout index table in the metadata block is used to convert the logical sampling coordinates from the original texture sequence into physical sampling coordinates on the optimized texture atlas in real time.
7. A dynamic texture atlas reconstructing and compression system based on spatial sparsity, applied to the dynamic texture atlas reconstructing and compression method based on spatial sparsity as described in any one of claims 1-6, characterized in that, The system includes: The texture feature analysis module is used to acquire dynamic texture sequences and perform feature analysis on texture units in the dynamic texture sequences to generate their respective multidimensional feature vectors. This includes: calculating the pixel distribution complexity within the texture unit to generate spatial consistency features; quantifying the correlation between the texture unit and other units in its spatiotemporal neighborhood to generate neighborhood correlation features; and fusing the spatial consistency features and the neighborhood correlation features into their respective multidimensional feature vectors. The potential model modeling module is used to construct an initial compressibility potential model for each texture unit based on the multidimensional feature vector. The initial compressibility potential model is used to characterize the compressibility potential of the texture unit in different neighborhood environments. The collaborative decision-making and layout optimization module is used to execute an iterative collaborative decision-making process with the initial compressibility potential model as input. During this process, an optimized texture atlas layout and a matching partitioned compression strategy mapping table are generated simultaneously. This includes: generating an initial atlas layout draft based on the initial compressibility potential model; performing a joint decision-making loop on the initial atlas layout draft, whereby the joint decision-making loop generates an estimated compression result through simulated compression and calculates a joint efficiency score based on the estimated compression result; adjusting the initial atlas layout draft according to the joint efficiency score to generate an updated atlas layout draft; and repeating the joint decision-making loop and adjustment steps until the joint efficiency score meets a preset convergence condition, and using the updated atlas layout draft and the corresponding compression strategy as the optimized texture atlas layout and the partitioned compression strategy mapping table. The differential compression module is used to perform differential compression on texture data arranged according to the optimized texture atlas layout based on the partition compression strategy mapping table to generate compressed texture data. This includes: parsing the partition compression strategy mapping table to identify a first region and a second region in the optimized texture atlas layout, wherein the first region corresponds to a first compression algorithm and the second region corresponds to a second compression algorithm; applying the first compression algorithm to the texture data in the first region to generate compressed texture data, wherein the first region is a high-homogeneity sparse cluster; and applying the second compression algorithm to the texture data in the second region to generate compressed texture data. The data encapsulation module is used to integrate and encapsulate the layout information of the optimized texture atlas layout, the partition compression strategy mapping table, and the compressed texture data to generate a compressed data stream.
Citation Information
Patent Citations
An Adaptive Texture Atlas Compression System and Method Based on the Unity Engine
CN120047590B
Compression and decompression method based on texture image similarity
CN104869425A
Self-adaptive texture atlas compression system and method based on Unity engine
CN120047590A