Texture processing method and apparatus

CN122906223APending Publication Date: 2026-10-13NETEASE (SHANGHAI) NETWORK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611272950.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-20
Publication Date
2026-10-13

AI Technical Summary

Technical Problem

[0003]然而,上述基于平均化采样密度的评估方式难以反映纹理在不同映射区域的局部采样需求差异,且未结合纹理自身的内容频率特征进行差异化判定,导致降采样风险的评估结果与纹理的实际几何及内容特征存在偏差

Benefits of technology

[0009]本公开其中一实施例提供一种纹理处理方法,包括:获取目标纹理在三维网格上的采样分布信息,基于采样分布信息确定目标纹理在三维网格上的有效采样密度;获取目标纹理的频域能量分布信息,基于频域能量分布信息确定目标纹理的高频能量占比;基于有效采样密度和高频能量占比,对目标纹理执行降采样风险评估,确定目标纹理的风险等级和目标纹理的安全降采样级数。这样,通过结合纹理在三维网格上的有效采样密度与频域高频能量占比对降采样风险进行评估,有助于更准确地确定安全降采样级数,减少因平均化采样评估导致的局部画质损失,并有助于降低过度压缩对存储与显存资源的占用。同时,基于风险等级进行分类评估,有助于在资源构建过程中减少不必要的重复处理,降低计算资源的消耗并提升处理效率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122906223A_ABST
    Figure CN122906223A_ABST
Patent Text Reader

Abstract

An embodiment of the present disclosure provides a texture processing method and device, comprising: obtaining sampling distribution information of a target texture on a three-dimensional grid, determining effective sampling density of the target texture on the three-dimensional grid based on the sampling distribution information; obtaining frequency energy distribution information of the target texture, determining a high-frequency energy proportion of the target texture based on the frequency energy distribution information; performing down-sampling risk assessment on the target texture based on the effective sampling density and the high-frequency energy proportion, determining a risk level of the target texture and a safe down-sampling number of the target texture. In this way, it is helpful to more accurately determine the safe down-sampling number, and reduce the occupation of storage and display memory resources caused by excessive compression.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and more particularly to texture processing methods and apparatus. Background Technology

[0002] In the process of building resources for graphics rendering applications, texture resources usually occupy a high storage and memory overhead. Related technologies generally perform block compression and resolution downsampling on textures, and formulate a unified downsampling strategy based on the average sampling density of textures on 3D models, so as to balance resource budget and image quality in batch processing.

[0003] However, the aforementioned evaluation method based on averaged sampling density fails to reflect the differences in local sampling requirements of textures in different mapping regions, and it does not incorporate the texture's own content frequency characteristics for differentiated judgment. This leads to a deviation between the assessment results of downsampling risk and the actual geometric and content characteristics of the texture. In batch processing scenarios of large-scale texture resources, these deviations can easily lead to repeated manual verification and parameter readjustment in the construction pipeline, increasing processing time and computational resource consumption. Summary of the Invention

[0004] This disclosure provides a texture processing method, apparatus, electronic device, and computer-readable storage medium to at least partially solve the aforementioned problems existing in the related art.

[0005] According to one aspect of this disclosure, a texture processing method is provided, comprising: acquiring sampling distribution information of a target texture on a three-dimensional mesh, and determining the effective sampling density of the target texture on the three-dimensional mesh based on the sampling distribution information; acquiring frequency domain energy distribution information of the target texture, and determining the high-frequency energy ratio of the target texture based on the frequency domain energy distribution information; performing a downsampling risk assessment on the target texture based on the effective sampling density and the high-frequency energy ratio, and determining the risk level of the target texture and the safe downsampling level of the target texture.

[0006] According to one aspect of this disclosure, a texture processing apparatus is provided, comprising: a first determining module, configured to acquire sampling distribution information of a target texture on a three-dimensional mesh, and determine an effective sampling density of the target texture on the three-dimensional mesh based on the sampling distribution information; a second determining module, configured to acquire frequency domain energy distribution information of the target texture, and determine a high-frequency energy proportion of the target texture based on the frequency domain energy distribution information; and a risk assessment module, configured to perform a downsampling risk assessment on the target texture based on the effective sampling density and the high-frequency energy proportion, and determine the risk level of the target texture and the safe downsampling level of the target texture.

[0007] According to one aspect of this disclosure, an electronic device is provided, including a processor and a memory; the memory stores a computer program; when the processor executes the computer program, it implements any of the above texture processing methods.

[0008] According to one aspect of this disclosure, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements any of the above texture processing methods.

[0009] One embodiment of this disclosure provides a texture processing method, including: acquiring sampling distribution information of a target texture on a three-dimensional mesh; determining the effective sampling density of the target texture on the three-dimensional mesh based on the sampling distribution information; acquiring frequency domain energy distribution information of the target texture; determining the proportion of high-frequency energy in the target texture based on the frequency domain energy distribution information; and performing a downsampling risk assessment on the target texture based on the effective sampling density and the proportion of high-frequency energy to determine the risk level and the safe downsampling level of the target texture. Thus, by combining the effective sampling density of the texture on the three-dimensional mesh with the proportion of high-frequency energy in the frequency domain to assess the downsampling risk, it helps to more accurately determine the safe downsampling level, reduce local image quality loss caused by averaged sampling assessment, and help reduce the occupation of storage and video memory resources by excessive compression. Simultaneously, classification assessment based on risk level helps to reduce unnecessary repetitive processing during resource construction, reduce computational resource consumption, and improve processing efficiency. Attached Figure Description

[0010] To more clearly illustrate the technical solutions in the embodiments of this disclosure, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0011] Figure 1 A schematic diagram of a system architecture is shown in one exemplary embodiment of this disclosure; Figure 2 A flowchart illustrating a method in one exemplary embodiment of this disclosure is shown; Figure 3 A geometrical schematic diagram of a UV-world space Jacobian SVD is shown in one exemplary embodiment of this disclosure; Figure 4 A schematic diagram of a 2D FFT energy spectrum and a Nyquist cutoff circle is shown in one exemplary embodiment of this disclosure; Figure 5 A schematic diagram of the structure of an electronic device is shown in one exemplary embodiment of the present disclosure. Detailed Implementation

[0012] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.

[0013] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.

[0014] The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this disclosure, "a plurality of" means two or more, unless otherwise expressly specified.

[0015] The method in one embodiment of this disclosure can run on a terminal device or a server. The terminal device can be a local terminal device. When the method in the embodiment runs on a server, the method can be implemented and executed based on a cloud interaction system, wherein the cloud interaction system includes a server and client devices. Figure 1 The figure shows a cloud interaction system architecture diagram provided in this disclosure. As shown, the cloud interaction system may include: a client device 10 and a server 20, wherein the client device 10 can be connected to the server 20 via a network 30.

[0016] It should be noted that the information (including but not limited to: user input information, such as information entered by the user into an input box), data (including but not limited to data used for analysis, stored data, and displayed data, such as context code, all code of the current project, service pressure corresponding to operations performed on all code of the current project, and code development status of the current project), and signals involved in the embodiments of this disclosure are all authorized by the user or fully authorized by all parties, and the collection, use, and processing of related data must comply with relevant laws, regulations, and standards. For example, the context code, operations performed on all code of the current project, and the service pressure and code development status involved in the operations in the embodiments of this disclosure are all obtained under full authorization.

[0017] A texture processing method according to one embodiment of the present disclosure, such as Figure 2 As shown, the method may include: Step S210: Obtain the sampling distribution information of the target texture on the three-dimensional mesh, and determine the effective sampling density of the target texture on the three-dimensional mesh based on the sampling distribution information; Step S230: Obtain the frequency domain energy distribution information of the target texture, and determine the high-frequency energy ratio of the target texture based on the frequency domain energy distribution information; Step S250: Based on the effective sampling density and high-frequency energy ratio, perform a downsampling risk assessment on the target texture to determine the risk level of the target texture and the safe downsampling level of the target texture.

[0018] According to one embodiment of this disclosure, by combining the effective sampling density of textures on a 3D mesh with the proportion of high-frequency energy in the frequency domain to assess downsampling risk, it helps to more accurately determine the safe downsampling level, reduce local image quality loss caused by averaged sampling assessment, and help reduce the occupation of storage and video memory resources by excessive compression. Simultaneously, classification assessment based on risk level helps to reduce unnecessary repetitive processing during resource construction, reduce computational resource consumption, and improve processing efficiency.

[0019] The embodiments of this disclosure will now be further described.

[0020] In step S210, the sampling distribution information of the target texture on the 3D mesh is obtained, and the effective sampling density of the target texture on the 3D mesh is determined based on the sampling distribution information. In this way, by capturing the sampling requirements of the texture at the worst local location on the 3D mesh, the average masking degradation of the entire mesh is avoided, providing a precise geometric basis for subsequent risk assessment.

[0021] In one implementation, for the diffuse texture of the floor to be evaluated, the system first traverses all three-dimensional mesh models that reference the texture from the resource dependency database, obtains the mapping relationship between the vertex texture coordinates and vertex positions corresponding to the texture in each model, thereby generating sampling distribution information; then analyzes the density of texel coverage of the texture on the surface of each part of the mesh, and determines the effective sampling density of the texture on the three-dimensional mesh.

[0022] Optionally, the sampling distribution information is used to characterize the differences in texel coverage density of the target texture on the surface of different regions of the 3D mesh. Optionally, the sampling distribution information can be geometric mapping data collected by traversing the 3D mesh models referenced by the target texture in the resource dependency database. This data at least includes the correspondence between the texture coordinates and vertex positions of each vertex, used to describe the distribution pattern of texture pixels on the 3D surface. Considering that the average density of the entire mesh often masks texel stretching or compression in local areas, as a possible implementation, the above information further records the deformation differences in each local area. For example, large triangular faces show significant texel stretching at oblique angles, while dense areas show highly concentrated texels. By obtaining this type of distribution information, a basis for local detail distinct from the average density can be provided for subsequent evaluation, supporting accurate identification of the worst-case sampling requirements. It should be noted that the sampling granularity can be flexibly set according to actual needs; it can be subdivided and statistically analyzed per triangular face or aggregated and summarized by mesh region.

[0023] Optionally, the effective sampling density is used to quantify the true texel coverage level of the target texture at the worst position in the 3D mesh. Optionally, the effective sampling density can be a density index obtained by performing quantile aggregation on the sampling distribution information, and its value reflects the sufficiency of sampling at the worst position of the target texture in the 3D mesh. To avoid the average density of the entire mesh canceling out large areas of degraded regions with high-quality regions, as a possible implementation, the aforementioned effective sampling density can be determined by aggregating the local densities of each triangular face and arranging them in ascending order, then taking the 5th percentile. This prioritizes capturing systemic density deficiencies and masks noise from individual degenerate triangles. Furthermore, this density index can also be weighted and corrected in conjunction with the anisotropy ratio, for example, appropriately increasing the density requirement for textures whose texture coordinates are severely stretched in one direction. It should be noted that the specific selection of the percentile is not limited to the 5th percentile; in engineering practice, it can be flexibly adjusted between the 1st and 10th percentiles according to noise suppression requirements.

[0024] In an optional implementation, the sampling distribution information of the target texture on a 3D mesh is obtained, and the effective sampling density of the target texture on the 3D mesh is determined based on the sampling distribution information. This includes: obtaining a 3D mesh model referencing the target texture; determining the local deformation parameters when the target texture is mapped to each triangular face based on the vertex position information and texture coordinate information of the 3D mesh model; and determining the effective sampling density of the target texture on the 3D mesh based on the local deformation parameters. In this way, by extracting vertex and texture coordinates from the 3D mesh model to estimate local deformation on a triangular facet-by-triangular facet, an effective sampling density reflecting the worst-case local sampling requirements is obtained, avoiding the masking of local image quality degradation caused by the full-mesh mean statistical method.

[0025] In one implementation, an offline tool parses a resource dependency database to locate all 3D mesh models referencing the target texture. For a given reference mesh, it reads the vertex position array and texture coordinate array from its binary assets and splits them into several triangular faces according to their indices. For the k-th triangular face, its local deformation parameters are calculated based on the vertex position information and texture coordinate information corresponding to that triangular face to quantify the degree of deformation of that triangular face during the mapping process from texture space to world space. Subsequently, the local deformation parameters of the texture on all triangular faces of all reference meshes are collected, and a quantization aggregation operation is performed to finally obtain the effective sampling density of the target texture on the entire mesh. Thus, a face-by-face refined evaluation of texture sampling conditions based on the original geometric data is achieved.

[0026] Optionally, a 3D mesh model is used to carry the mapping relationship of the target texture and geometric vertex data, which is retrieved and located through resource dependencies.

[0027] Optionally, the aforementioned 3D mesh model can be various static mesh assets, typically stored in a project resource library in binary format. In one possible implementation, the system automatically filters out all 3D mesh models referencing target textures by traversing the material-to-model reference chain in the resource dependency database. Subsequently, the parser locates the corresponding mesh asset's binary file, extracting its vertex position attributes and texture coordinate attributes without requiring additional preprocessing or intermediate format conversion, thus ensuring compatibility with the existing resource pipeline. The topological index information contained in this 3D mesh model directly determines the subsequent method of splitting into triangles, and its data precision and coordinate system definition directly affect the accuracy of calculating local deformation parameters. It should be noted that the aforementioned 3D mesh model can be a character appearance mesh, or a scene building or prop mesh; its mesh complexity and face count do not affect the applicability of this method.

[0028] Optionally, vertex position information is used to describe the three-dimensional coordinates of each vertex that constitutes the three-dimensional mesh model in world space, and is the basic data for calculating the world space edge vectors of the triangular face.

[0029] Optionally, the vertex position information is typically stored in the mesh asset as a floating-point array, with each vertex corresponding to a 3D coordinate component. During computation, the reader combines the position information of three vertices into a triangular face according to the index list and calculates the 3D edge vectors between each pair of vertices. To avoid dimensional inconsistencies caused by model scale differences, the coordinate system of the vertex position information should be consistent with the world space of the subsequent rendering pipeline. If the same target texture is shared by multiple 3D mesh models with different scaling ratios, the vertex position information of each mesh will be sent to the computation process separately, producing their respective local deformation parameter sequences, which are finally summarized by texture dimension. It should be understood that the precision of the vertex position information can be single-precision or half-precision floating-point, and this disclosure does not limit it.

[0030] Optionally, texture coordinate information is used to describe the coordinates of each vertex in the two-dimensional texture coordinate space of the target texture, and is the basic data for calculating the edge vectors of the triangular face texture space.

[0031] Optionally, the aforementioned texture coordinate information is typically stored in pairs with vertex position information within the same vertex structure, with each vertex corresponding to a set of two-dimensional texture coordinates. When calculating the local deformation parameters of a single triangular facet, the system calculates the two-dimensional edge vectors in texture space based on the texture coordinate information of its three vertices, and then solves for the deformation matrix by combining these vectors with the three-dimensional edge vectors. Considering that some art assets may have texture coordinate seams, overlaps, or exceed the range of 0 to 1, as long as the texture coordinate projection area of ​​the triangular facet is not zero, its texture coordinate information can participate in the calculation normally; for triangular faces with degenerate texture coordinates, the system skips them directly to ensure numerical stability. This processing method is compatible with resources using various complex texture coordinate splitting methods, ensuring the analysis pipeline's broad coverage of existing assets.

[0032] Optionally, a triangular facet, as the smallest unit of facet-by-face geometric analysis, is a spatial plane formed by three vertices in indexed order, carrying the local mapping region of the target texture. Optionally, these triangular faces are generated in batches by traversing the topological index of the 3D mesh model, with each facet possessing computable area and edge vectors in both texture space and world space. In one specific implementation, the system employs a fully vectorized batch computation strategy, performing edge vector construction and deformation matrix solving in parallel on thousands of triangular faces within a single mesh, thereby controlling processing time to the millisecond level. It should be noted that the area distribution differences of triangular faces are often extremely significant: large-area triangular faces, such as those on walls or floors, are prone to texel stretching under oblique viewing angles, while small decorative faces typically have abundant texel density. By independently calculating local deformation parameters for each triangular facet, the poor sampling conditions corresponding to large-area triangular faces can be accurately identified, avoiding the masking of these local degradations within the statistical mean by the full-mesh mean statistical method.

[0033] Optionally, local deformation parameters characterize the stretching, compression, and anisotropy of the target texture at each triangular facet when mapped from texture coordinate space to world space, supporting refined evaluation for facet-by-face sampling requirements. Optionally, these local deformation parameters are obtained by performing singular value decomposition on the deformation matrix, where the maximum stretching factor and minimum stretching factor correspond to the longest and shortest mapping lengths of the texture coordinate unit vector in world space, respectively. In one implementation, the system converts the maximum stretching factor into the worst-case effective texel density of the triangular facet, i.e., texture resolution divided by the maximum stretching factor; the resulting value directly reflects the number of texels that the triangular facet can distribute over a unit distance in the world. Simultaneously, the anisotropy ratio is determined using the ratio of the maximum to the minimum stretching factor to quantify the degree of uneven stretching of texture coordinate mapping in different directions. For example, when the texture coordinates of a wall triangular facet are highly stretched in one direction but almost unstretched in another, its anisotropy ratio will be significantly greater than 1, indicating a significant limitation in the sampling conditions of that area at a specific viewpoint. These parameters provide a geometric basis for the effective sampling density that is subsequently aggregated to the texture level, which differs from the full-grid mean statistical method.

[0034] Optionally, besides extracting the maximum and minimum stretching factors through singular value decomposition, other matrix decomposition or norm calculation methods can also be used to obtain local deformation parameters. As an alternative implementation, the system can calculate the determinant of the deformation matrix and other matrix norms to measure the area scaling ratio and overall stretching degree, respectively. Although the explicit direction of the principal direction is lost, it can still serve as an auxiliary basis for sorting the sampling density of each triangular facet. Furthermore, in cases where specific projects are extremely sensitive to computational overhead, only the spectral radius or the maximum column sum of the deformation matrix can be extracted as a simplified local deformation index, sacrificing some directional resolution for faster batch processing speed. It should be understood that regardless of the decomposition or norm form used, the main function of local deformation parameters is to quantify the nonlinear deformation from texture coordinates to world space facet by face, thereby providing geometric input for downstream risk assessment. This disclosure does not limit the specific numerical extraction method.

[0035] In an optional implementation, based on the vertex position information and texture coordinate information of the 3D mesh model, the local deformation parameters when the target texture is mapped to each triangular face are determined. This includes: for each triangular face contained in the 3D mesh model, calculating the two-dimensional edge vector of the triangular face based on the texture coordinate information, and calculating the three-dimensional edge vector of the triangular face based on the vertex position information; determining the deformation matrix corresponding to the triangular face based on the two-dimensional and three-dimensional edge vectors; and decomposing the deformation matrix to obtain the local deformation parameters of the triangular face. In this way, the mapping between texture and world space vertices is transformed into edge vectors and deformation matrices, which can accurately capture the degree of stretching in each direction of the triangular face, providing an accurate mathematical basis for subsequent face-by-face local texel density calculation.

[0036] For example, in one implementation, for the metal texture referenced on the surface of the character's armor, the processing tool reads the vertex position array and texture coordinate array of the armor model from the mesh binary data, and splits it into several triangular faces according to the index table. One of the triangular faces is selected, whose three vertices have world space coordinates of (10.0, 2.0, 5.0), (12.0, 2.0, 5.0), and (10.5, 4.0, 5.2), and texture space coordinates of (0.1, 0.1), (0.6, 0.1), and (0.3, 0.5). At this point, the tool first calculates two three-dimensional edge vectors of (2.0, 0.0, 0.0) and (0.5, 2.0, 0.2), and two two-dimensional edge vectors of (0.5, 0.0) and (0.2, 0.4). Subsequently, the system constructs a 2x2 deformation matrix based on the two-dimensional and three-dimensional edge vectors, so that the matrix can map the small displacements on the texture plane to the corresponding displacements in world space. Then, the deformation matrix is ​​mathematically decomposed to obtain two eigenvalues ​​that characterize the maximum and minimum stretching directions of the triangular face, which serve as the local deformation parameters of the triangular face.

[0037] Optionally, the two-dimensional edge vector is obtained through the texture coordinate difference and is used to characterize the local edge direction and span of the triangular face in the texture space.

[0038] Optionally, the aforementioned two-dimensional edge vectors are composed of the coordinate differences between the corresponding edges of two sides of the same triangular face in texture space. Specifically, the calculation involves subtracting the texture coordinates of the first vertex from the texture coordinates of the second vertex, and then subtracting the texture coordinates of the first vertex from the texture coordinates of the third vertex, resulting in two two-dimensional vectors. The direction and length of these two edge vectors directly reflect the tiling direction of the texture within the triangular face. When the texture mapping is rotated or stretched, the included angle and magnitude of the two-dimensional edge vectors will change accordingly. In batch processing, matrix-based difference operations can be performed simultaneously on all triangular faces of the entire mesh to obtain the entire array of two-dimensional edge vectors at once, thus avoiding the additional overhead of per-vertex looping. It should be noted that the calculation of two-dimensional edge vectors is not only applicable to standard diffuse textures, but also to various texture resources requiring geometric deformation analysis, such as normal maps and mask maps.

[0039] Optionally, the three-dimensional edge vectors are determined by the difference in vertex position coordinates, which are used to characterize the actual geometric edge scale and spatial orientation of the triangular face in world space.

[0040] Optionally, the aforementioned 3D edge vectors are obtained by extracting the position coordinates of the three vertices of the same triangular face in the world coordinate system and performing vector difference operations. The first edge vector is the position of the second vertex minus the position of the first vertex, and the second edge vector is the position of the third vertex minus the position of the first vertex. These two 3D edge vectors completely depict the true geometric shape of the triangular face in world space, including the side length ratio, the included angle, and the orientation of the spatial plane in which the triangular face is located. During the calculation process, if a degenerate triangular face with overlapping vertex coordinates or three nearly collinear vertices is encountered, its 3D edge vectors may have excessively short magnitudes or extremely small cross-sections. In this case, the degenerate triangular face can be skipped directly to avoid numerical anomalies in subsequent matrix inversion or decomposition operations. For example, for a large rectangular floor panel on a wall, the 3D edge vectors of the two triangular faces after splitting usually have similar magnitudes. However, for small triangular faces in delicate parts such as the earlobes of a character model, the magnitudes of their 3D edge vectors are significantly smaller, thus providing the original geometric basis for the subsequent differential calculation of the deformation matrix.

[0041] Optionally, the deformation matrix is ​​used to establish a linear mapping relationship from texture space to local planes in world space, in order to quantify the degree of local stretching and compression when the texture is attached to a 3D surface.

[0042] Optionally, the aforementioned deformation matrix is ​​a 2x2 matrix. Its construction logic involves projecting the 3D edge vectors onto the plane containing the triangular faces, and using the 2D edge vectors as the corresponding texture space input. A 2x2 linear mapping matrix is ​​then established, such that the product of this matrix and the 2D edge vectors precisely reconstructs the projected 3D edge vectors. The essential function of this matrix is ​​that after a unit vector in texture space is transformed by this matrix, its corresponding direction and stretching length in world space can be obtained, thus establishing a local linear approximation from texture coordinate differentiation to world space displacement. Considering the significant differences in vertex distribution among different triangular faces, to avoid the performance bottleneck caused by sequential calculation of each triangular face, in practical engineering implementation, the 2D and 3D edge vectors of the entire mesh can be batch-stacking into tensors, and the deformation matrix of all triangular faces can be solved at once using a matrix operation library. It should be noted that the process of obtaining the deformation matrix assumes that the mapping within the triangular area is a local linear transformation. For subdivided surfaces with high curvature, this assumption still has high approximation accuracy under the condition that the triangular faces are sufficiently dense.

[0043] Optionally, besides directly solving the deformation matrix using edge vectors, one can first calculate the normal vectors of the triangular facets in world space, then project the 3D edge vectors onto the tangent plane of the triangular facet to obtain the corresponding 2D representation, and then fit the deformation matrix using standard linear algebra methods. After determining the deformation matrix, matrix decomposition can be performed on the matrix to extract the maximum stretch factor and minimum stretch factor, two local deformation parameters. The maximum stretch factor represents the direction and magnitude of the most severe stretching of the texture per texel in world space, while the minimum stretch factor represents the direction and magnitude of the most significant compression. If the deformation matrix corresponding to a triangular facet exhibits extreme anisotropy, i.e., the ratio of the two stretch factors is significantly greater than one, it indicates that the texture is severely stretched in one direction and relatively compressed in another. This situation is more common in model areas with directional texture mapping, such as wall gaps or character clothing straps, and needs to be differentiated and processed in the subsequent aggregation calculation of effective sampling density.

[0044] In an optional implementation, the deformation matrix is ​​decomposed to obtain the local deformation parameters of the triangular facets, including: performing singular value decomposition on the deformation matrix to obtain the maximum and minimum stretching factors; and determining the effective sampling density and anisotropy ratio of the triangular facets based on the maximum and minimum stretching factors. This not only accurately extracts the maximum and minimum stretching of UV mappings in each direction but also quantifies directional differences into anisotropy indices, thus avoiding the limitation of a single scalar value masking severe local stretching and improving the accuracy of downsampling risk assessment.

[0045] For example, in one instance, for a constructed deformation matrix, singular value decomposition yields two stretching factors: the larger one is the maximum stretching factor, and the smaller one is the minimum stretching factor. The maximum stretching factor represents the longest stretching factor of the UV unit vector corresponding to the triangle in world space, while the minimum stretching factor represents the shortest stretching factor. Based on this, dividing the original texture resolution width by the maximum stretching factor yields the effective sampling density of the triangle in the worst stretching direction; dividing the maximum and minimum stretching factors yields the anisotropy ratio of the triangle, used to measure the degree of stretching imbalance in different directions of the UV mapping. For example, when the maximum stretching factor is 3.5 and the minimum stretching factor is 1.0, the anisotropy ratio is 3.5, indicating that the triangle is significantly stretched in one direction.

[0046] like Figure 3 This diagram illustrates a geometric representation of a UV-to-world-space Jacobian SVD (Singular Value Decomposition), demonstrating the transformation of a triangle from UV space to world space. Left image (UV space / texture coordinates): A blue triangle with vertices labeled UV0, UV1, and UV2, and sides labeled dUV1 (orange horizontal side) and dUV2 (green hypotenuse). The coordinate axes are U (horizontal axis 0.0-1.0) and V (vertical axis 0.0-1.0). The center is labeled 'Jacobian matrix J', with an arrow pointing to the right. Right image (world space / rendering coordinates): The same triangle, after Jacobian transformation, becomes an orange triangle in world space, with vertices labeled P0, P1 (maximum stretch direction, labeled with blue horizontal double-headed arrows σ_max (maximum singular value)) and P2_min (maximum compression direction, labeled with green vertical double-headed arrows σ_min (minimum singular value)). The coordinate axes are world space X (0.0-3.5) and world space Y (0.0-1.75). Anisotropy ratio = σ_max / σ_min; Effective texel density = Texture width / σ_max.

[0047] Optionally, the above decomposition of the deformation matrix can be performed using singular value decomposition (SVD) to obtain the maximum and minimum stretching factors. Optionally, the object of the SVD can be the 2×2 deformation matrix determined in the preceding steps based on the two-dimensional and three-dimensional edge vectors. This matrix describes the mapping relationship of a unit element in the texture coordinate system after a linear transformation in world space. After performing SVD on this deformation matrix, two singular values, the maximum and minimum stretching factors, can be obtained. The maximum stretching factor represents the length multiple of the UV unit vector in the direction where it is stretched most severely in world space, and the minimum stretching factor represents the length multiple in the direction where it is stretched least severely. Thus, the original resolution of the texture can be converted into the effective sampling density in the worst direction using the maximum stretching factor, thereby replacing the whole-mesh averaging calculation method and directly locating the weakest link in local sampling. It should be noted that the above SVD is only an example. In other embodiments of this disclosure, other matrix decomposition methods such as eigenvalue decomposition or extreme decomposition can also be used, as long as the difference in stretching scale in each direction can be obtained. This disclosure does not limit this. Furthermore, to avoid performance bottlenecks caused by independent calculation of each triangle, in practical engineering implementation, a vectorized parallel processing strategy can be adopted for a batch of triangles in the same mesh. The batch singular value decomposition can be completed at once on the graphics processing unit or the computing unit that supports single instruction stream and multiple data stream, so as to balance analysis accuracy and computational efficiency.

[0048] Optionally, the anisotropy ratio mentioned above is determined based on the ratio of the maximum stretch factor to the minimum stretch factor, reflecting the directional stretching differences in texture mapping.

[0049] Optionally, the anisotropy ratio mentioned above is calculated as the ratio of the maximum stretch factor to the minimum stretch factor. This ratio directly reflects the degree of stretching imbalance of UV mapping in each orthogonal direction. Considering that real-world textures often exhibit severe stretching in one direction while remaining almost proportional in another, introducing this index can avoid the loss of directional information in a single scalar density evaluation and prevent severely anisotropic textures from being misjudged as having the same sampling requirements as proportionally scaled textures. In one specific implementation, a larger anisotropy ratio indicates a more significant directional difference, requiring a more conservative processing strategy for downsampling the corresponding texture; if the ratio is close to 1.0, it indicates that the UV mapping is close to isotropic. It should be noted that the method of obtaining this anisotropy ratio is not limited to ratio calculation; directional differences can also be measured by difference or logarithmic transformation of the ratio, etc., and this disclosure does not limit this. Furthermore, during the overall texture aggregation stage, the anisotropy ratio of each triangular face can be statistically analyzed by percentile. For example, the 95th percentile can be taken as the anisotropy index of the texture, thereby preserving the information of the region with the most significant directional differences while shielding the noise introduced by individual degenerate triangles.

[0050] Optionally, the anisotropy ratio mentioned above can be obtained not only through the direct ratio of the maximum stretch factor to the minimum stretch factor, but also through a form adjusted by square root transformation or normalization to suppress the influence of extreme outliers. In one implementation, when the minimum stretch factor approaches zero, causing the ratio to approach infinity, a minimum truncation can be introduced for the minimum stretch factor, or the logarithmic difference between the two can be used instead of the ratio to ensure numerical stability. Furthermore, after obtaining the anisotropy ratio of each triangular facet, it can be aggregated by position for the entire texture, for example, taking the 95th percentile as the anisotropy index of the texture. This preserves the information of the region with the most significant directional differences while avoiding the noise of individual degenerate triangles affecting the overall evaluation. In addition, for interface or special effect textures without a 3D mesh reference, since there is no deformation matrix, the anisotropy ratio can be set to 1.0 by default, representing the isotropic assumption, so that it does not interfere with the subsequent evaluation strategy based on other dimensions, ensuring the compatibility of the geometric analysis module with textures from different sources. It should be understood that the above aggregation method is just an example, and statistical measures such as the mean or truncated mean can also be used. This disclosure does not limit this.

[0051] In an optional implementation, the effective sampling density of the target texture on the 3D mesh is determined based on local deformation parameters. This includes: collecting the effective sampling density and anisotropy ratio of each triangle facet contained in the 3D mesh model; performing quantization and aggregation on the effective sampling density to obtain the effective sampling density of the target texture; and performing quantization and aggregation on the anisotropy ratio to obtain the anisotropy index of the target texture. In this way, by processing the local deformation parameters of multiple triangle faces through quantization and aggregation, not only is the true sampling requirement of the texture on the worst-performing triangle facet captured, but noise interference from individual degenerate triangles is also effectively shielded, making the downsampling decision closer to the local degradation risk in actual rendering.

[0052] For example, suppose a brick wall texture is mapped onto a large mesh containing 800 triangular faces. After preliminary geometric analysis, the effective sampling density value sequence for each triangular face is obtained. This sequence is then sorted in ascending order, and the value at the 5th percentile (e.g., 1.2 texels per world unit) is taken as the effective sampling density of the texture. Simultaneously, the anisotropy ratios of all triangular faces are sorted in descending order, and the value at the 95th percentile (e.g., 3.8) is taken as the anisotropy index. In this way, even if there are many triangles in the mesh that are in redundant viewpoints, the true worst-case sampling requirement of the texture can still be accurately captured, thus providing a robust data foundation for downstream downsampling decisions.

[0053] Optionally, the above-mentioned quantile aggregation is used to sort multiple triangular facet parameters and truncate values ​​at specified quantiles as extreme sampling representations of the texture. Optionally, the above-mentioned quantile aggregation can use the 5th percentile to aggregate the effective sampling density and the 95th percentile to aggregate the anisotropy ratio. Considering that directly taking the arithmetic mean of the values ​​of all triangular faces can easily cause the values ​​of large-area low-stretched triangles and locally high-stretched triangles to cancel each other out, thereby masking the real risk of local undersampling, one objective of this embodiment is to naturally filter out the noise of a very small number of degenerate triangles in the mesh by truncating the low-end quantiles (such as the 5th percentile) of the sorted sequence, while retaining the key signal of systematic density insufficiency; and for the anisotropy ratio, by truncating the high-end quantiles (such as the 95th percentile), the most severe directional stretching of the texture during the mapping process can be accurately captured. The specific value of the aforementioned percentile is not limited to the 5th percentile or the 95th percentile. In other embodiments, any value between the 1st and 10th percentiles can be selected to aggregate the effective sampling density based on the grid quality and noise tolerance, or a value between the 90th and 99th percentiles can be selected to aggregate the anisotropy ratio. This disclosure does not limit this.

[0054] Optionally, in another implementation, the above-mentioned quantile aggregation can also be achieved through truncated means or robust statistical estimators. For example, after removing a certain proportion of the maximum and minimum values, the mean of the remaining samples can be calculated, which can also preserve the overall distribution offset characteristics while suppressing extreme noise. It should be noted that the above description of the aggregation method is only one example. In actual implementation, the choice can be made according to the texture type, mesh topology complexity, and pipeline performance budget. For example, for simple meshes with a very low number of faces, the minimum value after sorting can be directly used as the effective sampling density, while for complex scene models with more than one million faces, a streaming quantile approximation algorithm can be used to accelerate the calculation, thereby significantly reducing the memory and time overhead caused by full sorting while maintaining accuracy.

[0055] Optionally, the aforementioned anisotropy index is used to quantify the directional stretching differences during texture mapping and is obtained by high-order quantile aggregation of the anisotropy ratio.

[0056] Optionally, the anisotropy index mentioned above can be a value obtained by aggregating the 95th percentile, used to reflect the worst-case directional stretching of the entire texture among all its referenced meshes. Considering that real-world textures often undergo severe stretching along one axis while remaining almost unchanged along another during UV mapping, using only scalar density for downsampling decisions will lose directional information and give the same score to textures with severe anisotropy and textures with proportional stretching. As a possible implementation, introducing this index can amplify the downsampling risk weight of highly anisotropic textures by using square root operations when calculating the comprehensive risk score. It should be understood that the specific calculation of this index is not limited to the 95th percentile; in other implementations, it can also be in the form of the maximum value, the 90th percentile, or the truncated maximum value. Furthermore, in scenarios where a single texture is referenced by multiple meshes, the anisotropy index can be calculated separately for each referenced mesh, and then the largest value can be taken as the final index of the texture to take into account extreme deformation under multiple reference sources.

[0057] In step S230, the frequency domain energy distribution information of the target texture is obtained, and the proportion of high-frequency energy in the target texture is determined based on the frequency domain energy distribution information. In this way, by obtaining the frequency domain energy distribution information and determining the proportion of high-frequency energy, differentiated downsampling evaluation can be implemented according to the frequency characteristics of the texture content, so that high-frequency details and low-frequency smooth textures can obtain differentiated compression strategies, avoiding the loss of details or memory redundancy caused by a uniform standard.

[0058] In one implementation, a frequency domain transformation is performed on the target texture to obtain its frequency domain energy distribution information, thereby determining the proportion of high-frequency energy. Specifically, after the evaluation tool reads the RGB pixel data of the texture, it performs a two-dimensional frequency domain transformation on each color channel to obtain its respective channel spectrum. Subsequently, based on the candidate downsampling levels, the corresponding Nyquist cutoff frequency is determined, and the frequency points in the spectrum exceeding the cutoff frequency are defined as high-frequency regions. The ratio of high-frequency region energy to total energy is then calculated. For example, for a wall texture with dense brickwork, its high-frequency energy proportion can reach approximately 24.3%, indicating that the texture is highly sensitive to downsampling; while for a sky gradient texture, the high-frequency energy proportion is only about 2.1%, indicating that its content is smooth and allows for a greater degree of downsampling compression.

[0059] Among them, the aforementioned frequency domain energy distribution information is used to reflect the energy concentration pattern of the target texture on the frequency domain plane, providing a data basis for identifying the frequency characteristics of texture content.

[0060] Optionally, frequency domain energy distribution information is used to characterize the energy distribution of texture content at different spatial frequencies, thereby distinguishing between high-frequency detailed areas and low-frequency smooth areas. As one possible implementation, the aforementioned frequency domain energy distribution information can be obtained by performing a two-dimensional frequency domain transformation on the target texture. For example, transforming texture pixel data to a frequency domain plane yields a spectrum, where the origin corresponds to the DC component, and different radii correspond to different spatial frequency components. Furthermore, the frequency domain transformation can be performed separately for each color channel of the target texture. After obtaining the channel spectrum for each channel, the high-frequency energy distribution of each channel is statistically analyzed to avoid information from a single channel masking the frequency characteristics of other channels. It should be noted that, in addition to two-dimensional frequency domain transformation, frequency domain energy distribution information can also be obtained through other time-frequency joint analysis methods such as wavelet decomposition; this disclosure is not limited to these methods. Furthermore, for special types of textures such as normal maps, when obtaining frequency domain energy distribution information, their vector attributes can be combined, and the angle deviation before and after downsampling can be calculated to assist in evaluating frequency characteristics, thereby improving the evaluation accuracy of such special textures.

[0061] The aforementioned high-frequency energy ratio is used to quantify the proportion of high-frequency components in the target texture that exceed the candidate downsampling cutoff frequency, serving as a key indicator for evaluating the texture's sensitivity to downsampling.

[0062] Optionally, the high-frequency energy ratio is used to measure the proportion of high-frequency energy in the texture content to the total frequency domain energy. A higher ratio indicates richer texture details and a greater likelihood of distortion after downsampling. As a possible implementation, the determination process for the high-frequency energy ratio may include: defining a high-frequency region in the spectrum based on the Nyquist cutoff frequency corresponding to the candidate downsampling levels; summing the energies of all frequency points within this high-frequency region to obtain the high-frequency energy; and then dividing this sum by the total spectral energy to obtain the ratio. Considering that different color channels may carry different frequency information, the above calculation can be performed independently on each color channel and the maximum value taken to ensure effective capture of the frequency characteristics of the most sensitive channels in the texture. For normal maps, to avoid evaluation distortion caused by color domain frequency domain analysis, an angle deviation index can be used to replace or supplement the high-frequency energy ratio. For example, the texture can be re-normalized after downsampling and the angle difference calculated pixel-by-pixel with the original normal. It should be noted that the threshold for the high-frequency energy ratio can be dynamically adjusted according to the project's image quality requirements, and this disclosure is not limited to a fixed value.

[0063] In an optional implementation, the frequency domain energy distribution information of the target texture is obtained, and the high-frequency energy proportion of the target texture is determined based on the frequency domain energy distribution information. This includes: performing a frequency domain transformation on the target texture to obtain the spectrum data corresponding to the target texture; determining the high-frequency region and the low-frequency region in the spectrum data based on the cutoff frequency corresponding to the candidate downsampling level, and calculating the ratio of the energy of the high-frequency region to the total energy of the spectrum data to obtain the high-frequency energy proportion; wherein, performing a frequency domain transformation on the target texture to obtain the spectrum data corresponding to the target texture includes: performing a two-dimensional frequency domain transformation on each color channel of the target texture to obtain the channel spectrum corresponding to each color channel; calculating the high-frequency energy proportion of each channel spectrum, and selecting the maximum value as the high-frequency energy proportion of the target texture. In this way, by introducing independent frequency domain analysis of multiple color channels and selection of the extreme value of high-frequency energy proportion, the sensitivity of high-frequency details of the texture can be preserved while effectively shielding the noise interference of a single channel, thereby improving the accuracy and reliability of downsampling risk assessment.

[0064] In one implementation, when acquiring the frequency domain energy distribution information of the target texture, the pixel data of the texture is first separated into three color channels: red, green, and blue, and normalized to the numerical range [0,1]. Then, a two-dimensional frequency domain transformation (e.g., two-dimensional fast Fourier transform, i.e., 2D FFT) is performed independently on each color channel, and the zero-frequency component is shifted to the center of the spectrum using the fftshift operation to obtain the channel spectrum corresponding to each channel. During downsampling simulation evaluation, the Nyquist cutoff frequency is determined based on the candidate downsampling level N, and the high-frequency region and low-frequency region are divided on the spectrum plane with this cutoff frequency as the radius. The sum of the squares of the spectral energy magnitudes in the high-frequency region is counted as the high-frequency energy, and its ratio to the total energy of the spectral data is calculated to obtain the high-frequency energy proportion of each channel. Finally, the maximum value is selected from the calculation results of each of the three color channels as the final high-frequency energy proportion output of the target texture, which is used to participate in the subsequent comprehensive risk score calculation.

[0065] like Figure 4 The diagram shows a 2D FFT energy spectrum and the Nyquist cutoff circle. Two 2D FFT spectrum heatmaps are displayed side-by-side to illustrate the frequency cutoff effect of the Nyquist cutoff circle. Left image (high-frequency dense texture / like brick seams): high_freq_ratio ≈ 24.3%, marked 'critical'.

[0066] In the spectrum diagram, the FFT energy distribution in the upper right corner is discrete (multiple high-brightness points are distributed in various places); there is a cyan dashed circle in the center labeled 'Nyquist cutoff circle (downsampling 1×)', and there are significant yellow / red energy points outside the circle; the area outside the circle is the high-frequency energy that will be lost during downsampling.

[0067] The right image (low-frequency smooth texture / such as gradient / sky): high_freq_ratio ≈ 2.1%, marked 'low downsampling risk (safe)'.

[0068] In the spectrum, energy is highly concentrated near the central DC; there is almost no energy distribution outside the Nyquist cutoff circle, which appears dark blue; the right side is marked with the color scale log(|F|²), ranging from 0 to 16.

[0069] Both graphs have frequencies kx and ky on the horizontal and vertical axes, ranging from -60 to 60.

[0070] Optionally, a two-dimensional frequency domain transformation is used to map texture pixel data from the spatial domain to the frequency domain, generating spectral data for downsampling risk assessment. Optionally, the two-dimensional frequency domain transformation can be a mathematical operation such as a two-dimensional fast Fourier transform (2D FFT) that can convert spatial pixel information into frequency component representations. Considering that the essence of detail loss after texture downsampling is actually the aliasing and truncation of high-frequency components, as a possible implementation, the above method performs a two-dimensional frequency domain transformation on the target texture, transforming the pixel intensity changes originally dispersed at different spatial locations into energy distributions at different frequency positions in the spectrum, thereby accurately quantifying the frequency composition of the texture content. Taking 2D FFT as an example, each complex element in its output spectrum data corresponds to the amplitude and phase information of a specific spatial frequency. The region near the center of the spectrum represents the slow changing trend of the image (low frequency), while the region near the edge corresponds to rapidly changing details (high frequency). To avoid the inconvenience of frequency band division caused by the zero-frequency component of the spectrum being located at the four corners of the array, an fftshift operation can be further performed after the transformation to shift the zero-frequency point to the geometric center of the spectrum array, allowing the high and low frequency regions to be visually divided in the form of concentric circles or rectangular bands. It should be noted that the above description of the transformation type is only one example, and this disclosure is not intended to limit the specific algorithm of frequency domain transformation. In actual implementation, wavelet decomposition or other orthogonal transformation methods can also be used to obtain equivalent frequency domain energy distribution information, and the embodiments of this disclosure do not limit this.

[0071] Optionally, the candidate downsampling level is used to simulate the resolution reduction level of the texture, and the cutoff frequency is used to determine the high-frequency and low-frequency boundaries in the spectrum. Optionally, the candidate downsampling level represents a preset number of times the target texture is successively downsampled by half. Each downsampling means that the texture is reduced to half its original size in both the width and height directions, and the Nyquist cutoff radius in the frequency domain is halved accordingly. To avoid high-frequency information aliasing and the generation of visible block artifacts due to blind downsampling, the above method introduces a cutoff frequency dynamically associated with the candidate downsampling level into the spectral data, dividing the spectral plane into a low-frequency retention region and a high-frequency discard region. Specifically, if the current candidate downsampling level is N, and the original texture resolution is W and H in the width and height directions, respectively, then the cutoff radius r in the frequency domain can be set as min(W, H) divided by 2 and then divided by 2 to the power of N. The outer region of the ring or rectangle on the spectrum that is more than this radius from the center is defined as the high-frequency region that will be discarded by subsequent downsampling operations, and the rest is classified as the low-frequency region. It should be understood that the above-mentioned method for calculating the cutoff radius corresponds to the frequency cutoff characteristics of an ideal rectangular filter. However, in practical processing, in order to be compatible with non-square textures with different aspect ratios, the cutoff frequency can also be adaptively adjusted according to the long or short side, or an elliptical boundary can be used instead of a circular boundary to define the high and low frequency boundaries. This disclosure is not limited to this. Furthermore, this division of high and low frequency regions is not only applicable to regularly arranged grid spectra, but can also be extended to other non-uniform frequency sampling methods, thereby maintaining a consistent physical meaning in different transform domains.

[0072] Optionally, independent analysis of multiple color channels aims to perform frequency domain statistics on different color components separately and determine the upper limit of the high-frequency energy proportion of the texture through an extremum selection strategy. Optionally, since texture pixels are typically stored using three color channels—red, green, and blue—and the richness of high-frequency details in the same texture region often varies across different channels—for example, the normal information of some materials is mainly encoded in the blue channel, while surface scratches may be more evident in the red channel—to avoid insufficient sensitivity due to mean aggregation, the above method first performs a two-dimensional frequency domain transformation independently on each color channel and calculates the proportion of high-frequency energy in the total energy of each channel's spectrum separately. Finally, the maximum value from the calculation results of the three channels is selected as the high-frequency energy proportion of the target texture. In other words, as long as any color channel has a significant high-frequency component, the texture is considered to have high detail density, thus obtaining a more conservative recommendation for a safe downsampling level in the next level of comprehensive risk scoring. As one possible implementation, this extreme value selection mechanism can also be extended to include additional channels such as alpha channels, single black and white channels, or additional channels separated from any custom color space. When the texture data contains only a single luminance channel, the maximum value selection logic degenerates into the direct value of the unique channel, thereby maintaining the compatibility and consistency of the calculation process. One objective of this embodiment is that, through the maximum value aggregation strategy, on the one hand, it can prevent high-frequency details of individual channels from being overwhelmed by averaging operations, and on the other hand, it can ensure that different texture formats follow a unified evaluation standard when input, reducing pipeline complexity.

[0073] In step S250, based on the effective sampling density and high-frequency energy ratio, a downsampling risk assessment is performed on the target texture to determine the risk level and safe downsampling level of the target texture. Thus, by fusing geometric sampling density and frequency domain energy characteristics for hierarchical assessment, not only is the texture downsampling risk quantified and a safe level output, but image quality degradation in high-frequency details and locally sparse areas can also be effectively avoided while controlling resource consumption.

[0074] In practical applications, taking a brick joint diffuse reflection texture referenced by a wall grid as an example, after obtaining its effective sampling density and high-frequency energy ratio in the preprocessing, the system first compares the fifth percentile value of the texture's effective sampling density (1.20) with the safety threshold of 4.0. Since it fails the first-level fast screening, it proceeds to the second-level judgment: the texture's high-frequency energy ratio reaches 22.4%, far exceeding the low-frequency threshold of 0.05. Therefore, a third-level comprehensive scoring is triggered, calculating the risk score based on the product of the high-frequency energy ratio, the reciprocal of the effective sampling density, and the square root of the anisotropy ratio. Assuming the score is 0.35, exceeding the high-risk threshold of 0.30, the texture is marked as high-risk. Subsequently, the system simulates step-by-step from level zero. When simulating level one downsampling, the score is still higher than 0.30, while at level zero, the score is lower than 0.30. Therefore, the safe downsampling level for this texture is locked at level zero, preventing any downsampling operations and thus avoiding blocky artifacts in the brick joint details after compression. It should be noted that the above thresholds are just examples, and the specific values ​​can be flexibly set by the project based on the image quality budget.

[0075] Optionally, downsampling risk assessment is used to fuse geometric sampling and frequency domain energy features to perform multi-level judgments on the target texture and determine the degradation probability and handling strategy after downsampling.

[0076] Optionally, the downsampling risk assessment can be represented as a multi-level decision pipeline. Its input side receives the effective sampling density output by the aforementioned geometric analysis module and the high-frequency energy ratio output by the frequency domain analysis module, and optionally incorporates anisotropy as an auxiliary dimension. In one implementation, the assessment process may include a first-layer rapid screening: when the effective sampling density is higher than a preset safety threshold, the current texture is directly determined to have sufficient texel redundancy, allowing continued downsampling without further frequency domain analysis; for textures that fail the rapid screening, a second-layer frequency domain decision is entered. If the high-frequency energy ratio is lower than a preset low-frequency threshold, it indicates that the texture content is mainly characterized by smooth color transitions, and even with a low geometric density, it is unlikely to produce perceptible artifacts after downsampling, thus it can still be marked as safe. If both rapid screenings fail, a third-layer comprehensive scoring logic is triggered, fusing the high-frequency energy ratio, the reciprocal of the effective sampling density, and a preset power of the anisotropy ratio to generate a quantified risk score. It should be noted that the specific number of layers and threshold values ​​of the aforementioned multi-layer pipeline can be flexibly adjusted according to the project's image quality budget and construction time requirements. For example, in high-precision projects, the safety threshold can be increased to reduce false positives, or the third-layer scoring can be turned off in time-sensitive scenarios to speed up processing. For user interfaces and effect textures without 3D mesh references, layers related to geometric density can be skipped, and risk assessment can be completed solely based on frequency domain characteristics, thereby ensuring pipeline compatibility and coverage.

[0077] Optionally, the risk level is used to characterize the likelihood of image quality degradation of the target texture after downsampling, and its classification results directly guide the selection strategy of subsequent compression parameters and the setting of safety boundaries.

[0078] Optionally, the risk level can include, but is not limited to, three levels: safe, warning, and high risk, each corresponding to a different downsampling permission strategy. In one implementation, if the overall risk score is lower than or equal to the second risk threshold (e.g., 0.10), the texture is classified as safe, meaning that the current resolution or further downsampling will not cause significant visual degradation; if the score is higher than the second risk threshold but lower than or equal to the first risk threshold (e.g., 0.30), it is classified as warning, indicating that the texture is in the critical region for downsampling and further confirmation is needed based on runtime visibility data; if the score is higher than the first risk threshold, it is classified as high risk, at which point the system will prohibit any additional downsampling operations on the texture to avoid obvious blocky artifacts or loss of detail in the final rendered image. Furthermore, the risk level output is not only a discrete enumeration value but can also include a human-readable description of the risk cause, such as indicating insufficient effective sampling density or excessive high-frequency energy proportion, allowing the art and programming teams to perform targeted optimization based on specific values. It should be understood that the boundaries and naming conventions for different grades can be redefined based on the perceived quality tolerance of different projects, and this disclosure does not impose any restrictions on this.

[0079] Optionally, the safe downsampling level is used to quantify the maximum number of downsampling operations allowed for the target texture without exceeding the risk boundary, ensuring a dynamic balance between resource compression and visual fidelity.

[0080] Optionally, the safe downsampling level can be determined through step-by-step simulation evaluation. Specifically, starting from N=0, the system recalculates the corresponding high-frequency energy proportion using the frequency domain analysis module for each candidate downsampling level and verifies it again by substituting it into the comprehensive risk scoring formula. If the score at a certain level does not fall into the high-risk range, but the score at a higher level exceeds the high-risk threshold, the current level is output as the safe downsampling level for that texture; if the initial state is determined to be high-risk, the safe level is set to zero, and any downsampling operation is prohibited. In another implementation, to reduce redundant calculation overhead, the system can first calculate the risk score at the current resolution, and then use the empirical law that high-frequency energy decays with decreasing resolution for rapid estimation. However, key textures will still undergo step-by-step accurate back-calculation to ensure reliable results. It should be noted that the safe downsampling level is not fixed. After introducing runtime weighted data, for textures with high visual impact scores, their safe level can be downgraded to retain higher resolution, while for textures that have been in a low-activity state for a long time, it can be appropriately increased after manual review. This mechanism ensures that downsampling decisions are both globally consistent and adaptable to the differentiated needs of different textures in actual game scenarios.

[0081] In an optional implementation, a downsampling risk assessment is performed on the target texture based on the effective sampling density and the proportion of high-frequency energy to determine the risk level and safe downsampling level of the target texture. This includes: comparing the effective sampling density with a first density threshold; if the effective sampling density is greater than or equal to the first density threshold, the risk level of the target texture is determined to be safe; if the effective sampling density is less than the first density threshold, the proportion of high-frequency energy is further compared with a first energy threshold; if the proportion of high-frequency energy is less than or equal to the first energy threshold, the risk level is determined to be safe; if the proportion of high-frequency energy is greater than the first energy threshold, a comprehensive risk score is calculated based on the effective sampling density, the proportion of high-frequency energy, and the anisotropy ratio of the target texture, and the risk level and safe downsampling level of the target texture are determined according to the score range of the comprehensive risk score. In this way, through a hierarchical screening mechanism, safe textures are quickly excluded using a density threshold with extremely low computational cost, and low-frequency textures are filtered a second time using a frequency domain threshold. Only a small number of high-risk textures are subjected to comprehensive scoring, which significantly reduces the overall analysis time and improves the accuracy and robustness of the downsampling risk assessment.

[0082] In one implementation, for a diffuse texture referenced from a building wall grid, the system first reads its effective sampling density. If the effective texel density corresponding to the texture is 6.5 texels per world unit, significantly higher than the default first density threshold of 4.0, the risk level is directly determined to be safe. If the effective sampling density of another fabric texture is only 2.8, the system then proceeds to the second level of judgment: calling a frequency domain transformation to calculate the high-frequency energy ratio of the texture after one downsampling. If the measured value is approximately 3%, lower than the first energy threshold of 5%, the risk level is still determined to be safe; otherwise, if the measured high-frequency energy ratio is 22%, the system proceeds to the third level of comprehensive scoring, multiplying the reciprocal of the density, the high-frequency energy, and the square root of the anisotropy ratio to obtain a comprehensive risk score of 0.35, thus falling into the high-risk score range, and finally determining its safe downsampling level as 0.

[0083] Optionally, the first density threshold is used to perform rapid filtering of textures in the geometric sampling dimension to allow safe textures with sufficient texel redundancy. Optionally, the first density threshold serves as the first filtering boundary in the three-layer cascaded evaluation system, and its value directly determines the degree to which local geometric sampling redundancy can be considered a safe state that does not require further frequency domain analysis. In engineering implementation, this threshold can be dynamically set according to the overall memory budget of the project and the art pipeline's baseline requirements for image precision. For example, in a project that emphasizes the representation of distant open-world scenes, this threshold can be configured to 4.0 texels per world unit to ensure that no perceptible block artifacts appear at typical viewing distances. It should be noted that the above values ​​are only a balanced example for medium-sized scenes, and this disclosure is not intended to absolutely limit this threshold; in actual implementation, differentiated density thresholds can also be configured for high-precision character display areas or low-precision distant vegetation areas, or even set as a lookup table that varies with the camera's preset distance, so that the textures of near objects retain stricter density redundancy, while the threshold for distant objects is correspondingly relaxed. Furthermore, considering the different sampling requirements for different material types within the same project, the first density threshold can be further mapped to different numerical standards based on the type labels of diffuse map, normal map, or mask map.

[0084] Optionally, a first energy threshold is used to perform secondary filtering of low-frequency smooth textures in the frequency domain to identify safe textures with downsampling tolerance.

[0085] Optionally, the first energy threshold serves as the criterion for the second-layer frequency domain fast screening. Its main purpose is to identify textures that, even with insufficient geometric sampling density, still belong to the low-frequency smooth category, thereby avoiding unnecessary high-precision preservation of sky, solid-color skin, or large-area gradient maps. In one implementation, this threshold can be set to 5% of the total spectral energy for high-frequency energy. When the maximum high-frequency energy percentage of each channel obtained after the texture undergoes two-dimensional frequency domain transformation is lower than this threshold, the system determines that the texture has room for further downsampling at the content level. It should be emphasized that the above ratio is not absolutely limited. In projects that are primarily realistic and where high-frequency details are crucial, this threshold can be lowered to 3% or even 2% to capture more detail-sensitive textures. In stylized rendering or cartoon rendering projects, since textures often have large areas of color block edges, this threshold can be appropriately raised to 8% or 10%, allowing more textures to be quickly classified into the low-frequency safe category. Furthermore, this threshold can also be linked to the texture type label. For example, a more stringent first energy threshold can be used for normal maps and detail mask maps, while a relatively lenient threshold standard can be used for ambient occlusion maps and diffuse background maps.

[0086] Optionally, the comprehensive risk score is used to quantify the overall risk of image quality degradation of the target texture at candidate downsampling levels. Optionally, the calculation of the comprehensive risk score is based on the coupling of three key parameters: effective sampling density, high-frequency energy percentage, and anisotropy ratio. Its formula maintains a linear product relationship between the inverse of density and the high-frequency energy percentage, and introduces the square root of the anisotropy ratio as a modulation factor to reflect the amplifying effect of uneven stretching of UV mapping in different directions on sampling requirements. In one specific implementation, when the effective sampling density of a brick wall texture is 1.2 texels per world unit, the high-frequency energy percentage is 22.4%, and the anisotropy ratio is 3.2, the comprehensive risk score will be calculated as 0.22 multiplied by 0.83 and then multiplied by 1.79, resulting in approximately 0.33, falling into the high-risk range, thereby preventing further downsampling operations on the texture. It should be noted that the above-mentioned exponential and multiplier relationship can also exist in other forms. In the offline evaluation stage where computing resources are more abundant, the anisotropy ratio can be replaced with an anisotropy measure based on the angle between the triangular face orientation and the viewpoint direction. Alternatively, the average level of the texture sampled at runtime can be introduced as an additional correction term, so that textures that are frequently observed at a distance receive a relatively lenient risk score, while textures that are frequently observed at close range are subject to stricter restrictions.

[0087] Optionally, considering the significant differences in the balance between image quality and performance across different game projects, the weighting and formula structure of the comprehensive risk score can be adaptively adjusted according to project requirements. As another implementation method, in mobile projects with extremely tight total video memory budgets, the weighting coefficient of high-frequency energy proportion in the score can be appropriately increased, ensuring that any texture with medium to high-frequency energy is more strictly limited in its downsampling levels. In high-end platform projects prioritizing cinematic-quality image quality, the influence of the inverse of the effective sampling density can be enhanced, ensuring that even if the texture content frequency is low, excessive downsampling is avoided as long as the geometric sampling is sparse. Furthermore, the score result can not only be output as a single scalar value but can also be decomposed into component vectors of three dimensions: geometric risk, frequency domain risk, and deformation risk. This allows asset reviewers to visually view the specific contribution ratio of each risk on a graphical user interface. When reviewers find that a texture is judged to be in a critical state due to excessively high deformation risk, they can directly pinpoint the corresponding mesh UV unwrapping problem, rather than blindly reducing the downsampling levels to avoid artifacts.

[0088] Optionally, the score range can be used to define the risk level boundaries of the comprehensive risk score's numerical range, thereby mapping discrete executable decision categories.

[0089] Optionally, setting the score range essentially transforms the continuous comprehensive risk score into a tiered mechanism for discrete management actions. The boundary division directly determines how many textures will be marked as high-risk objects requiring focused review. In one implementation, two continuous thresholds can be set; for example, textures with scores greater than 0.30 can be classified as high-risk, textures with scores between 0.10 and 0.30 as warnings, and textures with scores less than or equal to 0.10 as safe, thus forming a three-tiered risk classification system. It should be noted that the specific dividing point between 0.10 and 0.30 is merely an engineering example of balancing precision and recall; this disclosure does not limit the number or value of this range. In actual deployment, the project team can dynamically adjust the interval boundaries based on the current version's memory availability and package size pressure. For example, when the release is imminent and the package size exceeds the budget, the upper limit of the warning interval can be temporarily raised from 0.30 to 0.40 to allow more textures to reduce size through downsampling. Conversely, when pursuing image quality benchmarks in the early stages of a version, the lower limit of the high-risk interval can be lowered to 0.20 to capture more potentially problematic textures. In addition, the score interval can be configured as a non-uniform stepped structure, so that the risk level remains unchanged when the score increases between 0 and 0.05, while a level jump is triggered through a very small interval between 0.25 and 0.30, to achieve a more refined distinction of critical states.

[0090] In an optional implementation, the risk level and safe downsampling level of the target texture are determined based on the score range of the comprehensive risk score. This includes: if the comprehensive risk score is greater than a first risk threshold, the risk level is determined to be high risk; if the comprehensive risk score is greater than a second risk threshold and less than or equal to the first risk threshold, the risk level is determined to be warning; if the comprehensive risk score is less than or equal to the second risk threshold, the risk level is determined to be safe. In this way, by using a dual threshold range to quantify the downsampling risk into three levels—safe, warning, and high risk—low-risk textures can be quickly filtered out, while high-risk textures can be accurately identified and over-downsampling prevented, achieving hierarchical automated control while ensuring image quality.

[0091] In one implementation, the assessment tool performs a three-tiered judgment on the comprehensive risk score output by module ④. If the score calculated for a brick joint normal map is 0.35, which is greater than the default first risk threshold of 0.30, the system directly marks its risk level as high-risk, and the corresponding safe downsampling level is locked at the current downsampling level, no longer allowing further downsampling; if the score for a wooden desktop diffuse texture is 0.18, which is between 0.10 and 0.30, it is marked as warning, allowing for further downsampling but triggering a manual review prompt; if the score for a skybox low-frequency gradient is 0.03, which is lower than the second risk threshold of 0.10, it is marked as safe, allowing continued downsampling. Thus, by using the two dividing points of 0.30 and 0.10, the system can automatically complete the risk rating of all textures.

[0092] Optionally, the first risk threshold serves as the entry boundary for high-risk levels, and its value directly determines which score triggers the downsampling ban. Optionally, the first risk threshold can be a static threshold preset based on the project's image quality standards, or a dynamically adjusted floating parameter based on historical backtesting data. Considering the objective differences in the tolerance for image flaws among different game genres, as a possible implementation, for large scenes emphasizing realism, the first risk threshold can be set to a relatively low value (e.g., 0.25) to intercept downsampling operations that may produce artifacts earlier; for projects with stylized rendering, the first risk threshold can be appropriately relaxed (e.g., 0.35) to gain more compression space. Furthermore, the first risk threshold can also establish a mapping relationship with the texture map type. For example, normal maps and mask maps use a stricter first risk threshold than diffuse maps to match the different sensitivity of different channels to image details. It should be noted that the values ​​of 0.25 and 0.35 mentioned above are only examples; in actual configuration, they can be flexibly set according to the specific project's memory budget and image quality requirements, and this disclosure is not limited to this.

[0093] Optionally, a second risk threshold serves as the boundary between safe and warning profiles, used to distinguish between low-risk textures and edge textures that require review.

[0094] Optionally, the setting of the second risk threshold aims to prevent the system from misjudging textures within the safety boundary as absolutely risk-free, thereby preserving a certain safety buffer zone. Considering that frequency domain analysis itself is affected by local texture noise and edge energy, a single comprehensive risk score may fluctuate slightly. The existence of the second risk threshold can classify textures with scores in the small positive range near zero into the warning category, prompting subsequent stages of the pipeline to pay attention rather than directly allowing them to pass. In engineering implementation, the second risk threshold can be adaptively calibrated according to the rejection rate of the first-layer fast screening: if the high-frequency energy of the remaining textures after the first-layer texel density fast screening is generally low, the second risk threshold can be lowered to 0.08 to expand the coverage of the safety category; if the proportion of high-frequency details in the remaining textures is high, the second risk threshold can be raised to 0.12, allowing more textures to enter the manual review process. It should be understood that the numerical form of the second risk threshold can be a floating-point number with two decimal places or an integer grade after linear mapping, and this embodiment does not limit this.

[0095] Optionally, the risk levels include three categories: safe, warning, and high risk, which are used to convert continuous scores into discrete decision instructions.

[0096] Optionally, the high-risk security risk level corresponds to the enforced semantics of prohibiting additional downsampling. The system can automatically mark the texture at this level as having reached its maximum safe downsampling level and block any build script attempting to continue downsampling, thereby completely eliminating block artifacts caused by over-compression at the pipeline level. The warning level corresponds to the conditional allowance semantics. The system allows one additional downsampling of the texture at this level when resources are scarce, but at the same time outputs the texture parsing result to the pending review list, so that the art or technical art department can focus on checking the screen space performance in the subsequent manual inspection process, in order to strike a balance between saving video memory and image quality risk. The safe level corresponds to the free downsampling semantics. The system can continue to execute the subsequent downsampling and block compression process without triggering additional review, thereby concentrating valuable build and review resources on textures that truly have quality problems. It should be noted that the above three-level classification is only an exemplary discrete mapping method. In other implementations, it can also be extended to a four-level or five-level subdivision system. For example, a severe warning level can be added between the warning level and the high-risk level to provide a finer granularity of risk differentiation.

[0097] In an optional implementation, a comprehensive risk score is calculated based on the effective sampling density, the proportion of high-frequency energy, and the anisotropy ratio of the target texture. This includes calculating the comprehensive risk score based on the reciprocal of the effective sampling density, the proportion of high-frequency energy, and a preset power of the anisotropy ratio. In this way, by multiplying the reciprocal of the density by the proportion of high-frequency energy and introducing the anisotropy ratio with a preset power, the three types of degradation risks are non-linearly coupled. This amplifies the risk weight of insufficient sampling while suppressing score bursts caused by extreme stretching, making the risk classification more consistent with actual rendering degradation.

[0098] In one example, when performing a comprehensive scoring on a brick wall texture, its effective sampling density was measured to be 1.20, the high-frequency energy proportion to be 22.4%, and the anisotropy ratio to be 3.2. Multiplying the reciprocal of the density (0.833) by the high-frequency proportion (0.224) and the square root of the anisotropy ratio (1.789), a risk score of approximately 0.334 is obtained, exceeding the high-risk threshold. Therefore, it is marked as high-risk, and the safe downsampling level is limited to zero. Optionally, the comprehensive risk score is the product of the reciprocal of the effective sampling density, the high-frequency proportion, and the anisotropy ratio to a preset power, integrating geometric, frequency domain, and deformation risks.

[0099] Optionally, the calculation process of the above-mentioned comprehensive risk score aims to integrate three heterogeneous indicators—geometric sampling conditions, texture content frequency, and texture coordinate mapping deformation—into a single dimensionless scale for comparison. Specifically, effective sampling density characterizes the abundance of texel coverage per unit world distance; a higher value indicates more abundant geometric sampling, while a lower value suggests insufficient sampling risk. Therefore, taking its reciprocal allows textures with low density to receive a higher risk weight. The high-frequency energy ratio directly reflects the proportion of detail energy in the target texture that exceeds the downsampling cutoff frequency in the frequency domain; a higher ratio indicates more severe detail loss after downsampling. The anisotropy ratio is obtained through singular value decomposition and is used to measure the degree of non-uniform stretching of the texture coordinate mapping in world space. It should be noted that the dimensions and numerical ranges of these three indicators are originally incompatible. By taking the reciprocal of density and applying a preset power to anisotropy, the product of the three can be mapped to a unified risk range, such as an open range above 0. This allows for the classification into three levels—safe, warning, and high-risk—based on preset first and second risk thresholds. In actual implementation, the value of the preset power can be fine-tuned according to the texture type or project experience. For example, for normal maps, a power slightly lower than 0.5 can be used to suppress normal domain deformation noise, while for diffuse maps, the power of 0.5 can be kept unchanged. This disclosure does not limit this.

[0100] Optionally, considering the different trade-offs between image quality and memory usage in various game projects, the specific function form of the aforementioned risk score can maintain the core framework of multiplying the inverse of density by the high-frequency ratio and then by the power of anisotropy, while adjusting the exponential and multiplicative weights. As one possible implementation, a power-law correction that increases with the number of candidate downsampling stages can be added to the high-frequency energy ratio. For example, when simulating two downsampling stages, this indicator could be increased to the power of 1.2 to reflect the nonlinear cumulative effect of high-frequency loss. Another implementation could be to multiply the anisotropy ratio by a confidence coefficient related to the number of referenced meshes, in addition to the preset power of the anisotropy ratio. This coefficient could be reduced when the number of referenced meshes is large to suppress the extreme scoring caused by excessive differences in texture coordinates across multiple meshes. Furthermore, if the target texture is a UI texture or effect texture without 3D mesh reference data, the anisotropy ratio can be directly set to 1.0 and the preset power calculation can be skipped, so that the comprehensive risk score is determined solely by the effective sampling density and the high-frequency energy ratio. It should be understood that the specific values ​​of the above-mentioned indices and weights can be determined by the project side through group control experiments or manual verification, and this disclosure is not limited to the fixed parameters recorded.

[0101] In an optional implementation, determining the safe downsampling level for the target texture includes: performing a step-by-step simulation evaluation of candidate downsampling levels, recalculating the high-frequency energy ratio and comprehensive risk score for each candidate downsampling level, and selecting the largest candidate downsampling level that does not fall into the high-risk range as the safe downsampling level. In this way, by performing a step-by-step simulation evaluation of candidate levels and selecting the largest level that does not fall into the high-risk range, the frequency domain and geometric features of each texture can be dynamically adapted to its maximum safe downsampling count, avoiding over-compression or under-compression caused by a uniform threshold.

[0102] In one implementation, for a texture, the system sequentially sets the candidate downsampling levels to 0, 1, and 2 for progressive simulation evaluation. Specifically, for candidate level 0, the system performs a frequency domain transformation based on the original resolution texture, calculates the high-frequency energy ratio, and combines the texture's effective sampling density and anisotropy ratio into the comprehensive risk scoring formula, finding the result to be within the safe range. After increasing the candidate level to 1, the system re-performs the frequency domain transformation on the texture at half resolution to obtain a new high-frequency energy ratio and risk score. At this point, the score has increased but still does not fall into the high-risk range. Continuing to increase the candidate level to 2, the recalculated risk score exceeds the upper limit of the high-risk range. Based on this, the system selects the maximum candidate level of 1, which does not fall into the high-risk range, as the safe downsampling level for the texture.

[0103] Optionally, the above candidate downsampling levels can be a sequence of integers starting from 0, with the upper limit dynamically adjusted according to the project budget and texture type.

[0104] Optionally, the aforementioned candidate downsampling levels represent the number of downsampling attempts to be made for the target texture, typically starting from level 0 and increasing progressively, such as simulating levels 0, 1, and 2 sequentially. During each simulation level, the system does not use the static metrics calculated for the original resolution in previous steps. Instead, it calls the frequency domain analysis logic to re-perform a two-dimensional frequency domain transformation at the resolution of the candidate level and recalculates the high-frequency energy proportion and comprehensive risk score based on the new spectral distribution. This is because the degree of damage to the texture's frequency domain features caused by downsampling changes non-linearly with increasing levels, and the initial static assessment may not accurately predict the cumulative risk effect after multiple downsampling levels. By recalculating step-by-step, frequency domain energy distribution and geometric sampling density data that more closely approximate the actual compression state can be obtained at each discrete level, thus providing a progressively traceable quantitative basis for selecting the safety threshold.

[0105] Optionally, the execution method of the above-mentioned step-by-step simulation evaluation is not limited to the linear traversal mode that starts from 0 and increases with a fixed step size. As a possible implementation, the system can also first estimate an initial search interval based on the previous static evaluation results. For example, when the static risk score is close to the high-risk threshold, the initial candidate level can be limited to the range of 0 to 1, thereby avoiding meaningless full traversal. Furthermore, if the project has stricter requirements on construction time, a binary search strategy can be used instead of linear increment. That is, the risk level of the intermediate level 2 is evaluated first. If it falls directly into the high-risk interval, the evaluation level is reverted to level 1, thereby reducing the number of recalculations. It should be noted that regardless of whether linear traversal, binary search, or adaptive step size based on heuristic estimation is used, the frequency domain transformation module must be independently called to recalculate the high-frequency energy ratio for each evaluation, and the result is substituted into the comprehensive risk score formula for judgment. Ultimately, it is ensured that the determined safe downsampling level strictly corresponds to the quantitative evaluation result of the last time the high-risk interval was not triggered.

[0106] Optionally, the maximum candidate downsampling level mentioned above is the last level that does not fall into the high-risk range after step-by-step simulation, serving as the upper limit for downsampling. Alternatively, the maximum candidate downsampling level mentioned above refers to the level with the largest value among all candidate levels evaluated through step-by-step simulation, whose corresponding comprehensive risk score does not fall into the high-risk range. For example, when levels 0, 1, and 2 have all been evaluated, with the comprehensive risk scores of levels 0 and 1 in the safe and warning ranges respectively, and level 2 exceeding the high-risk threshold, the system selects level 1 as the safe downsampling level for the target texture. The technical significance of this selection logic is that it not only determines the maximum allowable downsampling amplitude for the texture under the current scoring system but also retains a minimum guarantee margin for image quality through the hard constraint of not entering the high-risk range. It should be noted that the boundary of the high-risk range can be dynamically defined by the first risk threshold, and can be adjusted in actual projects according to different image quality levels or resource budgets, but its veto condition for selecting the safe level remains unchanged.

[0107] Optionally, the above-mentioned judgment logic for not falling into the high-risk range can also introduce a secondary buffer mechanism during actual execution to avoid oscillations in level selection caused by the score being right near the boundary of the high-risk range. As a possible implementation, when the difference between the comprehensive risk score of a candidate level and the high-risk threshold is less than a preset tolerance, even if the level does not numerically exceed the threshold, the system can downgrade it to a warning state and select a lower level as the actual safe downsampling level. For example, if the first risk threshold is 0.30, and a level score reaches 0.29 but the tolerance is set to 0.03, then the level is considered critically risky, and the final safe level will fall back to the previous level. Furthermore, for texture types that require special protection, such as character facial normal maps, the high-risk range boundary can be temporarily tightened or the maximum candidate level can be forcibly limited to no more than 1 level, thereby achieving refined protection of critical resources.

[0108] In an optional implementation, the method further includes: performing a quality comparison evaluation between the compressed image of the target texture and the original image of the target texture to obtain a perceptual quality loss value corresponding to the compressed image; determining whether the compression quality of the target texture meets preset requirements based on the perceptual quality loss value, and generating corresponding compression parameter adjustment information. In this way, by performing a quality comparison evaluation between the compressed image and the original image, a closed-loop measurement mechanism from compression parameters to actual rendering quality is established, thereby transforming subjective inspection into objective data and continuously optimizing image quality.

[0109] In one implementation, for a target texture that has undergone block compression and downsampling, an offline evaluation tool calls a perceptual index algorithm to compare the quality of the compressed image with the original image before packaging, and obtains a perceptual quality loss value that quantifies the degree of image degradation. If the loss value exceeds a preset qualified threshold, it is determined that the current compression quality does not meet the requirements, and compression parameter adjustment information is automatically generated to reduce the size of the Adaptive Scalable Texture Compression (ASTC) block or reduce the downsampling level, so as to mitigate image quality degradation in the next build iteration.

[0110] Optionally, the quality comparison assessment aims to use a perceptual index algorithm to perform difference analysis between the compressed image and the original image, in order to obtain a quantified perceptual quality loss value to support subsequent judgment. Optionally, the perceptual index algorithm used in the above quality comparison assessment can be an image difference assessment tool based on the characteristics of the human visual system, such as using the Perceptual Image Difference Assessment Index (FLIP) to compare the decoded texture pixel data with the original image pixel by pixel, quantifying the degree of image degradation introduced by compression and downsampling operations. Specifically, the tool first reads the file header information of the engine texture container to obtain the nominal resolution and the actual resolution after compression; if the two are inconsistent, downsampling is confirmed. Subsequently, the Adaptive Scalable Texture Compression (ASTC) decoder is called to restore the compressed data in the container into a computable pixel image, so as to perform subsequent visual fidelity analysis under a unified data format. It should be noted that this quality comparison assessment is not limited to a single assessment dimension; it can comprehensively measure the total perceptual loss after the superposition of encoding distortion and resolution downsampling distortion, or it can focus only on the image quality degradation caused by the encoding process itself, thus flexibly adapting to the diagnostic needs of different stages. Through the above quantitative evaluation, the system can output a numerical perceptual quality loss value for each texture, which serves as a direct basis for determining whether the current compression strategy is safe.

[0111] Optionally, considering that texture compression quality degradation is usually caused by the superposition of coding distortion and resolution downsampling distortion, as a possible implementation, the above quality comparison evaluation can be designed as a dual-path separate evaluation structure: one path measures only the perceptual loss introduced by the block compression encoding and decoding process at the target resolution, while the other path measures the comprehensive perceptual loss after upsampling the compression result back to the original resolution and comparing it with the original image, and the difference between the two is taken as the perceptual loss value of the independent contribution of downsampling. The advantage of this separate evaluation structure is that it can accurately distinguish the independent impact of different compression parameters on image quality and avoid conflating coding defects with insufficient resolution. When the independent downsampling loss is significantly higher than the coding loss, the system determines that the current downsampling level is too aggressive, thereby providing a clear direction for subsequent compression parameter adjustment information. It should be noted that the image scaling operation in the above two evaluation paths can use Lanczos filtering to maintain frequency domain characteristics, or other polyphase interpolation filter kernels can be selected according to performance constraints, and this disclosure is not limited to this.

[0112] Optionally, the compression parameter adjustment information is used to generate texture recompression suggestions, including reducing the downsampling levels or decreasing the compressed block size, when the compression quality does not meet the standards, to guide the next build iteration. Optionally, the aforementioned compression parameter adjustment information is used to feed back specific texture recompression instructions to the build pipeline when the perceived quality loss value exceeds a preset threshold or fails to reach a satisfactory level. This information may include suggestions to reduce the downsampling levels (e.g., restoring a two-level reduction to a one-level or zero-level reduction), instructions to reduce the Adaptive Scalable Texture Compression (ASTC) block size (e.g., changing a large 12x12 block to an 8x8 or 4x4 fine block), or flags to temporarily increase the compression quality budget for a specific texture type. Furthermore, the generated adjustment information can be output in tiers according to the severity of the risk: when the perceived loss value is in the warning range, a suggested adjustment prompt is output; when the perceived loss value is in the high-risk range, a mandatory build-blocking instruction is output, preventing this version of the texture from continuing into subsequent packaging stages until the parameters are manually corrected. It should be noted that the above compression parameter adjustment information can not only be applied to a single texture, but also, based on the aggregated statistical results of similar textures, reverse the target pixel density upper limit parameter in the global compression rule configuration, thereby achieving sustainable iteration from single-point correction to rule generalization.

[0113] In an optional implementation, a quality comparison evaluation is performed between the compressed image of the target texture and the original image of the target texture. This includes: scaling the original image to the target resolution of the compressed image to obtain a scaled reference image; performing a first-path quality evaluation on the compressed image and the scaled reference image to obtain a coding-independent loss value; upsampling the compressed image to the original resolution of the original image to obtain an upsampled image; performing a second-path quality evaluation on the upsampled image and the original image to obtain a comprehensive quality loss value; and determining a downsampling-independent loss value based on the difference between the comprehensive quality loss value and the coding-independent loss value. In this way, by performing dual-path separate evaluation of the encoding / decoding loss and the downsampling loss and quantifying the perceptual loss of the independent contribution of downsampling, the dominant impact of downsampling operations on image quality degradation can be accurately identified, providing a clear quantitative decision-making basis for subsequent compression parameter adjustments.

[0114] In practical applications, during the internal gameplay testing phase, the game client automatically collects texture usage telemetry through the rendering pipeline: for each texture involved in the final pixel shading, the texture level hit by the sampler in each frame is recorded, and the average sampling level is obtained by summing the data at the end of the test cycle; at the same time, the proportion of frames in which the texture appears in the rendering channel is calculated out of the total number of test frames. After reading the above active usage data, the offline evaluation tool performs a weighted fusion with the static perceptual quality loss value produced by the preceding module to obtain a visual impact score; then, the textures to be evaluated are sorted from high to low according to this score, and the top N textures are generated as a priority optimization list, so that the art and programming teams can focus their budgets on resources that truly have an impact on the visuals.

[0115] Optionally, active usage data can be used to characterize the frequency and hierarchical distribution of textures being called and sampled by the graphics engine during actual operation, providing a dynamic basis for subsequent scoring.

[0116] Considering that static image quality loss assessments cannot reflect the visibility of textures during actual gameplay, active usage data is used to introduce objective call frequency and sampling distribution information from the runtime side. In one possible implementation, the game engine's rendering pipeline performs lightweight texture usage statistics on each frame during internal testing, recording the texture level at which each texture is sampled and whether the texture is activated in the current frame's rendering call. This data is then aggregated and exported in a structured data format to the offline analysis side, where evaluation tools read and associate it with the corresponding texture assets. This data acquisition process does not involve intrusive modifications to game logic or player input; it only reuses existing texture binding and sampling state information from the renderer. While significantly reducing acquisition overhead, it provides a key dimension for subsequent weighted processing that differs from offline static evaluation.

[0117] Furthermore, in addition to the average sampling level and active frame rate percentage, active usage data can also include auxiliary information such as budget-degraded frame rate. The average sampling level directly reflects the resolution at which the texture is typically read by the sampler during runtime—if a texture is consistently accessed at a high texture level, it indicates that it is far from the camera's viewpoint or heavily occluded; even if its static image quality loss is high, its weight in the final image should be reduced. The active frame rate percentage is used to filter out decorative textures that only appear briefly in a very few special shots or cutscenes. Moreover, the above runtime data can be mapped and linked to static evaluation results during the offline evaluation phase by associating it with the texture's globally unique identifier, ensuring that the dynamic usage profile of each texture accurately corresponds to the risk assessment record. It should be noted that the sampling frequency and accuracy can be adaptively adjusted according to different hardware levels or test scenarios: for example, increasing the sampling density on low-performance devices to capture more degradation events, and extending the sampling window in cutscene levels to obtain a more representative frame rate percentage. Those skilled in the art can flexibly configure the sampling parameters according to the actual project requirements.

[0118] Optionally, the visual impact score is used to fuse the static image quality loss of a texture with its runtime visibility, quantifying the weight of the texture's actual impact on the final image. One objective of this embodiment is to calculate the visual impact score by fusing static perceived quality loss and runtime visibility, enabling the optimization ranking to simultaneously consider both the degree of compression damage to the texture itself and the probability that this damage is actually perceived by the player. Specifically, the aforementioned weighting process can employ a multiplicative fusion strategy: the perceived quality loss value output during the static evaluation phase is used as a base factor, multiplied sequentially by the texture level visibility factor and the active frame rate percentage factor. The texture level visibility factor is calculated based on the average sampling level; when a texture is sampled at a high texture level for an extended period, this factor tends to zero, significantly reducing the visual impact score. The active frame rate percentage serves as an overall scaling factor, penalizing textures that only appear occasionally. The advantage of this multiplicative structure is that if the visibility in any dimension is extremely low, the final score will quickly converge to a smaller value, ensuring that damaged textures that are truly frequently used and located at low texture levels are prioritized in the optimization queue.

[0119] Furthermore, the formula for calculating visual impact scoring can be adaptively adjusted according to the project's focus, and this disclosure is not limited to a single multiplicative model. For example, in character display scenes emphasizing close-up material representation, the weight of the texture level visibility factor can be increased, giving lower-level sampled textures higher scoring sensitivity; for open-world scenes emphasizing large-scale atmosphere, screen space occupancy can be introduced as an additional weighting factor, giving textures occupying a larger projection area higher priority. In addition, extreme outliers can be truncated during implementation: if the perceptual quality loss of a texture exceeds a preset limit, it is forcibly retained at the front of the priority optimization texture list regardless of its runtime visibility, to prevent serious flaws from being completely buried. All of these variations serve the same technical goal—to accurately match limited optimization budgets with texture assets that have the greatest impact on the player's visual experience.

[0120] Optionally, a priority optimization texture list is used to sort texture assets requiring focused processing in descending order of visual impact score, serving as the basis for concentrated optimization work by the art and programming teams. Optionally, the generation logic of the priority optimization texture list can include not only simple global sorting but also secondary grouping based on project modules or scene partitions. In one implementation, after calculating the visual impact score of all textures, the offline evaluation tool first performs a global sorting from highest to lowest score. Then, based on the scene package, material type, or resource package grouping tag to which the texture belongs, it maps the front-end N textures to the corresponding asset catalog, forming a priority optimization texture list with grouping information. It should be noted that the aforementioned N value can be dynamically set by the team based on the man-day budget for the current iteration; this disclosure does not limit this. This list can be presented in the form of a table or a visual dashboard, with each row containing a texture identifier, risk level, current safe downsampling level, visual impact score, and a summary of optimization suggestions. Based on this, the art and programming teams can quickly identify textures that are visually striking and currently over-compressed, and focus on implementing targeted fixes such as increasing resolution, changing compression formats, or re-unpacking texture coordinates, thereby investing limited iterative resources in the aspects that can best improve the player's viewing experience.

[0121] In an optional implementation, corresponding compression parameter adjustment information is generated, including: if the downsampling independent loss value is greater than the encoding independent loss value, then adjustment information to reduce the number of downsampling levels is generated. In this way, by quantitatively comparing the downsampling independent loss and the encoding independent loss, the excessive contribution of downsampling to image quality degradation can be directly identified in the perceptual quality backtesting, and specific suggestions for reducing the downsampling levels can be output in reverse, providing a clear quantitative decision basis for compression parameter adjustment. In one example, after completing a dual-path perceptual quality assessment, the offline tool calculated an encoding independent loss of 0.06 for a wall normal map, while the downsampling independent loss was 0.12. Since the downsampling independent loss exceeds the encoding independent loss, the tool determines that the texture is currently more affected by resolution reduction than by the error introduced by the encoder itself, and thus generates a clear suggestion to reduce the downsampling level of the texture from level one to level zero. This suggestion is output along with the rule revision list, and after review and confirmation by the asset team, the corresponding entry is directly adjusted in the compression rule configuration, achieving a closed loop from quality backtesting to parameter correction.

[0122] Optionally, this adjustment information is used to issue a feedback instruction to the rule configuration system to reduce the texture downsampling level when the downsampling-independent loss exceeds the encoding-independent loss.

[0123] Optionally, the above adjustment information can be automatically generated after the offline tool completes the dual-channel perception quality assessment. Besides the suggested target downsampling level, it can also include the specific numerical value of the current loss as a decision-making reference. For example, it can output plaintext feedback, recording the downsampling independent loss as 0.18 and the encoding independent loss as 0.09, and suggesting reducing the downsampling level from level one to level zero. Considering that the contributions of downsampling and encoding to image quality degradation may be reversed, when the perception error introduced by downsampling becomes the dominant factor, reducing the downsampling level can directly reduce the loss of high-frequency information caused by resolution reduction, thus bringing the total perception loss closer to the level introduced only by the encoder. It should be noted that the recipients of the adjustment information are not limited to the manual review interface; they can also be directly written back to the compression rule configuration table in structured data form, and automatically applied by the rule engine in the next round of resource construction. Furthermore, if the downsampling independent loss is slightly greater than the encoding independent loss, but both are at extremely low levels, only logging can be recorded without triggering a forced degradation alarm to avoid unnecessary configuration jitter within the fault tolerance threshold.

[0124] In an optional implementation, active usage data of the target texture during runtime is obtained. This active usage data includes at least one of the target texture's average sampling level and active frame rate percentage. The quality assessment results of the target texture are weighted based on the active usage data to obtain a visual impact score for the target texture. The textures to be evaluated are then prioritized for optimization according to their visual impact scores, generating a list of textures to be optimized first. By introducing active usage data from the runtime phase to weight the quality assessment results, the optimization budget can be precisely allocated to high-frequency visible textures, avoiding wasted computing power on invisible or low-activity textures, thereby improving overall optimization efficiency and image quality.

[0125] In one implementation, the offline tool reads runtime data collected and archived by the engine during gameplay testing, including the average sampling level and active frame rate percentage for each texture. For example, a diffuse texture of a distant brick wall has an average sampling level of 0.8 and an active frame rate percentage of 95%. The tool weights this value with the perceptual quality loss value obtained from previous offline evaluations, resulting in a high visual impact score, and thus prioritizes it in the list of textures for optimization. Conversely, a skybox texture that only appears briefly in hidden story segments has an active frame rate percentage of less than 2% and an average sampling level consistently greater than 4, resulting in a significantly lower weighted score and placing it at the bottom of the list. This allows the art team to allocate optimization budgets from top to bottom, ensuring that each modification focuses on texture resources with the highest player visibility.

[0126] Optionally, this data is used to measure the activity of the texture during runtime, and includes at least one of the average sampling level and the percentage of active frames to support subsequent weighted processing.

[0127] Optionally, the active usage data during the aforementioned runtime phase is collected and archived separately by the game client during gameplay testing. This data does not execute any analysis logic on the player's device but is instead read in uniformly by the evaluation tool during the offline phase. This data includes at least the average texture level actually sampled by the target texture during frame-by-frame rendering, and the proportion of active frames loaded and rendered by the texture throughout the entire testing period. By collecting the average sampling level, the viewing distance and magnification of the texture under typical viewing angles can be directly reflected: if a texture is sampled at a lower level for a long time, it means that it contributes a larger pixel area, and any quality defects are more easily noticed by the player. The proportion of active frames is used to measure the frequency of the texture's appearance in the overall game flow; a higher proportion indicates a greater sustained impact of the texture on the final visual performance. It should be noted that the above runtime data collection logic can reuse the engine's existing frame-by-frame rendering statistics function, without the need to implant additional heavy analysis modules, thus ensuring that the impact on runtime performance is minimized.

[0128] Optionally, considering that the contribution of different game scenarios to texture visibility may vary significantly, the active usage data, in addition to including the average sampling level and the percentage of active frames, can also include auxiliary information such as the estimated distance distribution of textures in screen space, lighting complexity weights, or budget degradation trigger frames. Furthermore, before weighting, the raw runtime data can be cleaned and normalized: for example, removing abnormal sampling records caused by loading screens or camera adjustments, or performing a weighted average of the active frames of the same texture across multiple levels to eliminate random biases from single tests. In this way, even when facing vastly different content structures such as open worlds or story dungeons, a more robust optimization priority ranking can be generated based on calibrated runtime data, avoiding the allocation of excessive production resources to edge textures that rarely see the player.

[0129] Optionally, the scoring aims to integrate offline quality loss and runtime visibility to generate a comprehensive score that represents the urgency of optimization after weighting the quality assessment results.

[0130] Optionally, the aforementioned visual impact score can be obtained by multiplying and weighting the perceived quality loss value, the average texture sampling level, and the proportion of active frames. In one specific calculation method, a visibility weight is first calculated based on the average sampling level. For example, the visibility weight is set to 1 minus the product of the average sampling level and the attenuation coefficient. When a texture is consistently sampled at a low level, this weight approaches 1, while when a texture is consistently sampled at a high level, this weight approaches 0. Then, the perceived quality loss value obtained from offline evaluation is multiplied by this visibility weight and the proportion of active frames to obtain the final score. One purpose of this calculation method is to map simple offline quality defects to the real player's perceptual space: even if a texture has a high subjective quality loss, as long as it is consistently in a high-level distant view and has extremely low active frames, its visual impact score will be suppressed to a low level, and vice versa. Thus, this score not only reflects the degree of distortion after the texture is technically compressed, but also reflects the probability and intensity of this distortion actually perceived by the player in the final rendered image.

[0131] Optionally, the weighting strategy for the visual impact score is not limited to a single product model. Piecewise functions or exponential decay can be introduced based on project needs to more precisely characterize the sensitivity differences across different intervals. For example, textures with an active frame rate below a specified threshold can have their scores compressed to near zero, thus completely excluding extremely unpopular resources. For textures with an average sampling level between 0 and 2, linear interpolation or smooth transition curves can be used to calculate visibility weights, avoiding score jumps at sampling level boundaries. Furthermore, if the project runs in a multiplayer online competitive or open-world environment, the active frame rate can be post-processed based on match duration or level appearance probability, allowing the visual impact score to adapt to dynamically changing content delivery rhythms. It should be understood that regardless of the weighting method used, the core is to establish an algebraic coupling relationship between offline quality loss and runtime visibility, thereby providing a quantifiable basis for generating a prioritized texture list.

[0132] Optionally, the list can be sorted according to visual impact scores, providing the asset team with an optimization sequence that can be executed based on urgency. Optionally, the output of the prioritized texture list can be a text table, a graphical dashboard, or an automated work order queue integrated with the resource management system, carrying at least the texture identifier, visual impact score, corresponding risk level, and suggested compression parameter adjustment direction. In practice, the asset team can prioritize processing the highest-scoring textures from the top of the list. These textures typically have a high percentage of active frames, low sampling levels, and significant offline quality loss; performing fine-grained recompression or increasing resolution on them can directly improve the visual experience. For textures in the middle and end of the list, existing compression parameters can be maintained or optimized only when budget allows, thus achieving Pareto improvement in resource allocation without changing the total memory and package budget. It should be noted that this list is not a static, one-time product. Whenever new active usage data is collected during runtime or offline evaluation rules are iterated and updated, the list can be re-sorted and refreshed to form a sustainable optimization loop.

[0133] According to one embodiment of the texture processing apparatus of the present disclosure, the apparatus may include: The first determining module is used to obtain the sampling distribution information of the target texture on the three-dimensional mesh, and determine the effective sampling density of the target texture on the three-dimensional mesh based on the sampling distribution information; The second determining module is used to obtain the frequency domain energy distribution information of the target texture and determine the high-frequency energy ratio of the target texture based on the frequency domain energy distribution information; The risk assessment module is used to perform downsampling risk assessment on the target texture based on the effective sampling density and the proportion of high-frequency energy, and to determine the risk level and the safe downsampling level of the target texture.

[0134] In this way, by combining the effective sampling density of textures on the 3D mesh with the proportion of high-frequency energy in the frequency domain to assess downsampling risk, it helps to more accurately determine the safe downsampling level, reduce local image quality loss caused by average sampling assessment, and help reduce the consumption of storage and video memory resources by excessive compression. At the same time, classification assessment based on risk level helps to reduce unnecessary duplication of processing during resource construction, reduce the consumption of computing resources, and improve processing efficiency.

[0135] The specific details of each part of the above-mentioned device have been described in detail in the method section of the implementation plan. For any undisclosed details, please refer to the implementation plan of the method section, and therefore will not be repeated here.

[0136] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to exemplary embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.

[0137] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure.

[0138] The following is a detailed reference. Figure 5 The diagram illustrates a structural schematic suitable for implementing an electronic device according to embodiments of the present disclosure. The electronic device may include a processor (e.g., a central processing unit, graphics processor, etc.) 1201, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 1202 or a program loaded from memory 1208 into random access memory (RAM) 1203. The RAM 1203 also stores various programs and data required for the operation of the electronic device. The processor 1201, ROM 1202, and RAM 1203 are interconnected via a bus 1204. An input / output (I / O) interface 1205 is also connected to the bus 1204.

[0139] Typically, the following devices can be connected to I / O interface 1205: input devices 1206 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 1207 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; memory devices 1208 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1209. Communication device 1209 allows electronic devices to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 5 Electronic devices with various devices are shown, but it should be understood that it is not required to implement or have all of the devices shown, and more or fewer devices may be implemented or have instead.

[0140] In particular, according to one embodiment of this disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, one embodiment of this disclosure includes a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via communication device 1209, or installed from memory 1208, or installed from ROM 1202. When the computer program is executed by processor 1201, it performs the functions defined in the methods described above in various embodiments of this disclosure.

[0141] Figure 5 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.

[0142] This disclosure also provides a computer-readable storage medium in which the methods described in this disclosure can be implemented in hardware or firmware, or implemented as recordable on a storage medium, or implemented as computer code originally stored on a remote storage medium or a non-transitory machine-readable storage medium and subsequently stored on a local storage medium after being downloaded over a network. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium may also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code, which, when accessed and executed by the computer, processor, or hardware, implements the methods shown in the above embodiments.

[0143] A portion of this disclosure can be applied to computer program products, such as computer program instructions, which, when executed by a computer, can invoke or provide methods and / or technical solutions according to this disclosure through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, and installation package files. Accordingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions; the computer compiling the instructions and then executing the corresponding compiled program; the computer reading and executing the instructions; or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.

[0144] Although embodiments of the present disclosure have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the present disclosure, and such modifications and variations all fall within the scope defined by the appended claims.

Claims

1. A texture processing method, characterized in that, include: Obtain the sampling distribution information of the target texture on the three-dimensional mesh, and determine the effective sampling density of the target texture on the three-dimensional mesh based on the sampling distribution information; Obtain the frequency domain energy distribution information of the target texture, and determine the high-frequency energy ratio of the target texture based on the frequency domain energy distribution information; Based on the effective sampling density and the high-frequency energy ratio, a downsampling risk assessment is performed on the target texture to determine the risk level of the target texture and the safe downsampling level of the target texture.

2. The method according to claim 1, wherein, The step of acquiring the sampling distribution information of the target texture on the 3D mesh, and determining the effective sampling density of the target texture on the 3D mesh based on the sampling distribution information, includes: Obtain a 3D mesh model that references the target texture, and determine the local deformation parameters when the target texture is mapped to each triangle based on the vertex position information and texture coordinate information of the 3D mesh model; Based on the local deformation parameters, the effective sampling density of the target texture on the three-dimensional mesh is determined.

3. The method according to claim 2, wherein, The step of determining the local deformation parameters when the target texture is mapped onto each triangular face based on the vertex position information and texture coordinate information of the 3D mesh model includes: For each triangular face contained in the three-dimensional mesh model, the two-dimensional edge vector of the triangular face is calculated based on the texture coordinate information, and the three-dimensional edge vector of the triangular face is calculated based on the vertex position information. Based on the two-dimensional edge vector and the three-dimensional edge vector, determine the deformation matrix corresponding to the triangular face; The deformation matrix is ​​decomposed to obtain the local deformation parameters of the triangular face.

4. The method according to claim 3, wherein, The process of decomposing the deformation matrix to obtain the local deformation parameters of the triangular facets includes: Perform singular value decomposition on the deformation matrix to obtain the maximum stretch factor and the minimum stretch factor; The effective sampling density and anisotropy ratio of the triangular facet are determined based on the maximum stretch factor and the minimum stretch factor.

5. The method according to claim 4, wherein, Determining the effective sampling density of the target texture on the 3D mesh based on the local deformation parameters includes: Collect the effective sampling density and anisotropy ratio of each triangular facet contained in the three-dimensional mesh model; The effective sampling density is obtained by performing fractional aggregation on the effective sampling density; The anisotropy ratio is aggregated to obtain the anisotropy index of the target texture.

6. The method according to claim 1, wherein, The step of obtaining the frequency domain energy distribution information of the target texture and determining the high-frequency energy ratio of the target texture based on the frequency domain energy distribution information includes: Perform a frequency domain transformation on the target texture to obtain the spectral data corresponding to the target texture; Based on the cutoff frequency corresponding to the candidate downsampling level, high-frequency and low-frequency regions are determined in the spectrum data, and the ratio of the energy of the high-frequency region to the total energy of the spectrum data is calculated to obtain the high-frequency energy proportion. The step of performing a frequency domain transformation on the target texture to obtain the spectral data corresponding to the target texture includes: A two-dimensional frequency domain transformation is performed on each color channel of the target texture to obtain the channel spectrum corresponding to each color channel; Calculate the high-frequency energy percentage of each channel spectrum, and select the maximum value as the high-frequency energy percentage of the target texture.

7. The method according to claim 1, wherein, The step of performing a downsampling risk assessment on the target texture based on the effective sampling density and the high-frequency energy ratio, and determining the risk level and safe downsampling level of the target texture, includes: The effective sampling density is compared with a first density threshold. If the effective sampling density is greater than or equal to the first density threshold, the risk level corresponding to the target texture is determined to be safe. If the effective sampling density is less than the first density threshold, the high-frequency energy ratio is further compared with the first energy threshold. If the high-frequency energy ratio is less than or equal to the first energy threshold, the risk level is determined to be safe. If the proportion of high-frequency energy is greater than the first energy threshold, a comprehensive risk score is calculated based on the effective sampling density, the proportion of high-frequency energy, and the anisotropy ratio of the target texture. Based on the score range of the comprehensive risk score, the risk level and the number of safe downsampling levels of the target texture are determined.

8. The method according to claim 7, wherein, The step of determining the risk level and the security downsampling level of the target texture based on the score range of the comprehensive risk score includes: If the comprehensive risk score is greater than the first risk threshold, the risk level is determined to be high risk; If the comprehensive risk score is greater than the second risk threshold and less than or equal to the first risk threshold, then the risk level is determined to be a warning. If the comprehensive risk score is less than or equal to the second risk threshold, the risk level is determined to be safe.

9. The method according to claim 7, wherein, The comprehensive risk score is calculated based on the effective sampling density, the high-frequency energy ratio, and the anisotropy ratio of the target texture, including: The comprehensive risk score is calculated based on the reciprocal of the effective sampling density, the proportion of high-frequency energy, and a preset power of the anisotropy ratio.

10. The method according to claim 7, wherein, Determining the safe downsampling level of the target texture includes: The candidate downsampling levels are simulated and evaluated step by step. For each candidate downsampling level, the high-frequency energy ratio and the comprehensive risk score are recalculated, and the largest candidate downsampling level that does not fall into the high-risk range is selected as the safe downsampling level.

11. The method according to claim 1, wherein, The method further includes: The compressed image of the target texture is compared with the original image of the target texture to obtain the perceptual quality loss value corresponding to the compressed image. Based on the perceived quality loss value, determine whether the compression quality of the target texture meets the preset requirements, and generate corresponding compression parameter adjustment information.

12. The method according to claim 11, wherein, The step of performing a quality comparison evaluation between the compressed image of the target texture and the original image of the target texture includes: The original image is scaled to the target resolution of the compressed result image to obtain a scaled reference image; The compressed image and the scaled reference image are subjected to a first-path quality assessment to obtain coding-independent loss values. The compressed image is upsampled to the original resolution of the original image to obtain an upsampled image; A second-path quality assessment is performed on the upsampled image and the original image to obtain a comprehensive quality loss value; The downsampling independent loss value is determined based on the difference between the overall quality loss value and the coding independent loss value.

13. The method according to claim 12, wherein, The generation of corresponding compression parameter adjustment information includes: If the downsampling independent loss value is greater than the coding independent loss value, then adjustment information to reduce the number of downsampling levels is generated.

14. The method according to claim 1, wherein, The method further includes: Obtain the active usage data of the target texture during the runtime phase, wherein the active usage data includes at least one of the average sampling level of the target texture and the percentage of active frames; The quality assessment results of the target texture are weighted based on the active usage data to obtain the visual impact score corresponding to the target texture. Based on the visual impact score, the textures to be evaluated are prioritized for optimization, and a list of textures to be prioritized for optimization is generated.

15. A texture processing apparatus, characterized in that, include: The first determining module is used to acquire sampling distribution information of the target texture on the three-dimensional grid, and determine the effective sampling density of the target texture on the three-dimensional grid based on the sampling distribution information; The second determining module is used to obtain the frequency domain energy distribution information of the target texture and determine the high-frequency energy ratio of the target texture based on the frequency domain energy distribution information; The risk assessment module is used to perform downsampling risk assessment on the target texture based on the effective sampling density and the high-frequency energy ratio, and to determine the risk level of the target texture and the safe downsampling level of the target texture.