Automatic weight reduction method for three-dimensional model
By automatically identifying core and non-core features of 3D models and applying adaptive mesh subdivision and error diffusion algorithms, the problem of poor detail processing in lightweighting 3D models is solved, data reduction and visual quality maintenance are achieved, and is suitable for Various application scenarios.
Patent Information
- Application Number
- CN202410735080.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-07
- Publication Date
- 2024-09-10
AI Technical Summary
Existing 3D model lightweighting methods cannot effectively distinguish and process different details of the 3D model, resulting in the loss of local features of the model or surface breaking, which affects the lightweighting effect.
Adopt automatic lightweight methods, including receiving and parsing original 3D model data, identifying core and non-core features, performing geometric approximate calculations, unnecessary detail removal and texture data compression, using adaptive mesh subdivision algorithms and error diffusion algorithms, and dynamically Control the grid distribution density to ensure the accuracy and visual quality of the model.
It achieves effective reduction of 3D model data while maintaining the key features and visual quality of the model. It is suitable for application scenarios that need to reduce the amount of model data while maintaining the basic shape and visual effects of the model, such as real-time rendering on mobile devices and Network transmission.
Smart Images

Figure CN118628690A
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of three-dimensional model lightweighting, and in particular to an automatic three-dimensional model lightweighting method. Background Art
[0002] A 3D model is a polygonal representation of an object, usually displayed by a computer or other video device. The displayed object can be a real-world entity or a fictional object. Anything that exists in the physical world can be represented by a 3D model.
[0003] The existing 3D model is composed of a large number of pictures. The quality of the data model can be improved by increasing the number of pictures, but at the same time, the disadvantage is that since the 3D model contains a large number of pictures, these pictures need to be loaded one by one when the 3D model is loaded into the web page, which causes loading jams. Therefore, it is necessary to lightweight the 3D model to avoid loading jams.
[0004] In the prior art, there are three-dimensional model lightweighting methods that are performed manually, and there are three-dimensional model lightweighting methods that are performed by software. Among them, the advantage of the manual method is that the processing effect is relatively fine, and different details in complex three-dimensional models can be processed separately, but the processing efficiency is low. In the three-dimensional model lightweighting method performed by software, the input three-dimensional model is usually lightweighted by inputting a unified processing parameter. This method has a faster processing speed, but it cannot perform differentiated processing for different local details of the three-dimensional model, so it will cause the local features of the model to be lost or cause broken surfaces, resulting in poor lightweighting effect. Summary of the invention
[0005] In view of this, the technical problem to be solved by the present invention is: to provide a method for automatic lightweighting of a three-dimensional model, which can perform differentiated lightweighting processing on different details of the three-dimensional model to avoid the loss of local features of the model.
[0006] In order to solve the above technical problems, the technical solution of the present invention is:
[0007] The automatic lightweight method of a three-dimensional model includes the following steps:
[0008] S1, receiving and parsing the original 3D model data to obtain geometric information and texture information;
[0009] S2. Use algorithms to analyze the original three-dimensional model to identify and distinguish the core structural features and non-core features in the model;
[0010] S3, according to the preset lightweight criteria, performing reduction measures on non-core features, the reduction measures including geometric approximation calculation, non-essential detail elimination and texture data compression;
[0011] S4, using adaptive mesh subdivision algorithm, dynamically adjust mesh distribution density according to the morphological complexity of the model surface, and reduce polygon count;
[0012] S5, embedding error diffusion algorithm to control shape smoothness and continuity in the model simplification process;
[0013] S6. Conduct a comprehensive inspection of the simplified model, compare the differences before and after simplification, and ensure that the accuracy and visual quality of the model meet the established standards;
[0014] S7: Make judgments based on the evaluation feedback. If the expected indicators are not met, go back to S2 and iteratively adjust the lightweight parameters until they meet the standards.
[0015] S8. Export the optimized three-dimensional model data.
[0016] Preferably, S2 comprises the following steps:
[0017] S21. Feature detection and collection: Use feature detection algorithms to scan the entire model, collect geometric features, including edge, surface, and hole geometric features, and record their location, size, and shape attributes;
[0018] S22. Topological structure analysis: Analyze the topological information of the model, identify the basic structural units and connection methods of the model, and distinguish the key elements that constitute the main framework of the model as the core structural features;
[0019] S23, geometric and visual importance assessment: Apply algorithms to evaluate the geometric complexity of each feature and its contribution to the overall visual effect, and preliminarily mark the features that have a decisive influence on the model appearance as core features;
[0020] S24, Function and structure analysis: Analyze the functional requirements and physical structure of the model, determine the features used to realize the model functions, including the load-bearing structure and interface features, and retain these features as core features;
[0021] S25. Integration of user guidance principles: Integrate specific guidance or rules provided by the user, such as retaining the level of detail in a specific area, and use this as a basis for adjusting the classification of features.
[0022] Preferably, in S3, the pre-set lightweight criteria include: target number of polygons, precision threshold, texture compression ratio, detail retention level, visual importance area, and performance target.
[0023] Preferably, in S3, the geometric approximation calculation includes approximating the original shape by reducing the number of polygons using a Douglas-Peucker algorithm;
[0024] Non-essential detail removal involves identifying and removing minor details in the model, such as tiny bumps, depressions, or decorative structures;
[0025] Texture data compression includes reducing the color depth of the image, using compression algorithms or adjusting the image size to reduce the storage space of texture data.
[0026] Preferably, S4 comprises the following steps:
[0027] S41. Analyze the surface of the model, calculate the curvature or complexity of each surface area, and identify high curvature areas (such as edges and sharp corners) and low curvature areas (such as planes and gently curved surfaces);
[0028] S42. Based on the analysis results, different mesh subdivision densities are set for surface areas of different complexity; including assigning high-density meshes to high-curvature areas to maintain shape details, and using low-density meshes to reduce the number of polygons for low-curvature areas;
[0029] S43, applying adaptive mesh subdivision algorithm to dynamically generate and adjust mesh on the model surface;
[0030] S44. Continue to evaluate mesh distribution and polygon count, and adjust subdivision parameters through iteration.
[0031] Preferably, S5 comprises the following steps:
[0032] S51, accurately calculating the geometric error caused by each simplification operation, the simplification operation including vertex deletion and edge merging;
[0033] S52, based on a predetermined strategy, dispersing the geometric error generated in the current step to surrounding unprocessed vertices or faces;
[0034] S53, based on a predetermined strategy, gradually diffusing the accumulated geometric errors to adjacent vertices and polygons;
[0035] S54. Continue to apply the error diffusion algorithm at each iteration of the model simplification process;
[0036] S55. Continuously monitor the shape quality of the simplified model throughout the process.
[0037] After adopting the above technical solution, the beneficial effects of the present invention are:
[0038] In the present invention, the automatic lightweight method of three-dimensional model includes the following steps: receiving and parsing original three-dimensional model data to obtain geometric information and texture information; using an algorithm to analyze the original three-dimensional model, identifying and distinguishing the core structural features and non-core features in the model; performing reduction measures on non-core features according to pre-set lightweight criteria, and the reduction measures include geometric approximation calculation, non-essential detail elimination and texture data compression; using an adaptive mesh subdivision algorithm to dynamically adjust the mesh distribution density according to the morphological complexity of the model surface to reduce the polygon count; embedding an error diffusion algorithm to control shape smoothness and continuity in the model simplification process; conducting a comprehensive inspection of the simplified model, comparing the differences before and after simplification, and ensuring that the accuracy and visual quality of the model meet the established standards; judging based on evaluation feedback, if the expected indicators are not met, backtracking, iteratively adjusting the lightweight parameters until they meet the standards; and exporting the optimized three-dimensional model data. The present invention realizes the effective reduction of model data while maintaining the key features and visual quality of the model, and is suitable for application scenarios that need to reduce the amount of model data while maintaining the basic form and visual effects of the model, such as real-time rendering on mobile devices, network transmission, VR / AR content production, etc. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The present invention is further described below in conjunction with the accompanying drawings and embodiments.
[0040] Figure 1 It is a flow chart of automatic lightweighting of a three-dimensional model according to an embodiment of the present invention. DETAILED DESCRIPTION
[0041] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0042] like Figure 1 As shown, the present invention comprises the following steps:
[0043] S1, receiving and parsing the original 3D model data to obtain geometric information and texture information;
[0044] S2. Use algorithms to analyze the original three-dimensional model to identify and distinguish the core structural features and non-core features in the model;
[0045] S3, according to the preset lightweight criteria, performing reduction measures on non-core features, the reduction measures including geometric approximation calculation, non-essential detail elimination and texture data compression;
[0046] S4, using adaptive mesh subdivision algorithm, dynamically adjust mesh distribution density according to the morphological complexity of the model surface, and reduce polygon count;
[0047] S5, embedding error diffusion algorithm to control shape smoothness and continuity in the model simplification process;
[0048] S6. Conduct a comprehensive inspection of the simplified model, compare the differences before and after simplification, and ensure that the accuracy and visual quality of the model meet the established standards;
[0049] S7: Make judgments based on the evaluation feedback. If the expected indicators are not met, go back to S2 and iteratively adjust the lightweight parameters until they meet the standards.
[0050] S8. Export the optimized three-dimensional model data.
[0051] In this application, in S2, an algorithm (such as a feature extraction algorithm) is used to analyze the model to identify key structural features (such as contour edges, characteristic curves) and non-core features (such as subtle textures, minor shape details) in the model. This step is crucial for subsequent targeted reduction. S2 includes the following steps:
[0052] S21. Feature detection and collection: Use feature detection algorithms to scan the entire model, collect geometric features, including edge, surface, and hole geometric features, and record their location, size, and shape attributes;
[0053] S22. Topological structure analysis: Analyze the topological information of the model, identify the basic structural units and connection methods of the model, and distinguish the key elements that constitute the main framework of the model as the core structural features;
[0054] S23, geometric and visual importance assessment: Apply algorithms to evaluate the geometric complexity of each feature and its contribution to the overall visual effect, and preliminarily mark the features that have a decisive influence on the model appearance as core features;
[0055] S24, Function and structure analysis: Analyze the functional requirements and physical structure of the model, determine the features used to realize the model functions, including the load-bearing structure and interface features, and retain these features as core features;
[0056] S25. Integration of user guidance principles: Integrate specific guidance or rules provided by the user, such as retaining the level of detail in a specific area, and use this as a basis for adjusting the classification of features.
[0057] In this way, the model features can be systematically identified and classified, providing clear objects and directions for subsequent lightweight processing.
[0058] In S3, non-core features are reduced based on pre-set criteria (such as accuracy requirements and target file size). Geometric approximation can be simplified by boundary representation, non-essential detail removal directly removes small structures that do not affect the overall appearance, and texture data compression reduces the size of texture data by reducing image resolution or using more efficient encoding methods.
[0059] Among them, the pre-set lightweighting criteria refer to a series of specific standards and parameters formulated before the automatic lightweighting of the 3D model, based on comprehensive factors such as specific application scenarios, target platform performance limitations, expected rendering speed, target file size, and visual fidelity requirements. These criteria guide the decision-making in the entire lightweighting process to ensure that the model can still meet the needs of the final application while reducing weight. Specifically, the pre-set lightweighting criteria include: 1. Target number of polygons: Set the maximum number of polygons that should be maintained after the model is simplified to adapt to the rendering capabilities of the target hardware; 2. Accuracy threshold: Define the maximum geometric error allowed during the model simplification process to ensure that the deviation in size and shape between the simplified model and the original model is within an acceptable range; 3. Texture compression ratio: Determine the degree of texture image compression to balance texture quality and file size; 4. Detail retention level: Determine which features are considered core structural features (such as fine structures that must be maintained) and non-core features (parts that can be appropriately simplified), as well as their respective processing strategies; 5. Visually important areas: Identify areas in the model that need special protection to ensure that these areas maintain a high level of detail even after lightweighting; 6. Performance target: Set performance indicators such as loading time and rendering frame rate according to application requirements, and adjust the lightweighting strategy accordingly.
[0060] In S3, geometric approximation includes approximating the original shape by reducing the number of polygons using the Douglas-Peucker algorithm; non-essential detail removal includes identifying and removing minor detail elements in the model, including tiny bumps, depressions or decorative structures; texture data compression includes reducing the color depth of the image, using compression algorithms or adjusting the image size to reduce the storage space of texture data.
[0061] In this application, S4 includes the following steps:
[0062] S41. Analyze the surface of the model, calculate the curvature or complexity of each surface area, and identify high curvature areas (such as edges and sharp corners) and low curvature areas (such as planes and gently curved surfaces);
[0063] S42. Based on the analysis results, different mesh subdivision densities are set for surface areas of different complexity; including assigning high-density meshes to high-curvature areas to maintain shape details, and using low-density meshes to reduce the number of polygons for low-curvature areas;
[0064] S43, applying adaptive mesh subdivision algorithm to dynamically generate and adjust mesh on the model surface;
[0065] S44. Continue to evaluate mesh distribution and polygon count, and adjust subdivision parameters through iteration.
[0066] Among them, Adaptive Mesh Refinement (AMR) is a method that dynamically adjusts the density of computational meshes, aiming to improve computational efficiency and accuracy, especially when dealing with physical problems with high irregularity or local complexity. This type of algorithm mainly includes the following aspects: 1. Adaptive subdivision based on error estimation: This algorithm estimates the error of the solution on the current mesh during the calculation process. If the error exceeds the preset threshold, the mesh is subdivided in the corresponding area to improve the local resolution. This method is widely used in fields such as solving partial differential equations; 2. Adaptive subdivision based on feature detection: The algorithm identifies specific features in the model or data, such as sharp boundaries, layer interfaces, high gradient areas, etc., and increases the mesh density near these features. This is widely used in fluid mechanics, meteorological simulation and geological modeling; 3. Multi-resolution adaptive grid: allows grids to exist simultaneously at different scales, and achieves efficient use of computing resources by using fine grids where high precision is required and coarser grids elsewhere; 4. Dynamic load balancing: With the dynamic subdivision and merging of grids, the algorithm also needs to consider how to distribute computing tasks in a parallel computing environment to ensure balanced workload of each processor; 5. Local grid remapping and reconstruction: In some cases, the algorithm will reconfigure the grid structure according to computing requirements or data characteristics, such as locally encrypting or sparsely meshing to better match the characteristics of the problem.
[0067] S5 includes the following steps:
[0068] S51, accurately calculating the geometric error caused by each simplification operation, the simplification operation including vertex deletion and edge merging;
[0069] S52, based on a predetermined strategy, dispersing the geometric error generated in the current step to surrounding unprocessed vertices or faces;
[0070] S53, based on a predetermined strategy, gradually diffusing the accumulated geometric errors to adjacent vertices and polygons;
[0071] S54. Continue to apply the error diffusion algorithm at each iteration of the model simplification process;
[0072] S55. Continuously monitor the shape quality of the simplified model throughout the process.
[0073] In the error diffusion algorithm, the established strategy refers to a series of pre-set rules and methods to effectively control the smoothness and continuity of the shape. These strategies are designed to guide how the error propagates on the surface of the model to achieve the best visual effect. Specifically, the established strategy may include the following points: 1. Neighborhood selection: Determine the diffusion range of each affected vertex or face. This may be a circular or spherical neighborhood with a fixed radius, or a neighborhood based on a certain topological relationship (such as the nearest N neighbors); 2. Weight assignment: Assign a weight to each neighbor vertex, which can be based on distance, adjacency, curvature or other factors. The purpose is to disperse the errors more reasonably and avoid concentrated accumulation in certain areas; 3. Directional diffusion: consider the directionality of error diffusion to ensure that the flow of errors along the model surface follows the natural shape trend, such as diffusing along the surface normal direction to reduce visual unnaturalness; 4. Error limit: set the upper limit of the error accumulation that each vertex or face can accept to prevent specific areas from becoming too smooth or distorted due to excessive diffusion; 5. Multi-level diffusion: use multiple rounds of diffusion process, each round may use different parameters or strategies to gradually refine the model surface while controlling the smooth transition of the overall shape; 6. Adaptive adjustment: dynamically adjust the diffusion parameters according to the local complexity and simplification requirements of the model, such as enhancing the diffusion effect in complex areas and weakening it in simple areas to maintain global visual consistency; 7. Error feedback loop: in multiple iterations, adjust the diffusion strategy according to the model quality feedback after each diffusion (such as surface smoothness evaluation) to ensure continuous optimization of model quality.
[0074] The present invention achieves effective reduction of model data while maintaining the key features and visual quality of the model. It is suitable for application scenarios that need to reduce the amount of model data while maintaining the basic form and visual effects of the model, such as real-time rendering on mobile devices, network transmission, VR / AR content production, etc.
[0075] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A three-dimensional model automatic lightweight method, characterized in that: The steps include: S1, receiving and parsing the original 3D model data to obtain geometric information and texture information; S2. Use algorithms to analyze the original three-dimensional model to identify and distinguish the core structural features and non-core features in the model; S3, according to the preset lightweight criteria, performing reduction measures on non-core features, the reduction measures including geometric approximation calculation, non-essential detail elimination and texture data compression; S4, using adaptive mesh subdivision algorithm, dynamically adjust mesh distribution density according to the morphological complexity of the model surface, and reduce polygon count; S5, embedding error diffusion algorithm to control shape smoothness and continuity in the model simplification process; S6. Conduct a comprehensive inspection of the simplified model, compare the differences before and after simplification, and ensure that the accuracy and visual quality of the model meet the established standards; S7: Make judgments based on the evaluation feedback. If the expected indicators are not met, go back to S2 and iteratively adjust the lightweight parameters until they meet the standards. S8. Export the optimized three-dimensional model data.
2. The automatic lightweighting method for a three-dimensional model according to claim 1, characterized in that: S2 includes the following steps: S21. Feature detection and collection: Use feature detection algorithms to scan the entire model, collect geometric features, including edge, surface, and hole geometric features, and record their position, size, and shape attributes; S22. Topological structure analysis: Analyze the topological information of the model, identify the basic structural units and connection methods of the model, and distinguish the key elements that constitute the main framework of the model as the core structural features; S23, Geometric and visual importance assessment: Apply algorithms to evaluate the geometric complexity of each feature and its contribution to the overall visual effect, and preliminarily mark the features that have a decisive influence on the model appearance as core features; S24, Function and structure analysis: Analyze the functional requirements and physical structure of the model, determine the features used to realize the model functions, including the load-bearing structure and interface features, and retain these features as core features; S25. Integration of user guidance principles: Integrate specific guidance or rules provided by the user, such as retaining the level of detail in a specific area, and use this as a basis for adjusting the classification of features.
3. The automatic lightweighting method for a three-dimensional model according to claim 1, characterized in that: In S3, the pre-set lightweight criteria include: target number of polygons, accuracy threshold, texture compression ratio, detail retention level, visual importance area, and performance target.
4. The automatic lightweight method for three-dimensional models according to claim 3, characterized in that: In S3, geometric approximation calculations include approximating the original shape by reducing the number of polygons using the Douglas-Peucker algorithm; Non-essential detail removal involves identifying and removing minor detail elements in the model, such as tiny bumps, depressions, or decorative structures; Texture data compression includes reducing the color depth of the image, using compression algorithms or adjusting the image size to reduce the storage space of texture data.
5. The automatic lightweight method for three-dimensional models according to claim 1, characterized in that: S4 includes the following steps: S41. Analyze the surface of the model, calculate the curvature or complexity of each surface area, and identify high curvature areas (such as edges and sharp corners) and low curvature areas (such as planes and gently curved surfaces); S42. Based on the analysis results, different mesh subdivision densities are set for surface areas of different complexity; This includes assigning high-density meshes to high-curvature areas to maintain shape details, and using low-density meshes to reduce the number of polygons in low-curvature areas; S43, applying adaptive mesh subdivision algorithm to dynamically generate and adjust mesh on the model surface; S44. Continue to evaluate mesh distribution and polygon count, and adjust subdivision parameters through iteration.
6. The automatic lightweight method for three-dimensional models according to claim 1, characterized in that: S5 includes the following steps: S51, accurately calculating the geometric error caused by each simplification operation, the simplification operation including vertex deletion and edge merging; S52, based on a predetermined strategy, dispersing the geometric error generated in the current step to surrounding unprocessed vertices or faces; S53, based on a predetermined strategy, gradually diffusing the accumulated geometric errors to adjacent vertices and polygons; S54. Continue to apply the error diffusion algorithm at each iteration of the model simplification process; S55. Continuously monitor the shape quality of the simplified model throughout the process.
Citation Information
Cited By
Model quality detection method and system and electronic equipment
CN118967682A
Three-dimensional model format conversion lightweight method, device and equipment
CN120257400A
Lightweight method and system for digital twin model of transformer
CN120953538A
A transformer digital twin model lightweight method and system
CN120953538B
Three-dimensional model lightweight processing method and system in industrial software
CN121788774A
