A method and system for optimizing large-scale BIM model data
By performing axis alignment bounding box calculation, LOD pyramid forest construction and layered processing on large-scale BIM model data, the problem that BIM model data cannot be rendered in real time on the web page is solved, and efficient three-dimensional rendering and optimization effects are achieved.
Patent Information
- Application Number
- CN202010388530.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-05-09
- Publication Date
- 2025-04-01
- Estimated Expiration
- 2040-05-09
AI Technical Summary
Large and complex BIM model data cannot be rendered in real-time interactive three-dimensionally on web pages, mainly due to the large amount of data, bandwidth limitations and insufficient browser memory/GPU video memory.
By calculating the axis alignment bounding box of the BIM model, a LOD pyramid forest is constructed, and the BIM model data is sliced according to the preset number of root nodes of the LOD pyramid forest to obtain multiple three-dimensional tiles. Then, through layered processing, the three-dimensional tiles are merged and optimized until the preset number of nodes is less than the preset value.
It realizes the optimization of large-scale BIM model data, retains the original semantic information, is suitable for three-dimensional applications based on web pages, significantly improves the user experience of traditional desktop 3D real-time interactive rendering, and converts it into three-dimensional real-time interactive rendering of web pages without plug-ins.
Smart Images

Figure CN111754617B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of BIM model optimization, and in particular to an optimization method and system for large-scale BIM model data. Background Art
[0002] Large and complex BIM model (Building Information Modeling) data uses discretized triangular meshes plus vertex attributes or patch attributes to express the model surface and internal space structure. Commonly used BIM model data has a large number of components, a large number of graphics elements, and a large file size, and the real-time rendering frame rate on traditional desktop rendering software is not high; at the same time, large amounts of data need to be rendered in three dimensions on a web page, and must first be downloaded. The current bandwidth, including future 5G bandwidth, will not be too easy; secondly, even if downloaded to the web side, there is not enough browser memory and GPU video memory to accommodate this data; finally, the web page calls the GPU to render this data, and the frame rate will not be higher than the desktop rendering. This makes it impossible to perform real-time interactive three-dimensional rendering of large and complex BIM model data on a web page. Summary of the invention
[0003] Therefore, the technical problem to be solved by the present invention is to overcome the defect in the prior art that large-volume complex BIM model data cannot be interactively rendered in real time in three dimensions on a web page, thereby providing an optimization method and system for large-volume BIM model data.
[0004] In order to achieve the above object, the present invention provides the following technical solutions:
[0005] In a first aspect, an embodiment of the present invention provides an optimization method for large-volume BIM model data, comprising the following steps: calculating an axis-aligned bounding box of a large-volume BIM model; constructing an LOD pyramid forest for the large-volume BIM model data, and slicing the bounding box according to a preset number of LOD pyramid forest root nodes to obtain a plurality of three-dimensional tiles, wherein the three-dimensional tiles all satisfy preset constraints; using the plurality of three-dimensional tiles as nodes of an initial layer, and performing layered processing on each node according to a preset optimization processing rule, and obtaining optimized BIM model data when the number of nodes after the layered processing is less than a preset value.
[0006] In one embodiment, the preset constraint condition includes: the number of vertices of the triangle mesh in each three-dimensional tile is less than a preset threshold.
[0007] In one embodiment, the preset constraint condition includes: the number of vertices of the triangle mesh in each three-dimensional tile is less than a preset threshold.
[0008] In one embodiment, the step of slicing the bounding box according to the preset number of LOD pyramid forest root nodes to obtain a plurality of three-dimensional tiles, wherein the three-dimensional tiles all satisfy preset constraints, includes:
[0009] Calculate the size of the initial 3D tile according to the preset number of LOD pyramid forest root nodes and the size of the axis-aligned bounding box;
[0010] Using the bounding box of the initial three-dimensional tile to cut the axis-aligned bounding box of the entire BIM model to obtain each secondary three-dimensional tile, and determining whether the secondary three-dimensional tile satisfies the preset constraint condition;
[0011] When the preset constraints are not met, each secondary 3D tile is divided into a preset number of equal parts, and the bounding box of the equally divided 3D tile is used to cut the axis-aligned bounding box of the entire BIM model, and so on, until all the 3D tiles obtained by cutting meet the preset constraints.
[0012] In one embodiment, the calculation formula for calculating the size sz of the initial 3D tile is:
[0013] sz=[(aabb.dx*aabb.dy*aabb.dz) / tt] 1 / 3,
[0014] Among them, aabb.dx*aabb.dy*aabb.dz represents the size of the axis-aligned bounding box, and tt represents the number of preset LOD pyramid forest root nodes.
[0015] In one embodiment, each secondary 3D tile is divided into four or eight regular equal parts.
[0016] In one embodiment, a plurality of three-dimensional tiles are used as nodes of an initial layer, and each node is subjected to layered processing according to a preset optimization processing rule. When the number of nodes after the layered processing is less than a preset value, a process of obtaining optimized BIM model data includes:
[0017] Using multiple 3D tile files as nodes of the initial layer, merging a preset number of adjacent 3D tiles, optimizing the merged new 3D tile files, and using the optimized results as the 3D tile files of the second layer, wherein the spatial bounding box of the 3D tile files of the second layer just covers the spatial bounding box of the preset number of 3D tiles of the initial layer;
[0018] After all the 3D tile files of the initial layer are merged and optimized into the second layer, the 3D tile files of the second layer replace all the 3D tile files of the initial layer;
[0019] The above-mentioned layered processing method of merging and optimizing the three-dimensional tile files is used in a similar manner. If the number of three-dimensional tile files in the Nth layer is less than the preset number, the layering is stopped to obtain the optimized BIM model data.
[0020] In one embodiment, the adjacent preset number is four or eight.
[0021] In one embodiment, the method for optimizing large-volume BIM model data further includes:
[0022] According to the intersection of the view volume and the bounding sphere of the 3D tile during 3D rendering, it is determined whether to download the 3D tile file of this layer to the client for rendering.
[0023] In a second aspect, an embodiment of the present invention provides an optimization system for large-volume BIM model data, including: an axis-aligned bounding box acquisition module, used to acquire and calculate the axis-aligned bounding box of the large-volume BIM model;
[0024] A slicing processing module is used to construct an LOD pyramid forest for large-volume BIM model data, and to slice the bounding box according to a preset number of LOD pyramid forest root nodes to obtain a plurality of three-dimensional tiles, wherein the three-dimensional tiles all meet preset constraint conditions;
[0025] The layered processing module is used to use multiple three-dimensional tiles as nodes of the initial layer, and perform layered processing on each node according to a preset optimization processing rule. When the number of nodes after the layered processing is less than a preset value, the optimized BIM model data is obtained.
[0026] In a third aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the large-volume BIM model data optimization method of the first aspect of the embodiment of the present invention.
[0027] In a fourth aspect, an embodiment of the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the large-volume BIM model data optimization method of the first aspect of the embodiment of the present invention by executing the computer instructions.
[0028] The technical solution of the present invention has the following advantages:
[0029] The optimization method and system of large-volume BIM model data provided by the present invention constructs an LOD pyramid forest for large-volume BIM model data, performs slice processing on the BIM model bounding box according to the preset number of LOD pyramid forest root nodes, and performs layered processing on the basis of the slice processing, so that the processed large-volume complex BIM model data completely retains the original semantic information of the input BIM model data, such as information on measurement, material, construction process, etc., lays a good foundation for subsequent three-dimensional applications based on web pages, and facilitates seamless migration from traditional desktop three-dimensional applications to three-dimensional applications based on web pages. It can significantly improve the user experience of three-dimensional real-time interactive rendering on the traditional desktop end, and transforms large-volume complex BIM model data from desktop real-time rendering to three-dimensional real-time interactive rendering on web pages without plug-ins. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0031] Figure 1 A flowchart of a specific example of a method for optimizing large-volume BIM model data in an embodiment of the present invention;
[0032] Figure 2 A schematic diagram of layered merging optimization processing in an embodiment of the present invention;
[0033] Figure 3 A flowchart of an example of sharding processing in an embodiment of the present invention;
[0034] Figure 4 A flowchart of an example of layered processing in an embodiment of the present invention;
[0035] Figure 5 It is a principle block diagram of a specific example of an optimization system for large-volume BIM model data in an embodiment of the present invention;
[0036] Figure 6 A composition diagram of a specific example of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0037] The technical solution of the present invention will be described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0038] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.
[0039] In addition, the technical features involved in the different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0040] Example 1
[0041] The embodiment of the present invention provides a method for optimizing large-scale BIM model data. Figure 1 As shown, the following steps are included:
[0042] Step S1: Calculate the axis-aligned bounding box of the large-volume BIM model.
[0043] The embodiment of the present invention calculates the minimum value Xmin and the maximum value Xmax of the first component of the vertex coordinates of the large-volume BIM model, the minimum value Ymin and the maximum value Ymax of the second component, and the minimum value Zmin and the maximum value Zmax of the third component. The axis-aligned bounding box of the large-volume BIM model can be expressed as: BoundingBox{vec3(Xmin,Ymin,Zmin),vec3(Xmax,Ymax,Zmax)}.
[0044] Step S2: construct an LOD pyramid forest for the large-volume BIM model data, and slice the bounding box according to the preset number of LOD pyramid forest root nodes to obtain multiple three-dimensional tiles, and all the three-dimensional tiles meet the preset constraints.
[0045] Through slicing, the three-dimensional space where the large and complex BIM model is located is divided into several regular cubic boxes. In the embodiment of the present invention, the three-dimensional tiles all meet two preset constraints:
[0046] 1) The number of vertices (vn) of the triangular mesh of the model strictly contained (excluding intersection) in the three-dimensional tile must be less than the specified threshold (50,000). After optimization using the existing BIM model mesh optimization algorithm (for example, the BIM model mesh optimization algorithm provided in the publication number CN110310353A, the invention name is "A BIM model data optimization method and system", hereinafter referred to as the reduction algorithm), the size of the triangular mesh in the three-dimensional tile after writing the file (filesize = vn * sizeof (float) * 3 = 50000 * 4 * 3 / 1024 is approximately equal to 586kb) can be controlled within 1M or less. Such written files are hereinafter referred to as tile files. Such small, batched tile files can be quickly judged according to the bounding sphere (bsp) of the view volume (hexahedron) and the tile during three-dimensional rendering to determine whether to download the batch of tile files to the client. Batch tile files are a collection of the minimum BIM model information that meets the conditions of spatial inclusion or spatial intersection with the rendering view volume, ensuring that the client downloads as little data as possible from the BIM model during real-time rendering and that it is sufficient for rendering, ensuring that the waiting time is within seconds, and the rendering frame rate is high and smooth. Otherwise, if a large volume of BIM files is downloaded to the client as a whole, the browser will not have more than 2G of memory space to carry it, wasting network bandwidth, causing the client to wait for a long time to load, and there will be a large number of culling operations during rendering, and the GPU rendering frame rate will be very low and not smooth;
[0047] 2) The surface area S of the model grid with texture attributes inside the 3D tile is also a control factor. While ensuring that the tile file is less than 1M, the surface area S of the textured model can determine the resolution of the texture image of the optimized texture model. After optimizing the textured BIM model using the reduction algorithm, all the multiple and multiple textures of the original model are rearranged to a 512*512 fixed-size texture image, with the aim of reducing the memory size occupied by the texture and reducing the rendering batches. After the textured model is optimized, the surface area R=S / (512*512) covered by each pixel is also a control threshold. Based on a large amount of data processing experience, the surface area covered by each pixel is less than 1 square centimeter, which can ensure that the difference in texture resolution between the optimized BIM and the original texture is within the acceptable range for the human eye.
[0048] Step S3: multiple three-dimensional tiles are used as nodes of the initial layer, and each node is layered according to a preset optimization processing rule. When the number of nodes after the layered processing is less than a preset value, the optimized BIM model data is obtained.
[0049] In the actual data processing process, for large BIM, such as large airports, planetariums, etc., the number of tile files can easily reach tens of thousands, and each tile file requires at least one rendering batch. If the full scene is loaded, there will be tens of thousands of rendering batches, which will greatly reduce the rendering frame rate and cause rendering jams. Therefore, based on the block division of large-scale complex BIM data, a layered processing method is proposed, that is, on the basis of the block division (referred to as level 0), the four or eight tiles adjacent in space are reconstructed (merged) into a tile, which is used as the input of the reduction algorithm and re-optimized to obtain a new larger tile, which is placed in another layer (level 1) until all level 0 tiles are combined and re-optimized to level 1. This process merges the four or eight adjacent tiles in level 0 and optimizes them, and the resulting tiles are output to level 1. The spatial range of the tiles in level 1 covers the spatial range of the corresponding four or eight tiles input in level 0, so the number of tiles in level 1 is one-fourth or one-eighth of the number of tiles in level 0. Similarly, all tiles in level i (i>=0) are merged into new tiles according to the adjacent four or eight tiles as the input of the reduction algorithm, and the level i is merged and optimized, and output to the level i+1 layer until level N. When the number of all tiles after optimization is less than 100, the merging and optimization are stopped. This process is called the construction of the LOD (Level of detail) tree, and N is the height of the LOD tree. In the above process, during the construction of level 0 to level N, the number of tile files decreases layer by layer in the manner of (1 / 4)i or (1 / 8)i, and the spatial coverage of the tile is also increasing by four or eight times. The benefit is that the rendering batch is reduced, and the amount of data for each tile remains basically unchanged after the reduction algorithm is optimized. What changes is that with each additional level, the geometric error of the tile after optimization will be larger and the details will be less. Then in the rendering scheduling process, the rendering engine determines the download of a certain level of tiles based on the distance from the current viewpoint. The farther away from the viewpoint, the higher the level of the tiles used, the smaller the batches, and the smaller the data volume, thereby reducing the download volume and rendering pressure and improving the frame rate.
[0050] The process of stratifying BIM model data is as follows: Figure 2As shown in the figure, each square at level 0 represents a tile file, which is a part of the BIM model that is strictly cut according to the spatial cube box represented by this square; each four adjacent tiles are merged and optimized and put into level 1 as a tile with a larger spatial coverage; and so on, until the number of tiles at level N is reduced to less than 100, the rendering batch will also be controlled at about 2 orders of magnitude, thereby achieving the purpose of reducing rendering batches, improving rendering frame rate, and reducing the amount of data downloaded.
[0051] The method provided by the embodiment of the present invention constructs an LOD pyramid forest for large-volume BIM model data, performs slice processing on the BIM model bounding box according to the preset number of LOD pyramid forest root nodes, and performs layered processing on the basis of the slice processing, so that the processed large-volume complex BIM model data completely retains the original semantic information of the input BIM model data, such as information on measurement, material, construction process, etc., lays a good foundation for subsequent three-dimensional applications based on web pages, and facilitates seamless migration from traditional desktop three-dimensional applications to three-dimensional applications based on web pages. It can significantly improve the user experience of three-dimensional real-time interactive rendering on the traditional desktop end, and transform large-volume complex BIM model data from desktop real-time rendering to three-dimensional real-time interactive rendering on web pages without plug-ins.
[0052] In the embodiment of the present invention, the bounding box is sliced according to the preset number of LOD pyramid forest root nodes to obtain a plurality of three-dimensional tiles, as shown in FIG. Figure 3 As shown, the following steps are included:
[0053] Step S21: Calculate the size of the initial three-dimensional tile according to the number of preset LOD pyramid forest root nodes and the size of the axis-aligned bounding box;
[0054] Step S22: using the bounding box of the initial three-dimensional tile to cut the axis-aligned bounding box of the entire BIM model to obtain each secondary three-dimensional tile, and determining whether the secondary three-dimensional tile satisfies the preset constraint condition;
[0055] Step S23: When the preset constraint conditions are not met, each secondary 3D tile is divided into a preset number of equal parts, and the bounding box of the equally divided 3D tile is used to cut the axis-aligned bounding box of the entire BIM model, and so on, until all the 3D tiles obtained by cutting meet the preset constraint conditions.
[0056] Specifically, the size sz of the initial tile is calculated according to the number of root nodes tt of the specified LOD tree, sz = [(aabb.dx*aabb.dy*aabb.dz) / tt]1 / 3, starting from the lower left point of aabb, the number of tiles in the x-axis direction of aabb nx = std::ceil(aabb.dx / sz), the number of tiles in the y-axis direction of aabb ny = std::ceil(aabb.dy / sz), the number of tiles in the z-axis direction of aabb nz = std::ceil(aabb.dz / sz); the lower left point lb of each tile can be calculated as follows pseudo code:
[0057] For i:0->nx
[0058] For j:0->ny
[0059] For k:0->nz
[0060] lb=vec3f(aabb.minx,aabb.miny,aabb.minz)+vec3f(sz,sz,sz)*vec3f(i,j,k);
[0061] The upper right point rt of each tile can be calculated using the following formula:
[0062] rt=lb+vec3f(1,1,1)*sz.
[0063] The BIM model data is accurately cut through the six faces of each tile's bounding box tile_aabb(lb, rt).
[0064] According to the above principle of block division, the model data of each tile is judged, that is, the number of vertices of the model mesh in the tile should be less than vn (it can be reasonably set according to actual needs), and the surface area of the textured model should meet the R value less than 1cm 2 ,If the condition is met, stop and output all tile files; otherwise, divide each tile equally by four or eight rules to get a new tile_aabb, and then use the new tile_aabb to cut the BIM model, and so on, until all tile files meet the two conditions of block division.
[0065] In an embodiment of the present invention, a plurality of three-dimensional tiles are used as nodes of the initial layer, and each node is layered according to a preset optimization processing rule. When the number of nodes after the layered processing is less than a preset value, the process of obtaining the optimized BIM model data is as follows: Figure 4 As shown, including:
[0066] Step S31: using multiple 3D tile files as nodes of the initial layer, merging a preset number of adjacent 3D tiles, optimizing the merged new 3D tile files, and using the optimized results as the second layer 3D tile files, wherein the spatial bounding box of the second layer 3D tile files just covers the spatial bounding box of the preset number of 3D tiles of the initial layer;
[0067] Step S32: after all the 3D tile files of the initial layer are merged and optimized into the second layer, the 3D tile files of the second layer replace all the 3D tile files of the initial layer;
[0068] Step S33: the above-mentioned layered processing method of merging and optimizing the three-dimensional tile files is followed by analogy. If the number of three-dimensional tile files in the Nth layer is less than the preset number, the layering is stopped to obtain the optimized BIM model data.
[0069] In a specific embodiment, all tile files obtained in the block division process are used as level 0 nodes to perform a layering process:
[0070] 1) Merge four or eight adjacent tile files. The merged new tile is used as the input of the reduction algorithm for model optimization. The optimization result is used as the level 1 tile file. The spatial bounding box of this tile file just covers the spatial bounding box of the corresponding four or eight tiles in level 0.
[0071] 2) After all level 0 tile files are merged and optimized into level 1, replace the level 0 tile files with the tiles in level 1, and generate all the tiles in level 2 according to the method in 1), and so on... If the number of tile files in level N is less than 100 (this is just an example, not limited to this), stop.
[0072] The slicing process of the present embodiment is actually a regular segmentation of the original model or scene, while the layering is to approximate the details of the original model or scene by reducing the geometric accuracy and texture accuracy of the tile on the basis of the slicing; after obtaining the slicing and layering LOD tree, the scene scheduler can load from the coarsest root node to the child node corresponding to the appropriate distance without the need to load the entire tree and all the scenes, reducing the pressure on network download and GPU rendering.
[0073] Example 2
[0074] The embodiment of the present invention provides a system for optimizing large-volume BIM model data. Figure 5 As shown, including:
[0075] The axis-aligned bounding box acquisition module 1 is used to acquire and calculate the axis-aligned bounding box of the large-volume BIM model. This module executes the method described in step S1 of embodiment 1, which will not be described in detail here.
[0076] The slicing processing module 2 is used to construct an LOD pyramid forest for large-volume BIM model data, and to slice the bounding box according to the preset number of LOD pyramid forest root nodes to obtain multiple three-dimensional tiles, and the three-dimensional tiles all meet the preset constraint conditions. This module executes the method described in step S2 of embodiment 1, which will not be repeated here.
[0077] The layered processing module 3 is used to use multiple three-dimensional tiles as nodes of the initial layer, and perform layered processing on each node according to a preset optimization processing rule. When the number of nodes after the layered processing is less than a preset value, the optimized BIM model data is obtained. This module executes the method described in step S3 of embodiment 1, which will not be repeated here.
[0078] The optimization system of large-volume BIM model data of the embodiment of the present invention constructs an LOD pyramid forest for large-volume BIM model data, performs slice processing on the BIM model bounding box according to the preset number of LOD pyramid forest root nodes, and performs layer processing on the basis of the slice processing, so that the processed large-volume complex BIM model data completely retains the original semantic information of the input BIM model data, such as information on measurement, material, construction process, etc., lays a good foundation for subsequent three-dimensional applications based on web pages, and facilitates seamless migration from traditional desktop three-dimensional applications to three-dimensional applications based on web pages. It can significantly improve the user experience of three-dimensional real-time interactive rendering on the traditional desktop end, and transforms large-volume complex BIM model data from real-time rendering on the desktop end to three-dimensional real-time interactive rendering on a web page without a plug-in.
[0079] Example 3
[0080] An embodiment of the present invention provides a computer device, such as Figure 6 As shown, the device may include a processor 51 and a memory 52, wherein the processor 51 and the memory 52 may be connected via a bus or other means. Figure 6 Take the example of connecting via a bus.
[0081] The processor 51 may be a central processing unit (CPU). The processor 51 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or a combination of the above chips.
[0082] The memory 52 is a non-transitory computer-readable storage medium that can be used to store non-transitory software programs, non-transitory computer executable programs and modules, such as the corresponding program instructions / modules in the embodiment of the present invention. The processor 51 executes various functional applications and data processing of the processor by running the non-transitory software programs, instructions and modules stored in the memory 52, that is, the optimization method of large-volume BIM model data in the above method embodiment is implemented.
[0083] The memory 52 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and applications required for at least one function; the data storage area may store data created by the processor 51, etc. In addition, the memory 52 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage devices. In some embodiments, the memory 52 may optionally include a memory remotely arranged relative to the processor 51, and these remote memories may be connected to the processor 51 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, an intranet, a mobile communication network, and combinations thereof.
[0084] One or more modules are stored in the memory 52, and when executed by the processor 51, the optimization method of large-volume BIM model data in Example 1 is executed.
[0085] The specific details of the above-mentioned computer device can be understood by referring to the corresponding related descriptions and effects in Example 1, and will not be repeated here.
[0086] Those skilled in the art can understand that the implementation of all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program. The program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD), etc.; the storage medium can also include a combination of the above-mentioned types of memory.
[0087] Obviously, the above embodiments are merely examples for the purpose of clear explanation, and are not intended to limit the implementation methods. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the implementation methods here. The obvious changes or modifications derived from these are still within the scope of protection of the invention.
Claims
1. A method for optimizing large-volume BIM model data, characterized in that: The steps include: Calculate axis-aligned bounding boxes for large-volume BIM models; Constructing an LOD pyramid forest for large-volume BIM model data, and slicing the bounding box according to a preset number of LOD pyramid forest root nodes to obtain a plurality of three-dimensional tiles, wherein the three-dimensional tiles all satisfy preset constraint conditions, and the preset constraint conditions include: the number of vertices of the triangular mesh in each three-dimensional tile is less than a preset threshold value and the surface area covered by each pixel in the model with texture attributes inside each three-dimensional tile is less than a preset threshold value; Take multiple 3D tiles as nodes of the initial layer, and perform layered processing on each node according to the preset optimization processing rules. When the number of nodes after layered processing is less than the preset value, the optimized BIM model data is obtained, including: Using multiple 3D tile files as nodes of the initial layer, merging a preset number of adjacent 3D tiles, optimizing the merged new 3D tile files, and using the optimized results as the 3D tile files of the second layer, wherein the spatial bounding box of the 3D tile files of the second layer just covers the spatial bounding box of the preset number of 3D tiles of the initial layer; After all the 3D tile files of the initial layer are merged and optimized into the second layer, the 3D tile files of the second layer replace all the 3D tile files of the initial layer; The above-mentioned merging and optimizing layering processing method of the 3D tile files is used in a similar manner. If the number of 3D tile files in the Nth layer is less than the preset number, the layering is stopped to obtain the optimized BIM model data. According to the intersection of the bounding box of the viewing volume and the 3D tile during 3D rendering, it is determined whether to download the 3D tile file of this layer to the client for rendering.
2. The method for optimizing large-volume BIM model data according to claim 1, characterized in that: The step of slicing the bounding box according to the preset number of LOD pyramid forest root nodes to obtain a plurality of three-dimensional tiles, wherein the three-dimensional tiles all meet the preset constraint conditions, comprises: Calculate the size of the initial 3D tile according to the preset number of LOD pyramid forest root nodes and the size of the axis-aligned bounding box; Using the bounding box of the initial three-dimensional tile to cut the axis-aligned bounding box of the entire BIM model to obtain each secondary three-dimensional tile, and determining whether the secondary three-dimensional tile satisfies the preset constraint condition; When the preset constraints are not met, each secondary 3D tile is divided into a preset number of equal parts, and the bounding box of the equally divided 3D tile is used to cut the axis-aligned bounding box of the entire BIM model, and so on, until all the 3D tiles obtained by cutting meet the preset constraints.
3. The method for optimizing large-volume BIM model data according to claim 2, characterized in that: The calculation formula for calculating the size sz of the initial three-dimensional tile is: sz=[(aabb.dx*aabb.dy*aabb.dz) / tt] 1 / 3 , Among them, aabb.dx*aabb.dy*aabb.dz represents the size of the axis-aligned bounding box, and tt represents the number of preset LOD pyramid forest root nodes.
4. The method for optimizing large-volume BIM model data according to claim 3, characterized in that: Each secondary three-dimensional tile is divided equally into four or eight regular parts.
5. The method for optimizing large-volume BIM model data according to claim 1, characterized in that: The number of adjacent presets is four or eight.
6. An optimization system for large-volume BIM model data, characterized in that: include: An axis-aligned bounding box acquisition module is used to obtain and calculate the axis-aligned bounding box of a large-volume BIM model; A slicing processing module is used to construct an LOD pyramid forest for large-volume BIM model data, and to slice the bounding box according to a preset number of LOD pyramid forest root nodes to obtain a plurality of three-dimensional tiles, wherein the three-dimensional tiles all satisfy preset constraint conditions, and the preset constraint conditions include: the number of vertices of the triangular mesh in each three-dimensional tile is less than a preset threshold value and the surface area covered by each pixel in the model with texture attributes inside each three-dimensional tile is less than a preset threshold value; The layered processing module is used to use multiple three-dimensional tiles as nodes of the initial layer, and perform layered processing on each node according to a preset optimization processing rule. When the number of nodes after the layered processing is less than a preset value, the optimized BIM model data is obtained, including: Using multiple 3D tile files as nodes of the initial layer, merging a preset number of adjacent 3D tiles, optimizing the merged new 3D tile files, and using the optimized results as the 3D tile files of the second layer, wherein the spatial bounding box of the 3D tile files of the second layer just covers the spatial bounding box of the preset number of 3D tiles of the initial layer; After all the 3D tile files of the initial layer are merged and optimized into the second layer, the 3D tile files of the second layer replace all the 3D tile files of the initial layer; The above-mentioned merging and optimizing layering processing method of the 3D tile files is used in a similar manner. If the number of 3D tile files in the Nth layer is less than the preset number, the layering is stopped to obtain the optimized BIM model data. According to the intersection of the bounding box of the viewing volume and the 3D tile during 3D rendering, it is determined whether to download the 3D tile file of this layer to the client for rendering.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the large-volume BIM model data optimization method as described in any one of claims 1 to 5.
8. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the large-volume BIM model data optimization method as described in any one of claims 1 to 5 by executing the computer instructions.
Citation Information
Patent Citations
BIM model data optimization method and system
CN110310353A
Three-dimensional visualization engine and WEB application calling method based on BIM model
CN107193911A