Method and apparatus for evaluating resource utilization, and electronic device
Patent Information
- Application Number
- CN202610905758.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-22
- Publication Date
- 2026-09-25
AI Technical Summary
[0003]然而,实际应用中频繁出现声明规格与有效利用程度不匹配的现象,导致资源分配效率低下,造成存储空间与显存带宽的持续性浪费
本公开示例实施方式的资源利用率的评估方法中,通过在资产构建流程中,自动从UV空间利用率、可见性利用率、多级分辨率利用率和通道利用率四个独立且互补的维度,量化目标纹理资源的资源利用率,一方面,可以分别从空间占用、视觉有效性、分辨率与内容复杂度匹配度和信息承载量角度衡量贴图资源的利用效率,避免单维度评估盲区,从多个角度精准定位资源浪费最严重的贴图资源并指导优化决策,全面发现资源优化机会;另一方面,可以在资产构建时自动化执行,不依赖运行时环境或捕获帧数据,每次构建完成后即可获得全量纹理资源的利用率评估结果,覆盖项目中所有贴图而非仅当前帧可见的贴图,为大规模游戏项目的贴图资源优化提供了系统化的数据支撑。
Smart Images

Figure CN122817049A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer graphics processing technology, and more specifically, to a method, apparatus and electronic device for evaluating resource utilization. Background Technology
[0002] In large-scale 3D content development projects, texture resources are a core asset component, and their storage and runtime overhead dominates overall resource consumption. In typical application scenarios such as open-world games, texture data not only constitutes the main storage burden of the installation package but also continuously occupies the graphics processor's video memory during runtime. This resource consumption is directly related to the texture's declared specifications, including basic attributes such as resolution parameters and channel configuration.
[0003] However, in practical applications, a mismatch frequently occurs between declared specifications and effective utilization, leading to inefficient resource allocation and continuous waste of storage space and video memory bandwidth. Furthermore, project teams often struggle to accurately identify the causes of this resource waste, resulting in optimization efforts relying solely on experience and lacking data support.
[0004] Therefore, there is an urgent need in this field for a resource utilization evaluation method that can comprehensively evaluate the utilization of texture resources in multiple dimensions and effectively reduce the waste of storage space and video memory bandwidth.
[0005] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0006] The purpose of this disclosure is to provide a method, apparatus and electronic device for evaluating resource utilization, which can at least to some extent comprehensively evaluate the utilization of texture resources in multiple dimensions and effectively reduce the waste of storage space and video memory bandwidth.
[0007] According to a first aspect of this disclosure, a method for assessing resource utilization is provided, comprising: Obtain pixel coverage data of the target texture resource, and obtain the UV space utilization rate of the target texture resource based on the number of effectively utilized pixels in the pixel coverage data and the total number of pixels of the target texture resource; Based on the visibility value of each pixel in the target texture resource in the association model, the visibility distribution data of the target texture resource is obtained, and the visibility utilization rate of the target texture resource is obtained by aggregating the pixel contribution results in the visibility distribution data. Obtain the loss curve of the multi-level resolution hierarchy sequence of the target texture resource, and obtain the multi-level resolution utilization rate of the target texture resource based on the curve shape characteristics of the loss curve; The information distribution characteristics of the target texture resource in each data channel are determined, the single channel utilization rate is obtained based on the information distribution characteristics, and the channel utilization rate of the target texture resource is obtained based on the single channel utilization rate of each data channel. The overall utilization rate of the target texture resource is obtained based on at least one of the UV space utilization rate, the visibility utilization rate, the multi-level resolution utilization rate, and the channel utilization rate.
[0008] According to a second aspect of this disclosure, a resource utilization rate assessment apparatus is provided, comprising: The UV space utilization determination module is used to obtain pixel coverage data of the target texture resource and obtain the UV space utilization of the target texture resource based on the number of effectively utilized pixels in the pixel coverage data and the total number of pixels of the target texture resource. The visibility utilization determination module is used to obtain the visibility distribution data of the target texture resource based on the visibility value of each pixel in the target texture resource in the association model, and to obtain the visibility utilization rate of the target texture resource based on the pixel contribution aggregation result in the visibility distribution data. The multi-level resolution utilization determination module is used to obtain the loss curve of the multi-level resolution hierarchy sequence of the target texture resource, and to obtain the multi-level resolution utilization of the target texture resource based on the curve shape characteristics of the loss curve. The channel utilization determination module is used to determine the information distribution characteristics of the target texture resource in each data channel, obtain the single channel utilization based on the information distribution characteristics, and obtain the channel utilization of the target texture resource based on the single channel utilization corresponding to each data channel. The overall utilization rate determination module is used to obtain the overall utilization rate of the target texture resource based on at least one of the UV space utilization rate, the visibility utilization rate, the multi-level resolution utilization rate, and the channel utilization rate.
[0009] According to a third aspect of this disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform the resource utilization assessment method described in any one of the preceding claims by executing the executable instructions.
[0010] According to a fourth aspect of this disclosure, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the resource utilization evaluation method described in any one of the preceding claims.
[0011] The exemplary embodiments disclosed herein can have the following beneficial effects: In the resource utilization evaluation method of the exemplary implementation of this disclosure, the resource utilization of target texture resources is automatically quantified from four independent and complementary dimensions—UV space utilization, visibility utilization, multi-level resolution utilization, and channel utilization—during the asset construction process. On the one hand, the utilization efficiency of texture resources can be measured from the perspectives of space occupation, visual effectiveness, resolution and content complexity matching, and information carrying capacity, avoiding blind spots in single-dimensional evaluation. It can accurately locate the texture resources with the most serious resource waste from multiple perspectives and guide optimization decisions, comprehensively discovering resource optimization opportunities. On the other hand, it can be automatically executed during asset construction, without relying on the runtime environment or capturing frame data. After each construction is completed, the utilization evaluation results of all texture resources can be obtained, covering all textures in the project rather than just the textures visible in the current frame, providing systematic data support for texture resource optimization in large-scale game projects.
[0012] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0013] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure. It is obvious that the drawings described below are merely some embodiments of this disclosure, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.
[0014] Figure 1 A flowchart illustrating a method for evaluating resource utilization according to an exemplary embodiment of this disclosure is shown. Figure 2 A schematic diagram of the process for obtaining pixel coverage data of a target texture resource according to an exemplary embodiment of this disclosure is shown; Figure 3 A flowchart illustrating the process of determining the UV space utilization of a target texture resource according to an exemplary embodiment of this disclosure is shown. Figure 4 A schematic diagram illustrating the calculation of UV space utilization according to a specific embodiment of the present disclosure is shown; Figure 5 This illustration shows a flowchart of an exemplary embodiment of the present disclosure for obtaining visibility distribution data of a target texture resource based on the visibility value of a pixel in an association model; Figure 6A flowchart illustrating an exemplary embodiment of this disclosure is shown to obtain the visibility utilization rate of a target texture resource based on the pixel contribution aggregation result in visibility distribution data. Figure 7 A schematic diagram of visibility utilization aggregation according to a specific embodiment of the present disclosure is shown; Figure 8 A flowchart illustrating the process of obtaining loss curves for multi-level resolution hierarchical sequences according to an exemplary embodiment of this disclosure is shown. Figure 9 A flowchart illustrating the curve shape characteristics of the calculated loss curve in an exemplary embodiment of this disclosure is shown. Figure 10 A schematic diagram of multi-level resolution utilization evaluation according to a specific embodiment of the present disclosure is shown; Figure 11 A flowchart illustrating the process of determining the loss diagnosis type of a target texture resource according to an exemplary embodiment of this disclosure is shown. Figure 12 A schematic diagram of four types of diagnosis of Mipmap loss curves according to a specific embodiment of the present disclosure is shown; Figure 13 A flowchart illustrating the process of determining the information distribution characteristics of a target texture resource in each data channel according to an exemplary embodiment of this disclosure is shown. Figure 14 A schematic diagram illustrating the channel information distribution characteristic analysis according to a specific embodiment of the present disclosure is shown; Figure 15 A schematic diagram of multidimensional utilization record and comprehensive score is shown according to a specific embodiment of the present disclosure; Figure 16 A schematic diagram of a multidimensional utilization evaluation framework flow according to a specific embodiment of the present disclosure is shown. Figure 17 A block diagram of a resource utilization evaluation apparatus according to an exemplary embodiment of the present disclosure is shown; Figure 18 A schematic diagram of the structure of a computer system suitable for implementing the embodiments of the present disclosure is shown. Detailed Implementation
[0015] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided to make this disclosure more comprehensive and complete, and to fully convey the concept of the example embodiments to those skilled in the art. The described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a full understanding of embodiments of this disclosure. However, those skilled in the art will recognize that the technical solutions of this disclosure can be practiced with one or more of the specific details omitted, or other methods, components, apparatus, steps, etc., can be employed. In other instances, well-known technical solutions are not shown or described in detail to avoid obscuring various aspects of this disclosure.
[0016] Furthermore, the accompanying drawings are merely illustrative of this disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted. Some block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0017] In some relevant embodiments, the utilization rate of texture resources can be evaluated through the following methods: 1. Runtime Mipmap (Multum In Parvo Map) streaming statistics (such as Unreal Engine's Texture Streaming) Modern game engines (such as Unreal Engine and Unity) have built-in runtime texture streaming systems. This system dynamically selects which level of mipmap to load at runtime based on the camera position and model distance, and provides statistical information (such as the current resident mip level of each texture and whether there are streaming bottlenecks).
[0018] 2. Mip-level visualization of graphics debugging tools (such as RenderDoc).
[0019] Graphics debugging tools (such as RenderDoc and Nsight Graphics) allow developers to capture frames at runtime and visualize the mipmap level of each pixel using false color overlay. By observing the distribution of false colors, developers can manually determine whether the texture resolution is too high or too low.
[0020] 3. UV (Texture Coordinates) Space Visualization Tool
[0021] Some modeling software (such as Maya and 3ds Max) and in-engine editors provide UV space visualization capabilities, which unfold UVs and overlay them onto textures for display, allowing artists to visually estimate the efficiency of UV space utilization.
[0022] However, the solutions in the above-mentioned related embodiments have the following core defects: Defect 1: It relies on runtime rather than build time. Mipmap's streaming statistics and graphics debugging tools require the actual game to run, the camera to be moved to a specific position, and frame data to be captured before analysis can be performed. This means that, firstly, analysis results cannot be obtained immediately after the assets are built; secondly, the analysis results depend on the specific running scene and camera position, and the conclusions may differ in different scenes; and finally, it cannot cover all textures in the project, but can only analyze textures appearing in the current frame.
[0023] Defect 2: Single-dimensional evaluation rather than multi-dimensional synthesis. The above solutions each focus on only one dimension of utilization—Mipmap streaming focuses on the resolution dimension, and UV visualization focuses on the fill rate dimension. No solution can simultaneously evaluate multiple dimensions and synthesize the output. Single-dimensional evaluation may miss significant waste; for example, a texture might have a high UV fill rate (appearing efficient), but most of its area might actually be invisible (low visibility utilization), or its alpha (transparency) channel might be completely constant (low channel utilization).
[0024] Flaw 3: Reliance on manual interpretation rather than automated scoring. Graphics debugging tools output false-color images, requiring developers to visually interpret the color meaning of each area; UV visualization requires artists to visually estimate the fill rate. In projects containing tens of thousands of textures, manual interpretation of each one is completely impractical. The above solutions lack an automated, batch-executed utilization scoring mechanism.
[0025] Analysis revealed that the root cause of these deficiencies lies in treating texture utilization as a runtime diagnostic issue rather than a build-time quality control issue, and in the isolation of evaluation tools across different dimensions, lacking a comprehensive, multi-dimensional utilization evaluation framework that is automatically executed throughout the build pipeline. The gap between texture declaration specifications and effective utilization stems from waste in four dimensions: 1. Wasted UV space: Textures are rectangular pixel grids, while the surface area of the model after UV unwrapping is irregularly shaped. Although the gaps between UV islands consume texture pixel space, they are not referenced by any model surface, which is a pure waste of space.
[0026] 2. Visibility Waste: Some surface areas of the model are occluded by their own geometry (such as the inside of clothing folds, equipment recesses, and behind the character's ears). Although the texture pixels mapped to these areas are referenced by UVs, they are actually invisible to the player. Allocating high-resolution texture space to these invisible areas is a waste of resources.
[0027] 3. Wasted Resolution: The declared resolution of a texture (e.g., 2048x2048) may not match its content complexity. A simple texture (such as a smooth gradient or low-frequency pattern), even with a declared high resolution, will show almost no perceptible quality loss when scaled down step by step—meaning that the extra high-resolution pixel data carries redundant information. Conversely, a texture containing dense, high-frequency details, even with a high resolution, will show significant quality loss when scaled down by one level, indicating that its resolution is already at the lower limit relative to the content complexity.
[0028] 4. Channel waste: In an RGBA (Red, Green, Blue, Alpha, red channel, green channel, blue channel, transparency / opacity) four-channel texture, some channels may carry extremely low information (such as the entire Alpha channel being 255, or a certain color channel being almost a constant value), but they are still stored and transmitted as a complete number of channels.
[0029] If utilization rates across multiple dimensions can be automatically quantified and reports generated during the asset construction phase, project teams can accurately pinpoint the most wasted textures and take corresponding optimization measures, such as reducing resolution, merging UV spaces, and decreasing the number of channels, thereby systematically reducing the storage and video memory usage of texture resources. For example, in a project with a total of 20GB of textures, if the average utilization rate is 0.85, it means that approximately 3GB of texture storage can be optimized.
[0030] Based on the above analysis, this example implementation first provides a method for evaluating resource utilization. (Reference) Figure 1 As shown, the above-mentioned method for assessing resource utilization may include the following steps: Step S110. Obtain the pixel coverage data of the target texture resource, and obtain the UV space utilization rate of the target texture resource based on the number of effectively utilized pixels in the pixel coverage data and the total number of pixels of the target texture resource.
[0031] Step S120. Obtain the visibility distribution data of the target texture resource based on the visibility value of each pixel in the correlation model, and obtain the visibility utilization rate of the target texture resource based on the pixel contribution aggregation result in the visibility distribution data.
[0032] Step S130. Obtain the loss curve of the multi-level resolution hierarchy sequence of the target texture resource, and obtain the multi-level resolution utilization rate of the target texture resource based on the curve shape characteristics of the loss curve.
[0033] Step S140. Determine the information distribution characteristics of the target texture resource in each data channel, obtain the single channel utilization rate based on the information distribution characteristics, and obtain the channel utilization rate of the target texture resource based on the single channel utilization rate of each data channel.
[0034] Step S150. Obtain the overall utilization rate of the target texture resource based on at least one of UV space utilization, visibility utilization, multi-level resolution utilization, and channel utilization.
[0035] In the resource utilization evaluation method of this exemplary implementation, the resource utilization of target texture resources is automatically quantified from four independent and complementary dimensions—UV space utilization, visibility utilization, multi-level resolution utilization, and channel utilization—during the asset construction process. On the one hand, the utilization efficiency of texture resources can be measured from the perspectives of space occupation, visual effectiveness, resolution and content complexity matching, and information carrying capacity, avoiding blind spots in single-dimensional evaluation. This allows for precise identification of texture resources with the most serious resource waste from multiple angles, guiding optimization decisions and comprehensively discovering resource optimization opportunities. On the other hand, this method can be automatically executed during asset construction, without relying on the runtime environment or capturing frame data. After each construction is completed, the utilization evaluation results of all texture resources can be obtained, covering all textures in the project rather than just those visible in the current frame, providing systematic data support for texture resource optimization in large-scale game projects.
[0036] Below, in conjunction with Figures 2 to 16 The steps described above in this example implementation will be explained in more detail.
[0037] In step S110, pixel coverage data of the target texture resource is obtained, and the UV space utilization rate of the target texture resource is obtained based on the number of effectively utilized pixels in the pixel coverage data and the total number of pixels of the target texture resource.
[0038] In this example implementation, the target texture resource is two-dimensional image data, such as texture mapping resources, applied to the surface of a model in 3D graphics rendering to enhance visual effects like detail, color, and texture. Pixel coverage data is binary image data used to indicate which pixel areas on the target texture resource are actually referenced or covered by the associated model. Typically, covered pixels are marked with one state value, and uncovered pixels are marked with another. The number of effectively utilized pixels refers to the number of pixels considered effectively utilized in the pixel coverage data of the target texture resource. This can include the number of pixels directly covered by the model surface and the number of pixels considered effectively utilized after certain expansion rules. The total number of pixels refers to the sum of all pixels of the target texture resource at its original resolution, typically equal to the width multiplied by the height of the target texture resource.
[0039] The UV space utilization rate of the target texture resource can be obtained by combining the number of effectively utilized pixels in the pixel coverage data with the total number of pixels in the target texture resource. Utilization rate measures the proportion of the target texture resource that is effectively used, and its value ranges from [0, 1], where 1 represents full utilization. UV space utilization rate can be used to quantify the proportion of the pixel space of the target texture resource that is actually used by the model's UVs.
[0040] In this example implementation, such as Figure 2 As shown, obtaining the pixel coverage data of the target texture resource can specifically include the following steps: Step S210. Create an initial pixel overlay map based on the original resolution of the target texture resource, and initialize the pixel values in the pixel overlay map to uncovered state values.
[0041] To accurately record the coverage status of each pixel on the target texture resource, a two-dimensional data structure with the exact same size as the target texture resource can be created. For example, a Boolean pixel coverage map with the same width and height as the target texture resource can be created. Each element in the pixel coverage map corresponds to a pixel on the target texture resource, and its initial value is initialized to indicate the "uncovered" state, such as the Boolean value false or the integer 0.
[0042] In this example implementation, during the preprocessing stage of model building, all model resources can be traversed to establish a reverse index between the target texture resource and the associated material group of all associated models; after the target texture resource enters the building stage, the vertex UV coordinates of each UV triangle in the associated material group are loaded through the reverse index.
[0043] The preprocessing stage of model building refers to the offline resource processing stage preceding the model building stage. During the preprocessing stage of asset building, all LOD0 model resources can be traversed, establishing a reverse index from the identifier of the target texture resource to all model material groups referencing that target texture resource. LOD (Level of Detail) refers to switching between different precision geometric representations based on the distance between the model and the camera. When a target texture resource enters the building process, a callback can be triggered through the reverse index to load the UV coordinates and triangle index data of the associated model. Asset building refers to the offline batch processing process of converting raw resources into a format usable by the target platform. This step significantly improves the efficiency of acquiring pixel coverage data, reduces computational resource consumption, and thus accelerates the entire target texture resource utilization evaluation process.
[0044] After establishing the inverse index between the target texture resource and all associated model material groups, UV triangulation can be performed on each (target texture resource, model, material group) combination at the actual build resolution of the target texture resource.
[0045] Step S220. Traverse each UV triangle in the associated material group of the associated model, and map the UV coordinates of the vertex of the UV triangle to the pixel space to obtain the corresponding pixel coordinates, where the associated model is the model that references the target texture resource.
[0046] To perform pixel-level analysis of the area used by a 3D model on a 2D target texture resource, it is necessary to process the projection of the UV triangles constituting the model surface into the texture coordinate space. Each UV triangle is defined by the positions of its three vertices in the UV coordinate system.
[0047] Specifically, each UV triangle of the current associated material group can be traversed, and the UV coordinates of its three vertices can be mapped from the [0, 1] space to the pixel space of [0, width-1]×[0, height-1] to obtain the corresponding pixel coordinates.
[0048] Step S230. Construct an axis-aligned bounding box of the UV triangle in pixel space based on the pixel coordinates, and for each pixel within the axis-aligned bounding box, determine whether the pixel is inside the UV triangle.
[0049] After determining the axis-aligned bounding box of the UV triangle, each pixel within that bounding box can be checked individually to determine whether it is truly inside the UV triangle. For example, geometric testing methods such as the centroid coordinate test can be used to determine whether a point is inside a triangle.
[0050] Specifically, the axis-aligned bounding box of the UV triangle in pixel space can be calculated, and a barycentric coordinate test is performed on each pixel within the bounding box. The barycentric coordinate method determines whether a pixel is inside the triangle by calculating the weight of the pixel relative to the vertices of the triangle. If all three components obtained through the barycentric coordinate test are greater than 0, the pixel is determined to be inside the triangle.
[0051] Step S240. If the pixel is inside the UV triangle, mark the pixel value in the pixel coverage map as a covered state value, and obtain the pixel coverage data of the target texture resource in the association model based on the marked pixel coverage map.
[0052] If a pixel is confirmed to be inside the UV triangle, the pixel state at the corresponding position in the pixel overlay map is updated. For example, if it is a Boolean pixel overlay map, the pixel is marked as true in the overlay map.
[0053] After traversing all UV triangles in the associative model and marking the pixels within each triangle, the resulting pixel cover map is a complete representation of the actual usage of the target texture resource within the associative model. This map clearly indicates which pixel regions on the target texture resource are occupied by the model and which are not. This final pixel cover map serves as the foundational data for subsequent calculations of UV space utilization.
[0054] In this example implementation, by transforming the model's usage area on the texture from a continuous UV space to a discrete pixel space, and combining axis-aligned bounding boxes and point-in-triangle judgment, accurate identification of the actual utilized area of the target texture resource is ensured. Through this systematic pixel-level rasterization process, an accurate pixel coverage map of the target texture resource in the associated model is ultimately obtained. The above steps provide a reliable and accurate foundation for subsequent UV space utilization calculations, thereby contributing to more effective management and optimization of the target texture resource.
[0055] In this example implementation, if the target texture resource has multiple associated models, the pixel values corresponding to each pixel in the target texture resource in the pixel coverage data of each associated model are taken as a union to obtain the merged pixel value corresponding to each pixel; based on the merged pixel value corresponding to each pixel in the target texture resource, the pixel coverage data of the merged target texture resource is obtained.
[0056] In 3D rendering and game development, a texture map is often shared by multiple different models or different parts of a model to save memory and improve rendering efficiency. When the same target texture resource is referenced by multiple model groups, the coverage results of all model groups are combined (logical OR) to obtain the complete coverage map of the target texture resource. Another implementation is to iterate through the coverage status of each pixel in all associated models, and immediately mark it as covered as soon as it is found to be covered by at least one model. The final pixel coverage map integrates the usage of the target texture resource in all associated models, and each pixel value reflects its status as covered by UV triangles in at least one associated model.
[0057] Through the above technical solution, when a target texture resource is used by multiple associated models, pixel coverage information from different models can be effectively integrated. This method of merging pixel coverage data ensures that every utilized pixel of the target texture resource can be accurately identified, avoiding the problem of incomplete or inaccurate utilization assessment caused by considering only a single model. Therefore, the resulting merged pixel coverage data can more comprehensively and realistically reflect the actual utilization of the target texture resource in all associated models, providing a more accurate and reliable data foundation for subsequent UV space utilization calculations.
[0058] In the actual workflow of a game engine, the gaps between UV islands are not entirely useless. When texture filtering samples pixels at the edges of UV islands, it reads the values of adjacent pixels. If the outer edge of a UV island is an uninitialized black pixel, the filtering result will show visible black gaps. To solve this problem, an Alpha Bleed operation can be performed on the UV islands—expanding the pixel color at the edge of the UV island outwards by a certain number of pixels to fill the gap area. Alpha Bleed refers to the operation of filling the pixel extension area around the island to avoid black gaps at the edges of UV islands during texture filtering.
[0059] In this example implementation, as Figure 3 As shown, the UV space utilization rate of the target texture resource is obtained based on the number of effectively utilized pixels in the pixel coverage data and the total number of pixels of the target texture resource. Specifically, it can include the following steps: Step S310. Pixels with a value of "covered" in the pixel coverage data are identified as covered pixels, and the number of covered pixels in the target texture resource is obtained based on the number of covered pixels.
[0060] Overlapping pixels represent the portion of the target texture resource that is directly mapped by the model's UVs. By counting the number of these overlapping pixels, the total number of overlapping pixels in the target texture resource can be obtained.
[0061] Step S320. For each uncovered pixel in the target texture resource, determine the pixel distance between the uncovered pixel and the nearest covered pixel.
[0062] Uncovered pixels are pixels whose UV triangles do not directly occupy the area. Pixel distance refers to the spatial distance between an uncovered pixel and its nearest covered pixel. This distance can be calculated using various distance transformation methods, such as Euclidean distance or Manhattan distance transformation, to obtain the distance from each uncovered pixel to its nearest covered pixel.
[0063] Step S330. If the pixel distance is less than or equal to the preset expansion width, the uncovered pixels are determined as filling pixels, and the number of filling pixels in the target texture resource is obtained according to the number of filling pixels.
[0064] The preset expansion width is a pre-defined threshold parameter used to define an effectively utilized buffer area. This expansion width determines the extent within which uncovered pixels can be considered effectively utilized. Fill pixels are those uncovered pixels that, while not directly covered by UV triangles, have a pixel distance to the nearest covered pixel that is less than or equal to the preset expansion width. These pixels are considered to fill the edge of the UV-covered area and are therefore effectively utilized. By counting these fill pixels, the number of fill pixels in the target texture resource can be obtained.
[0065] For example, you can set the padding width parameter P (the default is 16 pixels, following the industry practice of Alpha Bleed). Pixels at a distance less than or equal to P are marked as "padding is valid".
[0066] Alternatively, for each pixel that is false in the overlay map, check if there is a pixel that is true within its P-pixel neighborhood. If so, mark that pixel as having "padding valid".
[0067] After the coverage area expands, the effectively utilized pixels in the coverage map include two categories: pixels directly covered by UV triangles and pixels within the padding tolerance band. Although the gap pixels around the UV islands are not directly covered by UV triangles, they carry meaningful pixel data due to the technical requirements of Alpha Bleed and should be included in the scope of effective utilization.
[0068] Step S340. Obtain the number of effectively utilized pixels based on the number of covered pixels and the number of filled pixels, and obtain the UV space utilization rate of the target texture resource based on the number of effectively utilized pixels and the total number of pixels of the target texture resource.
[0069] Effectively utilized pixels are the sum of covered pixels and filled pixels. They take into account both pixels directly covered by UVs and pixels indirectly utilized within a certain extended width, thus reflecting the actual utilization of the target texture resource more comprehensively.
[0070] The UV space utilization rate is calculated as follows: First, the total number of pixels marked as true in the overlay map is counted as the number of directly overlaid pixels. Then, the number of pixels with effective padding but not directly overlaid is counted as the number of effectively utilized pixels. The total number of pixels equals the width of the target texture resource multiplied by its height. The UV space utilization rate equals the sum of the number of directly overlaid pixels and the number of effectively utilized pixels divided by the total number of pixels.
[0071] In this example implementation, the UV space utilization of the target texture resource can be calculated through offline analysis model UV data without relying on runtime data, and the necessary gap areas between UV islands due to the requirements of technologies such as Alpha Bleed can be properly handled.
[0072] Figure 4 A schematic diagram illustrating UV space utilization calculation according to a specific embodiment of this disclosure is provided to demonstrate the processes of UV rasterization, Alpha Bleed Padding expansion, and fill rate calculation. Figure 401 shows the UV space of a target texture resource, where several UV islands are represented by solid-color shaded areas indicating pixels covered by UV triangles (directly covered areas). After distance transformation, Figure 402 is obtained. In Figure 402, the dashed areas around the UV islands represent the tolerance area of Alpha Bleed Padding expansion (no more than 16 pixels from the nearest covered pixel), and the remaining white areas are marked as wasted space. The distance transformation calculation process is as follows: for each uncovered pixel, the Manhattan distance to the nearest covered pixel is calculated; pixels with a distance less than or equal to the Padding width P are marked as having valid padding. The final utilization calculation process is: UV space utilization equals the sum of the number of directly covered pixels and the number of filled pixels divided by the total number of pixels in the target texture resource. After calculating the UV space utilization, the final output fields may include: UV space utilization percentage, number of directly covered pixels, number of filled pixels, and total number of pixels.
[0073] In step S120, the visibility distribution data of the target texture resource is obtained based on the visibility value of each pixel in the target texture resource in the association model, and the visibility utilization rate of the target texture resource is obtained based on the pixel contribution aggregation result in the visibility distribution data.
[0074] In this example implementation, the visibility value represents the degree to which a pixel on the target texture resource is visible to the observer in the association model; generally, a larger value indicates higher visibility. Visibility distribution data represents the distribution of visibility values for each pixel on the target texture resource and can be displayed in the form of a visibility map. The pixel contribution aggregation result refers to the aggregation result of the visibility contributions of all valid pixels on the target texture resource. This result can be the cumulative value of visibility values, or a weighted sum of pixel visibility values, or other aggregation results; no specific limitation is made in this example implementation. Visibility utilization rate quantifies the proportion of pixels that are actually visible in the target texture resource. Visibility, as an independent evaluation dimension of utilization rate, can directly measure how much of the target texture resource space is effectively used, rather than being used as a weighting factor for other indicators.
[0075] In this example implementation, a spatial acceleration structure can be constructed for each model, and ray tracing can be performed on each effective pixel on the model surface using cosine-weighted hemispherical sampling to calculate the degree of occlusion by the model's own geometry to obtain visibility distribution data. For example... Figure 5 As shown, the visibility distribution data of the target texture resource is obtained based on the visibility value of each pixel in the association model. This can specifically include the following steps: Step S510. Construct the corresponding hierarchical bounding box based on the complete triangular mesh of the associated model.
[0076] For the complete triangular mesh of the model, a surface area heuristic BVH (Bounding Volume Hierarchy) is constructed. The Bounding Volume Hierarchy is a spatial acceleration structure used to speed up ray-geometry intersection queries. Constructed on a model-by-model basis (including all material groups), it can detect self-occlusion across material groups.
[0077] Step S520. Determine the overlay pixels and fill pixels in the target texture resource as valid pixels, and determine the world space position and normal direction of each valid pixel in the associated material group of the associated model.
[0078] Effective pixels refer to pixels in the target texture resource that are actually covered by the associated model or filled within a certain extended range, representing the area on the target texture resource that is directly or indirectly related to the model geometry. Focusing computation on effective pixels avoids unnecessary visibility calculations on completely unused areas of the target texture resource, thus improving efficiency. World space position refers to the precise 3D coordinates of the effective pixel in the 3D scene coordinate system. Normal direction refers to the vector direction of the model surface perpendicular to the tangent plane at that world space position. Specifically, for the current material group, the world space position and normal direction of each effective pixel can be calculated through UV rasterization and barycentric coordinate interpolation.
[0079] Step S530. Generate an orientation hemisphere based on the world space position and normal direction of the effective pixels, and perform cosine-weighted random sampling on the orientation hemisphere to obtain multiple sampling directions.
[0080] A directional hemisphere is a hemisphere centered on the world-space location of an effective pixel, extending upwards (towards the normal direction) along the normal direction of that pixel. This hemisphere defines the set of all possible directions in which the pixel can receive light or be observed. Cosine-weighted random sampling is a method for generating random sampling directions on the directional hemisphere. Its characteristic is that the sampling density is proportional to the cosine of the angle between the direction vector and the normal direction, meaning that regions closer to the normal direction will have a higher sampling density, while regions farther from the normal direction will have a lower sampling density.
[0081] For each valid pixel, cosine-weighted random sampling can be performed on the direction hemisphere defined by its normal to obtain multiple sampling directions. A deterministic pseudo-random number generator can also be used to ensure that the results are reproducible.
[0082] Step S540. Based on the sampling direction, emit multiple rays to the association model, determine the ray occlusion data corresponding to the effective pixels through the hierarchical bounding box, and determine the visibility probability of the effective pixels based on the ray occlusion data.
[0083] By emitting multiple rays along a sampling direction and performing occlusion queries using BVH (Browser Visibility Hashing), it's possible to detect whether other geometry in the scene is occluding a pixel. For each ray, occlusion data typically includes whether the ray intersects with a model; if so, the location, distance, and attributes of the intersecting geometry are recorded. This data directly reflects whether the pixel is occluded in a specific direction. Visibility probability refers to the proportion of unoccluded rays among all emitted sampled rays. For example, the visibility probability of each pixel can be equal to 1.0 minus the ratio of occluded rays to the total number of rays. This probability value quantifies the likelihood that the pixel is observed in the 3D scene.
[0084] Step S550. Obtain the visibility value of the effective pixels in the association model based on the visibility probability, and obtain the visibility distribution data of the target texture resource based on the visibility values of all pixels in the association model.
[0085] The visibility value is derived from the visibility probability and is a quantification metric used to represent the visibility of valid pixels in the association model. For example, the visibility probability can be quantized as an integer value in the range of [0, 255] to obtain the visibility value. The final output visibility distribution data is a grayscale visibility map with a fixed reference resolution (default 512x512).
[0086] In this example implementation, by introducing visibility calculation based on the geometry of the 3D model, the actual visibility of each effective pixel on the target texture resource in the 3D scene is accurately quantified, making the evaluation results closer to the actual usage of the target texture resource, avoiding misjudging invisible areas as effective utilization areas, thereby improving the accuracy and reliability of the target texture resource utilization evaluation.
[0087] In this example implementation, when the pixel contribution aggregation result is the cumulative visibility value of the pixels, such as Figure 6 As shown, the visibility utilization rate of the target texture resource is obtained based on the pixel contribution aggregation results in the visibility distribution data, which may specifically include the following steps: Step S610. Traverse the valid pixels in the target texture resource, normalize the visibility values of the valid pixels and then accumulate them to obtain the accumulated visibility value.
[0088] The visibility accumulation value is the sum of the normalized visibility values of all valid pixels. This value comprehensively reflects the total degree to which all valid regions on the target texture resource are observed in the association model. Visibility utilization can be calculated only on valid pixels covered by UVs. Specifically, the visibility accumulation value and the coverage pixel count can be initialized to 0. Then, all pixels marked as true by the coverage map are iterated over, and the merged visibility value of each pixel is normalized by dividing by 255.0 and added to the visibility accumulation value, while simultaneously incrementing the coverage pixel count by 1.
[0089] Step S620. Obtain the visibility utilization rate of the target texture resource based on the cumulative visibility value and the number of effectively utilized pixels.
[0090] The number of effectively utilized pixels represents the total number of pixels on the target texture resource that are considered meaningful, while the visibility accumulation value represents the sum of the actual visibility contributions of these meaningful pixels. By dividing the visibility accumulation value by the number of effectively utilized pixels, a visibility utilization rate between 0 and 1 can be obtained, which intuitively represents the efficiency with which the visibility resources of the target texture resource are utilized.
[0091] In this example implementation, if the target texture resource has multiple associated models, the merged visibility value corresponding to each pixel is obtained based on the maximum visibility value of each pixel in the target texture resource in each associated model; and the visibility distribution data of the merged target texture resource is obtained based on the merged visibility value corresponding to each pixel in the target texture resource.
[0092] If a target texture resource has multiple associated models, then the visibility data of all combinations of (models, material groups) associated with that target texture resource is loaded. If the resolution of the visibility data differs from the construction resolution of the target texture resource, bilinear interpolation resampling is performed. When the same target texture resource is referenced by multiple model groups, the maximum value among all model visibility values is taken as the merged visibility value for each pixel position; that is, "if any model can see it, it is considered visible."
[0093] Through the above technical solution, when a target texture resource is referenced by multiple associated models, its visibility contribution across all associated models can be accurately considered comprehensively. This strategy of merging visibility values by taking the maximum value avoids the problems of lost visibility information or inaccurate evaluation caused by considering only a single model. The resulting merged visibility distribution data can more comprehensively and realistically reflect the overall visibility status of the target texture resource in actual application scenarios, thus providing a more reliable data foundation for subsequent visibility utilization calculations and significantly improving the accuracy and comprehensiveness of target texture resource utilization evaluation.
[0094] Figure 7 A schematic diagram of visibility utilization aggregation according to a specific embodiment of this disclosure is shown to illustrate the aggregation process from per-texel visibility baking to map-level visibility utilization percentage. Figure 701 shows the grayscale visibility maps (obtained by ray tracing baking) for multiple (model, material groups), with bright colors representing high visibility and dark colors representing occluded low visibility areas. The multi-model merging process is then illustrated: when the same texture is referenced by multiple models, the maximum visibility value among all models is taken for each pixel location to obtain the merged visibility map. The final aggregation calculation process involves traversing only the pixels marked as valid in the overlay map, normalizing the merged visibility value of each valid pixel, and then summing them. The final visibility utilization is equal to the accumulated visibility value divided by the number of overlay pixels.
[0095] In this example implementation, 3D geometric self-occlusion visibility information is used to quantify the proportion of pixels effectively "seen" in the target texture resource. This serves as an independent evaluation dimension for utilization, accurately quantifying the actual visibility of each effective pixel on the target texture resource in the 3D scene. This makes the evaluation results closer to the actual usage of the target texture resource, avoiding misjudging invisible areas as effectively utilized areas, thereby improving the accuracy and reliability of the utilization evaluation of the target texture resource.
[0096] In step S130, the loss curve of the multi-level resolution hierarchy sequence of the target texture resource is obtained, and the multi-level resolution utilization rate of the target texture resource is obtained based on the curve shape characteristics of the loss curve.
[0097] In this example implementation, the multi-level resolution hierarchy sequence is an image sequence with decreasing resolution generated by progressively downscaling the target texture resource. The loss curve represents the degree of visual quality loss between the processed images at different levels within the multi-level resolution hierarchy sequence and the target texture resource. Curve morphology features refer to specific attributes of the loss curve's shape, such as its flatness, slope variation, and area; these features can be used to evaluate the resolution matching of the target texture resource. Multi-level resolution utilization is an indicator of the resolution utilization efficiency of the target texture resource, which can be quantified through the curve morphology features of the loss curve.
[0098] Specifically, during the asset construction process, the target texture resource is progressively scaled down from the original resolution to generate a Mipmap sequence (Mip 0 is the original resolution, Mip 1 is half resolution, Mip 2 is quarter resolution, and so on). For each Mipmap level k (k = 1, 2, ..., maxMipLevel), the quality loss of that level relative to the original resolution (Mip 0) is calculated.
[0099] By analyzing the quality loss curves of the target texture resource at each mipmap level, the system automatically diagnoses whether the mipmap resolution configuration of the target texture resource is reasonable. The core idea is that for a target texture resource with a reasonable resolution configuration, the loss at each mipmap level should show a smooth increasing curve, with the loss in the early (lower levels) stages remaining within a moderate range. If the shape of the loss curve deviates from this healthy pattern, it indicates that the resolution configuration is wasteful or insufficient.
[0100] In this example implementation, as Figure 8 As shown, obtaining the loss curve of the multi-level resolution hierarchy sequence of the target texture resource can specifically include the following steps: Step S810. Upsample the layer-processed images of each level in the multi-level resolution layer sequence to the original resolution of the target texture resource to obtain the upsampled images corresponding to each level of layer-processed images.
[0101] Upsample the Mip k level processed image in the multi-resolution hierarchical sequence to the same resolution as Mip 0 (target texture resource) (e.g., using bilinear interpolation) to obtain the corresponding upsampled image, so that the two can be compared pixel by pixel.
[0102] Step S820. Determine the pixel loss value of each pixel between the target texture resource and the upsampled image, and obtain the average loss value corresponding to the layer-processed image based on the pixel loss value.
[0103] For the upsampled image at the Mip k level and the original image data at the Mip 0 level, a perceptually weighted difference is calculated pixel-by-pixel to obtain the average loss value of the image processed at the corresponding level. The specific calculation method for different types of texture map resources is as follows: Normal texture (including Alpha channel): The loss value of each pixel is equal to the absolute value of the difference in the red channel multiplied by a weight of 0.165, plus the absolute value of the difference in the green channel multiplied by a weight of 0.54, plus the absolute value of the difference in the blue channel multiplied by a weight of 0.052, plus the absolute value of the difference in the Alpha channel multiplied by a weight of 0.243.
[0104] Normal texture (no alpha channel): The loss value of each pixel is equal to the absolute value of the difference in the red channel multiplied by a weight of 0.22, plus the absolute value of the difference in the green channel multiplied by a weight of 0.72, plus the absolute value of the difference in the blue channel multiplied by a weight of 0.07.
[0105] Normal mapping: The loss value for each pixel is equal to 1.0 minus the dot product of the Mip 0 normal vector and the Mip k normal vector (both normalized).
[0106] Step S830. Based on the average loss value corresponding to each level of image processing, obtain the loss curve of the multi-level resolution hierarchical sequence of the target texture resource.
[0107] The average loss at this level is equal to the sum of the loss values of all pixels divided by the total number of pixels. This results in a loss curve from Mip 1 to Mip maxLevel (the highest level): lossCurve = [mipLoss[1], mipLoss[2], ..., mipLoss[maxLevel]]. This curve is formed by connecting the average loss values of each level, with the Mipmap level on the horizontal axis and the average loss value on the vertical axis. The loss curve reflects the information decay pattern of the target texture resource at different resolutions.
[0108] In this example implementation, the curve shape characteristics of the loss curve may include low loss level, early slope, area under the curve, and first significant loss level. For example... Figure 9 As shown, calculating the shape characteristics of the loss curve can specifically include the following steps: Step S910. Starting from the first level of image processing, based on the number of consecutive levels where the average loss value is lower than the preset minimum loss threshold, the low loss level of the loss curve is obtained.
[0109] The count starts from Mip 1 and continues for consecutive levels where the loss is below a set threshold (e.g., the default threshold is 0.01). Specifically, it checks each level sequentially starting from Mip 1. If the loss of the current level is below the low loss threshold, the count of the low loss level is incremented by 1 and the check continues to the next level; if the loss of the current level reaches or exceeds the threshold, the counting stops.
[0110] lowLossCount indicates the number of mipmap levels that can be safely reduced. Within these levels, downsizing produces almost no perceptible quality loss, indicating that there is lowLossCount level redundancy in the current resolution.
[0111] Step S920. Based on the difference in average loss values between the first-level processed image and the second-level processed image, obtain the initial slope of the loss curve.
[0112] By calculating the average slope of the first two stages of the loss curve, we can measure the rate of information decay as the resolution is reduced from the original. The initial slope equals the second-stage loss minus the first-stage loss.
[0113] A low early slope indicates that the target texture resource experiences almost no quality loss during the first few levels of scaling down, suggesting that most pixels at the original resolution carry redundant information (adjacent pixels are highly similar), indicating that the resolution configuration is too high. A high early slope indicates that the target texture resource suffers significant quality loss after scaling down by one level, suggesting that the target texture resource contains dense high-frequency details, and the current resolution is approaching its sampling limit for these details.
[0114] Step S930. Obtain the sum of loss values based on the average loss values corresponding to each level of image processing, and obtain the area under the loss curve based on the total number of levels in the multi-level resolution sequence according to the sum of loss values.
[0115] The overall information density is measured by calculating the normalized area under the curve (AUC). The AUC is equal to the ratio of the sum of all loss values from the first to the highest level to the total number of levels in the multi-level resolution hierarchy sequence. A low AUC indicates that the target texture resource generally has a low loss at all levels (sparse overall information), while a high AUC indicates that the target texture resource generally has a high loss at all levels (dense information).
[0116] Step S940. Starting from the first-level hierarchical processing image, based on the level of the hierarchical processing image where the first occurrence of the average loss value is greater than or equal to the preset saliency threshold, obtain the first significant loss level of the loss curve.
[0117] The first significant loss level refers to the Mipmap level where the loss first exceeds a significance threshold (e.g., the default threshold of 0.02). Specifically, it can be checked level by level, starting from level 1, to find the first level where the loss reaches or exceeds the significance threshold, and this level number is recorded as the first significant loss level. If the loss at all levels does not exceed the threshold, it is marked as not found. This value directly indicates the effective starting resolution of the target texture resource; all higher resolution pixel data before this level contributes negligibly to image quality.
[0118] The above technical solution transforms the loss curves of multi-resolution hierarchical sequences of target texture resources into specific quantitative indicators such as the number of low-loss levels, early slope, area under the curve, and first significant loss level. This significantly improves the accuracy and operability of evaluating the multi-resolution utilization of target texture resources. These indicators clearly reveal the quality retention capability, quality degradation rate, and overall quality loss of target texture resources at different resolution levels. Based on the aforementioned curve morphology characteristics, Mipmap utilization scores can be calculated and diagnostic conclusions can be generated.
[0119] In this example implementation, the multi-level resolution utilization rate of the target texture resource can be obtained based on the low loss level and the total number of levels in the multi-level resolution hierarchy sequence.
[0120] Specifically, Mipmap utilization is equal to 1.0 minus the ratio of the number of low-loss levels to the number of maximum Mipmap levels, which is the proportion of effectively utilized Mipmap levels to the total number of levels.
[0121] For example, for a target texture resource with 11 levels of Mipmap (2048x2048), if the loss of the first 3 levels is below the threshold (lowLossCount = 3), then mipUtilization = 1 - 3 / 11 = 0.727, which means that about 27% of the resolution space is redundant.
[0122] Figure 10A schematic diagram illustrating a multi-level resolution utilization evaluation according to a specific embodiment of this disclosure is provided to demonstrate the process of progressive loss calculation, curve morphology feature extraction, and determination of four diagnostic types. Step 1 is the progressive loss calculation process: starting from the original resolution (Mip 0), the target texture resource is progressively scaled down (Mip 1 is 1 / 2 resolution, Mip 2 is 1 / 4 resolution, and so on). After upsampling back to the original resolution at each level, the perceptual weighted difference is calculated pixel-by-pixel with Mip 0 to obtain the average loss value for that level. Step 2 is the process of constructing a loss curve graph. The horizontal axis represents the Mipmap level (from Mip 1 to the highest level), and the vertical axis represents the loss value. The curve is marked with the extraction positions of four morphological features: the initial slope (the rate of ascent at the beginning of the curve), the low loss level (the consecutive levels where the loss is below the threshold), the first significant loss level (the position where the loss first exceeds the significance threshold), and the area under the curve (AUC, reflecting the overall information density). Then, based on the loss curve, Mipmap utilization is scored and diagnosed, ultimately outputting the utilization percentage, diagnostic type, and optimization suggestions.
[0123] In this example implementation, the loss diagnosis type of the target texture resource can also be obtained based on the curve shape characteristics of the loss curve.
[0124] The loss diagnosis type for target texture resources classifies the multi-level asymptotic texture usage of these resources based on the curve shape characteristics of the aforementioned loss curve. Its purpose is to transform complex quantitative characteristics into easily understandable and actionable qualitative descriptions, such as "too high resolution," "too low resolution," or "sparse content." This diagnostic type provides clear guidance for optimizing target texture resources, helping content creators or developers quickly identify and resolve problems within these resources, thereby improving their utilization efficiency and rendering performance.
[0125] In this example implementation, as Figure 11 As shown, the loss diagnosis type of the target texture resource is obtained based on the curve shape characteristics of the loss curve, which may specifically include the following steps: Step S1110. If the low loss level is greater than or equal to the first loss level threshold, and the initial slope is less than the lowest slope threshold, then the loss diagnosis type of the target texture resource is determined to be the resolution too high type.
[0126] For example, if the threshold for the first loss level is 2, the criteria for determining the overly high resolution type can be: lowLossCount >= 2 and earlySlope < earlySlope threshold.
[0127] The low initial loss of the target texture resource indicates that the highest level of the Mipmap is set too high, resulting in a large amount of video memory being wasted on high-resolution data that does not contribute visually. A typical scenario is setting a simple gradient or solid color texture to 2048x2048 resolution.
[0128] For this type of target texture resource, the maximum resolution of the target texture resource can be safely reduced by the lowLossCount level (e.g., from 2048 to 512), resulting in a memory saving of 1 - 1 / 4^lowLossCount.
[0129] Step S1120. If the average loss value of the first-level processed image is greater than the maximum loss threshold, the loss diagnosis type of the target texture resource is determined to be the low resolution type.
[0130] For example, the criterion for determining the low resolution type can be: mipLoss[1] > highLossThreshold (maximum loss threshold, such as the default threshold of 0.05).
[0131] The significant quality loss observed even at a single level downgrade of the target texture resource indicates that it contains a large amount of high-frequency detail, and the current resolution is already the minimum required to maintain image quality. The minimum mipmap dwell level for this target texture resource should be limited (i.e., mip streaming should be prevented from downgrading this target texture resource to an excessively low level); otherwise, severe blurring or distortion will occur in high-frequency areas when viewed from a distance. Typical scenarios include textures containing fine text, intricate patterns, or high-frequency noise patterns.
[0132] For this type of target texture resource, the minimum Mip dwell level can be set to no less than Mip 0 or Mip 1; or the resolution of the target texture resource can be increased to reduce the sampling density at the Mip 0 level.
[0133] Step S1130. If the low loss level is less than or equal to the second loss level threshold, and the average loss value of the first-level processed image is less than or equal to the maximum loss threshold, then the loss degree diagnosis type of the target texture resource is determined as the resolution matching type, wherein the second loss level threshold is less than the first loss level threshold.
[0134] For example, if the threshold of the second loss level is 1, the condition for determining the resolution matching type can be: lowLossCount <= 1 and mipLoss[1] <= highLossThreshold.
[0135] The resolution configuration of the target texture resource is well matched with its content complexity, and the initial loss is within a moderate range (neither too low nor too high). The loss at each level of Mipmap exhibits a healthy pattern of smooth, incremental increases. No optimization is required for this type.
[0136] Step S1140. If the area under the curve is less than the sparsity threshold and the number of low loss levels is greater than or equal to half of the total number of levels, then the loss diagnosis type of the target texture resource is determined as the content sparsity type.
[0137] For example, the criteria for determining sparse content are: auc < sparseThreshold (sparse threshold, such as the default threshold of 0.005) and lowLossCount >= maxMipLevel / 2.
[0138] The target texture resource exhibits extremely low loss at most Mipmap levels, indicating that its overall content is very simple (e.g., solid color, very low-frequency gradient), and may not require a separate texture resource at all. It can be replaced using procedural methods (e.g., constant color, simple gradient). A typical scenario is when artists habitually create textures for all materials, even if the material channel only requires constant values. For such target texture resources, consider removing the target texture resource and directly setting the color value using material parameters.
[0139] Figure 12 The diagram illustrates four types of diagnosis of Mipmap loss curves according to a specific embodiment of the present disclosure. The diagram contains four sub-plots, each showing a typical curve for one type of diagnosis, which are used to demonstrate typical curve examples and judgment conditions for the four curve shapes (Oversized / Undersized / Well-Sized / Sparse).
[0140] By analyzing the quality loss variation curves of the target texture resource at each mipmap level, the system automatically diagnoses whether the mipmap resolution configuration of the target texture resource is reasonable—too high (too low initial loss, wasting video memory) or too low (too high initial loss, risking image quality). Mipmap loss curve analysis enables resolution diagnosis based on the inherent attributes of the content (without relying on runtime parameter assumptions).
[0141] During the type diagnostic phase, output fields may include: percentage of Mip level utilization, diagnostic type, original data of the loss curve, number of low loss levels, initial slope, area under the curve, first significant loss level, suggested maximum resolution (for Oversized types), and suggested minimum resident Mip level (for Undersized types).
[0142] In step S140, the information distribution characteristics of the target texture resource in each data channel are determined, the single channel utilization rate is obtained based on the information distribution characteristics, and the channel utilization rate of the target texture resource is obtained based on the single channel utilization rate of each data channel.
[0143] In this example implementation, a data channel refers to an independent color or information component in the target texture resource, such as an RGB (red, green, blue) color channel or an Alpha (transparency) channel. Information distribution characteristics are an indicator of the amount of information contained in a particular channel of the target texture resource; this can be the information entropy or Shannon entropy of that channel. Taking information entropy as an example, a higher information entropy indicates a more dispersed data distribution and a larger amount of information; conversely, a lower information entropy value indicates a more concentrated distribution of pixel values in that channel and less information.
[0144] Single-channel utilization is a metric that measures the efficiency of information utilization of a target texture resource in a single channel. Channel utilization measures the overall efficiency of information utilization of a target texture resource across all channels. Channel utilization can be used to detect low-information channels in a target texture resource using information theory methods, quantifying resource waste at the channel level. This is the most refined of the four dimensions, operating at the channel level.
[0145] In this example implementation, the information distribution characteristics can be calculated independently for each color channel (R, G, B, and A, if present) of the target texture resource. For example... Figure 13 As shown, determining the information distribution characteristics of the target texture resource in each channel can specifically include the following steps: Step S1310. Traverse all pixel values in the data channel and construct a pixel value histogram corresponding to the data channel based on the frequency of each pixel value in the data channel.
[0146] Iterate through all pixel values in the current data channel, count the frequency of each pixel value (e.g., 0-255, a total of 256 bins), and construct a histogram of pixel values for the current data channel.
[0147] Step S1320. Based on the frequency of pixel values in the data channel and the total number of pixels in the target texture resource, obtain the probability of pixel values appearing in the data channel.
[0148] After obtaining the pixel value histogram, the frequency of pixel values can be converted into probabilities to calculate information distribution characteristics. Specifically, the histogram can be normalized to a probability distribution, where the total number of pixels equals the width multiplied by the height of the target texture resource, and the probability p(v) of each pixel value v (v ranges from 0 to 255) is equal to the ratio of the frequency of that pixel value in the histogram to the total number of pixels.
[0149] Step S1330. Determine the effective pixel values based on the occurrence probability of pixel values in the data channel, and obtain the information distribution characteristics of the target texture resource in the data channel based on the occurrence probability of all effective pixel values.
[0150] In this example implementation, all pixel values with a probability greater than 0 can be identified as valid pixel values, and their probability can be calculated by multiplying it by the logarithm of that probability to the base 2. Then, all these products are summed and the negative value is taken, which is the information entropy of the channel. The information entropy is used as the information distribution feature of the target texture resource in the corresponding data channel.
[0151] The information entropy ranges from [0, 8] bits (because the pixel value is an 8-bit integer, the maximum entropy is log2(256) = 8 bits, corresponding to a uniform distribution—all 256 values have an equal probability of occurrence).
[0152] Typical information entropy values and their meanings are as follows: Entropy = 0: All pixel values in the channel are the same (completely constant channel, such as Alpha, all values are 255); Entropy < 0.5: Pixel values within a channel are highly concentrated on a very small number of values (approximately constant channel). Entropy = 4~6: The pixel values within the channel are relatively dispersed (the channel that normally carries texture information); Entropy = 7~8: Pixel values within the channel are nearly uniformly distributed (high information content channel).
[0153] In this example implementation, the information distribution characteristics of the target texture resource in the corresponding data channel can be normalized to obtain the single channel utilization rate of the target texture resource.
[0154] Normalizing the information entropy to the range of [0, 1] can be used as a utilization score for that channel. Specifically, the channel utilization is equal to the information entropy of that channel divided by 8.0 (because the maximum possible information entropy for an 8-bit integer pixel value is 8 bits).
[0155] In this example implementation, the channel utilization rate of the target texture resource can be obtained based on the weighted average of the single channel utilization rates corresponding to each channel.
[0156] The channel utilization rate of the entire target texture resource is defined as the weighted average of the utilization rates of all channels. This is achieved by multiplying the utilization rate of each channel by its corresponding weight, summing the results, and then dividing by the sum of all channel weights. The weight allocation reflects the contribution of each channel to storage. It can be set to equal weight for each channel (i.e., each channel has a weight of 1), or other weight values can be set according to requirements.
[0157] In this example implementation, if the information distribution characteristics of the target texture resource in the data channel are less than the low information content threshold, the data channel is determined as a low information content channel; the channel data for determining the low information content channel includes the channel name of the low information content channel, the information distribution characteristics of the low information content channel, the dominant pixel value that appears most frequently in the low information content channel, and the pixel ratio corresponding to the dominant pixel value.
[0158] By setting a low information content threshold (e.g., a default of 0.5 bit entropy, corresponding to channelUtilization < 0.0625), for each data channel, if the information distribution characteristics are lower than this threshold, the channel is marked as a "low information content channel," and the following diagnostic information is output: channel name (R / G / B / A), information entropy value, dominant pixel value (the value with the highest frequency in the histogram), and the percentage of pixels with the dominant value. For example, the output might be: "Alpha channel information entropy 0.0 bits, all pixel values 255 (100%), it is recommended to remove the Alpha channel or reduce the texture format to RGB."
[0159] Furthermore, the evaluation criteria for channel utilization need to be handled differently for different target texture resource types. For example, normal maps encode direction vectors rather than color information in their pixel values, and there are mathematical constraints between their channels (Nx^2 + Ny^2 + Nz^2 = 1). The blue channel (Z component) is usually highly concentrated in the range [128, 255]. For normal maps, the low information content threshold is relaxed (increased to 1.5 bit entropy) to avoid misreporting the inherent concentration of the blue channel as waste. For mask maps / ID maps, these maps use a small number of discrete values to mark regions (e.g., 0 / 64 / 128 / 192 / 255 represent different material regions), and the information entropy is naturally low but not wasteful. For these maps, the diagnostic information should note "discrete value encoding type, low information entropy may not be wasteful".
[0160] Figure 14This diagram illustrates the channel information distribution feature analysis according to a specific embodiment of the present disclosure, demonstrating the process of per-channel histogram statistics, information entropy calculation, and low-information-content channel detection. The diagram includes four separate views of an RGBA texture (R, G, B, and A are each displayed independently as grayscale images), and a histogram of pixel values for each channel (horizontal axis: pixel value 0-255; vertical axis: frequency of occurrence). The histograms of the R and G channels show a relatively dispersed distribution (high information entropy, indicating meaningful texture information), the histogram of the B channel is moderately concentrated, while the histogram of the A channel shows an extremely concentrated distribution on a single value (255) (information entropy close to 0, indicating a constant channel). The right side of the diagram shows a normalized utilization score bar chart for each channel. Finally, a diagnostic label for the low-information-content channel (A channel) is output: "Removal of the Alpha channel is recommended, saving 25% storage."
[0161] In this example implementation, information theory methods are used to automatically detect low-information channels (such as constant channels and near-constant channels) in the target texture resource, quantifying resource waste at the channel level. The channel utilization dimension can automatically identify situations such as "all alpha channels are 255" and "the blue channel is almost constant," which are types of waste that traditional tools cannot detect automatically. By reducing the number of channels or merging low-information channels, the storage and bandwidth occupied by the target texture resource can be directly reduced.
[0162] In step S150, the overall utilization rate of the target texture resource is obtained based on at least one of UV space utilization rate, visibility utilization rate, multi-level resolution utilization rate, and channel utilization rate.
[0163] In this example implementation, the overall utilization rate is the final indicator for comprehensively evaluating the utilization efficiency of target texture resources, and it can be obtained by comprehensively calculating at least one of UV space utilization rate, visibility utilization rate, multi-level resolution utilization rate, and channel utilization rate.
[0164] In this example implementation, a comprehensive utilization score can be calculated for each target texture resource as a single indicator of overall utilization efficiency. For example, the comprehensive utilization rate can be equal to the product of four dimensions: UV space utilization, visibility utilization, Mip-level utilization, and channel utilization. After the utilization scores for the four dimensions are calculated, they can be imported into a unified data structure to generate a multi-dimensional utilization profile for each target texture resource.
[0165] Since the waste across the four dimensions is cumulative, multiplication can be used instead of a weighted average. If a target texture resource has a UV fill rate of 0.8, a visibility utilization rate of 0.5, a mip utilization rate of 0.25, and a channel utilization rate of 0.75, then its overall utilization rate is 0.8. 0.5 0.25 0.75 = 0.075, which means that only 7.5% of the target texture resource is being used effectively.
[0166] In this example implementation, the amount of storage that can be saved on the target texture resource can also be obtained based on the overall utilization rate and declared storage amount of the target texture resource.
[0167] Declared storage capacity refers to the amount of storage space allocated or declared to be occupied by a target texture resource in the system. Storage savings refer to the theoretical reduction in storage space that can be achieved by optimizing the target texture resource. This metric directly quantifies the degree of waste in the target texture resource, providing a clear target for resource optimization. Storage savings can be estimated as follows: wasted storage equals declared storage capacity multiplied by 1 minus the difference in overall utilization rate. By calculating the storage savings of target texture resources, developers or optimizers can intuitively understand the storage efficiency of each target texture resource and prioritize optimization of target texture resources with significant storage waste based on the specific value of the storage savings, thereby effectively reducing storage costs and improving resource management efficiency.
[0168] In this example implementation, the fields that can be included in the utilization record of each texture in the final output are shown in Table 1:
[0169] Table 1
[0170] Figure 15 This diagram illustrates a multidimensional utilization record and comprehensive score according to a specific embodiment of the present disclosure, demonstrating the data flow of four-dimensional utilization scores being imported into a unified record structure, multiplicative aggregation, and leaderboard output. The diagram includes the utilization percentage values output for each of the four dimensions (UV space utilization, visibility utilization, Mip-level utilization, and channel utilization), which are imported into a utilization record table in the center via arrows. The record table displays a complete multidimensional utilization profile for each texture map, including fields such as texture map identifier, declared resolution, number of channels, utilization scores for each dimension, and diagnostic information. The diagram also includes the multiplicative aggregation calculation of the comprehensive utilization (multiplying the four dimensions) and the resulting estimate of storage savings.
[0171] like Figure 15 As shown, a multi-dimensional utilization ranking can also be provided, which can be used to display a Top-N list sorted by utilization rate in ascending order of each dimension, with the most wasted texture maps listed at the top. For example, the utilization ranking can be output by sorting according to the following dimensions: 1. Overall Utilization Ranking: Arranged in ascending order of overall utilization rate to help developers identify texture maps with the most serious overall waste.
[0172] 2. Ranking by Single Dimension: Sorted in ascending order by UV space utilization, visibility utilization, Mip level utilization, and channel utilization, helping developers pinpoint problems by specific dimensions.
[0173] 3. Ranked by storage savings: Sorted in descending order by storage savings, helping developers prioritize optimization based on absolute benefit.
[0174] 4. Low Information Channel Report: Lists all texture maps containing low information channels, along with channel-level diagnostic suggestions.
[0175] In this example implementation, automated scoring and ranking enable scalable management. Each dimension outputs a quantified utilization score (a percentage between 0 and 1), eliminating the need for manual visual interpretation of false color maps or UV overlay maps. The leaderboard sorted by utilization allows developers to quickly locate the N most wasteful textures among tens of thousands of textures, concentrating limited optimization resources on the most profitable objectives.
[0176] like Figure 16 The diagram shown is a flowchart illustrating a multidimensional utilization evaluation framework in a specific embodiment of this disclosure. It demonstrates the overall framework for parallel computation and aggregated output across four utilization dimensions. The specific steps of the flowchart are as follows: Step S1610. Resource building pipeline input.
[0177] Input data can include texture resources, model UV data, 3D geometry data, etc.
[0178] Step S1620. Calculate the multidimensional utilization rate.
[0179] Step S1620 includes sub-steps S1621 to S1624, which are four parallel evaluation paths. The sub-steps are as follows: Step S1621. Calculation of UV space utilization rate.
[0180] In the asset creation process, rasterization is performed on the UV data associated with each texture, and the number of pixels covered by UV triangles is counted. The UV island coverage area is extended outward by a padding tolerance band of a fixed pixel width (for technical requirements such as Alpha Bleed). The extended coverage area is considered "effectively utilized". UV space utilization is defined as the ratio of the number of effectively utilized pixels to the total number of pixels in the texture.
[0181] Step S1622. Visibility utilization calculation.
[0182] The self-occlusion visibility probability of each pixel on the model surface is calculated using ray tracing to obtain per-texel visibility data. The visibility probability of each pixel is then weighted and summed as a weight for that pixel's contribution to texture utilization to obtain the visibility utilization percentage. Visibility is used as a "ruler" rather than a "filter" to characterize the proportion of pixels in the texture that are actually "seen" by the player.
[0183] Step S1623. Calculate Mipmap-level utilization.
[0184] During asset construction, the quality loss relative to the original resolution is calculated for each mipmap level of the texture, constructing a loss curve from Mip 0 to the highest level for diagnosis based on the inherent features of the content. By analyzing the morphological characteristics of this curve—the initial slope, the inflection point position, and the area under the curve—the system automatically diagnoses whether the mipmap resolution configuration of the texture is reasonable, identifying two types of problems: "too high resolution" (too low initial loss, wasting video memory) and "too low resolution" (too high initial loss, risk of losing high-frequency details), and outputting a mipmap utilization score and optimization suggestions.
[0185] Step S1624. Channel utilization calculation.
[0186] Shannon entropy is calculated independently for each color channel of the texture. After normalizing the entropy of each channel to the range [0, 1], the utilization score of that channel is obtained. Low entropy (close to 0) indicates that the channel carries very little information (such as constant values), which is a waste of resources at the channel level.
[0187] Step S1630. Multidimensional utilization aggregation.
[0188] The utilization scores from four dimensions are integrated into a unified data structure. The scores from the four dimensions are multiplied and combined to form a comprehensive utilization rate, and a multi-dimensional utilization profile is generated for each texture. The four dimensions are independent and complementary, and each dimension can be used independently.
[0189] Step S1640. Generate a multidimensional utilization report.
[0190] The utilization report is sorted in ascending order by utilization rate across various dimensions, providing a ranking list to help developers quickly identify the most wasted textures.
[0191] The calculations for the four utilization dimensions are independent and can be executed in parallel within the asset construction pipeline without runtime dependencies. Steps S1621 and S1622 rely on UV rasterization and visibility baking data from the preprocessing stage and are triggered on demand during texture construction; steps S1623 and S1624 rely only on the texture pixel data itself and are calculated independently after texture construction is complete. Steps S1630 and S1640 perform multidimensional aggregation and report output after all four dimensions have been calculated.
[0192] In a distributed asset building environment, calculations for each dimension are distributed across different building nodes. Each node generates an independent utilization log, which is automatically merged using an incremental aggregation tool. Calculations for the four dimensions can be completed at different times and on different nodes, as long as they are ultimately merged into the utilization record of the same texture. The aggregation tool performs an overwrite update (new value overwrites old value) on records with the same texture identifier, ensuring data timeliness.
[0193] It should be noted that although the steps of the method in this disclosure are described in a specific order in the accompanying drawings, this does not require or imply that the steps must be performed in that specific order, or that all the steps shown must be performed to achieve the desired result. Additional or alternative steps may be omitted, multiple steps may be combined into one step, and / or a step may be broken down into multiple steps.
[0194] Furthermore, this disclosure also provides a device for evaluating resource utilization. (See reference) Figure 17 As shown, the resource utilization assessment device may include a UV space utilization determination module 1710, a visibility utilization determination module 1720, a multi-level resolution utilization determination module 1730, a channel utilization determination module 1740, and a comprehensive utilization determination module 1750. Wherein: The UV space utilization determination module 1710 can be used to obtain the pixel coverage data of the target texture resource and obtain the UV space utilization of the target texture resource based on the number of effectively utilized pixels in the pixel coverage data and the total number of pixels of the target texture resource. The visibility utilization determination module 1720 can be used to obtain the visibility distribution data of the target texture resource based on the visibility value of each pixel in the target texture resource in the association model, and obtain the visibility utilization of the target texture resource based on the pixel contribution aggregation result in the visibility distribution data. The multi-level resolution utilization determination module 1730 can be used to obtain the loss curve of the multi-level resolution hierarchy sequence of the target texture resource, and obtain the multi-level resolution utilization of the target texture resource based on the curve shape characteristics of the loss curve. The channel utilization determination module 1740 can be used to determine the information distribution characteristics of the target texture resource in each data channel, obtain the single channel utilization based on the information distribution characteristics, and obtain the channel utilization of the target texture resource based on the single channel utilization corresponding to each data channel. The overall utilization rate determination module 1750 can be used to obtain the overall utilization rate of the target texture resource based on at least one of UV space utilization rate, visibility utilization rate, multi-level resolution utilization rate, and channel utilization rate.
[0195] In some exemplary embodiments of this disclosure, the UV space utilization determination module 1710 may include a pixel coverage map initialization unit, a pixel coordinate mapping unit, a triangle interior judgment unit, and a covered state marking unit. Wherein: The pixel overlay initialization unit can be used to create an initial pixel overlay based on the original resolution of the target texture resource, and initialize the pixel values in the pixel overlay to the uncovered state values. The pixel coordinate mapping unit can be used to traverse each UV triangle in the associated material group of the associated model and map the vertex UV coordinates of the UV triangle to the pixel space to obtain the corresponding pixel coordinates. Here, the associated model is the model that references the target texture resource. The triangle interior determination unit can be used to construct the axis-aligned bounding box of the UV triangle in pixel space based on the pixel coordinates, and for each pixel within the axis-aligned bounding box, determine whether the pixel is inside the UV triangle. The covered state marking unit can be used to mark the pixel value of the pixel in the pixel coverage map as a covered state value if the pixel is inside the UV triangle, and obtain the pixel coverage data of the target texture resource in the association model based on the marked pixel coverage map.
[0196] In some exemplary embodiments of this disclosure, the UV space utilization determination module 1710 may further include a coverage pixel number determination unit, a pixel distance determination unit, a fill pixel number determination unit, and an effective utilization pixel number determination unit. Wherein: The pixel coverage determination unit can be used to determine the pixels with a covered state value in the pixel coverage data as covered pixels, and obtain the number of covered pixels in the target texture resource based on the number of covered pixels; The pixel distance determination unit can be used to determine the pixel distance between each uncovered pixel and the nearest covered pixel for each uncovered pixel in the target texture resource; The fill pixel number determination unit can be used to determine the uncovered pixels as fill pixels if the pixel distance is less than or equal to the preset extension width, and obtain the fill pixel number in the target texture resource based on the number of fill pixels; The effective pixel utilization determination unit can be used to obtain the effective pixel utilization based on the number of covered pixels and the number of filled pixels, and to obtain the UV space utilization of the target texture resource based on the effective pixel utilization and the total number of pixels of the target texture resource.
[0197] In some exemplary embodiments of this disclosure, the visibility utilization determination module 1720 may include a hierarchical bounding box construction unit, a normal direction determination unit, a sampling direction determination unit, a visibility probability determination unit, and a visibility distribution data generation unit. Wherein: Hierarchical bounding box building units can be used to construct corresponding hierarchical bounding boxes based on the complete triangular mesh of the associated model; The normal direction determination unit can be used to identify the overlay and fill pixels in the target texture resource as valid pixels, and to determine the world space position and normal direction of each valid pixel in the associated material group of the associated model; The sampling direction determination unit can be used to generate a direction hemisphere based on the world space position and normal direction of the effective pixels, and perform cosine-weighted random sampling on the direction hemisphere to obtain multiple sampling directions; The visibility probability determination unit can be used to emit multiple rays to the association model based on the sampling direction, determine the ray occlusion data corresponding to the effective pixels through the hierarchical bounding box, and determine the visibility probability of the effective pixels based on the ray occlusion data; The visibility distribution data generation unit can be used to obtain the visibility value of effective pixels in the association model based on the visibility probability, and to obtain the visibility distribution data of the target texture resource based on the visibility value of all pixels in the association model.
[0198] In some exemplary embodiments of this disclosure, the multi-level resolution utilization determination module 1730 may include an upsampled image determination unit, an average loss value determination unit, and a loss curve generation unit. Wherein: The upsampled image determination unit can be used to upsample the layered processing images of each level in the multi-level resolution layer sequence to the original resolution of the target texture resource, so as to obtain the upsampled images corresponding to each level of layered processing images respectively. The average loss value determination unit can be used to determine the pixel loss value of each pixel between the target texture resource and the upsampled target texture resource, and obtain the average loss value corresponding to the layer-processed image based on the pixel loss value; The loss curve generation unit can be used to obtain the loss curve of the multi-level resolution hierarchical sequence of the target texture resource based on the average loss value corresponding to each level of image processing.
[0199] In some exemplary embodiments of this disclosure, the multi-level resolution utilization determination module 1730 may further include a low-loss level determination unit, an early slope determination unit, an area under the curve determination unit, and an initial significant loss level determination unit. Wherein: The low loss level determination unit can be used to obtain the low loss level of the loss curve based on the number of consecutive levels where the average loss value is lower than the preset minimum loss threshold, starting from the first level of image processing. The early slope determination unit can be used to obtain the early slope of the loss curve based on the difference between the average loss values of the first-level processed image and the second-level processed image. The area under the curve determination unit can be used to obtain the sum of loss values based on the average loss values corresponding to the image at each level of hierarchical processing, and to obtain the area under the curve of the loss curve based on the total number of levels in the multi-level resolution hierarchical sequence of the sum of loss values. The first significant loss level determination unit can be used to determine the first significant loss level of the loss curve, starting from the first level of hierarchical processing image, based on the level of the hierarchical processing image where the first occurrence of the average loss value is greater than or equal to a preset significance threshold.
[0200] In some exemplary embodiments of this disclosure, the resource utilization assessment apparatus provided by this disclosure may further include a loss degree diagnosis type determination module. The loss degree diagnosis type determination module may include a resolution-to-high type determination unit, a resolution-to-low type determination unit, a resolution-matching type determination unit, and a content-sparse type determination unit. Wherein: The resolution-to-high type determination unit can be used to determine the loss diagnosis type of the target texture resource as resolution-to-high if the low loss level is greater than or equal to the first loss level threshold and the early slope is less than the lowest slope threshold. The low resolution type determination unit can be used to determine the loss diagnosis type of the target texture resource as low resolution type if the average loss value of the first-level processed image is greater than the maximum loss threshold. The resolution matching type unit can be used to determine the loss degree diagnosis type of the target texture resource as the resolution matching type if the low loss level is less than or equal to the second loss level threshold and the average loss value of the image processed by the first level is less than or equal to the maximum loss threshold, wherein the second loss level threshold is less than the first loss level threshold. The content sparsity type determination unit can be used to determine the loss diagnosis type of the target texture resource as content sparsity type if the area under the curve is less than the sparsity threshold and the number of low loss levels is greater than or equal to half of the total number of levels.
[0201] In some exemplary embodiments of this disclosure, the channel utilization determination module 1740 may include a pixel value histogram construction unit, a pixel value occurrence probability determination unit, and an information distribution feature determination unit. Wherein: The pixel value histogram building unit can be used to traverse all pixel values in the data channel and build a pixel value histogram corresponding to the data channel based on the frequency of each pixel value in the data channel. The pixel value occurrence probability determination unit can be used to obtain the occurrence probability of a pixel value in the data channel based on the frequency of occurrence of the pixel value in the data channel and the total number of pixels in the target texture resource; The information distribution feature determination unit can be used to determine the effective pixel value based on the occurrence probability of the pixel value in the data channel, and obtain the information distribution feature of the target texture resource in the data channel based on the occurrence probability of all effective pixel values.
[0202] The specific details of each module / unit in the above-mentioned resource utilization evaluation device have been described in detail in the corresponding method embodiment section, and will not be repeated here.
[0203] 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.
[0204] Figure 18 A schematic diagram of the structure of a computer system suitable for implementing the embodiments of the present disclosure is shown.
[0205] It should be noted that, Figure 18 The computer system 1800 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments disclosed herein.
[0206] like Figure 18 As shown, the computer system 1800 includes a central processing unit (CPU) 1801, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 1802 or programs loaded from storage section 1808 into random access memory (RAM) 1803. The RAM 1803 also stores various programs and data required for system operation. The CPU 1801, ROM 1802, and RAM 1803 are interconnected via bus 1804. An input / output (I / O) interface 1805 is also connected to bus 1804.
[0207] The following components are connected to I / O interface 1805: an input section 1806 including a keyboard, mouse, etc.; an output section 1807 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 1808 including a hard disk, etc.; and a communication section 1809 including a network interface card such as a LAN card, modem, etc. The communication section 1809 performs communication processing via a network such as the Internet. A drive 1810 is also connected to I / O interface 1805 as needed. Removable media 1811, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 1810 as needed so that computer programs read from them can be installed into storage section 1808 as needed.
[0208] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 1809, and / or installed from removable medium 1811. When the computer program is executed by central processing unit (CPU) 1801, it performs various functions defined in the system of this disclosure.
[0209] Exemplary embodiments of this disclosure also provide a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the resource utilization evaluation method described above.
[0210] In one implementation, the computer program product can be a tangible product containing a computer program, such as a computer-readable storage medium storing the computer program. The readable storage medium can be a storage medium based on electrical, magnetic, optical, electromagnetic, infrared, or other signals, including but not limited to: random access memory (RAM), read-only memory (ROM), magnetic tape, floppy disk, flash memory, hard disk drive (HDD), solid-state drive (SSD), etc. For example, the computer program product can be implemented as a non-volatile storage medium storing a computer program, such as read-only memory, NAND flash memory, etc.
[0211] In one implementation, the computer program product can be an intangible product containing a computer program. For example, the computer program product can be implemented as a virtual digital product, such as an executable file, installation package, or other digital file storing the computer program.
[0212] Computer program code can be written in one or more programming languages. Examples of programming languages include C, Java, and C++. Program code can execute entirely on the user's computing device, partially on the user's computing device, or as a standalone software package. It can also execute partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, such as a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via an internet connection provided by a mobile network operator).
[0213] Computer programs can be carried or transmitted via signals such as electricity, magnetism, light, electromagnetic radiation, and infrared radiation. Electronic devices can convert signals carrying computer programs into digital signals, thereby running the computer programs. When a computer program runs on an electronic device, its code is used to cause the electronic device to execute (more specifically, to execute by the processor of the electronic device) the method steps of various exemplary embodiments of this disclosure, such as the resource utilization evaluation method described above.
[0214] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0215] It should be noted that although several modules for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more modules described above can be embodied in one module. Conversely, the features and functions of one module described above can be further divided and embodied by multiple modules.
[0216] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein.
[0217] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. A method for evaluating resource utilization rate, characterized in that, include: Obtain pixel coverage data of the target texture resource, and obtain the UV space utilization rate of the target texture resource based on the number of effectively utilized pixels in the pixel coverage data and the total number of pixels of the target texture resource; Based on the visibility value of each pixel in the target texture resource in the association model, the visibility distribution data of the target texture resource is obtained, and the visibility utilization rate of the target texture resource is obtained by aggregating the pixel contribution results in the visibility distribution data. Obtain the loss curve of the multi-level resolution hierarchy sequence of the target texture resource, and obtain the multi-level resolution utilization rate of the target texture resource based on the curve shape characteristics of the loss curve; The information distribution characteristics of the target texture resource in each data channel are determined, the single channel utilization rate is obtained based on the information distribution characteristics, and the channel utilization rate of the target texture resource is obtained based on the single channel utilization rate of each data channel. The overall utilization rate of the target texture resource is obtained based on at least one of the UV space utilization rate, the visibility utilization rate, the multi-level resolution utilization rate, and the channel utilization rate.
2. The method for evaluating resource utilization rate according to claim 1, characterized in that, The acquisition of pixel coverage data of the target texture resource includes: An initial pixel overlay map is created based on the original resolution of the target texture resource, and the pixel values in the pixel overlay map are initialized to uncovered state values. Traverse each UV triangle in the associated material group of the associated model, and map the vertex UV coordinates of the UV triangle to the pixel space to obtain the corresponding pixel coordinates, wherein the associated model is a model that references the target texture resource; Construct an axis-aligned bounding box of the UV triangle in the pixel space based on the pixel coordinates, and determine whether the pixel is inside the UV triangle for each pixel within the axis-aligned bounding box; If the pixel is inside the UV triangle, the pixel value of the pixel in the pixel coverage map is marked as a covered state value, and the pixel coverage data corresponding to the target texture resource in the association model is obtained according to the marked pixel coverage map.
3. The resource utilization rate assessment method according to claim 2, characterized in that, The step of obtaining the UV space utilization rate of the target texture resource based on the number of effectively utilized pixels in the pixel coverage data and the total number of pixels of the target texture resource includes: The pixels with a value of "covered" in the pixel coverage data are identified as covered pixels, and the number of covered pixels in the target texture resource is obtained based on the number of covered pixels. For each uncovered pixel in the target texture resource, determine the pixel distance between the uncovered pixel and the nearest covered pixel; If the pixel distance is less than or equal to the preset expansion width, the uncovered pixel is determined as a filling pixel, and the number of filling pixels in the target texture resource is obtained according to the number of filling pixels; The number of effectively utilized pixels is obtained based on the number of covered pixels and the number of filled pixels, and the UV space utilization rate of the target texture resource is obtained based on the number of effectively utilized pixels and the total number of pixels of the target texture resource.
4. The resource utilization rate assessment method according to claim 3, characterized in that, The step of obtaining the visibility distribution data of the target texture resource based on the visibility value of each pixel in the association model includes: Construct a corresponding hierarchical bounding box based on the complete triangular mesh of the aforementioned association model; The overlay pixels and the fill pixels in the target texture resource are determined as valid pixels, and the world space position and normal direction of each valid pixel in the associated material group of the associated model are determined. A direction hemisphere is generated based on the world space position and normal direction of the effective pixels, and multiple sampling directions are obtained by cosine-weighted random sampling on the direction hemisphere. Multiple rays are emitted into the association model based on the sampling direction. The ray occlusion data corresponding to the effective pixel is determined by the hierarchical bounding box, and the visibility probability of the effective pixel is determined based on the ray occlusion data. The visibility value of the effective pixel in the association model is obtained based on the visibility probability, and the visibility distribution data of the target texture resource is obtained based on the visibility values of all the pixels in the association model.
5. The method for evaluating resource utilization rate according to claim 1, characterized in that, The loss curve for obtaining the multi-level resolution hierarchy sequence of the target texture resource includes: Upsample the layered processed image of each level in the multi-level resolution layer sequence to the original resolution of the target texture resource to obtain the upsampled image corresponding to each level of the layered processed image; Determine the pixel loss value of each pixel between the target texture resource and the upsampled image, and obtain the average loss value corresponding to the layer-processed image based on the pixel loss value; Based on the average loss value corresponding to each level of the processed image, the loss curve of the multi-level resolution hierarchical sequence of the target texture resource is obtained.
6. The method for evaluating resource utilization rate according to claim 5, characterized in that, The curve morphology features of the loss curve include low loss level, early slope, area under the curve, and first significant loss level; the method also includes: Starting from the first level of image processing, the low loss level of the loss curve is obtained based on the number of consecutive levels where the average loss value is lower than the preset minimum loss threshold. The initial slope of the loss curve is obtained based on the difference between the average loss values of the first-level processed image and the second-level processed image. The sum of loss values is obtained based on the average loss values corresponding to the processed images at each level, and the area under the loss curve is obtained based on the total number of levels of the multi-level resolution hierarchical sequence according to the sum of loss values. Starting from the first level of hierarchical processing image, the first significant loss level of the loss curve is obtained based on the level of the hierarchical processing image where the average loss value is first greater than or equal to a preset significance threshold.
7. The method for evaluating resource utilization rate according to claim 6, characterized in that, The method further includes: The loss diagnosis type of the target texture resource is obtained based on the curve shape characteristics of the loss curve; The step of obtaining the loss diagnosis type of the target texture resource based on the curve shape characteristics of the loss curve includes: If the low loss level is greater than or equal to the first loss level threshold, and the early slope is less than the lowest slope threshold, then the loss degree diagnosis type of the target texture resource is determined to be the resolution too high type. If the average loss value of the image processed at the first level is greater than the maximum loss threshold, then the loss diagnosis type of the target texture resource is determined to be the low resolution type. If the low loss level is less than or equal to the second loss level threshold, and the average loss value of the first-level processed image is less than or equal to the maximum loss threshold, then the loss degree diagnosis type of the target texture resource is determined to be the resolution matching type, wherein the second loss level threshold is less than the first loss level threshold; If the area under the curve is less than the sparsity threshold, and the number of low loss levels is greater than or equal to half of the total number of levels, then the loss diagnosis type of the target texture resource is determined to be the content sparsity type.
8. The method for evaluating resource utilization rate according to claim 1, characterized in that, Determining the information distribution characteristics of the target texture resource in each data channel includes: Traverse all pixel values in the data channel and construct a pixel value histogram corresponding to the data channel based on the frequency of occurrence of each pixel value in the data channel; The probability of a pixel value appearing in the data channel is obtained based on the frequency of the pixel value appearing in the data channel and the total number of pixels in the target texture resource. The effective pixel values are determined based on the occurrence probability of the pixel values in the data channel, and the information distribution characteristics of the target texture resource in the data channel are obtained based on the occurrence probability of all the effective pixel values.
9. A resource utilization rate assessment device, characterized in that, include: The UV space utilization determination module is used to obtain pixel coverage data of the target texture resource and obtain the UV space utilization of the target texture resource based on the number of effectively utilized pixels in the pixel coverage data and the total number of pixels of the target texture resource. The visibility utilization determination module is used to obtain the visibility distribution data of the target texture resource based on the visibility value of each pixel in the target texture resource in the association model, and to obtain the visibility utilization rate of the target texture resource based on the pixel contribution aggregation result in the visibility distribution data. The multi-level resolution utilization determination module is used to obtain the loss curve of the multi-level resolution hierarchy sequence of the target texture resource, and to obtain the multi-level resolution utilization of the target texture resource based on the curve shape characteristics of the loss curve. The channel utilization determination module is used to determine the information distribution characteristics of the target texture resource in each data channel, obtain the single channel utilization based on the information distribution characteristics, and obtain the channel utilization of the target texture resource based on the single channel utilization corresponding to each data channel. The overall utilization rate determination module is used to obtain the overall utilization rate of the target texture resource based on at least one of the UV space utilization rate, the visibility utilization rate, the multi-level resolution utilization rate, and the channel utilization rate.
10. An electronic device, characterized in that, include: processor; as well as A memory for storing one or more programs, which, when executed by the processor, cause the processor to implement the resource utilization assessment method as described in any one of claims 1 to 8.