Modeling optimization method and system for 3d model

By acquiring the performance indicators of the three-dimensional model and cutting and feature label optimization, the problems of low efficiency and poor quality of the optimization area in the prior art are solved, and more efficient and accurate three-dimensional model optimization is achieved.

CN120070803APending Publication Date: 2025-05-30HUNAN UNIV OF SCI & ENG
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510201724.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-24
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

In the existing three-dimensional model optimization methods, the determination of the model in the optimization area depends on manual implementation, resulting in low efficiency and poor optimization quality.

Method used

A modeling optimization method for 3D models is proposed. By obtaining the performance indicators of the target model, determining the optimization indicators, cutting the target modeling file to obtain the model subfile set, and optimizing the model subfile according to the feature label.

Benefits of technology

The efficiency and accuracy of three-dimensional model optimization are improved, the impact on the overall structure is reduced, and the quality of optimization is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120070803A_ABST
    Figure CN120070803A_ABST
Patent Text Reader

Abstract

The invention discloses a modeling optimization method and system for a 3d model, and relates to the technical field of computers. Obtaining a target modeling file of the target model, and detecting the target modeling file to obtain a model performance index; determining an optimization index of the target modeling file according to the performance index, and cutting the target modeling file according to the optimization index to obtain a model sub-file set; and determining a feature tag of each model sub-file in the model sub-file set, and optimizing the model sub-files according to the feature tags. The modeling file of the target three-dimensional model is obtained, and the performance indexes of the modeling file are detected, so that the current state of the model can be comprehensively evaluated, and the optimization direction is defined. And after an optimization target is determined according to the indexes, the model is cut into a plurality of sub-files, so that local optimization is realized, the optimization efficiency is improved, and the influence on the whole structure is reduced. By determining the feature tag for each sub-file and performing targeted optimization, the accuracy and efficiency of optimization are enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of computer technology, and particularly relates to a modeling optimization method and system for 3D models. Background Art

[0002] Since the birth of three-dimensional modeling technology in the late 1960s, it has experienced an evolution from wireframe models, surface models to solid models. With the progress of computer technology, it has gradually developed into parametric modeling, multi-source data fusion, and artificial intelligence-driven automated modeling. Nowadays, it plays an important role in multiple fields, such as industrial design, entertainment, smart cities, and healthcare. In the future, three-dimensional modeling will be deeply integrated with virtual reality and augmented reality, providing users with immersive experiences, and continuously expanding applications in fields such as personalized medicine and smart cities, showing broad development prospects.

[0003] The existing three-dimensional model optimization is mainly achieved through the following methods: one is model decimation, removing the faces that have no impact on vision; the second is multi-resolution representation and LOD technology, dynamically selecting the model accuracy according to the viewing distance; the third is dynamic frustum culling, only rendering the part of the model within the frustum; the fourth is scene graph and spatial partitioning, optimizing local rendering through technologies such as octrees and kd-trees; the fifth is object-level optimization, adopting specific strategies for different objects; the sixth is chunk loading and pre-rendering, dynamically loading data and pre-rendering fixed-view images; the seventh is texture and material optimization, controlling the texture map size and reducing the use of transparent texture maps; the eighth is mesh simplification and topology reconstruction, optimizing the model structure. These methods effectively reduce the calculation and resource consumption, and improve the rendering efficiency and performance.

[0004] Although the above model optimization methods have certain effects, there are still some problems. For example, the determination of the optimization area of the model is achieved manually, resulting in low efficiency and poor optimization quality during the optimization process of the three-dimensional model. Summary of the Invention

[0005] The object of the present invention is to solve the problem that the determination of the optimization area of the model is achieved manually, resulting in low efficiency and poor optimization quality during the optimization process of the three-dimensional model, and to propose a modeling optimization method and system for 3D models.

[0006] In the first aspect of the implementation of the present invention, first, a modeling optimization method for 3D models is proposed, which is applied to 3D modeling software. The method includes:

[0007] Obtain the target modeling file of the target model, and detect the model performance indicators for the target modeling file; the performance indicators include: the number of model faces, file size, memory occupancy, and topological model;

[0008] Determine the optimization metrics of the target modeling file according to the performance metrics, and cut the target modeling file according to the optimization metrics to obtain a set of model sub-files; each model sub-file in the set of model sub-files has a feature label;

[0009] Determine the feature labels of each model sub-file in the set of model sub-files, and optimize the model sub-files according to the feature labels.

[0010] Optionally, cutting the target modeling file according to the optimization metrics to obtain a set of model sub-files includes:

[0011] Convert the target modeling file into a triangular mesh, and divide the triangular mesh into multiple sub-meshes according to the optimization metrics;

[0012] Extract feature attributes for each sub-mesh, and add the feature attributes as feature labels to the corresponding sub-mesh to obtain target sub-meshes;

[0013] Traverse each target sub-mesh to obtain the number of faces of each target sub-mesh. If the number of faces of the target sub-mesh > the preset number of face values, perform secondary division on the target sub-mesh as a model sub-file;

[0014] If the number of faces of the target sub-mesh ≤ the preset number of face values, obtain the neighboring sub-meshes of the target sub-mesh, and merge the target sub-mesh with the neighboring sub-meshes as a model sub-file.

[0015] Optionally, obtaining the neighboring sub-meshes of the target sub-mesh includes:

[0016] Obtain the adjacent points of the target sub-mesh, convert each adjacent point from the Cartesian coordinate system to the spherical coordinate system, and sort the adjacent points according to the polar angle to obtain an adjacent point sequence;

[0017] Calculate the features of each adjacent point in the adjacent point sequence to obtain adjacent point features, and aggregate the adjacent point features through a summation function to obtain a multi-dimensional feature vector.

[0018] Optionally, after aggregating the adjacent point features through a summation function to obtain a multi-dimensional feature vector, it includes:

[0019] Input the multi-dimensional feature vector into a dual attention layer, and obtain a query Q, a key K, and a value V through linear transformation;

[0020] Calculate the matrix dot product of the query Q and the key K to obtain a score matrix, calculate the similarity between all query vectors Q and all key vectors K to obtain a weight distribution, normalize the weight distribution to obtain a target weight distribution, and assign the target weight distribution to the score matrix to obtain an attention distribution matrix;

[0021] Extract the attention scores from the attention distribution matrix according to the preset ranking to obtain the target score set, and determine V according to the target score set k , through the linear layer M k and V k Calculate to obtain A l , through the linear layer M v and the said A l Calculate to obtain the local attention feature matrix;

[0022] Aggregate the local features in the local attention feature matrix after max pooling to obtain the local aggregated features, weight the local aggregated features with the attention score matrix to obtain the global attention features, and use the global attention features as the neighbor sub-grids.

[0023] Optionally, optimize the model sub-files according to the feature labels, including:

[0024] Calculate the first data density of the target modeling file according to the feature label. If the first data density > the preset first standard density, then judge the second data density of each model sub-file;

[0025] If the second data density ≥ the second standard density, then retain the data of this model sub-file;

[0026] If the second data density < the second standard density, then mark this model sub-file;

[0027] If the first data density ≥ the preset first standard density, then take the average value of the first data density as the third standard density, and then judge the third data density of each model sub-file;

[0028] If the third data density ≥ the third standard density, then retain the data of this model sub-file;

[0029] If the third data density < the third standard density, then mark this model sub-file.

[0030] In the second aspect of the implementation of the present invention, a modeling optimization system for 3D models is proposed, which is used to execute the above-mentioned modeling optimization method, including: a model performance evaluation module, a model file cutting module, and a model file optimization module:

[0031] The model performance evaluation module is used to obtain the target modeling file of the target model and detect the model performance indicators of the target modeling file; the performance indicators include: the number of model faces, file volume, memory occupancy, and topological model;

[0032] The model file cutting module is used to determine the optimization index of the target modeling file according to the performance index, and cut the target modeling file according to the optimization index to obtain a set of model sub-files; each model sub-file in the set of model sub-files has a feature label;

[0033] The model file optimization module is used to determine the feature labels of each model sub-file in the set of model sub-files, and optimize the model sub-files according to the feature labels.

[0034] Optionally, the model file cutting module further includes: a mesh cutting module, a label adding module, a secondary cutting module, and a mesh merging module:

[0035] The mesh cutting module is used to convert the target modeling file into a triangular mesh, and divide the triangular mesh into multiple sub-meshes according to the optimization index;

[0036] The label adding module is used to extract feature attributes from each sub-mesh, and add the feature attributes as feature labels to the corresponding sub-mesh to obtain target sub-meshes;

[0037] The secondary cutting module is used to traverse each target sub-mesh to obtain the number of faces of each target sub-mesh. If the number of faces of the target sub-mesh > the preset number of faces, the target sub-mesh is secondarily divided as a model sub-file;

[0038] The mesh merging module is used to, if the number of faces of the target sub-mesh ≤ the preset number of faces, obtain the neighboring sub-meshes of the target sub-mesh, and merge the target sub-mesh with the neighboring sub-meshes as a model sub-file.

[0039] Optionally, the mesh merging module further includes: an adjacent point obtaining module and an adjacent point aggregating module:

[0040] The adjacent point obtaining module is used to obtain the adjacent points of the target sub-mesh, convert each adjacent point from the Cartesian coordinate system to the spherical coordinate system, and sort the adjacent points according to the polar angle to obtain an adjacent point sequence;

[0041] The adjacent point aggregating module is used to calculate the features of each adjacent point in the adjacent point sequence to obtain adjacent point features, and aggregate the adjacent point features through a summation function to obtain a multi-dimensional feature vector.

[0042] Optionally, the adjacent point aggregating module further includes: a linear transformation module, a first matrix generating module, a second matrix generating module, and a neighboring sub-mesh determining module:

[0043] The linear transformation module is used to input the multi-dimensional feature vector into a dual attention layer, and obtain a query Q, a key K, and a value V through linear transformation;

[0044] The first matrix generation module is configured to calculate the matrix dot product of the query Q and the key K to obtain a score matrix, calculate the similarity between all query vectors Q and all key vectors K to obtain a weight distribution, normalize the weight distribution to obtain a target weight distribution, and assign the target weight distribution to the score matrix to obtain an attention distribution matrix;

[0045] The second matrix generation module is configured to extract target scores from the attention distribution matrix according to a preset ranking to obtain a target score set, and determine V according to the target score set k , through the linear layer M k and V k Calculate to obtain A l , through the linear layer M v and the A l Calculate to obtain a local attention feature matrix;

[0046] The neighboring sub-grid determination module is configured to aggregate the local features in the local attention feature matrix after max pooling to obtain a local aggregated feature, weight the local aggregated feature with the attention score matrix to obtain a global attention feature, and use the global attention feature as the neighboring sub-grid.

[0047] Optionally, the model file optimization module further includes:

[0048] The first judgment module is configured to calculate the first data density of the target modeling file according to the feature label. If the first data density > a preset first standard density, then judge the second data density of each model sub-file;

[0049] The first execution module is configured to retain the data of the model sub-file if the second data density ≥ the second standard density;

[0050] The second execution module is configured to mark the model sub-file if the second data density < the second standard density;

[0051] The second judgment module is configured to, if the first data density ≥ the preset first standard density, take the average value of the first data density as the third standard density, and then judge the third data density of each model sub-file;

[0052] The third execution module is configured to retain the data of the model sub-file if the third data density ≥ the third standard density;

[0053] The fourth execution module is configured to mark the model sub-file if the third data density < the third standard density.

[0054] Advantages of the present invention:

[0055] The present invention proposes a modeling optimization method for 3D models, which obtains a target modeling file of a target model, detects the target modeling file to obtain a model performance index; determines the optimization index of the target modeling file according to the performance index, cuts the target modeling file according to the optimization index to obtain a model sub-file set; determines the feature label of each model sub-file in the model sub-file set, and optimizes the model sub-file according to the feature label. By obtaining the modeling file of the target three-dimensional model and detecting its performance index, the current state of the model can be comprehensively evaluated and the optimization direction can be clarified. After determining the optimization target according to these indicators, the model is cut into multiple sub-files to achieve local optimization, improve the optimization efficiency and reduce the impact on the overall structure. By determining the feature label for each sub-file and optimizing it in a targeted manner, the accuracy and efficiency of the optimization are enhanced. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] The present invention will be further described below in conjunction with the accompanying drawings.

[0057] Figure 1 A flow chart of a modeling optimization method for a 3D model is provided for an embodiment of the present invention;

[0058] Figure 2 Another framework diagram of a modeling optimization system for 3D models is provided for an embodiment of the present invention. DETAILED DESCRIPTION

[0059] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. The term "and / or" herein is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the present invention, the description of "first", "second", etc. is only used for descriptive purposes, and cannot be understood as indicating or implying its relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" can explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but it must be based on the ability of ordinary technicians in the field to implement. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.

[0060] Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative work shall fall within the scope of protection of the present invention.

[0061] The embodiment of the present invention provides a modeling optimization method for a 3D model. Figure 1 , Figure 1 A flowchart of a modeling optimization method for a 3D model provided by an embodiment of the present invention. The method comprises the following steps:

[0062] S101, obtaining a target modeling file of a target model, and detecting the target modeling file to obtain a model performance index;

[0063] S102, determining an optimization index of a target modeling file according to the performance index, and cutting the target modeling file according to the optimization index to obtain a model sub-file set;

[0064] S103, determining a feature label of each model sub-file in the model sub-file set, and optimizing the model sub-file according to the feature label.

[0065] Performance indicators include: number of model faces, file size, memory usage and topology model; each model sub-file in the model sub-file set has a feature label;

[0066] Based on a modeling optimization method for 3D models provided by an embodiment of the present invention, by obtaining the modeling file of the target three-dimensional model and detecting its performance indicators, the current state of the model can be comprehensively evaluated and the optimization direction can be clarified. After determining the optimization target according to these indicators, the model is cut into multiple sub-files to achieve local optimization, improve the optimization efficiency and reduce the impact on the overall structure. By determining the feature label for each sub-file and optimizing it in a targeted manner, the accuracy and efficiency of the optimization are enhanced.

[0067] In one implementation, a target modeling file of a target three-dimensional model is obtained. The target modeling file is tested to obtain model performance indicators, including the number of model faces, file size, memory usage, and topological model; by testing multiple performance indicators, the complexity, storage requirements, and topological structure of the model can be fully understood, providing data support for subsequent optimization. The test results of performance indicators help to clarify the direction in which the model needs to be optimized, such as reducing the number of faces to improve rendering efficiency, or optimizing topology to enhance the stability of the model.

[0068] In one implementation, the optimization index of the target modeling file is determined based on the detected performance index; the target modeling file is cut according to the optimization index to obtain a set of model sub-files. By cutting the model into multiple sub-files, local optimization can be performed on each sub-file to improve the optimization efficiency and effect. Local optimization can reduce the impact on the overall structure of the model and avoid the risks that may be caused by global optimization.

[0069] In one implementation, the feature tags of each model sub-file in the model sub-file set are determined, and the model sub-files are optimized according to the feature tags. The determination of the feature tags makes the optimization process more targeted, and customized optimization can be carried out according to the characteristics of different sub-files. By classifying and optimizing the sub-files through the feature tags, the optimization efficiency can be improved and unnecessary calculations can be reduced.

[0070] In one embodiment, the target modeling file is cut according to the optimization index to obtain a model sub-file set, including:

[0071] The target modeling file is converted into a triangular mesh, and the triangular mesh is divided into multiple sub-meshes according to the optimization index;

[0072] Feature extraction is performed on each sub-mesh to obtain feature attributes, and the feature attributes are added as feature tags to the corresponding sub-mesh to obtain the target sub-mesh;

[0073] Each target sub-mesh is traversed to obtain the number of faces of each target sub-mesh. If the number of faces of the target sub-mesh > the preset face value, the target sub-mesh is further divided as a model sub-file;

[0074] If the number of faces of the target sub-mesh ≤ the preset face value, the neighboring sub-mesh of the target sub-mesh is obtained, and the target sub-mesh is merged with the neighboring sub-mesh as a model sub-file.

[0075] In one implementation, the 3D model is converted into a triangular mesh, and a meshing algorithm (such as Marching Cubes, Delaunay triangulation, etc.) is used to represent the surface of the model as a triangular mesh; the triangular mesh is divided into multiple sub-meshes (blocks). The division can be performed using a geometric feature-based method (such as normal, curvature) or a topology-based method (such as connectivity). Determine the division granularity. For example, select an appropriate block size according to the complexity of the model and the application scenario. Geometric features such as normal, curvature, and boundary continuity are extracted for each sub-mesh. The sub-meshes are marked according to feature similarity for subsequent optimization and processing.

[0076] In one implementation, all sub-meshes are traversed to check the features and the number of faces (number of points) of each sub-mesh. If the number of faces of a certain sub-mesh exceeds a given threshold (for example, the upper limit of the 95% confidence interval), the sub-mesh is further subdivided. If the number of faces of a certain sub-mesh is less than a given threshold (for example, the lower limit of the 95% confidence interval), the nearest neighbor sub-mesh of the sub-mesh is found and merged.

[0077] In one implementation, the human body model is converted into a triangular mesh to ensure that the model surface is composed of triangular patches. The human body model is segmented into multiple sub-meshes, for example: segmented by body parts (head, torso, limbs). Normal and curvature features are extracted for each sub-mesh, and key areas (such as joints, facial features, etc.) are marked. Check the number of faces (or face count) of each sub-mesh. For sub-meshes with too many faces (such as the head), further subdivision is performed. For sub-meshes with too few faces (such as fingers), find the nearest neighbor sub-mesh and merge them. After the above steps are completed, it helps with subsequent processing, for example: Local optimization: Smooth the head sub-mesh to improve the visual effect, and simplify the limb sub-mesh to reduce computational resource consumption; Global processing: Re-integrate all optimized sub-meshes into a complete human body model to ensure smooth transition at the boundaries; Output the optimized human body model file for subsequent rendering or animation production.

[0078] In one implementation, the data processing efficiency can be optimized by segmenting the target modeling file: 3D model data: Reduce random access and improve computational efficiency. The 3D model can be segmented into multiple blocks or sub-meshes to reduce the complexity of rendering and processing. Enhance data structuring: 3D model data: Segmenting the model into multiple blocks can better manage complex models and facilitate local optimization and editing. Improve data quality: 3D model data: Through preprocessing steps such as filtering and denoising, improve the data quality. Through steps such as mesh optimization and smoothing, improve the visual effect of the model.

[0079] In one embodiment, obtaining the neighboring sub-meshes of the target sub-mesh includes:

[0080] Obtain the adjacent points of the target sub-mesh, convert each adjacent point from the Cartesian coordinate system to the spherical coordinate system, and sort the adjacent points according to the polar angle to obtain an adjacent point sequence;

[0081] Calculate the features of each adjacent point in the adjacent point sequence to obtain adjacent point features, and aggregate the adjacent point features through a summation function to obtain a multi-dimensional feature vector.

[0082] In one implementation, obtain adjacent points: For each center point in the target sub-grid, find its k nearest neighbor points. Coordinate transformation: Convert the coordinates of these adjacent points from the Cartesian coordinate system to the spherical coordinate system. The spherical coordinate system consists of three components: radial distance r, polar angle θ, and azimuth angle φ; Sorting: Sort the adjacent points according to the polar angle θ to obtain a sorted sequence of adjacent points. Purpose: Through the spherical coordinate system and polar angle sorting, the spatial distribution and geometric structure of adjacent points can be better captured. And this sorting method helps to reduce the feature ambiguity caused by the random distribution of points and enhance the distinctiveness of features. Reducing feature ambiguity: The sorted sequence of adjacent points can better represent the local structure and reduce the feature ambiguity caused by the proximity of points. Enhancing geometric perception ability: The spherical coordinate system can better describe the spatial position of points and enhance the model's perception ability of the local geometric structure.

[0083] In one implementation, calculate adjacent point features: For the sorted sequence of adjacent points, calculate the features between each pair of adjacent points. These features can include: Cartesian coordinate features: Features based on the original Cartesian coordinates. Spherical coordinate features: Features based on the spherical coordinates. Other geometric features: Such as the distance and angle between points. Aggregate features: Use a summation function to aggregate the features of adjacent points to obtain a multi-dimensional feature vector. By combining Cartesian coordinate and spherical coordinate features, the geometric features of local three-dimensional model data can be more comprehensively described, improving the distinctiveness and expression ability of features. By aggregating features using the summation function, the computational complexity can be reduced while retaining the important information of local features.

[0084] In one implementation, for the center point in the target sub-grid, find its k nearest neighbor points (adjacent points) {P 1 , P 2 , …, P k}, convert the Cartesian coordinates (x i , y i , z i ) of each adjacent point to spherical coordinates (r i , θ i , φ i ), sort the adjacent points according to the polar angle θ i to obtain a sequence of adjacent points, and the sequence of adjacent points can be expressed as: F i = F 1 , F 2 , …, F k ; Use a summation function to aggregate the features of adjacent points, and the multi-dimensional feature vector obtained can be expressed as:

[0085] In one embodiment, after aggregating the adjacent point features using a summation function to obtain a multi-dimensional feature vector, it includes:

[0086] Input the multi-dimensional feature vector into the dual attention layer, and obtain query Q, key K, and value V through linear transformation;

[0087] Calculate the matrix dot product of query Q and key K to obtain the score matrix, calculate the similarity between all query vectors Q and all key vectors K to obtain the weight distribution, normalize the weight distribution to obtain the target weight distribution, and assign the target weight distribution to the score matrix to obtain the attention distribution matrix;

[0088] Extract the attention scores from the attention distribution matrix according to the preset ranking to obtain the target score set, and determine V according to the target score set k , through linear layer M k and V k Calculate to obtain A l , through linear layer M v and A l Calculate to obtain the local attention feature matrix;

[0089] Aggregate the local features in the local attention feature matrix after max pooling to obtain the local aggregated feature, weight the local aggregated feature with the attention score matrix to obtain the global attention feature, and use the global attention feature as the neighboring sub-grid.

[0090] In one implementation, input the multi-dimensional feature vector into the dual attention layer. Through linear transformation, obtain query (Q), key (K), and value (V) from the input feature matrix respectively, that is: (Q, K, V) = F s ·(W q , W k , W v ), Q, By reducing the dimensions of the query and the key, the computational amount is reduced and the computational efficiency is improved. Through linear transformation, the input features are converted into a form suitable for processing by the attention mechanism.

[0091] In one implementation, calculate the matrix dot product of query (Q) and key (K) to obtain the score matrix Calculate the similarity between all query vectors Q and all key vectors K to obtain the weight distribution. Normalize the weight distribution (through softmax and L1 norm normalization to enhance the discrimination of features and reduce the influence of noise), obtain the target weight distribution, and assign the target weight distribution to the score matrix to obtain the attention distribution matrix.

[0092] In one implementation, M k and M v are learnable linear layers respectively. Through linear layers, M k and M vAggregate local features to form a higher-level feature representation; integrate local features into global features through max pooling and weighted aggregation, retaining important local information; enhance the model's perception of global features through a global attention mechanism.

[0093] In one embodiment, optimizing the model sub-files according to feature tags includes:

[0094] Calculate the first data density of the target modeling file according to the feature tag. If the first data density > the preset first standard density, then judge the second data density of each model sub-file;

[0095] If the second data density ≥ the second standard density, then retain the data of this model sub-file;

[0096] If the second data density < the second standard density, then mark this model sub-file;

[0097] If the first data density ≥ the preset first standard density, then take the average value of the first data density as the third standard density, and then judge the third data density of each model sub-file;

[0098] If the third data density ≥ the third standard density, then retain the data of this model sub-file;

[0099] If the third data density < the third standard density, then mark this model sub-file.

[0100] In one implementation, the 3D model is pre-segmented into multiple blocks, and the division criteria of the blocks are related to the functionality of the model. For example: for a human body model, it can be segmented into multiple blocks according to body parts (such as head, limbs, torso, etc.). Data density: Evaluate its impact on the loading efficiency by analyzing whether the movement of each block consumes too much computing resources; for example: calculate the quotient of the data size of each region and the loading time as the data density; comprehensively evaluate in combination with factors such as the number of vertices, number of faces, and texture complexity of the model; for example: use a projection-based method to sample the model to form a Quality Map of Minipatches (QMM), and then extract quality-aware features to evaluate the resource consumption of the model during movement.

[0101] In one implementation, when the third data density ≥ the third standard density, then retain the data of this model sub-file; this indicates that the data of this model sub-file is reasonable at this time, has little impact on the overall model file, and the loading and rendering time is not long either; on the contrary, when the third data density < the third standard density, then mark this model sub-file; this indicates that this model sub-file is unreasonable at this time and needs to be optimized. The optimization directions can be the number of model faces, the quality of model textures, and model topology, etc.

[0102] An embodiment of the present invention also provides a modeling optimization system for 3D models based on the same inventive concept. Refer to Figure 2 , Figure 2 which is a schematic structural diagram of a modeling optimization system for 3D models provided by an embodiment of the present invention, including: a model performance evaluation module, a model file cutting module, and a model file optimization module:

[0103] The model performance evaluation module is used to obtain the target modeling file of the target model and detect the model performance indicators; the performance indicators include: the number of model faces, file volume, memory occupancy, and topological model;

[0104] The model file cutting module is used to determine the optimization indicators of the target modeling file according to the performance indicators, and cut the target modeling file according to the optimization indicators to obtain a set of model sub-files; each model sub-file in the set of model sub-files has a feature label;

[0105] The model file optimization module is used to determine the feature labels of each model sub-file in the set of model sub-files, and optimize the model sub-files according to the feature labels.

[0106] Based on the modeling optimization system for 3D models provided by an embodiment of the present invention, by obtaining the modeling file of the target 3D model and detecting its performance indicators, the current state of the model can be comprehensively evaluated, and the optimization direction can be clarified. After determining the optimization objectives according to these indicators, the model is cut into multiple sub-files to achieve local optimization, improve the optimization efficiency and reduce the impact on the overall structure. By determining the feature labels for each sub-file and performing targeted optimization, the accuracy and efficiency of the optimization are enhanced.

[0107] In one embodiment, the model file cutting module further includes: a mesh cutting module, a label adding module, a secondary cutting module, and a mesh merging module:

[0108] The mesh cutting module is used to convert the target modeling file into a triangular mesh and divide the triangular mesh into multiple sub-meshes according to the optimization indicators;

[0109] The label adding module is used to extract the feature attributes of each sub-mesh and add the feature attributes as feature labels to the corresponding sub-mesh to obtain the target sub-mesh;

[0110] The secondary cutting module is used to traverse each target sub-mesh to obtain the number of faces of each target sub-mesh. If the number of faces of the target sub-mesh > the preset number of face values, the target sub-mesh is secondarily divided as a model sub-file;

[0111] The mesh merging module is used to, if the number of faces of the target sub-mesh ≤ the preset number of face values, obtain the neighboring sub-mesh of the target sub-mesh, and merge the target sub-mesh with the neighboring sub-mesh as a model sub-file.

[0112] In one embodiment, the grid merging module further includes: an adjacent point acquisition module and an adjacent point aggregation module:

[0113] The adjacent point acquisition module is configured to acquire adjacent points of the target sub-grid, convert each adjacent point from a Cartesian coordinate system to a spherical coordinate system, and sort the adjacent points according to the polar angle to obtain an adjacent point sequence;

[0114] The adjacent point aggregation module is configured to calculate the features of each adjacent point in the adjacent point sequence to obtain adjacent point features, and aggregate the adjacent point features through a summation function to obtain a multi-dimensional feature vector.

[0115] In one embodiment, the adjacent point aggregation module further includes: a linear transformation module, a first matrix generation module, a second matrix generation module, and a neighboring sub-grid determination module:

[0116] The linear transformation module is configured to input the multi-dimensional feature vector into a dual attention layer, and obtain a query Q, a key K, and a value V through linear transformation;

[0117] The first matrix generation module is configured to calculate the matrix dot product of the query Q and the key K to obtain a score matrix, calculate the similarity between all query vectors Q and all key vectors K to obtain a weight distribution, normalize the weight distribution to obtain a target weight distribution, and assign the target weight distribution to the score matrix to obtain an attention distribution matrix;

[0118] The second matrix generation module is configured to extract attention scores from the attention distribution matrix according to a preset ranking to obtain a target score set, and determine V according to the target score set k , through the linear layer M k and V k Calculate to obtain A l , through the linear layer M v and A l Calculate to obtain a local attention feature matrix;

[0119] The neighboring sub-grid determination module is configured to aggregate the local features in the local attention feature matrix after max pooling to obtain local aggregation features, weight the local aggregation features with the attention score matrix to obtain global attention features, and use the global attention features as neighboring sub-grids.

[0120] In one embodiment, the model file optimization module further includes:

[0121] The first judgment module is configured to calculate a first data density of the target modeling file according to the feature label. If the first data density > a preset first standard density, then judge the second data density of each model sub-file;

[0122] The first execution module is used to retain the data of the model sub-file if the second data density ≥ the second standard density;

[0123] The second execution module is used to mark the model sub-file if the second data density < the second standard density;

[0124] The second judgment module is used to, if the first data density ≥ the preset first standard density, take the average value of the first data density as the third standard density, and then judge the third data density of each model sub-file;

[0125] The third execution module is used to retain the data of the model sub-file if the third data density ≥ the third standard density;

[0126] The fourth execution module is used to mark the model sub-file if the third data density < the third standard density.

[0127] The above has described in detail an embodiment of the present invention, but the content is only a preferred embodiment of the present invention and cannot be considered as limiting the scope of implementation of the present invention. All equivalent changes and improvements made according to the scope of the application of the present invention shall still fall within the scope covered by the patent of the present invention.

Claims

1. A modeling optimization method for a 3D model, characterized in that: Applied to 3D modeling software, the method comprises: Obtain a target modeling file of a target model, and detect the target modeling file to obtain model performance indicators; the performance indicators include: number of model faces, file size, memory usage, and topology model; Determine the optimization index of the target modeling file according to the performance index, and cut the target modeling file according to the optimization index to obtain a model sub-file set; each model sub-file in the model sub-file set has a feature label; Determine the characteristic label of each model sub-file in the model sub-file set, and optimize the model sub-file according to the characteristic label.

2. A modeling optimization method for 3D models according to claim 1, characterized in that: The target modeling file is cut according to the optimization index to obtain a model sub-file set, including: Converting the target modeling file into a triangular mesh, and dividing the triangular mesh into a plurality of sub-meshes according to the optimization index; Extract features from each sub-grid to obtain feature attributes, and add the feature attributes as feature labels to the corresponding sub-grid to obtain the target sub-grid; Traverse each target sub-grid to obtain the number of faces of each target sub-grid. If the number of faces of the target sub-grid is greater than the preset face value, the target sub-grid is divided twice as a model sub-file. If the number of faces of the target sub-grid is less than or equal to the preset face value, the neighboring sub-grids of the target sub-grid are obtained, and the target sub-grid and the neighboring sub-grids are merged as a model sub-file.

3. A modeling optimization method for 3D models according to claim 2, characterized in that: Get the neighboring sub-grids of the target sub-grid, including: Obtain the adjacent points of the target subgrid, convert each adjacent point from the Cartesian coordinate system to the spherical coordinate system, and sort the adjacent points according to the polar angle to obtain an adjacent point sequence; The features of each adjacent point in the adjacent point sequence are calculated to obtain adjacent point features, and the adjacent point features are aggregated through a summation function to obtain a multi-dimensional feature vector.

4. A modeling optimization method for 3D models according to claim 3, characterized in that: After aggregating the features of adjacent points through the sum function to obtain a multi-dimensional feature vector, it includes: The multi-dimensional feature vector is input into the dual attention layer, and the query Q, key K and value V are obtained through linear transformation; Calculate the matrix dot product of the query Q and the key K to obtain a score matrix, calculate the similarity of all query vectors Q and all key vectors K to obtain a weight distribution, normalize the weight distribution to obtain a target weight distribution, and assign the target weight distribution to the score matrix to obtain an attention distribution matrix; According to the preset ranking, the attention distribution matrix is ​​subjected to attention score extraction to obtain a target score set, and V is determined based on the target score set. k , through a linear layer M k and V k Calculate A l , through a linear layer M v and the A l Calculate the local attention feature matrix; The local features in the local attention feature matrix are aggregated after maximum pooling to obtain local aggregate features, the local aggregate features are weighted by the attention score matrix to obtain global attention features, and the global attention features are used as neighboring sub-grids.

5. A modeling optimization method for 3D models according to claim 1, characterized in that: Optimizing the model sub-file according to the feature tags includes: Calculate the first data density of the target modeling file according to the feature tag, and if the first data density is greater than a preset first standard density, determine the second data density of each model sub-file; If the second data density is ≥ the second standard density, the data of the model sub-file is retained; If the second data density is less than the second standard density, the model subfile is marked; If the first data density is greater than or equal to the preset first standard density, the average value of the first data density is used as the third standard density, and the third data density of each model sub-file is determined; If the third data density is ≥ the third standard density, the data of the model sub-file is retained; If the third data density is less than the third standard density, the model subfile is marked.

6. A modeling optimization system for 3D models, characterized in that: Used to execute the modeling optimization method according to any one of claims 1 to 5, the modeling optimization system comprises: a model performance evaluation module, a model file cutting module and a model file optimization module: The model performance evaluation module is used to obtain a target modeling file of a target model, and detect the target modeling file to obtain a model performance index; the performance index includes: the number of model faces, file volume, memory usage and topology model; The model file cutting module is used to determine the optimization index of the target modeling file according to the performance index, and cut the target modeling file according to the optimization index to obtain a model sub-file set; each model sub-file in the model sub-file set has a feature label; The model file optimization module is used to determine the feature labels of each model sub-file in the model sub-file set, and optimize the model sub-files according to the feature labels.

7. A modeling optimization system for 3D models according to claim 6, characterized in that: The model file cutting module also includes: a mesh cutting module, a label adding module, a secondary cutting module and a mesh merging module: The mesh cutting module is used to convert the target modeling file into a triangular mesh and divide the triangular mesh into a plurality of sub-meshes according to the optimization index; The label adding module is used to extract features from each sub-grid to obtain feature attributes, and add the feature attributes as feature labels to the corresponding sub-grid to obtain a target sub-grid; The secondary cutting module is used to traverse each target sub-grid to obtain the number of faces of each target sub-grid. If the number of faces of the target sub-grid is greater than the preset face value, the target sub-grid is secondary divided as a model sub-file; The grid merging module is used to obtain the neighboring subgrids of the target subgrid if the number of faces of the target subgrid is less than or equal to the preset face value, and merge the target subgrid with the neighboring subgrids as a model subfile.

8. A modeling optimization system for 3D models according to claim 7, characterized in that: The grid merging module also includes: an adjacent point acquisition module and an adjacent point aggregation module: The adjacent point acquisition module is used to acquire adjacent points of the target subgrid, convert each adjacent point from a Cartesian coordinate system to a spherical coordinate system, and sort the adjacent points according to polar angles to obtain an adjacent point sequence; The adjacent point aggregation module is used to calculate the features of each adjacent point in the adjacent point sequence to obtain adjacent point features, and aggregate the adjacent point features through a summation function to obtain a multi-dimensional feature vector.

9. A modeling optimization system for 3D models according to claim 8, characterized in that: The adjacent point aggregation module further includes: a linear change module, a first matrix generation module, a second matrix generation module and a neighboring sub-grid determination module: The linear transformation module is used to input the multidimensional feature vector into the dual attention layer, and obtain the query Q, key K and value V through linear transformation; The first matrix generation module is used to calculate the matrix dot product of the query Q and the key K to obtain a score matrix, calculate the similarity of all query vectors Q and all key vectors K to obtain a weight distribution, normalize the weight distribution to obtain a target weight distribution, and assign the target weight distribution to the score matrix to obtain an attention distribution matrix; The second matrix generation module is used to extract the attention score from the attention distribution matrix according to the preset ranking to obtain a target score set, and determine V according to the target score set. k , through a linear layer M k and V k Calculate A l , through a linear layer M v and the A l Calculate the local attention feature matrix; The neighbor sub-grid determination module is used to aggregate the local features in the local attention feature matrix after maximum pooling to obtain local aggregated features, weight the local aggregated features with the attention score matrix to obtain global attention features, and use the global attention features as the neighbor sub-grid.

10. A modeling optimization system for 3D models according to claim 6, characterized in that: The model file optimization module also includes: The first judgment module is used to calculate the first data density of the target modeling file according to the feature tag, and if the first data density is greater than a preset first standard density, then judge the second data density of each model sub-file; The first execution module is used for retaining the data of the model sub-file if the second data density is greater than or equal to the second standard density; The second execution module is used for marking the model sub-file if the second data density is less than the second standard density; The second judgment module is used for judging the third data density of each model sub-file by taking the average value of the first data density as the third standard density if the first data density is greater than or equal to the preset first standard density; The third execution module is used for retaining the data of the model sub-file if the third data density is greater than or equal to the third standard density; The fourth execution module is used for marking the model sub-file if the third data density is less than the third standard density.