Gift 3D model lightweight processing method for terminal loading
By generating topological connectivity constraint paths and texture mapping control fields in the 3D model of the gift, and optimizing topological patches and texture coordinates, the problems of large data volume and visual performance quality during terminal loading are solved, and the model is made lightweight and loaded efficiently.
Patent Information
- Application Number
- CN202511498025.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-20
- Publication Date
- 2026-01-16
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing 3D models of gifts have a large amount of data when loaded on the terminal, resulting in slow loading and sluggish interface response. Furthermore, the existing lightweight methods cannot effectively take into account the local key features and texture details of the model, resulting in a decline in visual performance quality.
By extracting the curvature concentration region of the normal discontinuous boundary line, a topological connectivity constraint path is generated to limit the local deformation propagation range. A texture mapping control field is constructed, the geometric topological adaptive adjustment matrix is derived, and texture compression processing is performed to optimize the relocation and reconstruction of topological patches and texture coordinates.
While maintaining the integrity of the model's key geometric features, the amount of data is significantly reduced, visual fidelity and structural consistency are improved, and the loading efficiency of terminal devices and user interaction experience are enhanced.
Smart Images

Figure CN121349578A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, specifically a lightweight processing method for gift 3D models loaded on a terminal. Background Technology
[0002] With the rapid development of virtual reality, augmented reality, online shopping platforms, and interactive display technologies, product display based on 3D models has gradually become an important means of enhancing user interaction experience. Especially for gift items, which typically have intricate surface details and complex structures, 3D models can present the product's appearance features to users more intuitively and comprehensively, thereby improving marketing effectiveness and user satisfaction.
[0003] However, existing 3D gift models are typically generated through 3D scanning, reverse engineering, or design software modeling. These models often have high mesh density and complex topological structures. Furthermore, to achieve a realistic and detailed appearance, these models usually require high-resolution texture mapping, significantly increasing the overall data size. When such high-precision 3D gift models are applied to performance-constrained mobile devices, tablets, or web pages, slow loading, sluggish interface response, and even failure to display properly due to insufficient memory often occur. This not only degrades the user's visual experience and interactive feel but also hinders the widespread application of 3D display technology in the online gift sales sector.
[0004] Current lightweighting methods for 3D models mostly employ uniform topological patch simplification and overall texture compression, lacking differentiated processing approaches for key local features and texture details. This one-size-fits-all lightweighting strategy easily leads to the loss of key local features and severe texture distortion, making it difficult to effectively balance the dual requirements of controlling model data volume and visual performance quality. Furthermore, existing technologies do not fully consider the correlation between local topological features, geometrically sensitive areas, and texture mapping coordinate distortion areas of 3D models, failing to accurately achieve simultaneous optimization of local feature regions and texture maps. Summary of the Invention
[0005] The present invention aims to solve at least one of the technical problems existing in the prior art; to this end, the present invention proposes a lightweight processing method for gift 3D models loaded on the terminal.
[0006] To achieve the above objectives, the present invention provides a lightweight processing method for gift 3D models loaded on a terminal, comprising: Based on the topological mesh of the gift 3D model, the boundary lines of normal discontinuity are extracted. The curvature concentration region at the intersection of the boundary lines is used as the topological constraint reference to generate a topological connectivity constraint path. The local deformation transmission range is then limited according to the topological connectivity constraint path. Based on the texture coordinate distribution characteristics of the topological patches within the local deformation transmission range, the spatial stretching direction of the texture mapping is determined, a texture mapping control field is constructed, and high-distortion regions of the texture mapping are identified in the texture mapping control field. Based on the topological adjacency relationship of the high-twist region, an adaptive adjustment matrix for the geometric topology is derived, and the repositioning of the topological patches is controlled according to the adaptive adjustment matrix. Based on the changes in texture coordinates after topological patch relocation, a texture space resampling mask is generated, and the local texture reconstruction area is defined. Texture compression processing is then performed, and a lightweight 3D model of the gift is output.
[0007] Further, the step of generating a topological connectivity constraint path and limiting the local deformation propagation range based on the topological connectivity constraint path includes: Based on the topological connectivity characteristics of discontinuous boundary lines in the topological mesh, a spatially continuous and dense curvature peak region is extracted at the intersection of boundary lines. Based on the spatial relationship between the curvature peak region and the surrounding topological patches, determine the topological constraint nodes that can connect multiple curvature peak regions simultaneously; A topological connectivity constraint path is generated using topological constraint nodes as spatial connection hubs. Based on this path, the transmission boundary range of the spatial topological deformation influence is defined, and the local deformation transmission range is output.
[0008] Furthermore, determining the topology constraint node that can simultaneously connect multiple curvature peak regions includes: Analyze the local topological stability of the topological mesh surrounding the curvature peak region, and screen out multiple undetermined constraint nodes whose topological stability is lower than a preset topological stability threshold; Determine the topological adjacency relationship between each undetermined constraint node and the curvature peak region, and determine the candidate topological constraint nodes that can connect multiple curvature peak regions based on the adjacency relationship; Based on the evaluation of topological redundancy between candidate topological constraint nodes and topological patches, the node with the minimum topological redundancy is selected as the topological constraint node, and the topological constraint node is output.
[0009] Further, the construction of the texture mapping control field and the identification of high-distortion regions of the texture mapping within the texture mapping control field include: Based on the spatial texture coordinate distribution of the topological patch within the local deformation transmission range, the irregular spatial extension region of the local texture deformation of the topological patch is determined; Regional analysis of the spatial expansion trend of texture coordinate distribution direction in irregular spatial expansion regions of texture deformation is performed to extract candidate distortion regions with abnormal spatial expansion trends. By combining the topological boundary and texture distribution characteristics of candidate distorted regions, regions where the texture coordinate expansion trend does not match the topological boundary structure are identified as high-distorted regions, and the spatial location and texture mapping control field of the high-distorted regions are output.
[0010] Furthermore, the derivation of the adaptive adjustment matrix of the geometric topology, and the control of the repositioning of the topological patches based on the adaptive adjustment matrix, includes: Based on the local spatial correlation between the highly distorted region and the topologically adjacent region, a local spatial mapping relationship for the topological patch is established. The spatial constraint effect of topologically adjacent regions on highly distorted regions is determined by local spatial mapping relationships, and the topological constraint factor is obtained. Based on the topological constraint factor, the spatial adjustment matrix of the geometric topology is derived, and the spatial adjustment matrix is used to reposition the topological patches in space. Output the set of topological patches after spatial relocation and the spatial adjustment matrix of the geometric topology.
[0011] Furthermore, determining the spatial constraint effect of topologically adjacent regions on highly distorted regions, and obtaining the topological constraint factor, includes: Analyze the topological connectivity between topologically adjacent regions and highly distorted regions, and identify unstable topological connectivity nodes with large spatial location fluctuations in the topologically adjacent regions; Based on the spatial positional fluctuations of the topological connection nodes, determine the degree to which the topological connection nodes cause spatial positional interference to the topological structure of the high-twist region; Based on the degree of spatial location interference, different spatial constraint weights are applied to the topologically adjacent regions, generating the topological constraint factor and outputting the constraint factor.
[0012] Furthermore, the repositioning of the topological patch using a spatial adjustment matrix includes: The spatial interaction relationship between topological patches and topological constraint factors is obtained based on the spatial adjustment matrix; The spatial interaction relationship is used to redefine the spatial position movement path of the topological patch, and the position that has the least impact on adjacent topological patches when the topological patch moves is determined. The topological patches are spatially repositioned according to their determined positions to generate a set of repositioned topological patches with stable topological structure, and the set of repositioned topological patches is output.
[0013] Furthermore, the process of defining the local texture reconstruction area, performing texture compression processing, and outputting a lightweight 3D model of the gift includes: Based on the changes in texture coordinates after topological patch relocation, regions where the texture boundary does not match the topological boundary are identified, and texture boundary misalignment regions are determined. For the texture boundary misalignment region, a topology control mask for texture resampling is constructed, and the reconstruction range of texture coordinates is defined by the topology control mask; The texture coordinates within the reconstruction range are locally reconstructed so that the distribution of texture coordinates matches the topological boundary; Output the reconstructed local texture regions to perform subsequent texture compression processing and obtain a lightweight 3D model of the gift.
[0014] Furthermore, the topology control mask for constructing texture resampling includes: Analyze the texture coordinate offset state before and after topological patch relocation to determine the sensitive area of texture mapping coordinate change of topological patch; Based on the texture coordinate offset pattern of sensitive areas, a local control region for topological mapping coordinates is established; Based on the local control region, the texture coordinate mapping relationship between topological patches is determined, and a topological control mask for texture resampling is constructed. Output a texture resampling topology control mask used to limit the range of texture coordinate reconstruction.
[0015] Compared with the prior art, the beneficial effects of the present invention are: This invention establishes a topological constraint benchmark based on the curvature concentration region of the normal discontinuous boundary line, and generates topological connectivity constraint paths using topological constraint nodes as spatial hubs, thereby achieving precise limitation of the local deformation propagation range of the gift 3D model. This scheme can effectively control the influence range of local deformation while maintaining the integrity of the model's key geometric features, avoiding the detail loss and boundary deformation problems caused by traditional overall surface reduction methods, thus improving the accuracy and stability of model geometric optimization.
[0016] This invention constructs a texture mapping control field within the topological constraint path, combines the spatial distribution characteristics of texture coordinates to identify and extract high-distortion regions of the texture mapping, and further derives an adaptive adjustment matrix for the geometric topology to optimize the repositioning of topological patches. This scheme achieves coordinated adjustment of the relationship between the geometric topology and the texture mapping, ensuring that the texture coordinate distribution remains consistent with the topological boundary, fundamentally eliminating texture stretching and distortion problems in high-distortion regions, and significantly improving the visual fidelity and structural consistency of the model on low-bandwidth terminal devices.
[0017] This invention generates a texture space resampling mask based on texture coordinate changes after topological patch relocation, and then performs local texture reconstruction and texture compression processing on this mask, achieving a dynamic balance between preserving local features and controlling the overall data volume of the 3D model. This method significantly reduces the amount of texture data in the model without affecting the details and visual effects of the gift model, significantly reducing terminal loading time and memory usage, and improving the real-time display efficiency and user interaction experience of the 3D gift model on mobile devices and web pages. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This is a flowchart illustrating the method of the present invention. Detailed Implementation
[0020] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0021] Please see Figure 1 This embodiment provides a lightweight processing method for gift 3D models loaded on a terminal, including: S101: Based on the topological mesh of the gift 3D model, extract the boundary lines of normal discontinuity, take the curvature concentration region at the intersection of the boundary lines as the topological constraint reference, generate the topological connectivity constraint path, and limit the local deformation transmission range according to the topological connectivity constraint path. It should be noted that the "gift 3D model" in this embodiment refers to a gift appearance data model with a topological mesh structure generated by 3D scanning, reverse modeling, or design modeling software. The topological mesh consists of vertices, edges, and faces. Each vertex records three-dimensional spatial coordinates, each edge describes the spatial connection relationship between vertices, and each face is a triangular or quadrilateral face used to represent the local geometry of the gift surface.
[0022] It should be further noted that, in this embodiment, the "boundary line with discontinuous normal vectors" refers to a boundary line segment in the topological mesh where the difference in the direction of the normal vector between adjacent faces exceeds a preset angle threshold. This threshold is typically set at... The topology is used to identify areas of abrupt changes in the model's surface structure. These areas often correspond to contour transitions, decorative edges, or material abrupt changes in the gift, and are the parts most prone to local stress concentration during deformation. Therefore, they need to be used as important inputs for topology constraints.
[0023] In a specific implementation, generating a topological connectivity constraint path and limiting the local deformation propagation range based on the topological connectivity constraint path includes: Based on the topological connectivity characteristics of discontinuous boundary lines in the topological mesh, a spatially continuous and dense curvature peak region is extracted at the intersection of boundary lines. In implementation, the local average curvature and Gaussian curvature are first calculated based on the normal information of each vertex of the topological mesh of the gift's 3D model. Specifically, a discrete curvature calculation model is used to estimate the mesh curvature, where: Mean curvature The calculation formula is:
[0024] Gaussian curvature The calculation formula is:
[0025] in: Let N(i) be the three-dimensional coordinate vector of vertex i and its adjacent vertex j, representing the neighborhood set of vertex i; The interior angles of the corresponding sides of adjacent triangles; Let i be the angle of the adjacent face of vertex i. Let be the local mixed area where vertex i is located.
[0026] It should be noted that the Gaussian curvature and average curvature values obtained through the above calculations are used to characterize the curvature of local surfaces. When there are significant broken lines, edges, or decorative grooves on the model surface, the local curvature values often exhibit a high-density clustering characteristic. Therefore, areas with curvature values more than twice the average curvature of the overall model are selected as curvature concentration areas.
[0027] Subsequently, the distribution regions of adjacent curvature peak points are extracted along the boundary lines of normal discontinuities in the topological mesh, and the spatial distribution density between peak points is calculated using the formula: ;in, This represents the number of peak curvature points within the region. Let this be the projected area of the region. (in If a preset threshold is set (e.g., more than 20 peak points per square centimeter), the region is marked as a "curvature concentration region" for subsequent topology constraint path generation.
[0028] Based on the spatial relationship between the curvature peak region and the surrounding topological patches, determine the topological constraint nodes that can connect multiple curvature peak regions simultaneously; The determination of topology constraint nodes that can simultaneously connect multiple curvature peak regions includes: Analyze the local topological stability of the topological mesh surrounding the curvature peak region, and screen out multiple undetermined constraint nodes whose topological stability is lower than a preset topological stability threshold; In implementation, to establish paths that maintain topological continuity and control the range of deformation propagation, connecting nodes need to be determined between multiple regions of concentrated curvature. These nodes are called "topological constraint nodes" and serve as the core of the topological path connections.
[0029] First, a stability analysis is performed on the local mesh in each curvature concentration region, and the local topological stability index is calculated. :
[0030] in: These are the maximum and minimum side lengths of the facets within this region; The variance of the interior angles of the facet; These are the normal vectors of nodes i and j, respectively; For experience weights, satisfy .
[0031] when When the value is 0.3, it indicates that the structure around the node is relatively unstable and is likely to become a key point for topology propagation during deformation, and it is listed as a candidate constraint node.
[0032] Determine the topological adjacency relationship between each undetermined constraint node and the curvature peak region, and determine the candidate topological constraint nodes that can connect multiple curvature peak regions based on the adjacency relationship; In implementation, the spatial connectivity between candidate nodes and curvature concentration regions is calculated, and the path length is measured using the shortest topological path method.
[0033] in, This represents the set of all feasible topological paths from candidate node i to the curvature set region k. Let be the path length. If a candidate node simultaneously satisfies the condition of two or more curvature concentration regions... If a node has 3 or fewer topological edges, it is determined that the node has the multi-connection property and is denoted as a candidate topological constraint node.
[0034] Based on the evaluation of topological redundancy between candidate topological constraint nodes and topological patches, the node with the minimum topological redundancy is selected as the topological constraint node, and the topological constraint node is output. In implementation, topological redundancy analysis is performed on all candidate topological constraint nodes, using redundancy indicators. Quantification: ;in, The number of adjacent faces of node i. Let be the number of adjacent edges. If The node with the minimum value among all candidate nodes is selected as the topological constraint node.
[0035] A topological connectivity constraint path is generated using topological constraint nodes as spatial connection hubs. Based on this path, the transmission boundary range of the spatial topological deformation influence is defined, and the local deformation transmission range is output. It should be noted that the "topological connectivity constraint path" in this embodiment uses the aforementioned determined topological constraint nodes as the starting point or hub node for path generation, and gradually expands the path structure through the topological connectivity relationships between nodes. This path is used to clearly define the deformation transmission range within a local area of the topological mesh of the gift's 3D model, so as to accurately control the transmission area of local deformation during the subsequent model lightweighting process.
[0036] Specifically, this embodiment generates connected paths based on topological constraint nodes using a topological path expansion algorithm, including the following steps: First, initialize the set of topological connectivity constraint paths, using the previously determined topological constraint nodes as initial nodes, and define them as a set. In the formula, These are topological constraint nodes.
[0037] Subsequently, based on the breadth-first search (BFS) algorithm, the topology nodes are expanded in an ordered manner. The expansion process is publicly disclosed and clearly defined as follows: Set the maximum level threshold for topology expansion For example, if the topology expansion depth is 5 and the initial search depth is L=0, the topology expansion starts from the initial node and proceeds outwards.
[0038] In the topology expansion at level L, for the current set of nodes Each node in Determine all nodes that are topologically adjacent to the given node. Has the node been visited? If not, then... Add to the next level node set The specific calculation process and formula are as follows:
[0039] In the formula, Represents a node The set of all directly adjacent nodes in the topology, connected by direct topological edges.
[0040] Repeat the above topology node expansion process until the topology path expansion level reaches the preset maximum level threshold. After expansion, the set of topological connectivity constraint path nodes The final form is: ; It should be noted that the set of topological connectivity constraint path nodes obtained after the above topological expansion... A clearly defined set of nodes represents a set of nodes within which local deformations of the topology can be effectively propagated, ensuring that local deformations do not exceed the expected range.
[0041] Furthermore, to clearly define the boundary range of spatial deformation propagation, a closed-loop constraint is applied to the path boundary based on the aforementioned set of topologically connected constraint path nodes. Specifically, a closed topological boundary loop is formed by connecting the outermost topological nodes of the path, denoted as the set. :
[0042] The aforementioned boundary loops form a clearly defined closed-loop structure in space, thereby defining the precise spatial range of local deformation transmission in the three-dimensional model of the gift.
[0043] Finally, the set of path nodes constrained by the above topological connectivity is... Set of boundary loops The common output serves as the basic data input for subsequent local topology optimization and texture mapping optimization, ensuring that the local model deformation transmission process is accurate, efficient, and has engineering applicability.
[0044] S102: Based on the texture coordinate distribution characteristics of the topological patches within the local deformation transmission range, determine the spatial stretching direction of the texture mapping, construct a texture mapping control field, and identify the high-twist region of the texture mapping in the texture mapping control field; It should be noted that, in this embodiment, "texture coordinates" specifically refers to the two-dimensional parameter coordinates (UV coordinates) of the surface of the topological patch of the gift 3D model. Each topological patch corresponds to one or more texture coordinates, which point to the specific pixel positions on the texture map, thereby determining the texture mapping relationship of the topological patch.
[0045] It should be further clarified that "spatial stretching direction" specifically refers to the direction in which the texture coordinate density changes significantly on the surface of the topological mesh. Specifically, when the density of texture coordinates suddenly increases or decreases in a certain direction, exhibiting obvious local stretching or compression, this situation is defined as the spatial stretching direction of the texture map, which is used to guide the subsequent texture optimization process.
[0046] In a specific implementation, the step of constructing a texture mapping control field and identifying high-distortion regions of the texture mapping within the texture mapping control field includes: Based on the spatial texture coordinate distribution of the topological patch within the local deformation transmission range, the irregular spatial extension region of the local texture deformation of the topological patch is determined; Specifically, based on all topological patches within the local deformation transmission range defined in step S101, the spatial distribution differences of texture coordinates in each topological patch are first calculated to quantify the degree of spatial expansion irregularity of texture coordinates in the local area.
[0047] In implementation, this embodiment defines a local spatial expansion irregularity index for topological patch texture coordinates. The calculation formula is: In the formula: 𝑓 represents any topological patch within the local deformation propagation range; These represent the U and V values of the texture coordinates corresponding to all vertices in the facet 𝑓, respectively; These represent the standard deviations of the texture coordinates U and V within the patch, respectively. These represent the average values of the texture coordinates U and V within the patch 𝑓, respectively.
[0048] The spatial expansion irregularity index is obtained by calculating each topological patch using the above formula. If the index of the topological patch exceeds the set threshold (e.g., greater than 1.5), the topological patch is marked as an "irregular spatial extension region of texture deformation" and is used as the object of the next analysis.
[0049] Regional analysis of the spatial expansion trend of texture coordinate distribution direction in irregular spatial expansion regions of texture deformation is performed to extract candidate distortion regions with abnormal spatial expansion trends. Furthermore, in order to clarify the spatial stretching direction, this embodiment performs regional trend analysis on the texture coordinate distribution of topological patches within the irregular spatial expansion area of texture deformation, and identifies candidate regions with significant abnormal spatial expansion trends in local areas.
[0050] In practical implementation, a spatial expansion trend index for topological patches is defined. The calculation formula is: In the formula: The number of vertices in the topological patch 𝑓; The gradient of the texture coordinates of the i-th vertex is represented by the following method: ;in, These represent the gradient components of the texture coordinates along the x and y directions of the local tangential space of the topological patch, respectively.
[0051] When the spatial expansion trend indicator of topological patches within the region When the trend exceeds a preset trend threshold (e.g., greater than 2.0), the local area where the topological patch is located is marked as a candidate distortion region, and the next step is to perform refined analysis.
[0052] By combining the topological boundary and texture distribution characteristics of candidate distorted regions, regions where the texture coordinate expansion trend does not match the topological boundary structure are identified as high-distorted regions, and the spatial location and texture mapping control field of the high-distorted regions are output. This embodiment combines the topological boundary characteristics and texture coordinate distribution of topological patches within the candidate distortion region to determine the degree of matching between the texture coordinate expansion trend and the topological boundary structure within the region, and finally identifies the "high distortion region". In practice, the determination of high-distortion regions uses an index of the degree of mismatch between the topological boundary and the texture coordinate expansion trend. Perform the calculation:
[0053] In the formula: Candidate distortion regions; Represents the set of all topological boundary edges within region R; Let e be the spatial tangential unit vector of the topological boundary edge; The unit vector representing the principal expansion trend of texture coordinates in region R is obtained through principal component analysis (PCA) of the texture coordinate distribution within the region.
[0054] If the distortion mismatch index of the candidate distortion region If the distortion exceeds the set high distortion threshold (e.g., greater than 0.5), the region is explicitly marked as a "high distortion region", and the specific spatial location of the high distortion region and the corresponding texture mapping control field are output. The above texture mapping control field is specifically defined as follows: Spatial location range: The set of coordinates of all topological nodes in the highly distorted region; Texture mapping vector field: A set of vectors corresponding to the changing trends of node texture coordinates within a region, used to guide the optimization and control of subsequent texture mapping.
[0055] S103: Based on the topological adjacency relationship of the high-twist region, derive the adaptive adjustment matrix of the geometric topology, and control the repositioning of the topological patch according to the adaptive adjustment matrix; It should be noted that the "adaptive adjustment matrix" mentioned in this embodiment refers to a mathematical matrix used to control the precise adjustment of the spatial position of topological patches. This matrix is dynamically generated by analyzing the spatial position correlation between high-distortion regions and their surrounding adjacent topological patches, which can effectively reduce the degree of texture mapping distortion.
[0056] In a specific implementation, deriving the adaptive adjustment matrix of the geometric topology and controlling the repositioning of the topological patches based on the adaptive adjustment matrix includes: Based on the local spatial correlation between the highly distorted region and the topologically adjacent region, a local spatial mapping relationship for the topological patch is established. In practice, based on the high-twist region identified by S102, a spatial position correlation analysis is first performed on the directly adjacent topological patches around it to establish a clear local spatial mapping relationship.
[0057] Specifically, the local spatial mapping relationship is explicitly represented by the correspondence of the three-dimensional spatial coordinates of the vertices of the topological patch, as follows: Let the set of topological nodes in the high-twist region be... The set of adjacent topological nodes is Then the node With nodes The local spatial mapping relationship can be expressed as:
[0058] In the formula: Representing nodes respectively and nodes The three-dimensional spatial coordinates; The L2 norm of Euclidean space is used to quantify the actual distance between spatial locations.
[0059] Based on the above local spatial mapping relationship, the distance between each topological node in all high-twist regions and its adjacent region nodes is calculated, and these relationships are recorded to form a mapping relationship set: .
[0060] The spatial constraint effect of topologically adjacent regions on highly distorted regions is determined by local spatial mapping relationships, and the topological constraint factor is obtained. In practice, the spatial constraint effect of topologically adjacent regions on highly distorted regions is specifically defined as the degree to which adjacent topological patches have a spatially stable or unstable influence on the topological structure of highly distorted regions, and is quantified in the form of topological constraint factors.
[0061] The determination of the spatial constraint effect of topologically adjacent regions on highly distorted regions, and the acquisition of topological constraint factors, includes: Analyze the topological connectivity between topologically adjacent regions and highly distorted regions, and identify unstable topological connectivity nodes with large spatial location fluctuations in the topologically adjacent regions; Based on the set of local spatial mapping relationships established above The degree of positional fluctuation of each node in different local mapping relationships is calculated to identify nodes with unstable topological connections. (Node spatial fluctuation degree) The calculation formula is explicitly defined as follows:
[0062] in, For nodes The average of the positional differences between all nodes in the high-twist region; The total number of nodes in the high-twist region; node If the degree of spatial fluctuation If the set threshold is exceeded (e.g., spatial fluctuations exceed 20% of the average distance), the node is explicitly marked as an unstable topology connection node.
[0063] Based on the spatial positional fluctuations of the topological connection nodes, determine the degree to which the topological connection nodes cause spatial positional interference to the topological structure of the high-twist region; Furthermore, the degree of interference that each unstable topological connection node causes to the topology of the high-twist region is calculated. The specific quantification method is as follows: ;in: The interference level weighting coefficient is obtained from model experiments, with typical values such as 0.5 to 1.5. For nodes The calculated value of spatial fluctuation.
[0064] Based on the degree of spatial location interference, different spatial constraint weights are applied to the topological adjacency region, generating the topological constraint factor and outputting the constraint factor. In specific implementation, the "topology constraint factor" is defined as a weighting coefficient used to quantify the spatial position constraints imposed by the topological adjacency region on the nodes of the high-twist region. The value of the topology constraint factor directly affects the construction accuracy of the subsequent spatial adjustment matrix. Specifically, topological constraint factors The calculation formula is clearly defined as follows:
[0065] In the formula: For unstable topological connection nodes in the topological adjacency region; For nodes The level of interference determined above; These represent the maximum and minimum values of the interference level of all unstable nodes, respectively; The preset range of values for the topology constraint factor is usually set to 1. The higher value indicates that the node exerts a stronger constraint on the highly distorted region.
[0066] Using the above formula, each unstable topology connection node is calculated to form a complete set of topology constraint factors: ;in, It is a set of nodes connected to an unstable topology.
[0067] Based on the topological constraint factor, the spatial adjustment matrix of the geometric topology is derived, and the spatial adjustment matrix is used to reposition the topological patches in space. The "spatial adjustment matrix" described in this embodiment is used to explicitly control the magnitude and direction of spatial position adjustment of topological patches, thereby effectively reducing the degree of local texture mapping distortion in the topological structure. Specifically, the spatial adjustment matrix... It is a dynamic adaptive matrix calculated based on the relationship between topological constraint factors and topological connectivity.
[0068] The step of repositioning the topological patch spatially using a spatial adjustment matrix includes: The spatial interaction relationship between topological patches and topological constraint factors is obtained based on the spatial adjustment matrix; The spatial interaction relationship formula for topological patch nodes is defined as follows:
[0069] In the formula: For any topological node within the high-twist region; For nodes The set of all adjacent unstable topologically connected nodes; They are nodes The three-dimensional spatial coordinates; The topological constraint factor is obtained from the aforementioned calculation; This represents the total number of adjacent nodes.
[0070] The spatial interaction relationships of all nodes within the high-twist region are calculated one by one using this formula. To form a set of spatial interaction relationships .
[0071] The spatial interaction relationship is used to redefine the spatial position movement path of the topological patch, and the position that has the least impact on adjacent topological patches when the topological patch moves is determined. Furthermore, based on the aforementioned clearly defined set of spatial interaction relationships The spatial movement path of the topological patch node is redefined to minimize the impact of its movement on adjacent topological patches.
[0072] In practical implementation, topology nodes Spatial location movement path Explicitly defined as: ; In the formula: 𝜆 is the movement range control coefficient, and its value is explicitly limited to [0,1]. The optimal value is determined through engineering practice, for example, 0.5; For nodes Spatial interaction vector.
[0073] Subsequently, the movement path vector calculated above is used... , will node Move to a new spatial location .
[0074] The topological patches are spatially repositioned according to their determined positions to generate a set of repositioned topological patches with stable topological structure, and the set of repositioned topological patches is output. In practice, the set of topological patches after explicit relocation is obtained by moving and relocating the aforementioned node positions. The set of topological patches specifically consists of: node position coordinates. It has been clearly updated; the spatial relationship between adjacent topological patches is stable and there is no obvious distortion; after the topological structure is relocated, the fluctuation range of the spatial position between nodes is significantly reduced (e.g., the average fluctuation range is reduced by more than 50%).
[0075] Finally, the repositioned set of topological patches is... and the aforementioned spatial adjustment matrix The output is used for the next step of texture coordinate reconstruction and local texture compression optimization.
[0076] Output the set of topological patches after spatial relocation and the spatial adjustment matrix of the geometric topology.
[0077] S104: Based on the changes in texture coordinates after topological patch relocation, generate a texture space resampling mask, limit the local texture reconstruction area, perform texture compression processing, and output a lightweight gift 3D model. It should be noted that the "texture space resampling mask" described in this embodiment specifically refers to a mask data structure. This structure is generated based on the changes in texture coordinates of topological patches after spatial relocation, and can clearly define the area where local reconstruction and optimization of texture coordinates are required. Using this mask ensures accurate positioning of the processing area during subsequent texture mapping adjustments, effectively avoiding redundant calculations and processing in unnecessary areas, and improving the overall computational efficiency and accuracy of texture compression.
[0078] In a specific implementation, the process of defining the local texture reconstruction area, performing texture compression processing, and outputting a lightweight 3D model of the gift includes: Based on the changes in texture coordinates after topological patch relocation, regions where the texture boundary does not match the topological boundary are identified, and texture boundary misalignment regions are determined. Specifically, the method for determining the texture boundary misalignment region is as follows: compare the degree of difference in UV texture coordinate positions of the topological patch before and after spatial relocation, and calculate and quantify the relative misalignment index between the topological boundary and the texture map boundary. :
[0079] In the formula: 𝑓 is an arbitrary topological patch; The total number of vertices in the topological patch 𝑓; Representing vertices respectively The texture coordinates after spatial relocation and the original texture coordinates; The distance is the Euclidean distance in the UV texture space.
[0080] When the indicator When the misalignment exceeds a preset threshold (e.g., 0.05), the area is explicitly marked as a "texture boundary misalignment area" for use in subsequent steps.
[0081] For the texture boundary misalignment region, a topology control mask for texture resampling is constructed, and the reconstruction range of texture coordinates is defined by the topology control mask; The topology control mask for constructing texture resampling includes: Analyze the texture coordinate offset state before and after topological patch relocation to determine the sensitive area of texture mapping coordinate change of topological patch; Specifically, the texture coordinate change sensitive region refers to the region where the relative position of texture coordinates changes significantly. This is determined by calculating the texture coordinate offset sensitivity index. Sure:
[0082] in, The average spacing of texture coordinates for all vertices within the facet 𝑓. When When the value exceeds a preset sensitivity threshold (e.g., 0.2), the vertex... The area containing the area is marked as a sensitive area.
[0083] Based on the texture coordinate offset pattern of sensitive areas, a local control region for topological mapping coordinates is established; Specifically, the local control region is formed by extending from the sensitive region as the center to its topologically adjacent regions, and the extension process adopts the topological connection radius. (For example, within 2 to 3 topological side lengths) clearly defined to ensure sufficient coverage of all areas that may be significantly affected by texture offset.
[0084] Based on the local control region, the texture coordinate mapping relationship between topological patches is determined, and a topological control mask for texture resampling is constructed. Specifically, the topology control mask includes a set of topology nodes. and the corresponding boundary connection relationship : The node set is explicitly defined as all topological nodes within the local control area that are significantly affected by texture coordinates; Boundary connectivity is explicitly limited to a set of nodes. The topological edges that exist between nodes.
[0085] Output a texture resampling topology control mask used to limit the range of texture coordinate reconstruction; Finally, the topology control mask data structure is explicitly output and used as input data for subsequent steps to precisely define the boundary range of the texture reconstruction region.
[0086] The texture coordinates within the reconstruction range are locally reconstructed so that the distribution of texture coordinates matches the topological boundary; In practice, the following steps should be clearly defined: Based on the topology control mask, the texture coordinates of topology nodes within the reconstruction range are interpolated and adjusted. The adjustment method includes UV coordinate remapping based on the spatial position of the topology boundary after relocation. The optimal distribution of texture coordinates for each node is determined using the least squares optimization method, with the specific formula as follows:
[0087] In the formula: For nodes The set of adjacent nodes; Adjacent nodes The target texture coordinates are obtained by remapping based on the topological boundary.
[0088] The texture coordinate distribution after the above interpolation and reconstruction process can accurately match the topological boundary, eliminating texture misalignment and distortion.
[0089] Output the reconstructed local texture reconstructed region to perform subsequent texture compression processing and obtain a lightweight gift 3D model; Specifically, standard texture compression algorithms (such as the DXT series algorithms based on block compression) are explicitly used to compress the aforementioned local texture reconstruction regions, generating compressed texture data with significantly reduced size and data volume. Finally, the compressed texture data is remapped onto topological patches to complete the overall model's texture lightweighting process, outputting a lightweight 3D gift model suitable for fast loading on the terminal while effectively retaining high visual quality.
[0090] The above embodiments are only used to illustrate the technical methods of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical methods of the present invention without departing from the spirit and scope of the technical methods of the present invention.
Claims
1. A method for lightweight processing of a gift 3D model for terminal loading, characterized in that, The method comprises the following steps: Based on the topological grid of the gift three-dimensional model, the normal discontinuous boundary line is extracted, the curvature concentration area at the intersection of the boundary line is taken as the topological constraint reference, the topologically connected constraint path is generated, and the local deformation conduction range is limited according to the topologically connected constraint path; According to the texture coordinate distribution characteristics of the topological patches in the local deformation conduction range, the spatial stretching direction of the texture mapping is determined, the texture mapping control field is constructed, and the high-twist area of the texture mapping is identified in the texture mapping control field; According to the topological adjacency relationship of the high-twist area, the adaptive adjustment matrix of the geometric topology is derived, and the relocation of the topological patches is controlled according to the adaptive adjustment matrix; According to the change of the texture coordinates after the relocation of the topological patches, the texture space resampling mask is generated, the local texture reconstruction area is limited, the texture compression processing is performed, and the gift three-dimensional model after lightweight processing is output.
2. The method for lightweight processing of a gift 3D model for terminal loading according to claim 1, characterized in that, The method comprises the following steps: Based on the topological connection characteristics of the normal discontinuous boundary line in the topological grid, the spatial distribution continuous and dense curvature peak area at the intersection of the boundary line is extracted; According to the spatial correlation between the curvature peak area and the surrounding topological patches, the topological constraint node capable of connecting multiple curvature peak areas at the same time is determined; The topologically connected constraint path is generated with the topological constraint node as the spatial connection hinge, the conduction boundary range of the spatial topological deformation influence is determined according to the path, and the local deformation conduction range is output.
3. The method for lightweight processing of a gift 3D model for terminal loading according to claim 2, characterized in that, The method comprises the following steps: The local topological structure stability of the topological grid around the curvature peak area is analyzed, and multiple undetermined constraint nodes with topological structure stability lower than a preset topological stability threshold are screened out; The topological adjacent relationship between each undetermined constraint node and the curvature peak area is determined, and the candidate topological constraint node capable of connecting multiple curvature peak areas is determined according to the adjacent relationship; Based on the topological structure redundancy evaluation between the candidate topological constraint node and the topological patch, the node with the minimum topological structure redundancy is selected as the topological constraint node, and the topological constraint node is output.
4. The method for lightweight processing of a gift 3D model for terminal loading according to claim 3, characterized in that, The method comprises the following steps: According to the spatial texture coordinate distribution of the topological patches in the local deformation conduction range, the irregular spatial expansion area of the local texture deformation of the topological patches is determined; The regional analysis of the spatial expansion trend is performed on the texture coordinate distribution direction in the irregular spatial expansion area of the texture deformation, and the candidate twist area with abnormal spatial expansion trend is extracted; The area where the texture coordinate expansion trend does not match the topological boundary structure is identified as the high-twist area by combining the topological boundary and the texture distribution characteristics of the candidate twist area, and the spatial position of the high-twist area and the texture mapping control field are output.
5. The method for lightweight processing of a gift 3D model for terminal loading according to claim 4, characterized in that, The method comprises the following steps: According to the local spatial position correlation between the high-twist area and the topological adjacent area, the local spatial mapping relationship of the topological patches is established; Determine the spatial constraint effect of the topological adjacent region on the high distortion region by a local space mapping relationship, and obtain a topological constraint factor; Derive a spatial adjustment matrix of the geometric topology according to the topological constraint factor, and reposition the spatial position of the topological patch by using the spatial adjustment matrix; Output the topological patch set after the spatial position repositioning and the spatial adjustment matrix of the geometric topology.
6. The method for lightweight processing of a gift 3D model for terminal loading according to claim 5, characterized in that, The determination of the spatial constraint effect of the topological adjacent region on the high distortion region includes: Analyze the topological connection relationship between the topological adjacent region and the high distortion region, and identify unstable topological connection nodes in the topological adjacent region with large spatial position fluctuations; Determine the degree of spatial position interference of the topological connection nodes on the topological structure of the high distortion region according to the spatial position fluctuation of the topological connection nodes; According to the degree of spatial position interference, different spatial constraint weights are applied to the topological adjacent region to generate the topological constraint factor and output the constraint factor.
7. The method of claim 6, wherein the method is a method of lightweight processing of a gift 3D model for terminal loading, characterized by, The repositioning of the spatial position of the topological patch by using the spatial adjustment matrix includes: Obtain the spatial interaction relationship between the topological patch and the topological constraint factor based on the spatial adjustment matrix; Redefine the spatial position moving path of the topological patch by using the spatial interaction relationship, and determine the position of the topological patch with the minimum influence on the adjacent topological patch during movement; Reposition the topological patch according to the determined position to generate a repositioned topological patch set with stable topological structure, and output the repositioned topological patch set.
8. The method for lightweight processing of a gift 3D model for terminal loading according to claim 7, characterized in that, The limitation of the local map reconstruction region, the execution of the texture compression processing, and the output of the lightweight processed gift three-dimensional model include: Based on the change of the texture coordinate after the repositioning of the topological patch, identify the region where the map boundary and the topological boundary do not match, and determine the texture boundary misalignment region; For the texture boundary misalignment region, construct a texture resampling topological control mask, and limit the reconstruction range of the texture coordinate by the topological control mask; Reconstruct the texture coordinate in the reconstruction range to make the distribution of the texture coordinate match the topological boundary; Output the reconstructed local map reconstruction region to perform subsequent texture compression processing and obtain the lightweight processed gift three-dimensional model.
9. The method for lightweight processing of a gift 3D model for terminal loading according to claim 8, characterized in that, The construction of the texture resampling topological control mask includes: Analyze the texture coordinate offset state before and after the repositioning of the topological patch, and determine the sensitive region of the texture mapping coordinate change of the topological patch; Based on the texture coordinate offset law of the sensitive region, establish a local control region of the topological mapping coordinate; According to the local control region, determine the texture coordinate mapping relationship between the topological patches to form a texture resampling topological control mask; Output the texture resampling topological control mask for limiting the reconstruction range of the texture coordinate.
