Grid-based three-dimensional model recombination and post-processing method

Through a grid-based three-dimensional model reorganization and post-processing method, the problems of low efficiency and low post-processing efficiency in the prior art are solved, and high-precision, high-efficiency and lightweight three-dimensional data processing are realized. In a large-scale three-dimensional data reorganization task.

CN119478289APending Publication Date: 2025-02-18福州市勘测院有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411459535.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-18
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

The existing three-dimensional model reorganization method is inefficient and is prone to misjudgment and rework. Especially when large-scale reorganization and processing sites are located on the grid boundary line, it is difficult to achieve accurate grid division, and the manual post-processing efficiency is also relatively high. Low.

Method used

A three-dimensional model reorganization and post-processing method based on grid is proposed. By reading the fbx model file, converting the coordinate system, reorganizing the grid, processing materials and maps, removing highlight phenomena, compressing the map specifications and generating 3dtiles format files, it can achieve efficient results. three-dimensional data reorganization and conversion.

Benefits of technology

It realizes high-precision, high efficiency and lightweight three-dimensional data reorganization and conversion, which has higher accuracy and processing efficiency than manual processing, is suitable for large-scale three-dimensional data reorganization tasks, and reduces the use of hardware resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119478289A_ABST
    Figure CN119478289A_ABST
Patent Text Reader

Abstract

The invention discloses a grid-based three-dimensional model recombination and post-processing method, which ingeniously realizes high-precision, high-efficiency and light-weight three-dimensional data recombination and conversion by preprocessing, merging, segmenting, post-processing and other operations on a three-dimensional model, and compared with the current common method for manually processing the three-dimensional model, the grid-based three-dimensional model recombination and post-processing method provided by the invention has the advantages that the efficiency is greatly improved; according to the scheme, higher accuracy and processing efficiency are achieved, meanwhile, manual operation is reduced, and the method is more suitable for a large-range three-dimensional data recombination task.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of three-dimensional data processing, and in particular to a grid-based three-dimensional model reconstruction and post-processing method. Background Art

[0002] For the reconstruction process of 3D models, the main method at present is still to use 3D model processing software to manually divide the 3D model. This intuitive processing method is suitable for the re-division of a small number of 3D model scenes, but not suitable for large-scale 3D model reconstruction. In actual production, misjudgment and rework will occur. In addition, manual methods are difficult to accurately divide the 3D model according to the new grid when processing sites and other 3D models located on the grid boundary line that need to be divided into multiple division grids.

[0003] In terms of post-processing, the common method of post-processing 3D models is to manually traverse all models and materials in the file scene and modify them one by one according to the production and subsequent storage and display requirements. Since a large number of 3D models is prone to a large number of repetitive processes, it is inefficient to modify them one by one manually. Therefore, how to optimize the reconstruction strategy of 3D models so that they can be processed in batches while ensuring their reconstruction quality and reducing the occupation of hardware resources is a very positive and practical research topic. Summary of the invention

[0004] In view of this, an object of the present invention is to provide a grid-based 3D model reconstruction and post-processing method with high processing accuracy, good efficiency and light weight.

[0005] In order to achieve the above technical objectives, the technical solution adopted by the present invention is:

[0006] A grid-based three-dimensional model reconstruction and post-processing method, comprising:

[0007] S01, reading an fbx model file, and preprocessing the three-dimensional model in the read fbx model file according to preset conditions;

[0008] S02, determining the parameters of the coordinates of the three-dimensional model in the fbx model file to be converted to the CGCS2000 coordinate system that is the same as the zoning grid, and then uniformly converting the coordinates of the three-dimensional model to the CGCS2000 coordinate system so that the three-dimensional model can be cut by the new zoning grid;

[0009] S03, reorganizing the three-dimensional model according to the preset zoning grid, generating an fbx model file divided according to the zoning grid and adaptively cut, and setting the fbx model file as the reorganized fbx model file;

[0010] S04, reading the 3D model in the reorganized fbx model file, and sequentially performing parent-child unpacking, removing empty objects, and renaming operations on the model;

[0011] S05, obtaining material information of the three-dimensional model, determining whether the corresponding texture can be converted into a transparent texture, and adaptively modifying the texture according to the determination result;

[0012] S06, removing the model highlight phenomenon generated by the three-dimensional model;

[0013] S07. Use a unique material to represent multiple sub-materials with the same diffuse map in a 3D model;

[0014] S08, compressing the texture size of the three-dimensional model to less than or equal to 1024*1024;

[0015] S09. The 3D model is translated to the CGCS2000 coordinate system, and then 3D sliced ​​to generate a 3D model file in 3dtiles tile format.

[0016] As a possible implementation, further, in the present solution S01, the fbx model file is read by a software program, and then all material information in the fbx model file is traversed to locate the material without a diffuse reflection map, and a diffuse reflection map is added to it.

[0017] As a preferred implementation method, preferably, in this solution S01, the fbx model file is read by the 3ds Max software program; wherein the diffuse reflection map path corresponding to the material without diffuse reflection map is empty, and the diffuse reflection map path is specified as a pre-set general map path to add the diffuse reflection map, thereby clearing the material without diffuse reflection map in the fbx model file.

[0018] As a preferred implementation method, preferably, this solution S02 includes:

[0019] Determine the parameters for transforming the 3D model in the fbx model file from the original urban construction coordinates to the CGCS2000 coordinate system that is the same as the new zoning grid;

[0020] The method for cutting the three-dimensional model under the new division grid coordinates includes: subtracting a value from the x and y coordinates of the three-dimensional model in the fbx model file as a whole, so that the integer part of the absolute value of the x and y coordinates is within five digits.

[0021] As a preferred implementation method, preferably, this solution S03 includes:

[0022] According to the positional relationship between the initial zoning grid of the 3D model and the preset zoning grid, the 3D model is reorganized and divided according to the preset zoning grid in the 3D scene, the 3D model is adaptively cut using the new zoning grid, and an fbx model file is generated, which is set as the reorganized fbx model file.

[0023] As a preferred implementation method, preferably, this solution S04 includes:

[0024] Read the reorganized fbx model file, perform parent-child operations on the 3D models with parent-child relationships, then traverse all objects in the scene, remove the corresponding empty objects, and then rename the 3D models in the form of mesh name + category code + model serial number.

[0025] As a preferred implementation method, preferably, this solution S05 includes:

[0026] Get the material information of the 3D model, and determine whether the diffuse reflection maps corresponding to all its materials have pixel values ​​with opacity less than 255 to determine whether it can be converted into a transparent map. If so, it means that it can be converted into a transparent map. Change its single-channel output option to Alpha to convert it into a transparent map. Otherwise, change the map to a picture file format with a .jpg suffix and reassociate it with its corresponding material.

[0027] As a possible implementation, further, this solution S06 includes:

[0028] Read the reorganized fbx model file, traverse all the materials of the 3D model, and adjust the highlight level of the material to 0 to remove the model highlight phenomenon generated by the 3D model.

[0029] As a possible implementation, further, this solution S07 includes:

[0030] Traverse and reorganize all material information of the 3D model in the fbx model file. If the diffuse map of the current material has not been recorded, record the current material name and diffuse map; if the diffuse map of the current material has been recorded for use by other materials, it is considered that the current material and the material that previously used the diffuse map are the same material and can be replaced by each other. Then change the material used by the object or face pointed by the current material to the previously recorded material and delete the current material.

[0031] As a possible implementation, further, this solution S08 includes:

[0032] Traverse and reorganize the specification information of the textures used in the scene of the 3D model in the fbx model file. If the long side pixel of the texture is greater than 1024, scale the texture according to the original ratio so that the long side pixel of the texture is less than or equal to 1024, so as to compress the texture specification size of the 3D model to less than or equal to 1024*1024.

[0033] By adopting the above-mentioned technical scheme, the present invention has the following beneficial effects compared with the prior art: the grid-based three-dimensional model reconstruction and post-processing method involved in the scheme cleverly realizes high-precision, high-efficiency and lightweight three-dimensional data reconstruction and conversion by preprocessing, merging, segmenting and post-processing operations on the three-dimensional model. Compared with the currently common method of manually processing three-dimensional models, the scheme has higher accuracy and processing efficiency, while reducing manual operations, and is more suitable for a wide range of three-dimensional data reconstruction tasks. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0035] Figure 1 It is a brief implementation process of the treatment method of this solution and a brief schematic diagram of the functions and effects of the steps;

[0036] Figure 2 This is a schematic diagram of the chaotic surface mapping phenomenon of the 3D model after reorganization by FME in the processing method of this solution;

[0037] Figure 3 This is a brief schematic diagram of the parent-child set generated after FME clipping in this solution processing method;

[0038] Figure 4 It is a schematic diagram of the name of the three-dimensional model after it is renamed in the processing method of this solution;

[0039] Figure 5 This is the display situation when setting different single-channel output options for the transparent map in this solution processing method, where the left is Alpha and the right is RGB intensity. DETAILED DESCRIPTION

[0040] The present invention will be further described in detail below in conjunction with the accompanying drawings and examples. It is particularly noted that the following examples are only used to illustrate the present invention, but are not intended to limit the scope of the present invention. Similarly, the following examples are only partial embodiments of the present invention rather than all embodiments, and all other embodiments obtained by those of ordinary skill in the art without creative work are within the scope of protection of the present invention.

[0041] like Figure 1 As shown, this embodiment provides a grid-based three-dimensional model reconstruction and post-processing method, which includes:

[0042] S01, reading an fbx model file, and preprocessing the three-dimensional model in the read fbx model file according to preset conditions;

[0043] S02, determining the parameters of the coordinates of the three-dimensional model in the fbx model file to be converted to the CGCS2000 coordinate system that is the same as the zoning grid, and then uniformly converting the coordinates of the three-dimensional model to the CGCS2000 coordinate system so that the three-dimensional model can be cut by the new zoning grid;

[0044] S03, reorganizing the three-dimensional model according to the preset zoning grid, generating an fbx model file divided according to the zoning grid and adaptively cut, and setting the fbx model file as the reorganized fbx model file;

[0045] S04, reading the 3D model in the reorganized fbx model file, and sequentially performing parent-child unpacking, removing empty objects, and renaming operations on the model;

[0046] S05, obtaining material information of the three-dimensional model, determining whether the corresponding texture can be converted into a transparent texture, and adaptively modifying the texture according to the determination result;

[0047] S06, removing the model highlight phenomenon generated by the three-dimensional model;

[0048] S07. Use a unique material to represent multiple sub-materials with the same diffuse map in a 3D model;

[0049] S08, compressing the texture size of the three-dimensional model to less than or equal to 1024*1024;

[0050] S09. The 3D model is translated to the CGCS2000 coordinate system, and then 3D sliced ​​to generate a 3D model file in 3dtiles tile format.

[0051] Among them, in this solution S01, the fbx model file can be read by a software program, and then all material information in the fbx model file can be traversed in batches to locate the material without diffuse reflection map and add a diffuse reflection map to it.

[0052] In this solution, the processing logic and steps can be loaded into the FME plug-in or FME software in the form of FME plug-ins, so that it can execute corresponding operations in a timely manner. The principle logic of loading or adding FME plug-ins or FME software to execute commands in 3D model software is existing technology. This solution is to cleverly utilize it in the reconstruction of 3D models. Therefore, the operating principle of the FME plug-in will not be repeated.

[0053] Based on the above, in this step, since the original fbx model file may have some materials missing diffuse maps, if it is directly input into FME for reorganization, the reorganized 3D model will have a chaotic surface map (such as Figure 2 ), you need to ensure that the original fbx model has been cleared of any materials that are missing diffuse maps before importing into FME.

[0054] As a preferred implementation method, preferably, in this solution S01, the fbx model file can be read by the 3ds Max software program or other three-dimensional software editing program; wherein the diffuse reflection map path corresponding to the material without diffuse reflection map is empty, and the diffuse reflection map is added by specifying its diffuse reflection map path as a pre-set general map path, thereby clearing the material without diffuse reflection map in the fbx model file.

[0055] In order to avoid the abnormal reorganization problem caused by the inconsistency of coordinate data, the solution S02 includes: determining the parameters of the three-dimensional model in the fbx model file from the original urban construction coordinates to the CGCS2000 coordinate system that is the same as the new zoning grid;

[0056] Specifically, the method for cutting the three-dimensional model under the new division grid coordinates includes: subtracting a value from the x and y coordinates of the three-dimensional model in the fbx model file as a whole, so that the integer part of the absolute value of the x and y coordinates is within five digits.

[0057] As a preferred implementation method, preferably, this solution S03 includes: using FME to reorganize the original fbx file according to the new zoning grid, and generating a reorganized fbx file divided according to the zoning grid, which includes: specifically, according to the positional relationship between the initial zoning grid of the three-dimensional model and the preset zoning grid, the three-dimensional model is reorganized and divided according to the preset zoning grid in the three-dimensional scene, and the new zoning grid is used to adaptively cut the three-dimensional model to generate an fbx model file, which is set as the reorganized fbx model file.

[0058] Specifically, according to the positional relationship between the old and new zoning grids, the original fbx files involved in the new grid are integrated, and the new zoning grid is used for cutting after integration in the scene. According to the positional relationship between the old zoning grid and the new zoning grid corresponding to the integrated original fbx file, the fbx files containing the complete three-dimensional model in the new zoning grid are screened, and the fbx files that do not contain the complete three-dimensional model in the new zoning grid are eliminated. The screened fbx files are the reorganized fbx files. Since the computer running memory capacity is limited and the memory space occupied by the three-dimensional model is large, it is necessary to integrate and cut the original fbx files into the reorganized fbx files in multiple times, each time according to one or more new zoning grids, until all new zoning grids are used for cutting and a complete reorganized fbx file is obtained. Since FME's function of processing three-dimensional models is not perfect, there are some problems with the reorganized fbx files output by FME, which need to be post-processed according to the actual needs of production and display.

[0059] This solution S04 includes: reading the reorganized fbx model file, performing a parent-child relationship operation on the three-dimensional model with a parent-child relationship, and then traversing all objects in the scene, removing the corresponding empty objects, and then renaming the three-dimensional model in the form of mesh name + category code + model serial number.

[0060] In S04, if the complete 3D model in the original fbx file is located on the boundary of the new partition grid, after FME cutting, a parent-child set will be generated, that is, the parent object and multiple child objects under it (such as Figure 3 ), where the parent object has the same name as the original model, corresponding to an empty object in the scene. Multiple child object names are all empty, corresponding to the multiple objects that the original model is divided into after cutting.

[0061] Therefore, the 3D models with parent-child relationship in the reorganized fbx file are un-parented, and then all objects in the scene are traversed. If they correspond to empty objects, they are deleted, thereby eliminating the parent-child and empty object problems caused by FME cutting.

[0062] After the above operations, some model names are empty. According to the application requirements of the 3D model, the 3D models in the file need to be renamed according to the new zoning grid name and feature category. The naming rule is generally grid name + category code + model serial number (such as Figure 4 ).

[0063] In terms of texture compression, this solution S05 includes: obtaining the material information of the three-dimensional model, determining whether the diffuse reflection maps corresponding to all its materials have pixel values ​​with opacity less than 255, so as to determine whether it can be converted into a transparent map. If so, it means that it can be converted into a transparent map, and changing its single-channel output option to Alpha to convert it into a transparent map. Otherwise, changing the map to a picture file format with a .jpg suffix and reassociating it with its corresponding material.

[0064] Since the original texture file is generally in .png format, it stores the transparency information of the image, but occupies a large storage space. Figure 5 It shows that after the original fbx file is processed by FME, the single channel output option of some transparent maps is modified and displayed as opaque maps.

[0065] In specific operations, you can traverse the diffuse maps of all materials in the fbx file to determine whether there are pixel values ​​with opacity less than 255. If so, it is considered that the background of this map can be converted to transparent, and the single-channel output option of the sub-material using this map is changed to "Alpha" to make the map appear as a transparent map; if not, change the map from .png to .jpg file and re-associate it with the material, thereby saving the storage space required for the map.

[0066] As a possible implementation, further, the present solution S06 includes: reading the reorganized fbx model file, traversing all materials of the three-dimensional model, and adjusting the highlight level of the material to 0, so as to remove the model highlight phenomenon generated by the three-dimensional model.

[0067] As a possible implementation method, further, the present solution S07 includes: traversing all material information of the three-dimensional model in the reorganized fbx model file, and if the diffuse reflection map of the current material has not been recorded, recording the current material name and diffuse reflection map; if the diffuse reflection map of the current material has been recorded for use by other materials, it is considered that the current material and the material that previously used the diffuse reflection map are the same material and can be replaced by each other, then the material used by the object or face pointed to by the current material is changed to the previously recorded material, and the current material is deleted.

[0068] In this step, the specific operation is to traverse all materials in the fbx file. If the diffuse reflection map of the current material has not been recorded, the current material name and diffuse reflection map are recorded; if the diffuse reflection map of the current material has been recorded as used by other materials, the current material is considered to be the same material as the material that previously used the diffuse reflection map and can be replaced with each other. Then the material used by the object or face pointed by the current material is changed to the previously recorded material, and the current material is deleted. After all materials are traversed, the diffuse reflection maps of the standard material and sub-material in the fbx file are the only maps in the file scene, and the memory space occupied by the fbx file is effectively reduced.

[0069] As a possible implementation, further, this solution S08 includes: traversing the specification information of the map used in the scene of the three-dimensional model in the reorganized fbx model file, and if the long side pixel of the map is greater than 1024, scaling the map according to the original ratio so that the long side pixel of the map is less than or equal to 1024, so as to compress the map specification size of the three-dimensional model to less than or equal to 1024*1024.

[0070] In this solution, since a large number of post-processing operations are completed using 3ds Max software, when the model coordinates have a large number of digits, the operation of the 3D model is likely to cause the model coordinates to shift. Therefore, when FME converts the 3D model coordinates, the x and y coordinates of the 3D model in the fbx file are subtracted by a value based on the converted CGCS2000 coordinates, so that the absolute values ​​of the x and y coordinates are <100000. The 3D model processed in this way can be used smoothly by 3ds Max, but its 3D coordinates differ from the actual CGCS2000 coordinates of the model by a translation amount, and it needs to be translated back to the CGCS2000 coordinate system after the post-processing process is completed.

[0071] The x and y coordinate values ​​subtracted in the previous step are uniformly added to the 3D model coordinates, and the 3D model is uniformly translated back to the CGCS2000 coordinate system. In order to facilitate the display of the 3D model on the web display platform and reduce the memory space occupied by the 3D model, the 3D model is converted into 3dtiles format using software.

[0072] The above descriptions are only some embodiments of the present invention, and are not intended to limit the protection scope of the present invention. Any equivalent device or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A grid-based three-dimensional model reconstruction and post-processing method, characterized in that: It includes: S01, reading an fbx model file, and preprocessing the three-dimensional model in the read fbx model file according to preset conditions; S02, determining the parameters of the coordinates of the three-dimensional model in the fbx model file to be converted to the CGCS2000 coordinate system that is the same as the zoning grid, and then uniformly converting the coordinates of the three-dimensional model to the CGCS2000 coordinate system so that the three-dimensional model can be cut by the new zoning grid; S03, reorganizing the three-dimensional model according to the preset zoning grid, generating an fbx model file divided according to the zoning grid and adaptively cut, and setting the fbx model file as the reorganized fbx model file; S04, reading the 3D model in the reorganized fbx model file, and sequentially performing parent-child unpacking, removing empty objects, and renaming operations on the model; S05, obtaining material information of the three-dimensional model, determining whether the corresponding texture can be converted into a transparent texture, and adaptively modifying the texture according to the determination result; S06, removing the model highlight phenomenon generated by the three-dimensional model; S07. Use a unique material to represent multiple sub-materials with the same diffuse map in a 3D model; S08, compressing the texture size of the three-dimensional model to less than or equal to 1024*1024; S09. The 3D model is translated to the CGCS2000 coordinate system, and then 3D sliced ​​to generate a 3D model file in 3dtiles tile format.

2. The grid-based three-dimensional model reconstruction and post-processing method according to claim 1, characterized in that: In S01, the fbx model file is read by a software program, and then all material information in the fbx model file is traversed to locate the material without a diffuse reflection map, and a diffuse reflection map is added to it.

3. The grid-based three-dimensional model reconstruction and post-processing method according to claim 2, characterized in that: In S01, the fbx model file is read by the 3ds Max software program; wherein the diffuse reflection map path corresponding to the material without diffuse reflection map is empty, and the diffuse reflection map path is specified as a pre-set universal reflection map path to realize adding the diffuse reflection map, thereby clearing the material without diffuse reflection map in the fbx model file.

4. The grid-based three-dimensional model reconstruction and post-processing method according to any one of claims 1 to 3, characterized in that: S02 includes: Determine the parameters for transforming the 3D model in the fbx model file from the original urban construction coordinates to the CGCS2000 coordinate system that is the same as the new zoning grid; The method for cutting the three-dimensional model under the new division grid coordinates includes: subtracting a value from the x and y coordinates of the three-dimensional model in the fbx model file as a whole, so that the integer part of the absolute value of the x and y coordinates is within five digits.

5. The grid-based three-dimensional model reconstruction and post-processing method according to claim 4, characterized in that: S03 includes: According to the positional relationship between the initial zoning grid of the 3D model and the preset zoning grid, the 3D model is reorganized and divided according to the preset zoning grid in the 3D scene, the 3D model is adaptively cut using the new zoning grid, and an fbx model file is generated, which is set as the reorganized fbx model file.

6. The grid-based three-dimensional model reconstruction and post-processing method according to claim 5, characterized in that: S04 includes: Read the reorganized fbx model file, perform parent-child operations on the 3D models with parent-child relationships, then traverse all objects in the scene, remove the corresponding empty objects, and then rename the 3D models in the form of mesh name + category code + model serial number.

7. The grid-based three-dimensional model reconstruction and post-processing method according to claim 4, characterized in that: S05 includes: Get the material information of the 3D model, and determine whether the diffuse reflection maps corresponding to all its materials have pixel values ​​with opacity less than 255 to determine whether it can be converted into a transparent map. If so, it means that it can be converted into a transparent map. Change its single-channel output option to Alpha to convert it into a transparent map. Otherwise, change the map to a picture file format with a .jpg suffix and reassociate it with its corresponding material.

8. The grid-based three-dimensional model reconstruction and post-processing method according to claim 1, characterized in that: S06 includes: Read the reorganized fbx model file, traverse all the materials of the 3D model, and adjust the highlight level of the material to 0 to remove the model highlight phenomenon generated by the 3D model.

9. The grid-based three-dimensional model reconstruction and post-processing method according to claim 1, characterized in that: S07 includes: Traverse and reorganize all material information of the 3D model in the fbx model file. If the diffuse map of the current material has not been recorded, record the current material name and diffuse map; if the diffuse map of the current material has been recorded for use by other materials, it is considered that the current material and the material that previously used the diffuse map are the same material and can be replaced by each other. Then change the material used by the object or face pointed by the current material to the previously recorded material and delete the current material.

10. The grid-based three-dimensional model reconstruction and post-processing method according to claim 1, characterized in that: S08 includes: Traverse and reorganize the specification information of the textures used in the scene of the 3D model in the fbx model file. If the long side pixel of the texture is greater than 1024, scale the texture according to the original ratio so that the long side pixel of the texture is less than or equal to 1024, so as to compress the texture specification size of the 3D model to less than or equal to 1024*1024.