An optimization method, apparatus, electronic device, and medium for BIM loading.
By filtering and constructing the oriented bounding box information of the BIM model, and combining the level of detail rules and painter algorithms, the rendering state of the model is dynamically adjusted, which solves the problems of low loading efficiency and poor performance of BIM and achieves efficient rendering in complex scenes.
Patent Information
- Application Number
- CN202411776874.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-05
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2044-12-05
AI Technical Summary
In existing technologies, Building Information Modeling (BIM) loading efficiency is low and loading performance is poor, especially when small objects are occluded inside multi-story building models. Existing occlusion query algorithms cannot handle this flexibly, and ray detection methods are performance-intensive and unsuitable, resulting in insufficient BIM loading efficiency and performance.
By selecting building models that meet the target loading optimization conditions, calculating their oriented bounding box (OBB) information, using level of detail rules and painter algorithms to determine occlusion relationships, filtering out hidden models step by step and constructing target OBB models, and only displaying the OBB models of non-hidden models in the rendering scene.
By dynamically updating the rendering state of the model, the number of invalid rendering models is reduced, improving the loading efficiency and performance of BIM, especially optimizing the rendering load in complex scenes.
Smart Images

Figure CN119720337B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of building information modeling (BIM) technology, and in particular to an optimization method, apparatus, electronic device, and medium for BIM loading. Background Technology
[0002] With the increasing popularity of Building Information Modeling (BIM) technology, the architectural design field often faces problems such as high model complexity and large number of models, which often become bottlenecks restricting model loading performance.
[0003] In existing technologies, the performance burden is generally reduced by lowering the model precision through Level of Detail (LOD) rules. However, LOD rules are mainly suitable for high-precision triangular face models, and for scenarios with a large number of small-sized models inside building floors, LOD technology is difficult to meet performance requirements. In addition, existing occlusion query algorithms, such as hard query methods, cannot flexibly handle occlusion problems, and while raycasting methods have high accuracy, they are performance-intensive and not suitable for occlusion of small objects inside multi-story building models, resulting in rendering more models in the scene and reducing the loading efficiency and performance of BIM. Summary of the Invention
[0004] This invention provides an optimized method for BIM loading to solve the problems of low loading efficiency and poor loading performance of building information models.
[0005] According to one aspect of the present invention, an optimization method for BIM loading is provided, comprising:
[0006] In the building model data to be loaded, select candidate optimized building models that meet the target loading optimization conditions;
[0007] Calculate the oriented bounding box (OBB) information for each candidate optimized building model;
[0008] Based on the OBB information of each candidate optimized building model, at least one level of detail rule is used to progressively filter out the candidate hidden model and the target hidden model from each candidate optimized building model.
[0009] Based on the occlusion relationships of each candidate hidden model calculated using the painter algorithm, the target hidden model is selected from each candidate hidden model, and the target OBB model corresponding to each target hidden model is constructed.
[0010] While loading and displaying the building model data (excluding the target hidden model) in the rendering scene, the target OBB models are also loaded into the rendering scene for synchronous display.
[0011] According to another aspect of embodiments of the present application, there is also provided an optimization device for BIM loading, comprising:
[0012] a building model screening module configured to screen, from the building model data to be loaded, candidate optimized building models that meet a target loading optimization condition;
[0013] an information calculation module configured to calculate OBB information of each candidate optimized building model;
[0014] a hidden model screening module configured to screen, from each candidate optimized building model, a candidate hidden model and a target hidden model according to the OBB information of each candidate optimized building model using at least one level of detail rule;
[0015] a model construction module configured to screen the target hidden model from each candidate hidden model according to an occlusion relationship of each candidate hidden model calculated using a painter algorithm, and to construct a target OBB model corresponding to each target hidden model;
[0016] a model display module configured to load each target OBB model into a rendering scene for synchronous display while loading and displaying other model data in the building model data except the target hidden model in the rendering scene.
[0017] According to another aspect of embodiments of the present application, there is also provided an electronic device, comprising:
[0018] at least one processor; and
[0019] a memory communicatively connected to the at least one processor; wherein
[0020] the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to perform the optimization method for BIM loading according to any one of the embodiments of the present application.
[0021] According to another aspect of embodiments of the present application, there is also provided a computer readable storage medium storing computer instructions for enabling a processor to perform the optimization method for BIM loading according to any one of the embodiments of the present application.
[0022] According to another aspect of embodiments of the present application, there is also provided a computer program product comprising computer program / instructions for enabling a processor to perform the steps of the method according to any one of the embodiments of the present application.
[0023] The technical scheme of the embodiment of the application is: in the building model data to be loaded, candidate optimization building models meeting target loading optimization conditions are screened; OBB information of each candidate optimization building model is calculated respectively; according to the OBB information of each candidate optimization building model, at least one level of detail rule is used to screen out candidate hidden models and target hidden models from each candidate optimization building model step by step; according to the occlusion relationship of each candidate hidden model calculated by the painter algorithm, the target hidden models are screened out from the candidate hidden models, and target OBB models corresponding to each target hidden model are constructed; while loading and displaying other model data in the building model data except the target hidden models in the rendering scene, each target OBB model is loaded into the rendering scene for synchronous display. Through the level of detail rule and the painter algorithm, the rendering state of the model in the scene is dynamically updated, the number of invalid rendering models is reduced, the rendering load is reduced, the loading efficiency of the BIM is improved, and the loading performance of the BIM is optimized.
[0024] It should be understood that the content described in this part is not intended to identify key or important features of the embodiments of the application, nor is it used to limit the scope of the application. Other features of the application will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS
[0025] In order to more clearly illustrate the technical solutions in the embodiments of the application, the following will briefly introduce the drawings needed to be used in the embodiment description. Obviously, the drawings in the following description are only some embodiments of the application, and other drawings can be obtained by those skilled in the art without creative labor.
[0026] Figure 1 is a flow chart of a BIM loading optimization method provided by the first embodiment of the application;
[0027] Figure 2 is a flow chart of another BIM loading optimization method provided by the second embodiment of the application;
[0028] Figure 3 is a model initialization and classification flow chart suitable for the embodiments of the application;
[0029] Figure 4 is a model display hidden query result calculation flow chart suitable for the embodiments of the application;
[0030] Figure 5 is a model loading flow chart suitable for the embodiments of the application;
[0031] Figure 6 is a structural schematic diagram of a BIM loading optimization device provided by the third embodiment of the application;
[0032] Figure 7 is a structural schematic diagram of an electronic device implementing the BIM loading optimization method of the embodiments of the present application. DETAILED DESCRIPTION
[0033] In order for those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the accompanying drawings of the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor should fall within the scope of protection of the present application.
[0034] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily describe a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but can include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0035] Embodiment one
[0036] Figure 1 A flowchart of a BIM loading optimization method provided for the first embodiment of the present application, the present embodiment can be applicable to the case of screening and hiding the occluded building model in the building information model when loading the building model to the rendering scene. The method can be executed by a BIM loading optimization device, which can be realized in the form of hardware and / or software and can generally be configured in an electronic device. As shown in the figure, the method comprises: Figure 1
[0037] S110, screening the candidate optimization building model meeting the target loading optimization condition in the building model data to be loaded.
[0038] In the embodiment of the present application, the target loading optimization condition can be understood as follows: in the to-be-loaded architectural model data, the architectural parts with large volume and possible occlusion relationship, such as pipes, walls, elbows (a kind of pipe fitting that changes the direction of the pipeline), and the like, are mainly concerned, because these components may affect the line of sight when rendering, and the occlusion relationship between them and other architectural parts needs to be considered before loading and rendering. In contrast, for the components with large volume but no occlusion relationship, such as floors, they usually do not affect the line of sight, and therefore can be ignored in the optimization process. The alternative optimization architectural model can be understood as follows: the architectural parts with large volume and occlusion relationship, and the architectural parts near the architectural parts with large volume and occlusion relationship, which are possibly occluded and have a large number and relatively small size, are selected from the to-be-loaded architectural model according to the target loading optimization condition.
[0039] Specifically, in the to-be-loaded architectural model data, the alternative optimization architectural model meeting the target loading optimization condition is selected, such as the architectural parts, such as pipes, walls, elbows, and the like, and the architectural parts near the architectural parts, which are possibly occluded and have a large number and relatively small size.
[0040] S120, the OBB information of each alternative optimization architectural model is calculated respectively.
[0041] In the embodiment of the present application, the OBB (Oriented Bounding Box) refers to a minimum bounding box used to enclose an object in a three-dimensional space, which can be rotated to fit the shape of the object more closely, so as to better adapt to the direction of the object.
[0042] Specifically, the convex hull of the vertices of each alternative optimization architectural model is determined by calculating the minimum convex polygon of all vertices; the principal component analysis is performed on the vertices of the convex hull to identify the principal axis of the architectural model (the principal axis determines the direction of the OBB), and the boundary of the OBB is determined according to the analysis result; the vertices of the OBB are reconstructed by projecting the points onto the principal axis and calculating the minimum and maximum values of the projection; finally, the vertices of the OBB are converted from the principal component analysis space back to the original space to obtain the OBB information of each alternative optimization architectural model.
[0043] S130, according to the OBB information of each alternative optimization architectural model, at least one level of detail rule is used to select the alternative hidden model and the target hidden model from each alternative optimization architectural model step by step.
[0044] In the embodiment of the present application, the Level of Detail (LOD) rule refers to dynamically adjusting the rendering details of the object according to the distance between the 3D object and the observation point (for example, the camera). When the object is far away from the observation point, a model with fewer polygons or lower details is used for rendering, thereby reducing the rendering load and improving the rendering efficiency; when the object is close to the observation point, a model with more details and more quantity is used to maintain the visual quality, and the transition between different LOD models is smooth, and the continuity of the scene and the resolution of the model are visually maintained. The target hidden model can be specifically understood as: the building model that needs to be hidden, and the selected target hidden model in the step S130 refers to the selected target hidden model in the selected optimization building model that meets the LOD filtering rule by using at least one Level of Detail rule, that is, the selected optimization building model that needs to be hidden. The alternative hidden model can be specifically understood as: the building model in the selected optimization building model except the target hidden model, that is, the selected optimization building model that does not meet the LOD filtering rule. The LOD rule can specifically include: the LOD angle rejection rule and the LOD scene management rule. The LOD angle rejection refers to rejecting the objects that are not in the field of view of the camera according to the angle of the camera and the orientation of the object, so as to reduce the rendering burden. The LOD scene management refers to dividing the scene into different regions, and using different LOD strategies for each region to optimize the resource allocation.
[0045] Specifically, according to the OBB information of each selected optimization building model, at least one LOD filtering rule, for example, the LOD angle rejection rule and the LOD scene management rule, is used to select the selected optimization building model that meets the LOD filtering rule as the target hidden model, and the remaining selected optimization building model is selected as the alternative hidden model.
[0046] In the step S140, the occlusion relationship of each alternative hidden model calculated by using the painter algorithm is used to select the target hidden model from the alternative hidden models, and the target OBB model corresponding to each target hidden model is constructed.
[0047] In the embodiment of the present application, the painter algorithm refers to sorting the building models in the scene according to their distance from the observation point, and then drawing the building models in order from far to near. Since the building model close to the observation point is drawn last, it covers the building model far away, and finally produces the occlusion relationship of the corresponding building model on the screen, so that the mutual occlusion relationship of the building models can be determined, and the occlusion relationship can specifically include: complete occlusion, partial occlusion and no occlusion.
[0048] Specifically, the painter algorithm is used to calculate the mutual occlusion relationship of each candidate hidden model, and the occluded building model that needs to be hidden, i.e., the target hidden model, is screened out, and the target OBB model is constructed according to the corresponding OBB information to replace the occluded building model that does not perform rendering.
[0049] S150, while loading and displaying the model data of the building model except the target hidden model in the rendering scene, the target OBB model is loaded into the rendering scene for synchronous display.
[0050] Specifically, while loading and displaying the model data of the building model except the target hidden model, i.e., the building model that needs to be displayed, in the rendering scene, the target OBB model, i.e., the building model that is occluded and does not perform rendering in the building model data, is loaded into the rendering scene for synchronous display.
[0051] The technical scheme of the embodiment of the application screens the candidate optimization building model that meets the target loading optimization condition from the building model data to be loaded, calculates the OBB information of each candidate optimization building model, screens the candidate hidden model and the target hidden model from each candidate optimization building model by using at least one level of detail rule according to the OBB information of each candidate optimization building model, screens the target hidden model from each candidate hidden model according to the occlusion relationship of each candidate hidden model calculated by the painter algorithm, and constructs the target OBB model corresponding to each target hidden model, and loads each target OBB model into the rendering scene for synchronous display while loading and displaying the model data of the building model except the target hidden model in the rendering scene. By using the level of detail rule and the painter algorithm, the rendering state of the model in the dynamic update scene is realized, the number of invalid rendering models is reduced, the rendering load is reduced, the loading efficiency of BIM is improved, and the loading performance of BIM is optimized.
[0052] Optionally, on the basis of each of the above embodiments, the candidate hidden model and the target hidden model are screened from each candidate optimization building model by using at least one level of detail rule according to the OBB information corresponding to each candidate optimization building model, including:
[0053] According to the OBB information corresponding to each candidate optimization building model, the candidate optimization building model located outside the viewing frustum is screened out as the target hidden model by viewing frustum query, and the remaining candidate optimization building models are used as the candidate hidden model.
[0054] In the embodiment of the present application, the view cone query is to determine which building models in the scene are located in the view cone of the observation point (such as a camera), and only the building models located in the view cone are rendered, while the building models outside the view cone are ignored, thereby reducing the rendering burden.
[0055] Specifically, according to the OBB information corresponding to each alternative optimized building model, the distance between each point of the OBB corresponding to each alternative optimized building model and the observation point (such as a camera) is calculated, the nearest point is taken as the minimum point, and the farthest point is taken as the maximum point. Whether the minimum point, the maximum point and the center point of the OBB corresponding to each alternative optimized building model are in the view cone of the observation point (such as a camera) is judged to determine whether the building model needs to be hidden. For example, when three points are in the view cone, no hiding is needed, when two points or one point are in the view cone, it belongs to across the view cone, when no point is in the view cone, it belongs to outside the view cone, and the building models in the across view cone and the outside view cone need to be hidden, that is, the alternative optimized building model located outside the view cone is screened out, which needs to be taken as the target hidden model, and the remaining alternative optimized building models are taken as the alternative hidden models, so as to reduce unnecessary rendering and calculation and improve the performance of BIM loading rendering.
[0056] Further, on the basis of each of the above embodiments, when the alternative optimized building model located outside the view cone is screened out as the target hidden model, it further includes:
[0057] In the OBB information of the remaining alternative optimized building models, the OBB information of the pipeline type building model is obtained.
[0058] According to the OBB information of the pipeline type building model, a first ratio of the camera distance divided by the diameter of the pipeline is calculated for each pipeline type building model, and the alternative optimized building model with the first ratio greater than or equal to a first preset threshold is screened out as the target hidden model.
[0059] In the embodiment of the present application, the first ratio can be specifically understood as the ratio of the distance (camera distance) from the camera (observation point) to the center of the pipeline to the diameter of the pipeline, which is used to judge the relative size of the pipeline and the relative distance of the camera. The first preset threshold can be specifically understood as the LOD threshold set according to the project requirements and performance considerations, so as to determine whether to hide the building model during rendering according to the calculated first ratio.
[0060] Specifically, after screening out the candidate optimized building model located outside the view frustum as the target hidden model, in the OBB information of the remaining candidate optimized building models, the OBB information of the pipeline type building model is acquired, including the distance from the camera (observation point) to the center of the pipeline (camera distance) and the diameter of the pipeline, the first ratio is obtained by dividing the camera distance by the diameter of the pipeline, and the first ratio is compared with the first preset threshold value, when the first ratio is greater than or equal to the first preset threshold value, it represents that the pipeline is relatively far away from the camera and the diameter of the pipeline is relatively small, which needs to be hidden, that is, the candidate optimized building model is taken as the target hidden model, and the remaining candidate optimized building models are taken as the candidate hidden models, so as to realize the preliminary filtering of the candidate optimized building models in the view frustum according to the relationship between the camera distance and the diameter of the pipeline.
[0061] Further, on the basis of the above-mentioned embodiments, after screening out the candidate optimized building model with the first ratio greater than or equal to the first preset threshold value as the target hidden model, further comprising:
[0062] According to the OBB information of the remaining candidate optimized building models, the second ratio obtained by dividing the camera distance of each candidate optimized building model by the size of the bounding box is calculated, and the candidate optimized building model with the second ratio greater than or equal to the second preset threshold value is screened out as the target hidden model.
[0063] In the embodiments of the present application, the second ratio can be specifically understood as the ratio of the distance (camera distance) from the camera (observation point) to the center point of the OBB bounding box or the reference point set according to the demand to the size of the OBB bounding box, which is used to dynamically adjust the rendering details according to the relative distance between the camera and the OBB bounding box of the building model and the size of the OBB bounding box of the building model. The second preset threshold value can be specifically understood as the LOD threshold value set according to the project demand and performance consideration, so as to determine whether to hide the building model during rendering according to the calculated second ratio.
[0064] Specifically, after screening out the candidate optimized building model with the first ratio greater than or equal to the first preset threshold value as the target hidden model, a second ratio of a camera distance from a camera (observation point) to a center point of an OBB bounding box or a reference point set according to requirements divided by a size of the OBB bounding box is calculated according to OBB information of each remaining candidate optimized building model, wherein the size of the OBB bounding box can be a difference between maximum and minimum coordinate values of the OBB bounding box along X, Y and Z axes and a diagonal line, and the second ratio is compared with a second preset threshold value; when the second ratio is greater than or equal to the second preset threshold value, it means that the OBB bounding box is relatively far from the camera and the size of the OBB bounding box is relatively small, and needs to be hidden, that is, the candidate optimized building model is taken as the target hidden model, and each remaining candidate optimized building model is taken as a candidate hidden model, so as to further filter the candidate optimized building model according to the relationship between the camera distance and the size of the bounding box.
[0065] Further, on the basis of each of the above embodiments, after screening out the candidate optimized building model with the second ratio greater than or equal to the second preset threshold value as the target hidden model, the method further comprises:
[0066] projecting each candidate optimized building model to a screen plane, calculating a third ratio of a camera distance of each candidate optimized building model divided by an area of a minimum circumscribed rectangle formed by projecting the OBB bounding box to the screen plane according to OBB information of each remaining candidate optimized building model, and screening out the candidate optimized building model with the third ratio greater than or equal to a third preset threshold value as the target hidden model.
[0067] In the embodiments of the present application, the third ratio can be specifically understood as a ratio of a distance (camera distance) from a camera (observation point) to a center point of an OBB bounding box or a reference point set according to requirements to an area of a minimum circumscribed rectangle formed by projecting the OBB bounding box to a screen plane, which is used to dynamically adjust rendering details according to the relative distance between the camera and the OBB bounding box of the building model and the size of the projection area of the OBB bounding box of the building model on the screen. The third preset threshold value can be specifically understood as a LOD threshold value set according to project requirements and performance considerations, so as to determine whether to hide the building model during rendering according to the calculated third ratio.
[0068] Specifically, after screening out the candidate optimized building model with the second ratio greater than or equal to the second preset threshold as the target hidden model, the candidate optimized building model is projected to the screen plane, and a third ratio of a camera distance from the camera (observation point) to a center point of an OBB bounding box or a reference point set according to requirements to an area of a minimum circumscribed rectangle formed by projecting the OBB bounding box to the screen plane is calculated according to the OBB information of the remaining candidate optimized building models, where the area of the minimum circumscribed rectangle formed by projecting the OBB bounding box to the screen plane can be: in the screen coordinate system, the minimum circumscribed rectangle is calculated using the projected OBB vertex, the minimum and maximum x and y coordinates of the projected vertex on the screen plane are determined, so that the boundary of the circumscribed rectangle is determined, and then the area is calculated.
[0069] Then, the third ratio is compared with a third preset threshold, when the third ratio is greater than or equal to the third preset threshold, it represents that the OBB bounding box is relatively far from the camera and the projection area of the OBB bounding box on the screen is relatively small, which needs to be hidden, that is, the candidate optimized building model is taken as the target hidden model, and the remaining candidate optimized building models are taken as the candidate hidden models, so as to further filter the candidate optimized building models according to the relationship between the camera distance and the projection area of the OBB bounding box on the screen.
[0070] Further, on the basis of the above-mentioned embodiments, after screening out the candidate optimized building model with the third ratio greater than or equal to the third preset threshold as the target hidden model, the method further comprises:
[0071] The candidate optimized building model is projected to the screen plane, a fourth ratio of a camera distance of each candidate optimized building model to the number of screen squares occupied by the projection is calculated according to the OBB information of the remaining candidate optimized building models, and the candidate optimized building model with the fourth ratio greater than or equal to a fourth preset threshold is screened out as the target hidden model.
[0072] In the embodiments of the present application, the fourth ratio can be specifically understood as the ratio of the distance (camera distance) from the camera (observation point) to the center point of the OBB bounding box or the reference point set according to requirements to the number of screen squares occupied by the projection of the OBB bounding box to the screen plane, which is used to dynamically adjust the rendering details according to the relative distance between the camera and the OBB bounding box of the building model and the size of the number of screen squares occupied by the projection of the OBB bounding box of the building model on the screen. The fourth preset threshold can be specifically understood as the LOD threshold set according to the project requirements and performance considerations, so as to determine whether to hide the building model during rendering according to the calculated fourth ratio.
[0073] Specifically, after screening out the candidate optimization building model with the third ratio greater than or equal to the third preset threshold value as the target hidden model, the candidate optimization building model is projected to the screen plane, and the fourth ratio of the camera distance from the camera (observation point) to the center point of the OBB bounding box or the reference point set according to the requirement divided by the number of screen squares occupied by the projection of the OBB bounding box to the screen plane is calculated according to the OBB information of the remaining candidate optimization building model, wherein the number of screen squares occupied by the projection of the OBB bounding box to the screen plane can be: in the screen coordinate system, the minimum and maximum x and y coordinates of the OBB vertex are determined, so as to determine the boundary of the OBB on the screen, that is, the minimum circumscribed rectangle of the projection of the OBB.
[0074] Then, the number of screen squares occupied by the OBB can be estimated by calculating the size of the screen space occupied by the OBB divided by the size of the screen square, and the fourth ratio is compared with the fourth preset threshold value, when the fourth ratio is greater than or equal to the fourth preset threshold value, it represents that the OBB bounding box is relatively far from the camera and the number of screen squares occupied by the projection of the OBB bounding box on the screen is relatively small, which needs to be hidden, that is, the candidate optimization building model is taken as the target hidden model, and the remaining candidate optimization building model is taken as the candidate hidden model, so as to further filter the candidate optimization building model according to the relationship between the camera distance and the projection area of the OBB bounding box on the screen. By adopting the LOD rules such as view frustum query, relationship between pipe diameter and camera distance, relationship between bounding box size and camera distance, relationship between projection area and camera distance, and relationship between the number of screen squares occupied and camera distance, the candidate hidden model and the target hidden model are screened out from the candidate optimization building model, the fine model filtering is realized, the number of invalid rendering models is reduced, the rendering load is reduced, the loading efficiency of BIM is improved, and the loading performance of BIM is optimized.
[0075] Embodiment two
[0076] Figure 2 The flowchart of another BIM loading optimization method provided by the embodiment two of the application, the embodiment is a refinement of the operation of screening out the target hidden model from the candidate optimization building model according to the occlusion relationship of the candidate hidden model calculated by the painter algorithm in the above-mentioned embodiment, and constructing the target OBB model corresponding to each target hidden model, specifically comprising: screening out the candidate hidden model completely occluded as the target hidden model according to the occlusion relationship of the candidate hidden model calculated by the painter algorithm; calculating the fifth ratio of the occluded proportion of each remaining candidate hidden model, and screening out the candidate optimization building model with the fifth ratio greater than or equal to the fifth preset threshold value as the target hidden model.
[0077] Correspondingly, as Figure 2As shown, the method comprises:
[0078] S210, in the building model data to be loaded, screening the candidate optimization building models meeting the target loading optimization condition.
[0079] S220, calculating the OBB information of each candidate optimization building model respectively.
[0080] S230, according to the OBB information of each candidate optimization building model, using at least one level of detail rule, screening the candidate hidden models and the target hidden model in each candidate optimization building model step by step.
[0081] S240, according to the occlusion relationship of each candidate hidden model calculated by the painter algorithm, screening the candidate hidden model completely occluded as the target hidden model.
[0082] Specifically, in the building model data to be loaded, the candidate optimization building models meeting the target loading optimization condition are screened, the OBB information of each candidate optimization building model is calculated respectively, according to the OBB information of each candidate optimization building model, one or more level of detail rules are used, the candidate hidden models and the target hidden model are screened in each candidate optimization building model step by step, the occlusion relationship of each candidate hidden model is calculated by the painter algorithm, for example, complete occlusion, partial occlusion and no occlusion. The candidate hidden model completely occluded is screened as the target hidden model. Wherein, whether the OBB projection of the building model exists the occlusion relationship with the projection of other building model OBB can be checked by comparing the overlapping situation of the screen grid of the OBB projection and the screen grid of other OBB projection.
[0083] S250, calculating the fifth ratio value of the occluded proportion of each remaining candidate hidden model, and screening the candidate hidden model with the fifth ratio value greater than or equal to the fifth preset threshold as the target hidden model.
[0084] In the embodiment of the application, the fifth ratio value can be specifically understood as: the ratio of the number of the screen grid of the OBB projection overlapping with other OBB projection to the total number of the screen grid of the OBB, which is projected onto the screen plane. The fifth preset threshold can be specifically understood as: the allowed occlusion proportion threshold set according to the project demand and performance consideration, so as to determine whether to hide the building model during rendering according to the calculated fifth ratio value.
[0085] Specifically, the OBB is projected onto the screen plane, the minimum circumscribed rectangle of the OBB projection is determined in the screen coordinate system, and the number of screen squares covered by the rectangle and overlapping with other OBB projections is calculated, and then divided by the total number of screen squares of the rectangle, that is, the fifth ratio of the occlusion ratio of each remaining candidate hidden model is calculated. The fifth ratio is compared with the fifth preset threshold, when the fifth ratio is greater than or equal to the fifth preset threshold, for example, when the fifth preset threshold is 80%, and the fifth ratio is 90%, it indicates that 90% of the candidate hidden model corresponding to the OBB is occluded, and the candidate hidden model corresponding to the OBB needs to be hidden, that is, the candidate hidden model with the fifth ratio greater than or equal to the fifth preset threshold is selected as the target hidden model.
[0086] S260, while loading and displaying other model data in the building model data except the target hidden model in the rendering scene, loading each target OBB model into the rendering scene for synchronous display.
[0087] Specifically, while loading and displaying other model data in the building model data except the target hidden model, that is, the building model that needs to be displayed, in the rendering scene, each target OBB model (that is, the building model in the building model data that is not rendered due to being occluded) is loaded into the rendering scene for synchronous display.
[0088] The technical scheme of the embodiment of the application screens the candidate optimization building model meeting the target loading optimization condition in the building model data to be loaded, calculates the OBB information of each candidate optimization building model, selects the candidate hidden model and the target hidden model from each candidate optimization building model in stages according to the OBB information of each candidate optimization building model by using at least one level of detail rule, selects the candidate hidden model that is completely occluded as the target hidden model according to the occlusion relationship of each candidate hidden model calculated by using the painter algorithm, calculates the fifth ratio of the occlusion ratio of each remaining candidate hidden model, and selects the candidate hidden model with the fifth ratio greater than or equal to the fifth preset threshold as the target hidden model. While loading and displaying other model data in the building model data except the target hidden model in the rendering scene, each target OBB model is loaded into the rendering scene for synchronous display. By using the painter algorithm to determine the building model that is occluded or mostly occluded, the calculation amount of rendering these building models is reduced, and the overall rendering performance is improved. Especially in a complex scene with a large number of models and small sizes, there are multiple OBBs that may occlude each other. By dynamically adjusting the rendering strategy by using the painter algorithm, the performance and visual effect are optimized, the OBB bounding box is used to replace these hidden models, the number of actual rendering models is reduced, the loading efficiency of BIM is improved, and the loading performance of BIM is optimized.
[0089] Optionally, on the basis of the above embodiments, in the building model data to be loaded, the candidate optimized building model meeting the target loading optimization condition can be screened, which can include:
[0090] In the database, the building model data to be loaded is obtained;
[0091] In the building model data to be loaded, the candidate optimized building model meeting the target loading optimization condition is screened, and the basic geometric shape corresponding to each candidate optimized building model is determined.
[0092] The basic geometric shape includes a pipeline, a wall, and an elbow.
[0093] In the embodiment of the application, the basic geometric shape can be understood as the geometric shape of the building model that may cause the building components to form an occlusion relationship during the loading and rendering of the building model, and can specifically include a pipeline, which is usually cylindrical or rectangular, and can block the line of sight or light in the building, especially in a dense pipeline network; a wall, which is usually rectangular or cubic, and is used to separate space and provide support, and the thickness and height of the wall can block the line of sight and light; an elbow, which is a pipe fitting used to change the direction of the pipeline, and is usually circular or elliptical, and can cause occlusion of the line of sight in a dense pipeline network; and can also include beams and columns, which are usually cuboids or cylinders, and are used to support the weight of the building, and can form an occlusion relationship with other small building components in the building.
[0094] By determining the basic geometric shape corresponding to each candidate optimized building model, including the pipeline, the wall, and the elbow, the pipeline model that needs to be processed separately can be quickly located when the target hidden model is screened for the pipeline building model, thereby improving the processing efficiency and reducing the time for searching for a specific component in a large number of candidate optimized building models. In addition, the candidate optimized building model including the pipeline, the wall, and the elbow can be maintained and managed before BIM loading optimization, to ensure that the building model of the key parts is correct.
[0095] Specific application scenarios
[0096] With the wide application of BIM technology, problems such as complex models and large number of models are often encountered in architectural design, which leads to performance bottlenecks in model loading. To solve the problems of low loading efficiency and poor loading performance of building information models, the embodiment of the application proposes an optimization method for BIM loading, which can specifically include three links: model initialization and classification, model display hidden query result calculation, and model loading.
[0097] Figure 3A model initialization and classification flowchart suitable for embodiments of the present application is shown in FIG. 1. Figure 3 As shown in FIG. 1, the model initialization and classification link can specifically include:
[0098] First, building model data is obtained from a database, and the models are classified according to query conditions (equivalent to target loading optimization conditions) such as geometric shape categories and volumes and possibly occlusion relationships, and building parts including basic geometric shapes such as pipes, walls and elbows and possibly occlusion relationships near the basic geometric shapes, which have a large number and relatively small size, are screened out for subsequent processing. The remaining building models that do not meet the query conditions are used as display loading models.
[0099] Then, basic information is calculated for each model, OBB information is calculated, including its size, position and direction, which is used for subsequent LOD rules and occlusion calculation; screen segmentation projection data sources are calculated according to the OBB information, that is, the data set of the OBB projection in the screen space is calculated, including the projection area and the number of screen occupied cells; and model OBB placeholder models and model display and hidden query result states are generated to record the OBB models generated in the model display and hidden query result calculation link and the model display and hidden query results obtained by calculation.
[0100] Figure 4 A model display and hidden query result calculation flowchart suitable for embodiments of the present application is shown in FIG. 2. Figure 4 As shown in FIG. 2, the model display and hidden query result calculation link is used to gradually screen and filter the models through five kinds of LOD rules, including view frustum query, pipe diameter and camera distance relationship, bounding box size and camera distance relationship, projection area and camera distance relationship, and the number of screen cells occupied after projection and camera distance relationship, and to realize dynamic display and hiding of the models by combining painter's algorithm for occlusion calculation. Specifically, the model display and hidden query result calculation link can include:
[0101] 1. View frustum query
[0102] According to whether each OBB is in the camera view frustum, models that cross the view frustum and are outside the view frustum are hidden, the corresponding OBB model state is updated, and the hidden information is recorded in the model display and hidden query result state.
[0103] 2. Pipe diameter and camera distance relationship
[0104] According to the relationship between the camera distance and the pipe diameter, the pipe with a small diameter and a long distance from the camera is hidden (for example, the ratio of the camera distance to the pipe diameter is greater than a preset ratio threshold), the corresponding OBB model state is updated, and the hidden information is recorded in the model display and hidden query result state.
[0105] 3. Bounding box size and camera distance relationship
[0106] Filter out the model with small OBB size and far distance from the camera (for example, the ratio of camera distance to OBB size is greater than a preset ratio threshold), update the corresponding OBB model state, and record the hidden information to the model display hidden query result state.
[0107] 4. Relationship between projection area and camera distance
[0108] Project the OBB bounding box to the screen plane, filter according to the relationship between the minimum circumscribed rectangle area formed after projection and the distance of the camera, filter out the model with small minimum circumscribed rectangle area and far distance from the camera (for example, the ratio of camera distance to minimum circumscribed rectangle area is greater than a preset ratio threshold), update the corresponding OBB model state, and record the hidden information to the model display hidden query result state, and update the calculated projected OBB projection information and record it to the screen segmentation projection data source.
[0109] 5. Relationship between the number of screen cells occupied after projection and the distance of the camera
[0110] Further filter according to the number of screen cells occupied by the OBB bounding box after projection, combined with the distance of the camera, filter out the model with small number of screen cells occupied by the OBB bounding box after projection and far distance from the camera (for example, the ratio of camera distance to the number of screen cells occupied is greater than a preset ratio threshold), update the corresponding OBB model state, and record the hidden information to the model display hidden query result state, and update the calculated projected OBB projection information and record it to the screen segmentation projection data source.
[0111] 6. Occlusion calculation and dynamic display of models
[0112] On the basis of the filtered models, apply the painter algorithm to calculate the occlusion relationship of the models, and record the calculation results to the screen segmentation projection data source. Determine the occlusion relationship by comparing whether the projected cells of each OBB model in the screen overlap. First, filter out the OBB models that are completely occluded, and record the hidden information to the model display hidden query result state. Then calculate the number of screen cells overlapped by the OBB and other OBB projections divided by the total number of screen cells of the OBB to get the occlusion ratio. Filter out the models with large occlusion ratio (for example, the occlusion ratio is greater than a preset ratio threshold), and replace these hidden models with OBB bounding boxes to reduce the number of actual rendering models. Record the hidden information to the model display hidden query result state, and record the display information of the remaining models to the model display hidden query result state.
[0113] Figure 5 is a model loading flowchart suitable for embodiments of the present application, asFigure 5 As shown, the model loading link can specifically include: obtaining the display and hidden state of the model through the above LOD rule and occlusion calculation, and dynamically updating the rendering state of the model in the scene. In addition to the hidden model in the building model data, other model data, i.e. the real BIM model that needs to be displayed, is loaded and displayed in the rendering scene, and the hidden real model is displayed by the corresponding OBB bounding box.
[0114] The embodiment of the application provides an optimization method for building information model BIM loading. By combining a plurality of LOD rules and occlusion algorithms, and using an OBB bounding box to replace a hidden model, the number of actually rendered models is reduced, and the response speed and rendering efficiency of a BIM system in processing a BIM model are improved. In particular, in a scene in which a plurality of models are arranged in a building floor and the models have small sizes, the number of invalidly rendered models in a complex model of a multi-storey building is effectively reduced, the rendering state of the model in the scene is dynamically updated, the rendering load is reduced, the loading efficiency and response speed of the BIM are improved, and the loading performance of the BIM is optimized.
[0115] Embodiment three
[0116] Figure 6 A structural schematic diagram of a BIM loading optimization device provided by the embodiment three of the application is shown in the figure. Figure 6 As shown, the device comprises a building model screening module 610, an information calculation module 620, a hidden model screening module 630, a model construction module 640 and a model display module 650.
[0117] The building model screening module 610 is configured to screen candidate optimization building models that meet a target loading optimization condition from building model data to be loaded.
[0118] The information calculation module 620 is configured to calculate OBB information of each candidate optimization building model.
[0119] The hidden model screening module 630 is configured to screen candidate hidden models and target hidden models from each candidate optimization building model by using at least one level of detail rule according to the OBB information of each candidate optimization building model.
[0120] The model construction module 640 is configured to screen target hidden models from each candidate hidden model according to an occlusion relationship of each candidate hidden model calculated by using a painter algorithm, and to construct target OBB models corresponding to each target hidden model.
[0121] The model display module 650 is configured to load each target OBB model into a rendering scene for synchronous display while loading and displaying other model data in the building model data except the target hidden models in the rendering scene.
[0122] The technical scheme of the embodiment of the application filters the candidate optimization building models meeting the target loading optimization condition from the building model data to be loaded, calculates the OBB information of each candidate optimization building model, filters the candidate hidden models and the target hidden models from each candidate optimization building model according to the OBB information of each candidate optimization building model and at least one level of detail rule, filters the target hidden models from each candidate hidden model according to the occlusion relationship of each candidate hidden model calculated by the painter algorithm, constructs the target OBB model corresponding to each target hidden model, and loads each target OBB model into the rendering scene for synchronous display while loading and displaying the other model data in the building model data except the target hidden models in the rendering scene. By the level of detail rule and the painter algorithm, the rendering state of the model in the scene is dynamically updated, the number of invalid rendering models is reduced, the rendering load is reduced, the loading efficiency of the BIM is improved, and the loading performance of the BIM is optimized.
[0123] On the basis of the above embodiments, the hidden model filtering module 630 is specifically configured to:
[0124] According to the OBB information corresponding to each candidate optimization building model, the candidate optimization building model located outside the view cone is filtered as the target hidden model by the view cone query, and the remaining candidate optimization building models are filtered as the candidate hidden models.
[0125] Optionally, on the basis of the above embodiments, the hidden model filtering module 630 can include an OBB information acquisition unit and a first ratio calculation unit.
[0126] The OBB information acquisition unit is configured to, while filtering the candidate optimization building model located outside the view cone as the target hidden model, acquire the OBB information of the pipe type building model from the OBB information of the remaining candidate optimization building models.
[0127] The first ratio calculation unit is configured to calculate the first ratio of the camera distance divided by the pipe diameter of each pipe type building model according to the OBB information of the pipe type building model, and filter the candidate optimization building model with the first ratio less than a first preset threshold as the target hidden model.
[0128] Further, on the basis of the above embodiments, the hidden model filtering module 630 can further include a second ratio calculation unit.
[0129] a second ratio calculation unit, configured to, after screening out the candidate optimized building model with the first ratio greater than or equal to the first preset threshold as the target hidden model, calculate a second ratio of a camera distance of each of the remaining candidate optimized building models divided by a size of an OBB of the candidate optimized building model, and screen out the candidate optimized building model with the second ratio greater than or equal to a second preset threshold as the target hidden model.
[0130] Further, on the basis of the above embodiments, the hidden model screening module 630 can further include a third ratio calculation unit.
[0131] The third ratio calculation unit is configured to, after screening out the candidate optimized building model with the second ratio greater than or equal to the second preset threshold as the target hidden model, project each of the remaining candidate optimized building models to a screen plane, calculate a third ratio of a camera distance of each of the remaining candidate optimized building models divided by an area of a minimum circumscribed rectangle of the candidate optimized building model, and screen out the candidate optimized building model with the third ratio greater than or equal to a third preset threshold as the target hidden model.
[0132] Further, on the basis of the above embodiments, the hidden model screening module 630 can further include a fourth ratio calculation unit.
[0133] The fourth ratio calculation unit is configured to, after screening out the candidate optimized building model with the third ratio greater than or equal to the third preset threshold as the target hidden model, project each of the remaining candidate optimized building models to a screen plane, calculate a fourth ratio of a camera distance of each of the remaining candidate optimized building models divided by a number of screen squares occupied by the candidate optimized building model, and screen out the candidate optimized building model with the fourth ratio greater than or equal to a fourth preset threshold as the target hidden model.
[0134] On the basis of the above embodiments, the model construction module 640 is specifically configured to:
[0135] screen out a completely occluded candidate hidden model as the target hidden model according to occlusion relationships of the candidate hidden models calculated by using the painter algorithm;
[0136] calculate a fifth ratio of an occluded proportion of each of the remaining candidate hidden models, and screen out the candidate optimized building model with the fifth ratio greater than or equal to a fifth preset threshold as the target hidden model.
[0137] On the basis of the above embodiments, the building model screening module 610 is specifically configured to:
[0138] In the database, building model data to be loaded is acquired;
[0139] In the building model data to be loaded, candidate optimized building models meeting target loading optimization conditions are screened, and a basic geometric shape corresponding to each candidate optimized building model is determined.
[0140] The basic geometric shape includes a pipeline, a wall body, and an elbow.
[0141] The BIM loading optimization device provided in the embodiments of the present application can execute the BIM loading optimization method provided in any of the embodiments of the present application, and has the corresponding function modules and beneficial effects of the execution method.
[0142] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information comply with relevant laws and regulations and do not violate public order and good customs.
[0143] Embodiment four
[0144] Figure 7 A structural schematic diagram of an electronic device 10 that can be used to implement embodiments of the present application is shown. The electronic device is intended to represent various forms of digital computers, such as laptops, desktops, tablets, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular telephones, smart phones, wearable devices (e.g., headsets, glasses, watches, etc.), and other similar computing devices. The components shown here, their connections and relationships, and their functions, are meant to be examples only, and are not intended to limit the implementations of the present application described and / or claimed in this document.
[0145] As shown in Figure 7 The electronic device 10 includes at least one processor 11, and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which is communicatively connected to the at least one processor 11, wherein the memory stores a computer program that can be executed by the at least one processor. The processor 11 can execute various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0146] A plurality of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network, such as the Internet, and / or various telecommunication networks.
[0147] The processor 11 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 performs various methods and processes described above, such as the BIM loading optimization method, i.e.:
[0148] In the building model data to be loaded, screening the candidate optimized building models that meet the target loading optimization conditions;
[0149] Respectively calculating the OBB information of each candidate optimized building model;
[0150] According to the OBB information of each candidate optimized building model, using at least one level of detail rule to screen out candidate hidden models and target hidden models in each candidate optimized building model step by step;
[0151] According to the occlusion relationship of each candidate hidden model calculated by the painter algorithm, screening out the target hidden models in each candidate hidden model and constructing the target OBB model corresponding to each target hidden model;
[0152] While loading and displaying the model data in the building model data except the target hidden models in the rendering scene, loading each target OBB model into the rendering scene for synchronous display.
[0153] In some embodiments, the BIM loading optimization method can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the BIM loading optimization method described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to perform the BIM loading optimization method by any other appropriate means (e.g., by means of firmware).
[0154] Various implementations of the systems and techniques described above can be realized in digital electronic circuitry, integrated circuitry, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SOC), a programmable logic device (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.
[0155] Computer programs used to implement the methods of the application can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the computer program, when executed by the processor of the machine, implements the functions / acts specified in the flow diagrams and / or block diagrams. The computer program can be executed entirely on a machine, partially on a machine, partially on a machine as a standalone software package, partially on a machine and partially on a remote machine or entirely on a remote machine or server.
[0156] In the context of the present application, a computer-readable storage medium can be a tangible medium that can contain or store computer programs for use by or in connection with an instruction execution system, apparatus, or device. The computer-readable storage medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer-readable storage medium can be a machine-readable signal medium. More specific examples of the machine-readable storage medium will include one or more lines of electrical connections, portable computer disks, hard disk drives, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or Flash memory), optical fibers, portable compact disc read-only memories (CD-ROMs), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0157] To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the electronic device. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
[0158] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0159] The computing system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. A server can be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system, to solve the defects of large management difficulty and weak business scalability in traditional physical host and VPS service.
[0160] It should be understood that the various forms of flow shown above can be re-ordered, added to, or deleted from without departing from the scope of the present disclosure. For example, the steps recited in the present disclosure can be executed in parallel, executed in sequence, or executed in a different order, as long as the desired results of the present disclosure are achieved, and the present disclosure is not limited herein.
[0161] The specific embodiments described hereinabove are illustrative only and not restrictive. One skilled in the art will appreciate that variations and modifications can be made to the specifics described herein without departing from the spirit and principles of the application. Accordingly, the scope of protection is not limited to the specific details described herein but is given by the appended claims.
Claims
1. A method for building information modeling (BIM) loading optimization, comprising: The application comprises the following steps: In the building model data to be loaded, the candidate optimization building models meeting the target loading optimization conditions are screened out; The OBB information of each candidate optimization building model is calculated respectively; According to the OBB information of each candidate optimization building model, at least one level of detail rule is used to screen out the candidate hidden models and the target hidden models from the candidate optimization building models step by step; According to the occlusion relationship of each candidate hidden model calculated by the painter algorithm, the target hidden models are screened out from the candidate hidden models, and the target OBB models corresponding to the target hidden models are constructed; While the model data in the building model data except the target hidden models is loaded and displayed in the rendering scene, the target OBB models are loaded into the rendering scene for synchronous display; According to the OBB information corresponding to each candidate optimization building model respectively, at least one level of detail rule is used to screen out the candidate hidden models and the target hidden models from the candidate optimization building models step by step, which comprises the following steps: According to the OBB information corresponding to each candidate optimization building model respectively, the candidate optimization building models located outside the view volume are screened out as the target hidden models through the view volume query, and the remaining candidate optimization building models are taken as the candidate hidden models; The painter algorithm refers to sorting the building models in the scene according to the distance of the building models from the observation point, and then drawing the building models in the order from far to near.
2. The method of claim 1, wherein, While the candidate optimization building models located outside the view volume are screened out as the target hidden models, the following steps are further included: The OBB information of the pipeline type building model is obtained from the OBB information of the remaining candidate optimization building models; According to the OBB information of the pipeline type building model, the first ratio of the camera distance to the pipeline diameter of each pipeline type building model is calculated, and the candidate optimization building model with the first ratio greater than or equal to the first preset threshold is screened out as the target hidden model.
3. The method of claim 2, wherein, After the candidate optimization building model with the first ratio greater than or equal to the first preset threshold is screened out as the target hidden model, the following steps are further included: According to the OBB information of the remaining candidate optimization building models, the second ratio of the camera distance to the size of the bounding box of each candidate optimization building model is calculated, and the candidate optimization building model with the second ratio greater than or equal to the second preset threshold is screened out as the target hidden model.
4. The method of claim 3, wherein, After the candidate optimization building model with the second ratio greater than or equal to the second preset threshold is screened out as the target hidden model, the following steps are further included: Each candidate optimization building model is projected to the screen plane, the third ratio of the camera distance to the area of the minimum circumscribed rectangle of each candidate optimization building model is calculated according to the OBB information of the remaining candidate optimization building models, and the candidate optimization building model with the third ratio greater than or equal to the third preset threshold is screened out as the target hidden model.
5. The method of claim 4, wherein, After the candidate optimization building model with the third ratio greater than or equal to the third preset threshold is screened out as the target hidden model, the following steps are further included: Projecting each of the candidate optimized building models to a screen plane, calculating a fourth ratio of a camera distance of each of the candidate optimized building models divided by a number of screen squares occupied by the projection according to OBB information of each of the remaining candidate optimized building models, and screening the candidate optimized building model with the fourth ratio greater than or equal to a fourth preset threshold as a target hidden model.
6. The method of claim 1, wherein, According to the occlusion relationship of each of the candidate hidden models calculated by the painter algorithm, screening the target hidden model from the candidate hidden models, and constructing a target OBB model corresponding to each of the target hidden models, including: According to the occlusion relationship of each of the candidate hidden models calculated by the painter algorithm, screening the candidate hidden model that is completely occluded as the target hidden model; Calculating a fifth ratio of an occluded proportion of each of the remaining candidate hidden models, and screening the candidate hidden model with the fifth ratio greater than or equal to a fifth preset threshold as the target hidden model.
7. The method according to any one of claims 1 to 6, characterized in that, In the building model data to be loaded, screening the candidate optimized building model meeting the target loading optimization condition, including: Obtaining the building model data to be loaded in the database; In the building model data to be loaded, screening the candidate optimized building model meeting the target loading optimization condition, and determining a basic geometric shape corresponding to each of the candidate optimized building models respectively; The basic geometric shape includes a pipe, a wall, and an elbow.
8. An electronic device, comprising: The electronic device includes: at least one processor; and a memory communicatively connected with the at least one processor; wherein The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to execute the BIM loading optimization method in any one of claims 1-7.
9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer instructions for enabling the processor to execute the BIM loading optimization method in any one of claims 1-7 when executed.
Citation Information
Patent Citations
Railway fixed facility BIM model lightweight loading method
CN112906125A
Factory equipment model batch rendering method and system
CN117437340A