A lightweight method for engineering BIM models
By adopting the lightweight method of engineering BIM model in the visual production process of BIM model, and using octree storage structure and LOD technology, the problem of inefficient data transmission, conversion and preprocessing of BIM model is solved, data compatibility and controllability are improved, efficient rendering and editing are achieved, and the needs of efficient digital platforms in large-scale projects are met.
Patent Information
- Application Number
- CN202111232868.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-22
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2041-10-22
AI Technical Summary
In the visual production process of BIM model, there are problems such as poor standardization of data transmission, slow data conversion and platform refresh, inconvenient data preprocessing, and poor operability, especially in terms of data error correction and compatibility.
A method of lightweight engineering BIM model is adopted, including model format conversion, model lightweight processing, model visual editing and model data export. The specific steps include converting the BIM model source data into an editable intermediate file, performing lightweight processing of the model, and exporting it into a custom-format model file after editing. This method uses octree storage structure and LOD technology to optimize data structure and rendering speed.
Through this method, the inefficiency of BIM model data transmission, conversion and preprocessing is solved, data compatibility and controllability are improved, efficient rendering and editing are realized, and the needs of efficient digital platforms in large-scale projects are met.
Smart Images

Figure CN113962001B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the cross-technical field of computer vision, computer three-dimensional graphics, engineering BIM visualization and application, and specifically relates to a lightweight method for an engineering BIM model. Background Art
[0002] At present, in the actual BIM visualization production process, it is found that there are problems such as poor standardization of data transmission, slow data conversion and platform refresh, inconvenient data preprocessing process, and weak operability. In addition, there are deficiencies in data compatibility and controllability. Specifically, when data errors occur in the BIM model, the intermediate process cannot make micro-error corrections and adjustments, and the resource data must be modified as a whole, resulting in redundant production, which cannot meet the requirements of efficient construction of digital platforms in large-scale projects. Summary of the invention
[0003] In view of the defects of the prior art, the present invention provides a method for lightweighting an engineering BIM model, which can effectively solve the above problems.
[0004] The technical solution adopted by the present invention is as follows:
[0005] The present invention provides a method for lightweighting an engineering BIM model, comprising the following steps:
[0006] Step 1, model format conversion step: used to convert the BIM model source data into an editable intermediate file of a unified data type;
[0007] Step 2, model lightweighting step: used to perform model lightweighting processing on the BIM model intermediate type file to obtain a lightweight BIM model file;
[0008] Step 3, model visualization editing step: used to edit the lightweight BIM model file to obtain the edited BIM model file;
[0009] Step 4, model data export step: used to export the edited BIM model file into a BIM model file in a custom format.
[0010] Preferably, step 1 is specifically:
[0011] Sequentially convert BIM model source data into editable intermediate files of unified data type.
[0012] Preferably, step 2 is specifically:
[0013] Step 2.1, reading the BIM model intermediate type file, wherein the BIM model intermediate type file includes a plurality of original models; traversing each of the original models, and assigning an original model global ID and original model category information to each traversed original model;
[0014] Step 2.2, according to the original model category information, the original models belonging to the same category are aggregated to form an original model set;
[0015] For each original model set, create a corresponding complex model data set; the complex model data set is initially empty;
[0016] Assume that for the original model set C i , create a corresponding complex model data set F i ; The complex model data set F i Has a unique complex model data set ID;
[0017] The complex model data set F i The creation process is:
[0018] Step 2.2.1, creating a model information table B1; the model information table B1 is used to store the model information of each original model in the original model set Ci; wherein the model information of the original model includes the original model global ID information and the original model geometry information;
[0019] Step 2.2.2, create a model material information table B2; the model material information table B2 is used to store the complex model data set F i Complex model data set ID information and material global ID information; each material global ID corresponds to a material texture map;
[0020] Step 2.2.3: The whole formed by the model information table B1 and the model material information table B2 is the complex model data set F i ;
[0021] Step 2.2.4, from the complex model data set F i In the process, the model information table B1 is read, and for each piece of original model geometry information read, a model simplification operation is performed on it to generate simplified model geometry information corresponding to the original model global ID;
[0022] Step 2.2.5, complex model data set F i A container E is pre-established in the container; the simplified model geometry information corresponding to each original model global ID is added to the container E, and the simplified model geometry information stored in the container E is called the complex model intermediate geometry information;
[0023] Step 2.3, construct the bounding box:
[0024] Use the intermediate geometry information of the complex model to construct the total bounding box R0 of the complex model;
[0025] Using the simplified model geometry information of each container E, a corresponding simplified model bounding box is constructed, which is represented as: simplified model bounding box S1, simplified model bounding box S2,..., simplified model bounding box S m ; Wherein, m is the number of simplified model geometry information included in the container E; wherein each simplified model bounding box is bounded to the corresponding original model global ID;
[0026] Step 2.4, using the octree space structure to perform spatial division on the total bounding box R0 of the complex model, forming a division structure corresponding to the octree space structure, and finally using the octree storage structure to store the spatial position relationship of each original model;
[0027] The specific steps are:
[0028] Step 2.4.1, pre-set the depth of the octree structure to X layers, namely: the first layer, the second layer, ..., the Xth layer;
[0029] The first layer has one node node1; node node1 has 8 child nodes, forming the second layer, that is, the second layer has nodes node2-1, node node2-2, and node node2-8; for each node in the second layer, it has 8 child nodes, thus forming the third layer, and so on, each node in each layer has 8 child nodes downward, until reaching each node in the Xth layer; thus forming an octree storage structure;
[0030] Step 2.4.2, the complex model total bounding box R0 corresponds to node node1, and the bounding box information of the complex model total bounding box R0 is stored through node node1;
[0031] The complex model total bounding box R0 is evenly divided into 8 rectangles, each rectangle is a sub-bounding box of the complex model total bounding box R0, corresponding to a node of the second layer, and the bounding box information of the corresponding sub-bounding box is stored through the node;
[0032] By analogy, the total bounding box R0 of the complex model and the sub-bounding boxes of different layers formed by continuous downward division are realized, and the sub-bounding boxes of different layers formed by continuous downward division form a sub-bounding box set; the spatial relationship of the sub-bounding box set corresponds to the octree storage structure;
[0033] Step 2.4.3, for each simplified model bounding box obtained in step 2.3, first compare it with the sub-bounding box set to determine the sub-bounding box it is in, and then mark the original model global ID corresponding to the simplified model bounding box in the corresponding child node of the octree storage structure;
[0034] Step 2.5, constructing the LOD multi-level detail model information according to the octree storage structure of step 2.4;
[0035] Constructing multi-level detail information of the model lod, including: based on the model information table B1, for the original model corresponding to the original model global ID corresponding to the child node in the octree storage structure, generating a plurality of original model detail models with different precisions; and establishing a mapping relationship between each original model detail model and the corresponding child node in the octree storage structure;
[0036] Based on the model material information table B2, all material texture maps are merged into a large material texture map; according to the lod level parameter, the large material texture map is used to generate a variety of large material texture detail maps with different precisions; and each large material texture detail map with each precision is mapped to the corresponding layer of the octree storage structure.
[0037] Preferably, it also includes:
[0038] When rendering, the octree storage structure is used to store the detail maps of large material textures of each precision and the detail models of different precisions of each original model. According to the position and importance of different original models in the display environment in the BIM model, the resource allocation for rendering the original model is determined, and the number of faces and detail of non-important objects are reduced, thereby obtaining efficient rendering results.
[0039] Preferably, resource allocation for rendering the original models is determined according to the positions and importance of different original models in the BIM model in the display environment, specifically:
[0040] If the original model has a low position and low importance in the display environment, the low-detail model of the original model and the low-detail map of the large material texture are read to achieve rendering;
[0041] On the contrary, if the original model has a high position and importance in the display environment, the high-detail model of the original model and the high-detail map of the large material texture are read to achieve rendering.
[0042] The lightweight method of an engineering BIM model provided by the present invention has the following advantages:
[0043] This system optimizes data structure and lightweight data storage through model lightweight preprocessing operations, based on octree algorithm, and combined with LOD technology;
[0044] The present invention adopts an octree storage structure to store large material texture detail maps of each precision and detail models of different precisions of each original model, thereby improving rendering speed. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 A schematic diagram of a process for lightweighting an engineering BIM model provided by the present invention;
[0046] Figure 2 A simplified schematic diagram of the model provided by the present invention;
[0047] Figure 3 The model lightweight method provided by the present invention constructs an octree model storage structure principle diagram for spatial relationships. DETAILED DESCRIPTION
[0048] In order to make the technical problems, technical solutions and beneficial effects solved by 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 used to limit the present invention.
[0049] The present invention provides a method for lightweighting an engineering BIM model, referring to Figure 1 , including the following steps:
[0050] Step 1, model format conversion step: used to convert the BIM model source data into an editable intermediate file of a unified data type;
[0051] Step 1 is as follows:
[0052] The BIM model source data is sequentially converted into editable intermediate files of uniform data types, wherein the intermediate files of uniform data types are three-dimensional format intermediate files.
[0053] As an embodiment, the model data format is uniformly processed through model format conversion, and the specific content of the execution is: BIM resource data is uniformly converted into FBX format intermediate files for import, and the imported BIM model data is converted into editable .x type model data.
[0054] In this embodiment, the unified FBX format intermediate file import and the fbx to x type model file conversion achieve the purpose of standardizing data transmission and enhancing data operability, while simplifying the data processing flow.
[0055] Step 2, model lightweighting step: used to perform model lightweighting processing on the BIM model intermediate type file to obtain a lightweight BIM model file;
[0056] Step 2 is as follows:
[0057] Step 2.1, read the BIM model intermediate type file, wherein the BIM model intermediate type file includes multiple original models; traverse each of the original models, and for each traversed original model, assign its original model global ID and original model category information; the original model category information can be represented by a model version number ID.
[0058] Step 2.2, according to the original model category information, the original models belonging to the same category are aggregated to form an original model set;
[0059] For each original model set, create a corresponding complex model data set; the complex model data set is initially empty;
[0060] Assume that for the original model set C i , create a corresponding complex model data set F i ; The complex model data set F i Has a unique complex model data set ID;
[0061] The complex model data set F i The creation process is:
[0062] Step 2.2.1, creating a model information table B1; the model information table B1 is used to store the model information of each original model in the original model set Ci; wherein the model information of the original model includes the original model global ID information and the original model geometry information;
[0063] Step 2.2.2, create a model material information table B2; the model material information table B2 is used to store the complex model data set F i Complex model data set ID information and material global ID information; each material global ID corresponds to a material texture map;
[0064] Step 2.2.3: The whole formed by the model information table B1 and the model material information table B2 is the complex model data set F i ;
[0065] Therefore, through the complex model data set F i , the original models belonging to the same category are uniformly stored using the model information table B1 and the model material information table B2.
[0066] Step 2.2.4, from the complex model data set F i In the example, the model information table B1 is read, and for each original model geometry information read, a model simplification operation is performed on it to generate simplified model geometry information corresponding to the original model global ID; Figure 2 , Figure 2 The left picture shows the original model geometry information; Figure 2 The figure on the right shows simplified model geometry information. The model simplification operation may be: using an edge collapse algorithm based on quadratic error metric to simplify the original model.
[0067] Step 2.2.5, complex model data set F i A container E is pre-established in the container; the simplified model geometry information corresponding to each original model global ID is added to the container E, and the simplified model geometry information stored in the container E is called the complex model intermediate geometry information;
[0068] Step 2.3, construct the bounding box:
[0069] The complex model intermediate geometry information is used to construct the complex model total bounding box R0; specifically, since the container E stores multiple simplified model geometry information, each simplified model geometry information includes geometric parameters such as the coordinates of each vertex of the model. Therefore, the complex model total bounding box R0 can be obtained by reading all vertex coordinates.
[0070] Using the simplified model geometry information of each container E, a corresponding simplified model bounding box is constructed, which is represented as: simplified model bounding box S1, simplified model bounding box S2,..., simplified model bounding box S m ; Wherein, m is the number of simplified model geometry information included in the container E; wherein each simplified model bounding box is bounded to the corresponding original model global ID;
[0071] Step 2.4, using the octree space structure, divide the complex model total bounding box R0 into spaces, forming a division structure corresponding to the octree space structure, and finally using the octree storage structure to store the spatial position relationship of each original model; Figure 3 , which is the schematic diagram of this step.
[0072] The specific steps are:
[0073] Step 2.4.1, pre-set the depth of the octree structure to X layers, namely: the first layer, the second layer, ..., the Xth layer; for example, three layers.
[0074] The first layer has one node node1; node node1 has 8 child nodes, forming the second layer, that is, the second layer has nodes node2-1, node node2-2, and node node2-8; for each node in the second layer, it has 8 child nodes, thus forming the third layer, and so on, each node in each layer has 8 child nodes downward, until reaching each node in the Xth layer; thus forming an octree storage structure;
[0075] Step 2.4.2, the complex model total bounding box R0 corresponds to node node1, and the bounding box information of the complex model total bounding box R0 is stored through node node1;
[0076] The complex model total bounding box R0 is evenly divided into 8 rectangles, each rectangle is a sub-bounding box of the complex model total bounding box R0, corresponding to a node of the second layer, and the bounding box information of the corresponding sub-bounding box is stored through the node;
[0077] By analogy, the total bounding box R0 of the complex model and the sub-bounding boxes of different layers formed by continuous downward division are realized, and the sub-bounding boxes of different layers formed by continuous downward division form a sub-bounding box set; the spatial relationship of the sub-bounding box set corresponds to the octree storage structure;
[0078] Step 2.4.3, for each simplified model bounding box obtained in step 2.3, first compare it with the sub-bounding box set to determine the sub-bounding box it is in, and then mark the original model global ID corresponding to the simplified model bounding box in the corresponding child node of the octree storage structure;
[0079] Step 2.5, constructing the LOD multi-level detail model information according to the octree storage structure of step 2.4;
[0080] Constructing multi-level detail information of the model lod, including: based on the model information table B1, for the original model corresponding to the original model global ID corresponding to the child node in the octree storage structure, generating a plurality of original model detail models with different precisions; and establishing a mapping relationship between each original model detail model and the corresponding child node in the octree storage structure;
[0081] Based on the model material information table B2, all material texture maps are merged into a large material texture map; according to the lod level parameter, the large material texture map is used to generate a variety of large material texture detail maps with different precisions; and each large material texture detail map with each precision is mapped to the corresponding layer of the octree storage structure.
[0082] The specific contents of model lightweight execution are as follows:
[0083] A1. Based on the complex model data set, build an octree model storage structure, establish a lod level for its vertices, merge the octree model texture maps, and build a lod level for the merged texture maps;
[0084] A2. Use parametric geometry description and primitive combination to lightweight the model.
[0085] In this embodiment, the purpose of optimizing data structure and lightweight data storage is achieved through model lightweight preprocessing operations, based on the octree algorithm, and combined with LOD technology.
[0086] Step 3, model visualization editing step: used to edit the lightweight BIM model file to obtain the edited BIM model file;
[0087] This step can specifically be:
[0088] Set the orientation operator, associate the orientation operator with the BIM model, and map the translation, rotation, and scaling operations on the BIM model by controlling the orientation operator.
[0089] Specifically, the translation information of the model in the x, y, z, yz, xz, and xy directions is controlled by the defined T_x, T_y, T_z, T_yz, T_xz, T_xyz translation orientation information of the orientation operating body; the rotation information of the model in the x, y, z directions is controlled by the defined R_x, R_y, and R_z rotation orientation information of the orientation operating body; the overall scaling information of the model in the xyz direction is controlled by the defined S_xyz scaling orientation information of the orientation operating body.
[0090] The matrix data, vertex data, and texture data changed by the data stream are written into the lightweight BIM model file, and the lightweight BIM model file is edited.
[0091] Specifically, the data stream writes data changes to the editable file; the model information in the scene is edited, mainly including matrix information, vertex information, and texture information. The changed model information will be stored in the system cache, and the file will be saved. The matrix data, vertex data, and texture data will be written into the corresponding editable model file in the form of a binary data stream, which exists in the form of an intermediate file of type x.
[0092] In this embodiment, the model visual editing based on the orientation operation body and data stream writing technology achieves the purpose of enhancing data compatibility and controllability. At the same time, the intuitive visual programming enhances the convenience and operability of data processing.
[0093] Step 4, model data export step: used to export the edited BIM model file into a BIM model file in a custom format.
[0094] This step specifically includes: compressing the edited BIM model file; encrypting it; and exporting a custom format .pak pre-rendered file;
[0095] In this embodiment, based on Zlib data compression and RSA data encryption technology, all model vertices, model maps, and model attachment information are losslessly converted into the encrypted model format of this engine, ensuring the security of source data imported into the engine.
[0096] Also includes:
[0097] When rendering, the octree storage structure is used to store the detail maps of large material textures of each precision and the detail models of different precisions of each original model. According to the position and importance of different original models in the display environment in the BIM model, the resource allocation for rendering the original model is determined, and the number of faces and detail of non-important objects are reduced, thereby obtaining efficient rendering results.
[0098] in:
[0099] The resource allocation for rendering the original models is determined based on the position and importance of the original models in the display environment. Specifically:
[0100] If the original model has a low position and low importance in the display environment, the low-detail model of the original model and the low-detail map of the large material texture are read to achieve rendering;
[0101] On the contrary, if the original model has a high position and importance in the display environment, the high-detail model of the original model and the high-detail map of the large material texture are read to achieve rendering.
[0102] The present invention provides a lightweight method for an engineering BIM model, which has the following advantages:
[0103] (1) This system achieves the purpose of standardized data transmission and enhanced data operability by uniformly converting intermediate files into 3D formats and converting fbx to x-type model files, while simplifying the data processing process;
[0104] (2) This system optimizes the data structure and lightweight data storage through model lightweight preprocessing operations, based on the octree algorithm, and combined with LOD technology;
[0105] (3) This system achieves the purpose of enhancing data compatibility and controllability through model visual editing based on azimuth operation and data stream writing technology. At the same time, intuitive visual programming enhances the convenience and operability of data processing;
[0106] (4) Through the model data export operation, this system converts all the information of model vertices, model maps, and model attachments into the encrypted model format of this engine without loss based on Zlib data compression and RSA data encryption technology, thus ensuring the security of source data imported into the engine.
[0107] (5) The present invention uses an octree storage structure to store large material texture detail maps of each precision and detail models of different precisions for each original model, thereby improving rendering speed.
[0108] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be considered as the scope of protection of the present invention.
Claims
1. A lightweight method for an engineering BIM model, characterized in that: The following steps are involved: Step 1, model format conversion step: used to convert the BIM model source data into an editable intermediate file of a unified data type; Step 2, model lightweighting step: used to perform model lightweighting processing on the BIM model intermediate type file to obtain a lightweight BIM model file; Step 3, model visualization editing step: used to edit the lightweight BIM model file to obtain the edited BIM model file; Step 4, model data export step: used to export the edited BIM model file into a BIM model file in a custom format; Among them: Step 2 is specifically as follows: Step 2.1, reading the BIM model intermediate type file, wherein the BIM model intermediate type file includes a plurality of original models; traversing each of the original models, and assigning an original model global ID and original model category information to each traversed original model; Step 2.2, according to the original model category information, the original models belonging to the same category are aggregated to form an original model set; For each original model set, create a corresponding complex model data set; the complex model data set is initially empty; Assume that for the original model set C i , create a corresponding complex model data set F i ; The complex model data set F i Has a unique complex model data set ID; The complex model data set F i The creation process is: Step 2.2.1, creating a model information table B1; the model information table B1 is used to store the model information of each original model in the original model set Ci; wherein the model information of the original model includes the original model global ID information and the original model geometry information; Step 2.2.2, create a model material information table B2; the model material information table B2 is used to store the complex model data set F i Complex model data set ID information and material global ID information; each material global ID corresponds to a material texture map; Step 2.2.3: The whole formed by the model information table B1 and the model material information table B2 is the complex model data set F i ; Step 2.2.4, from the complex model data set F i In the process, the model information table B1 is read, and for each piece of original model geometry information read, a model simplification operation is performed on it to generate simplified model geometry information corresponding to the original model global ID; Step 2.2.5, complex model data set F i A container E is pre-established in the container; the simplified model geometry information corresponding to each original model global ID is added to the container E, and the simplified model geometry information stored in the container E is called the complex model intermediate geometry information; Step 2.3, construct the bounding box: Use the intermediate geometry information of the complex model to construct the total bounding box R0 of the complex model; Using the simplified model geometry information of each container E, a corresponding simplified model bounding box is constructed, which is represented as: simplified model bounding box S1, simplified model bounding box S2,..., simplified model bounding box S m ; Where m is the number of simplified model geometry information included in container E; where each simplified model bounding box is bounded to the corresponding original model global ID; Step 2.4, using the octree space structure to perform spatial division on the total bounding box R0 of the complex model, forming a division structure corresponding to the octree space structure, and finally using the octree storage structure to store the spatial position relationship of each original model; The specific steps are: Step 2.4.1, pre-set the depth of the octree structure to X layers, namely: the first layer, the second layer, ..., the Xth layer; The first layer has one node node1; node node1 has 8 child nodes, forming the second layer, that is, the second layer has nodes node2-1, node node2-2, and node node2-8; for each node in the second layer, it has 8 child nodes, thus forming the third layer, and so on, each node in each layer has 8 child nodes downward, until reaching each node in the Xth layer; thus forming an octree storage structure; Step 2.4.2, the complex model total bounding box R0 corresponds to node node1, and the bounding box information of the complex model total bounding box R0 is stored through node node1; The complex model total bounding box R0 is evenly divided into 8 rectangles, each rectangle is a sub-bounding box of the complex model total bounding box R0, corresponding to a node of the second layer, and the bounding box information of the corresponding sub-bounding box is stored through the node; By analogy, the total bounding box R0 of the complex model and the sub-bounding boxes of different layers formed by continuous downward division are realized, and the sub-bounding boxes of different layers formed by continuous downward division form a sub-bounding box set; the spatial relationship of the sub-bounding box set corresponds to the octree storage structure; Step 2.4.3, for each simplified model bounding box obtained in step 2.3, first compare it with the sub-bounding box set to determine the sub-bounding box it is in, and then mark the original model global ID corresponding to the simplified model bounding box in the corresponding child node of the octree storage structure; Step 2.5, constructing the LOD multi-level detail model information according to the octree storage structure of step 2.4; Constructing multi-level detail information of the model lod, including: based on the model information table B1, for the original model corresponding to the original model global ID corresponding to the child node in the octree storage structure, generating a plurality of original model detail models with different precisions; and establishing a mapping relationship between each original model detail model and the corresponding child node in the octree storage structure; Based on the model material information table B2, all material texture maps are merged into a large material texture map; according to the lod level parameter, the large material texture map is used to generate a variety of large material texture detail maps with different precisions; and each large material texture detail map with each precision is mapped to the corresponding layer of the octree storage structure.
2. The lightweight engineering BIM model method according to claim 1, characterized in that: Step 1 is as follows: Sequentially convert BIM model source data into editable intermediate files of unified data type.
3. The lightweight engineering BIM model method according to claim 1, characterized in that: Also includes: When rendering, the octree storage structure is used to store the detail maps of large material textures of each precision and the detail models of different precisions of each original model. According to the position and importance of different original models in the display environment in the BIM model, the resource allocation for rendering the original model is determined, and the number of faces and detail of non-important objects are reduced, thereby obtaining efficient rendering results.
4. The lightweight engineering BIM model method according to claim 3 is characterized in that: The resource allocation for rendering the original models is determined based on the position and importance of the original models in the display environment. Specifically: If the original model has a low position and low importance in the display environment, the low-detail model of the original model and the low-detail map of the large material texture are read to achieve rendering; On the contrary, if the original model has a high position and importance in the display environment, the high-detail model of the original model and the high-detail map of the large material texture are read to achieve rendering.
Citation Information
Patent Citations
Method for converting BIM into GIS model supporting large-volume graded loading
CN112035433A
Lightweight display method and system for mass data BIM model
CN112084556A