Three-dimensional model lightweight processing method and device, computer equipment and storage medium
By performing structural feature partitioning and compression, texture downsampling, and animation node merging on the 3D model, a lightweight binary file is generated, solving the problems of large data volume and inconsistent formats in the shipbuilding industry, and achieving efficient data transmission and rendering.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-28
- Publication Date
- 2026-05-01
AI Technical Summary
In the shipbuilding industry, 3D models involve large amounts of data, high bandwidth consumption during transmission, and demanding requirements for terminal rendering. Furthermore, the lack of a unified format standard makes information interconnection and interoperability difficult.
By partitioning and compressing the structural features of the 3D model, downsampling and merging the texture data, and performing node marking and merging on the animation data, a lightweight binary file format is generated.
The system achieves a 60% lightweighting rate for 3D models, reducing data transmission and terminal rendering requirements while improving information interconnectivity.
Smart Images

Figure CN121962547A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of 3D model technology, and in particular to a method, apparatus, computer device, and storage medium for lightweight processing of 3D models. Background Technology
[0002] With the development of information technology, 3D model-based design technology has been widely applied. Shipyards use various 3D design software for design and then carry out 3D manufacturing and assembly based on these designs. The application of 3D design technology has improved shipyards' production design capabilities and provided technical support for 3D design, construction, and operation and maintenance throughout the entire lifecycle. However, the promotion and application of 3D design technology in the shipbuilding industry still faces the following two challenges: On the one hand, the mainstream software used in the shipbuilding industry uses its own unique format, and after years of development, the model representation in the market is seriously fragmented, and no unified format representation standard has been formed, which creates obstacles to the interconnection and interoperability of shipbuilding data.
[0003] On the other hand, due to the complexity of the 3D model itself, the related design documents and process documents are huge in size. In particular, the 3D design delivery model is many times larger than that of a typical ship type. Not only does it consume a lot of bandwidth during transmission, but it also requires a lot of computing resources when rendering on the terminal. The original 3D design delivery model cannot be accurately displayed on terminals with limited resources, such as handheld devices. Summary of the Invention
[0004] Based on this, a method, apparatus, computer equipment, and storage medium for lightweight processing of 3D models are provided to solve the technical problems of poor lightweight processing effect of 3D models, diverse expression methods of 3D models in the manufacturing process, large data volume, frequent transmission, low network load capacity in the workshop, and high terminal performance requirements.
[0005] On the one hand, a method for lightweight processing of three-dimensional models is provided, the method comprising: The structural features of the 3D model are analyzed, and the structural features of the 3D model are divided into high-precision feature areas, medium-precision feature areas and low-precision feature areas. The structural features of the high-precision feature areas, the medium-precision feature areas and the low-precision feature areas are compressed to obtain simplified geometric data. The process feature texture of the three-dimensional model is obtained, and the process feature texture is compressed to obtain simplified texture data; Obtain node data from the simulation animation of the 3D model, mark the node data as empty nodes, zero-transformation nodes, and duplicate named nodes, delete the node data marked as empty nodes and zero-transformation nodes, and merge the node data marked as duplicate named nodes to obtain simplified animation data. The simplified geometry data, simplified texture data, and simplified animation data are packaged into a single binary file.
[0006] In one embodiment, the structural feature analysis of the 3D model divides the structural features of the 3D model into high-precision feature regions, medium-precision feature regions, and low-precision feature regions. The simplified geometric data is obtained by compressing the structural features of the high-precision feature regions, the medium-precision feature regions, and the low-precision feature regions, respectively. The structural features of the 3D model are analyzed, and the structural features of the 3D model are divided into high-precision feature areas, medium-precision feature areas and low-precision feature areas according to the structural complexity. The compressed data precision is set for the high-precision feature area, the medium-precision feature area, and the low-precision feature area respectively. The compressed data precision of the high-precision feature area is greater than that of the medium-precision feature area, and the compressed data precision of the medium-precision feature area is greater than that of the low-precision feature area. Based on the accuracy of the compressed data, the structural features of the high-precision feature region, the medium-precision feature region, and the low-precision feature region are compressed to obtain simplified geometric data.
[0007] In one embodiment, obtaining the process feature texture of the three-dimensional model and performing texture compression on the process feature texture to obtain simplified texture data includes: Obtain a geometric structure with process-specific textures, obtain the material of the geometric structure, and set the texture compression ratio based on the material; Based on the texture compression ratio, the process feature textures on the geometric structure are compressed to obtain simplified texture data.
[0008] In one embodiment, the step of obtaining the process feature texture of the three-dimensional model and performing texture compression on the process feature texture to obtain simplified texture data further includes: The 3D model is segmented according to the viewing angle from far to near using a pyramid downsampling strategy, and the reduced resolution of each segment is set. The resolution of each segment of the 3D model is compressed according to the reduced resolution.
[0009] In one embodiment, acquiring node data from the simulation animation of the 3D model and marking the node data as empty nodes, zero-transformation nodes, and duplicate named nodes includes: Identify the node data in the simulation animation of the 3D model, mark node data with no associated geometric data / material / animation data as empty nodes, mark node data that is an identity matrix and has no animation as zero transformation nodes, and mark duplicate node data with similar names and the same attributes as duplicate named nodes.
[0010] In one embodiment, the process of merging node data marked as duplicate named nodes includes: Merge adjacent nodes with the same material and similar transformations into a single mesh; Convert stationary device components into static batch node data, and set rendering call conditions for the static batch node data to reduce the number of rendering calls; Identify the identical geometric objects that appear repeatedly in the 3D model, generate instantiated applications for the identical geometric objects, retain only one copy of the original geometric data of the identical geometric objects, and set all identical geometric objects to reference the original geometric data.
[0011] In one embodiment, identifying the recurring identical geometries in the 3D model includes: Extract geometric components from the 3D model, traverse the 3D model to identify geometric components with consistent functions as initial repeating geometric parts, and generate geometric hash values for the initial repeating geometric parts; Calculate the matching degree of geometric hash values between any two of the initial repeating geometric elements in sequence; Two initial duplicate geometries with a matching degree greater than or equal to the first threshold are marked as duplicate geometries. A hash retrieval library is established to record the position and reference relationship of the duplicate geometries. In response to the existence of a new duplicate geometries, the new duplicate geometries are added to the hash retrieval library. The two initial repeating geometries with a matching degree less than the first threshold are quantized and encoded to form mesh vertices / faces, and then geometrically compressed.
[0012] On the other hand, a lightweight processing device for three-dimensional models is provided, the device comprising: The geometric data compression module is used to analyze the structural features of the three-dimensional model, divide the structural features of the three-dimensional model into high-precision feature areas, medium-precision feature areas and low-precision feature areas, and compress the structural features of the high-precision feature areas, the medium-precision feature areas and the low-precision feature areas respectively to obtain simplified geometric data; The texture data compression module is used to acquire the process feature texture of the three-dimensional model and perform texture compression on the process feature texture to obtain simplified texture data. An animation data compression module is used to acquire node data in the simulation animation of the 3D model, mark the node data as empty nodes, zero-transformation nodes and duplicate named nodes, delete the node data marked as empty nodes and zero-transformation nodes, and merge the node data marked as duplicate named nodes to obtain simplified animation data. The data encapsulation and processing module is used to package simplified geometric data, simplified texture data, and simplified animation data into a single binary file.
[0013] In another aspect, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of a three-dimensional model lightweighting processing method.
[0014] In another aspect, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the steps of a method for lightweighting a 3D model.
[0015] The aforementioned 3D model lightweighting processing method, device, computer equipment, and storage medium reduce the volume of geometric data by compressing the structural features of the 3D model, compress the texture of the process features, mark the node data in the simulation animation as empty nodes, zero-transformation nodes, and duplicate named nodes, clean up redundant nodes to simplify the animation data, and convert the data format to the binary file format of the lightweight model, thereby achieving a 60% lightweighting rate for the 3D model. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 This is a flowchart illustrating a method for lightweighting a 3D model in one embodiment of this application. Figure 2 This is a logic diagram of a three-dimensional model lightweighting method in one embodiment of this application; Figure 3 This is a logic diagram of node data classification processing of a 3D model in one embodiment of this application; Figure 4 This is a flowchart illustrating the step of identifying the recurring identical geometric shapes in the three-dimensional model in one embodiment of this application; Figure 5 This is a structural block diagram of a three-dimensional model lightweighting processing device in one embodiment of this application; Figure 6 This is an internal structural diagram of a computer device in one embodiment of this application. Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0019] In one embodiment, such as Figure 1 , Figure 2 As shown, a lightweight processing method for 3D models is provided, including the following steps: Step S1: Analyze the structural features of the 3D model, divide the structural features of the 3D model into high-precision feature areas, medium-precision feature areas and low-precision feature areas, and compress the structural features of the high-precision feature areas, the medium-precision feature areas and the low-precision feature areas respectively to obtain simplified geometric data; Step S2: Obtain the process feature texture of the three-dimensional model, and perform texture compression on the process feature texture to obtain simplified texture data; Step S3: Obtain node data from the simulation animation of the 3D model, mark the node data as empty nodes, zero-transformation nodes and duplicate named nodes, delete the node data marked as empty nodes and zero-transformation nodes, and merge the node data marked as duplicate named nodes to obtain simplified animation data. Step S4: Package the simplified geometric data, simplified texture data, and simplified animation data into a single binary file.
[0020] Specifically, the volume of geometric data is reduced by compressing the structural features of the 3D model, the texture of the process features is compressed, the node data in the simulation animation is marked as empty nodes, zero-transformation nodes and duplicate named nodes, redundant nodes are cleaned up to simplify the animation data, and the data format is converted into the binary file format of the lightweight model, so that the lightweight rate of the 3D model reaches 60%.
[0021] In this embodiment, the structural feature analysis of the 3D model divides the structural features of the 3D model into high-precision feature regions, medium-precision feature regions, and low-precision feature regions. The simplified geometric data is obtained by compressing the structural features of the high-precision feature regions, the medium-precision feature regions, and the low-precision feature regions, respectively. The structural features of the 3D model are analyzed, and the structural features of the 3D model are divided into high-precision feature areas, medium-precision feature areas and low-precision feature areas according to the structural complexity. The compressed data precision is set for the high-precision feature area, the medium-precision feature area, and the low-precision feature area respectively. The compressed data precision of the high-precision feature area is greater than that of the medium-precision feature area, and the compressed data precision of the medium-precision feature area is greater than that of the low-precision feature area. Based on the accuracy of the compressed data, the structural features of the high-precision feature region, the medium-precision feature region, and the low-precision feature region are compressed to obtain simplified geometric data.
[0022] The key process features of thin plate construction are identified through mesh analysis algorithms. Based on the model type, the structure is decomposed into three categories: high-precision feature area, medium-precision feature area, and low-precision feature area. High-precision feature area includes weld seams and assembly holes (which must be completely preserved). Medium-precision feature area includes bending surfaces and reinforcing ribs (allowing an error of 0.2mm). Low-precision feature area includes flat plates and supports (allowing an error of 0.5mm). The data accuracy is preserved according to the different feature areas, and then the data is compressed to reduce the amount of model data.
[0023] In this embodiment, obtaining the process feature texture of the 3D model and performing texture compression on the process feature texture to obtain simplified texture data includes: Obtain a geometric structure with process-specific textures, obtain the material of the geometric structure, and set the texture compression ratio based on the material; Based on the texture compression ratio, the process feature textures on the geometric structure are compressed to obtain simplified texture data.
[0024] Among these measures, high-fidelity compression is applied to process feature textures, while equipment labels and representations retain their clarity. A large number of common material textures, such as metal substrates and plastic substrates, are compressed at a high compression ratio to reduce texture volume. Different compression ratios are applied to textures of different materials, and a large number of models are uniformly compressed to reduce texture volume.
[0025] In this embodiment, the step of obtaining the process feature texture of the three-dimensional model and performing texture compression on the process feature texture to obtain simplified texture data further includes: The 3D model is segmented according to the viewing angle from far to near using a pyramid downsampling strategy, and the reduced resolution of each segment is set. The resolution of each segment of the 3D model is compressed according to the reduced resolution.
[0026] Among them, the pyramid downsampling strategy reduces the resolution of the model in segments according to the viewing distance, thereby reducing the loading time of the model and the volume of 3D model data.
[0027] Specifically, using a pyramid downsampling strategy, the model resolution is reduced piecewise based on the viewing distance as follows: Level 0: Original resolution (4K); Levels 1-5: Gradually reduce resolution (2K → 1080p → 720p); Level 6+: Uses the Lanczos3 interpolation algorithm to maintain edge sharpness, reduce the loading time of 3D models, and reduce the data size of 3D models.
[0028] The step of segmenting the 3D model according to the viewing angle from far to near and setting the reduced resolution of each segment includes: Based on the distance range from far to near from the stated viewpoint, the texture resolution of each segment is set in an exponential or logarithmic manner, such that the texture resolution of the far-distance segment is lower than that of the near-distance segment.
[0029] like Figure 3 As shown, in this embodiment, obtaining node data from the simulation animation of the 3D model and marking the node data as empty nodes, zero-transformation nodes, and duplicate named nodes includes: Identify the node data in the simulation animation of the 3D model, mark node data with no associated geometric data / material / animation data as empty nodes, mark node data that is an identity matrix and has no animation as zero transformation nodes, and mark duplicate node data with similar names and the same attributes as duplicate named nodes.
[0030] Among these measures, the simulation animation is rendered and optimized by distinguishing and simplifying node data, ultimately reducing the number of nodes and rendering calls, thereby reducing the size of the model.
[0031] The step of marking node data with no associated geometry / material / animation data as empty nodes includes: identifying nodes that do not contain any mesh, material references, or animation trajectories; The step of marking node data that is an identity matrix and has no animation as a zero-transformation node includes: identifying nodes whose local transformation matrix is an identity matrix and is not driven by any animation curve; The step of marking duplicate node data with similar names and the same attributes as duplicate named nodes includes: identifying nodes whose name strings have a similarity higher than a preset threshold and whose geometric attributes, material attributes and / or animation attributes are completely identical.
[0032] like Figure 3 As shown, in this embodiment, the process of merging node data marked as duplicate named nodes includes: Merge adjacent nodes with the same material and similar transformations into a single mesh; Convert stationary device components into static batch node data, and set rendering call conditions for the static batch node data to reduce the number of rendering calls; Identify the identical geometric objects that appear repeatedly in the 3D model, generate instantiated applications for the identical geometric objects, retain only one copy of the original geometric data of the identical geometric objects, and set all identical geometric objects to reference the original geometric data.
[0033] The step of converting stationary device components into static batch node data includes: identifying device components whose local or global transformations remain unchanged throughout the entire animation cycle in the simulation animation; The setting of rendering call conditions for the static batch node data includes: setting conditions such as frustum culling, occlusion culling, and / or distance LOD to reduce unnecessary rendering calls; The setting that all repeated geometries reference the original geometry data includes storing the transformation matrix and material reference of each repeated geometry relative to the original geometry, without storing its independent geometric vertex data.
[0034] The system employs several optimization techniques: invalid node removal, batch deletion of all nodes marked as redundant, and automatic repair of affected parent-child hierarchical relationships; node merging optimization, including merging adjacent nodes with the same material and similar transformations into a single mesh; static batching, converting permanently static device components into static batches to reduce rendering calls; and instantiation processing, identifying identical geometries appearing more than five times (such as conveyor belt rollers and standard fasteners), converting these duplicate geometries into instantiated references, and retaining only one copy of the original geometric data. Ultimately, this reduces the number of nodes and rendering calls, thereby reducing the model's size.
[0035] like Figure 4 As shown, in this embodiment, identifying the recurring identical geometric shapes in the 3D model includes: Extract geometric components from the 3D model, traverse the 3D model to identify geometric components with consistent functions as initial repeating geometric parts, and generate geometric hash values for the initial repeating geometric parts; Calculate the matching degree of geometric hash values between any two of the initial repeating geometric elements in sequence; Two initial duplicate geometries with a matching degree greater than or equal to the first threshold are marked as duplicate geometries. A hash retrieval library is established to record the position and reference relationship of the duplicate geometries. In response to the existence of a new duplicate geometries, the new duplicate geometries are added to the hash retrieval library. The two initial repeating geometries with a matching degree less than the first threshold are quantized and encoded to form mesh vertices / faces, and then geometrically compressed.
[0036] The first threshold is preferably 98%. For repetitive geometric models, such as conveyor belt units and roller conveyor equipment, a hash library is constructed, and models with a matching degree of 98% or higher are indexed repeatedly.
[0037] An improved Draco algorithm is used to quantize and encode mesh vertices / faces, and geometric compression is performed to reduce vertex data accuracy. A vertex reuse index table is established for repetitive truss structures in thin-plate components of ships.
[0038] The process of traversing the 3D model to identify functionally consistent geometric components as initial repeating geometry includes: preliminary screening based on the bounding box size, number of vertices, number of faces, topology, and / or geometric feature descriptors of the geometric components. The step of generating a geometric hash value for the initial repeating geometry includes: performing hash calculations on the simplified mesh, key feature point coordinates, and / or geometric feature descriptors of the geometric component; The calculation of the matching degree of geometric hash values between any two of the initial repeating geometries includes: comparing the geometric hash values or their feature vectors using Euclidean distance, cosine similarity, and / or structural similarity index.
[0039] The step of quantizing and encoding mesh vertices / faces and performing geometric compression includes: The mesh vertices / faces are compressed using algorithms such as Vertex Quantization, Octtree encoding, Deltamation encoding, Draco compression, and / or V-Mesh compression.
[0040] The simplified model has been formatted and the geometric data, textures, and animation data have been encapsulated into GLB format. Resources have been merged to optimize the size of the model and enable it to be displayed on lightweight platforms.
[0041] Resources are standardized: textures are uniformly converted to standard formats (PNG / JPG), materials and nodes are renamed, special characters (such as spaces and Chinese characters) are eliminated, and animation data is separated from static models (e.g., mechanical motion animations are stored separately). Resource merging and optimization package models, textures, and animations into a single binary file, avoiding the multi-file management issues of traditional formats. This reduces the size of the model and allows it to be displayed on lightweight platforms. Ultimately, the overall model data is reduced by 60%.
[0042] like Figure 2As shown, the lightweight 3D model processing method described herein is applicable to 3D models of equipment in shipbuilding thin-plate workshops. It solves the problems of diverse 3D model representation methods, large data volume, frequent data transmission, low workshop network load capacity, and high terminal performance requirements during the manufacturing process. It achieves a lightweighting rate of 60% for shipbuilding thin-plate workshop equipment models, thereby improving the efficiency of shipbuilding production operations.
[0043] Example 1: First, the 3D model data of the ship welding robot was obtained from the workshop equipment. The model is a SolidWorks format welding robot model (original file 1.5GB), including components such as the robotic arm, welding torch, and temperature sensor. The model was decomposed into three types of structures using analytical tools.
[0044] Develop a tiered strategy for key process characteristics of welding equipment: The welding torch tip, welding path, and sensor area (high-precision area, 16-bit quantization) are simplified to retain accuracy when temperature, position, and size data are disabled.
[0045] The robotic arm linkage (medium precision range, 14-bit quantization, error 0.15mm) uses material compression to simplify the non-load-bearing surface.
[0046] The workstation fence (low-precision area, 12-bit quantization, error 0.8mm) was simplified to 30% of the original number of faces using vertex clustering. Simultaneously, 48 duplicate protective net supports were instantiated.
[0047] Texture: Oxidation layer map (8K→2K KTX2).
[0048] Node optimization: Remove redundant rotation keyframes from the wire coiling animation and clear 137 empty nodes left over from debugging.
[0049] The final compressed model format was converted and packaged into an improved GLB format. The final model size was reduced from 1.5GB to 520MB (65% weight reduction), and the number of rendering calls was reduced from 315 times / frame to 119 times / frame (62% weight reduction).
[0050] Example 2: First, the 3D model data of the laser cutting machine was obtained from the thin plate workshop. The model was a SolidWorks format crane model (original file 2.2GB), including a precision guide rail system, cutting head assembly, and feeding mechanism. The model was decomposed into three types of structures using analytical tools.
[0051] Develop a tiered strategy for key process characteristics of laser cutting equipment: Identify the cutting seam (high-precision area, error <0.1mm), retain the original data grid (simplification rate ≤5%), and the positioning error ≤0.2mm.
[0052] Guide rail rack (medium precision range, error <0.2mm), retains motion trajectory data, simplifies non-structured surfaces by 20%.
[0053] For the machine frame (low-precision area, error <0.5mm), retain structural component dimensional data and simplify geometric data accuracy. Establish hash indexes for 12 sets of repeating feed rollers to reuse geometric data.
[0054] For animation rendering, the rendering batches for the same structural components (such as trusses) are reduced by 90%, and the metal base texture of the fuselage is merged into a 2K atlas to generate a 10-level Mipmap chain.
[0055] The final compressed model format was converted and packaged into an improved GLB format. The final model size was reduced from 2.2GB to 785MB (64.3% lightweighting), and the number of vertices decreased from 2.1M to 0.76M (64% strong quantization).
[0056] In the above-mentioned lightweight processing method for 3D models, the volume of geometric data is reduced by compressing the structural features of the 3D model, the texture of the process features is compressed, the node data in the simulation animation is marked as empty nodes, zero-transformation nodes and duplicate named nodes, redundant nodes are cleaned up to simplify the animation data, and the data format is converted into the binary file format of the lightweight model, so as to achieve a lightweight rate of 60% for the 3D model.
[0057] In one embodiment, such as Figure 5 As shown, a lightweight 3D model processing device 10 is provided, including: a geometric data compression module 1, a texture data compression module 2, an animation data compression module 3, and a data encapsulation processing module 4.
[0058] The geometric data compression module 1 is used to analyze the structural features of the three-dimensional model, divide the structural features of the three-dimensional model into high-precision feature areas, medium-precision feature areas and low-precision feature areas, and compress the structural features of the high-precision feature areas, the medium-precision feature areas and the low-precision feature areas respectively to obtain simplified geometric data.
[0059] The texture data compression module 2 is used to obtain the process feature texture of the three-dimensional model and perform texture compression on the process feature texture to obtain simplified texture data.
[0060] The animation data compression module 3 is used to acquire node data in the simulation animation of the three-dimensional model, mark the node data as empty nodes, zero-transformation nodes and duplicate named nodes, delete the node data marked as empty nodes and zero-transformation nodes, and merge the node data marked as duplicate named nodes to obtain simplified animation data.
[0061] The data encapsulation and processing module 4 is used to package the simplified geometric data, simplified texture data, and simplified animation data into a single binary file.
[0062] In this embodiment, the structural feature analysis of the 3D model divides the structural features of the 3D model into high-precision feature regions, medium-precision feature regions, and low-precision feature regions. The simplified geometric data is obtained by compressing the structural features of the high-precision feature regions, the medium-precision feature regions, and the low-precision feature regions, respectively. The structural features of the 3D model are analyzed, and the structural features of the 3D model are divided into high-precision feature areas, medium-precision feature areas and low-precision feature areas according to the structural complexity. The compressed data precision is set for the high-precision feature area, the medium-precision feature area, and the low-precision feature area respectively. The compressed data precision of the high-precision feature area is greater than that of the medium-precision feature area, and the compressed data precision of the medium-precision feature area is greater than that of the low-precision feature area. Based on the accuracy of the compressed data, the structural features of the high-precision feature region, the medium-precision feature region, and the low-precision feature region are compressed to obtain simplified geometric data.
[0063] In this embodiment, obtaining the process feature texture of the 3D model and performing texture compression on the process feature texture to obtain simplified texture data includes: Obtain a geometric structure with process-specific textures, obtain the material of the geometric structure, and set the texture compression ratio based on the material; Based on the texture compression ratio, the process feature textures on the geometric structure are compressed to obtain simplified texture data.
[0064] In this embodiment, the step of obtaining the process feature texture of the three-dimensional model and performing texture compression on the process feature texture to obtain simplified texture data further includes: The 3D model is segmented according to the viewing angle from far to near using a pyramid downsampling strategy, and the reduced resolution of each segment is set. The resolution of each segment of the 3D model is compressed according to the reduced resolution.
[0065] In this embodiment, obtaining node data from the simulation animation of the 3D model and marking the node data as empty nodes, zero-transformation nodes, and duplicate named nodes includes: Identify the node data in the simulation animation of the 3D model, mark node data with no associated geometric data / material / animation data as empty nodes, mark node data that is an identity matrix and has no animation as zero transformation nodes, and mark duplicate node data with similar names and the same attributes as duplicate named nodes.
[0066] In this embodiment, the process of merging node data marked as duplicate named nodes includes: Merge adjacent nodes with the same material and similar transformations into a single mesh; Convert stationary device components into static batch node data, and set rendering call conditions for the static batch node data to reduce the number of rendering calls; Identify the identical geometric objects that appear repeatedly in the 3D model, generate instantiated applications for the identical geometric objects, retain only one copy of the original geometric data of the identical geometric objects, and set all identical geometric objects to reference the original geometric data.
[0067] In this embodiment, identifying the recurring identical geometries in the 3D model includes: Extract geometric components from the 3D model, traverse the 3D model to identify geometric components with consistent functions as initial repeating geometric parts, and generate geometric hash values for the initial repeating geometric parts; Calculate the matching degree of geometric hash values between any two of the initial repeating geometric elements in sequence; Two initial duplicate geometries with a matching degree greater than or equal to the first threshold are marked as duplicate geometries. A hash retrieval library is established to record the position and reference relationship of the duplicate geometries. In response to the existence of a new duplicate geometries, the new duplicate geometries are added to the hash retrieval library. The two initial repeating geometries with a matching degree less than the first threshold are quantized and encoded to form mesh vertices / faces, and then geometrically compressed.
[0068] In the aforementioned lightweight 3D model processing device, the volume of geometric data is reduced by compressing the structural features of the 3D model, the texture of the process features is compressed, the node data in the simulation animation is marked as empty nodes, zero-transformation nodes and duplicate named nodes, redundant nodes are cleaned up to simplify the animation data, and the data format is converted into the binary file format of the lightweight model, so as to achieve a lightweight rate of 60% for the 3D model.
[0069] Specific limitations regarding the lightweight 3D model processing device can be found in the limitations of the 3D model lightweight processing method described above, and will not be repeated here. Each module in the aforementioned lightweight 3D model processing device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the corresponding operations of each module.
[0070] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 6 As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and the database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores lightweight 3D model processing data. The network interface communicates with external terminals via a network connection. When the computer program is executed by the processor, it implements a lightweight 3D model processing method.
[0071] Those skilled in the art will understand that Figure 6 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0072] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps: The structural features of the 3D model are analyzed, and the structural features of the 3D model are divided into high-precision feature areas, medium-precision feature areas and low-precision feature areas. The structural features of the high-precision feature areas, the medium-precision feature areas and the low-precision feature areas are compressed to obtain simplified geometric data. The process feature texture of the three-dimensional model is obtained, and the process feature texture is compressed to obtain simplified texture data; Obtain node data from the simulation animation of the 3D model, mark the node data as empty nodes, zero-transformation nodes, and duplicate named nodes, delete the node data marked as empty nodes and zero-transformation nodes, and merge the node data marked as duplicate named nodes to obtain simplified animation data. The simplified geometry data, simplified texture data, and simplified animation data are packaged into a single binary file.
[0073] For specific limitations on the steps a processor takes when executing a computer program, please refer to the limitations on the method for lightweight processing of 3D models mentioned above, which will not be repeated here.
[0074] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor: The structural features of the 3D model are analyzed, and the structural features of the 3D model are divided into high-precision feature areas, medium-precision feature areas and low-precision feature areas. The structural features of the high-precision feature areas, the medium-precision feature areas and the low-precision feature areas are compressed to obtain simplified geometric data. The process feature texture of the three-dimensional model is obtained, and the process feature texture is compressed to obtain simplified texture data; Obtain node data from the simulation animation of the 3D model, mark the node data as empty nodes, zero-transformation nodes, and duplicate named nodes, delete the node data marked as empty nodes and zero-transformation nodes, and merge the node data marked as duplicate named nodes to obtain simplified animation data. The simplified geometry data, simplified texture data, and simplified animation data are packaged into a single binary file.
[0075] For specific limitations on the steps implemented when a computer program is executed by a processor, please refer to the limitations on the methods for lightweight processing of 3D models mentioned above, which will not be repeated here.
[0076] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0077] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0078] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for lightweighting three-dimensional models, characterized in that, include: The structural features of the 3D model are analyzed, and the structural features of the 3D model are divided into high-precision feature areas, medium-precision feature areas and low-precision feature areas. The structural features of the high-precision feature areas, the medium-precision feature areas and the low-precision feature areas are compressed to obtain simplified geometric data. The process feature texture of the three-dimensional model is obtained, and the process feature texture is compressed to obtain simplified texture data; Obtain node data from the simulation animation of the 3D model, mark the node data as empty nodes, zero-transformation nodes, and duplicate named nodes, delete the node data marked as empty nodes and zero-transformation nodes, and merge the node data marked as duplicate named nodes to obtain simplified animation data. The simplified geometry data, simplified texture data, and simplified animation data are packaged into a single binary file.
2. The lightweight processing method for three-dimensional models according to claim 1, characterized in that, The structural feature analysis of the 3D model divides the structural features of the 3D model into high-precision feature areas, medium-precision feature areas, and low-precision feature areas. The simplified geometric data obtained by compressing the structural features of the high-precision feature areas, medium-precision feature areas, and low-precision feature areas respectively includes: The structural features of the 3D model are analyzed, and the structural features of the 3D model are divided into high-precision feature areas, medium-precision feature areas and low-precision feature areas according to the structural complexity. The compressed data precision is set for the high-precision feature area, the medium-precision feature area, and the low-precision feature area respectively. The compressed data precision of the high-precision feature area is greater than that of the medium-precision feature area, and the compressed data precision of the medium-precision feature area is greater than that of the low-precision feature area. Based on the accuracy of the compressed data, the structural features of the high-precision feature region, the medium-precision feature region, and the low-precision feature region are compressed to obtain simplified geometric data.
3. The method for lightweighting three-dimensional models according to claim 1, characterized in that, The step of obtaining the process feature texture of the 3D model and performing texture compression on the process feature texture to obtain simplified texture data includes: Obtain a geometric structure with process-specific textures, obtain the material of the geometric structure, and set the texture compression ratio based on the material; Based on the texture compression ratio, the process feature textures on the geometric structure are compressed to obtain simplified texture data.
4. The method for lightweighting three-dimensional models according to claim 1, characterized in that, The step of obtaining the process feature texture of the three-dimensional model and performing texture compression on the process feature texture to obtain simplified texture data further includes: The 3D model is segmented according to the viewing angle from far to near using a pyramid downsampling strategy, and the reduced resolution of each segment is set. The resolution of each segment of the 3D model is compressed according to the reduced resolution.
5. The method for lightweighting three-dimensional models according to claim 1, characterized in that, The step of acquiring node data from the simulation animation of the 3D model and marking the node data as empty nodes, zero-transformation nodes, and duplicate-named nodes includes: Identify the node data in the simulation animation of the 3D model, mark node data with no associated geometric data / material / animation data as empty nodes, mark node data that is an identity matrix and has no animation as zero transformation nodes, and mark duplicate node data with similar names and the same attributes as duplicate named nodes.
6. The method for lightweighting three-dimensional models according to claim 5, characterized in that, The process of merging node data marked as duplicate named nodes includes: Merge adjacent nodes with the same material and similar transformations into a single mesh; Convert stationary device components into static batch node data, and set rendering call conditions for the static batch node data to reduce the number of rendering calls; Identify the identical geometric objects that appear repeatedly in the 3D model, generate instantiated applications for the identical geometric objects, retain only one copy of the original geometric data of the identical geometric objects, and set all identical geometric objects to reference the original geometric data.
7. The lightweight processing method for three-dimensional models according to claim 6, characterized in that, The identification of the identical geometric shapes that appear repeatedly in the 3D model includes: Extract geometric components from the 3D model, traverse the 3D model to identify geometric components with consistent functions as initial repeating geometric parts, and generate geometric hash values for the initial repeating geometric parts; Calculate the matching degree of geometric hash values between any two of the initial repeating geometric elements in sequence; Two initial duplicate geometries with a matching degree greater than or equal to the first threshold are marked as duplicate geometries. A hash retrieval library is established to record the position and reference relationship of the duplicate geometries. In response to the existence of a new duplicate geometries, the new duplicate geometries are added to the hash retrieval library. The two initial repeating geometries with a matching degree less than the first threshold are quantized and encoded to form mesh vertices / faces, and then geometrically compressed.
8. A lightweight processing device for three-dimensional models, characterized in that, The device includes: The geometric data compression module is used to analyze the structural features of the three-dimensional model, divide the structural features of the three-dimensional model into high-precision feature areas, medium-precision feature areas and low-precision feature areas, and compress the structural features of the high-precision feature areas, the medium-precision feature areas and the low-precision feature areas respectively to obtain simplified geometric data; The texture data compression module is used to acquire the process feature texture of the three-dimensional model and perform texture compression on the process feature texture to obtain simplified texture data. An animation data compression module is used to acquire node data in the simulation animation of the 3D model, mark the node data as empty nodes, zero-transformation nodes and duplicate named nodes, delete the node data marked as empty nodes and zero-transformation nodes, and merge the node data marked as duplicate named nodes to obtain simplified animation data. The data encapsulation and processing module is used to package simplified geometric data, simplified texture data, and simplified animation data into a single binary file.
9. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.