Method and System for Rendering Building Information Model Scenes Based on Parallel Computing
Through parallel computing and multi-threaded rendering technology, the BIM model file data is split into multiple sub-data and allocated to multiple threads for processing, solving the problems of insufficient rendering performance and blocking of BIM models in large scenarios, and achieving more efficient rendering fluency and resource utilization.
Patent Information
- Application Number
- CN202111332557.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-11
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2041-11-11
AI Technical Summary
The prior art has problems such as insufficient single-threaded rendering performance and difficult to start when rendering a large-scene BIM model, and it has failed to effectively utilize the computing resources of multi-core CPUs.
Parallel computing logic and multi-core CPU are used to realize multi-threaded rendering. By splitting the BIM model file data into multiple sub-data and distributing it to multiple threads for independent pipeline layout processing, including data reading, parsing, allocation, transmission and display.
It improves rendering processing efficiency, makes full use of the processing resources of multi-core CPUs, solves the problems of insufficient single-thread rendering performance and rendering blocking, and improves the rendering fluency and optimization performance of BIM scenes.
Smart Images

Figure CN114091147B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of building information modeling, and in particular, to a method and system for rendering a building information model scene based on parallel computing. Background Art
[0002] In recent years, the technology of Building Information Modeling (hereinafter referred to as BIM for short) has been the focus of the promotion of national building informatization. With the promotion and application of the informatization of the construction industry, urban comprehensive pipe corridors, and sponge cities across the country, the trend of reform and transformation in the construction industry has become increasingly popular, and the value of BIM will be greater and greater. However, there are problems in the process of promoting BIM, such as high learning costs, it is difficult for non-designers to quickly master, the use of BIM modeling software has high requirements for operating hardware, and the BIM original model is not portable.
[0003] In the face of the above problems, the current mainstream solution in the industry is to perform lightweight processing on the original BIM model, then render it, and finally conduct display discussions, management decisions, calculation analysis, etc. to support multi-party collaborative applications. However, this rendering mode has the following disadvantages for large-scale BIM scenarios:
[0004] When the rendered BIM scene is very complex (a large number of instances, complex material systems, many textures, complex shader combinations, complex rendering pipelines, etc.), the time consumption caused by the calculation of all these large amounts of state updates and resource binding operations per frame is very serious. Serial computing can only process one task at a time, and the rendering mode based on serial computing will cause scene stuttering in complex BIM scenarios. In a large-scale BIM scene, when processing operations to modify the pipeline state, the driver will run many tasks in the background, including downloading textures, texture sampling, texture mapping, synchronization of resource access, verification of the correctness of the rendering state combination, and error checking. If these are stuck on the CPU side, it is difficult to start optimization using a single-threaded rendering mode based on serial computing. Summary of the Invention
[0005] The present invention provides a method and system for rendering a building information model scene based on parallel computing to solve the disadvantages existing in the existing rendering mode when rendering a large-scale BIM scene.
[0006] The first object of the present invention is to provide a method for rendering a building information model scene based on parallel computing, including the following steps: data reading and data parsing, obtaining file information according to the file path of the BIM model file data, selecting a corresponding data loader for data loading based on the file information, and splitting the loaded data into several sub-data; data distribution and pipeline layout, distributing several sub-data to several threads one by one, and each thread independently performs pipeline layout processing on the corresponding sub-data; picture transmission, transmitting the picture data after pipeline layout processing to the scene container module; scene display, displaying all visible objects within the BIM scene range.
[0007] Further, each of the sub-data includes at least one BIM scene object data, and the BIM scene object data includes one or more of a terrain object, a water body object, a building component object, a particle object, and a lighting object.
[0008] Further, each of the threads includes several branch threads; the pipeline layout step includes distributing a plurality of BIM scene object data to the plurality of branch threads one by one for management, each of the branch threads corresponding to managing the life cycle of a pipeline, and each of the pipelines corresponding to a BIM scene object data.
[0009] Further, the life cycle of each of the pipelines includes the following rendering commands: creating an instance, obtaining a physical device, creating a swap chain, creating a depth buffer, creating a frame buffer, creating a data buffer, creating a synchronization barrier, enabling a validation layer, executing drawing, and destroying redundant object data.
[0010] Further, the data parsing includes: parsing node information, parsing camera data, parsing mesh data, parsing buffer data, and parsing texture data.
[0011] Further, it further includes an operation judgment step, and the operation judgment step includes: judging whether to operate on the scene picture displayed in the scene display step; if so, adjusting the relevant parameters of the pipeline layout according to the operation instruction and updating the transmitted picture.
[0012] Further, it further includes an output judgment step, and the output judgment step includes: judging whether to output a picture or a video; if so, transmitting the data of the picture or the video to the user's local machine.
[0013] The second object of the present invention is to provide a system for rendering a building information model scene based on parallel computing, the system comprising: a data loading module, used to obtain file information according to the file path of the BIM model file data, select a corresponding data loader to load data based on the file information, and split the loaded data into a plurality of sub-data; a pipeline layout module, used to distribute the split sub-data to a plurality of threads one by one, so that each thread independently performs pipeline layout processing on the corresponding sub-data; an information transmission module, used to transmit images after pipeline layout processing; a scene container module, used to receive the image data transmitted by the information transmission module, and display the image data as all visible objects within the BIM scene.
[0014] Furthermore, each of the threads includes several branch threads; the pipeline layout module includes multiple branch thread management modules, and the branch thread management module allocates multiple BIM scene object data to the multiple branch threads one by one; wherein each branch thread management module manages the life cycle of a pipeline, and each pipeline corresponds to a BIM scene object data.
[0015] Furthermore, the scene container module includes a display unit, an operation unit and an output unit; the display unit is used to display the results drawn and generated by the pipeline layout module; the operation unit is used to issue operation instructions, and the operation instructions include at least one of section analysis, measurement and calculation, object selection, object query, scene browsing, terrain change, water body placement, component tree viewing, drawing linkage, and two- and three-dimensional integrated navigation; the output unit is used to generate photo data or video data, and output the photo data or the video data to a downloadable area.
[0016] According to the method and system for building information model scene rendering based on parallel computing provided by the present invention, the BIM model file data is split into multiple sub-data, and the multi-core CPU processing capability of the computer is used to simultaneously perform multi-threaded rendering processing on the multiple sub-data. Compared with conventional single-threaded rendering processing, the processing efficiency is improved, the processing resources of the multi-core CPU are fully utilized, and the problem of insufficient single-threaded rendering performance and the problem of difficulty in optimization when rendering is blocked is solved. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0018] Figure 1Flowchart of the method for rendering building information model scenes based on parallel computing provided by an embodiment of the present invention;
[0019] Figure 2 Flowchart of the rendering command for the life cycle of a pipeline provided by an embodiment of the present invention;
[0020] Figure 3 Schematic diagram of the system for rendering building information model scenes based on parallel computing provided by an embodiment of the present invention. Detailed implementation manners
[0021] To make the above objects, features, and advantages of the present invention more obvious and understandable, the following detailed description of the specific embodiments of the present invention will be given with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0022] Since the production of BIM models and data requires mastering professional BIM modeling software. BIM modeling software such as revit with the highest market share has a certain learning cost and it is difficult for non-designers to quickly master it; in addition, due to the overly complex information and relationships contained in BIM models, the files are often very large. It is common for the data size of BIM models to be several hundred megabytes, and even several gigabytes to dozens of gigabytes. Viewing, operating, and managing models with such a large amount of data requires a computer with high-performance graphics processing, and the requirements for the operating hardware are relatively high; furthermore, due to the large amount of data, the upload and download of BIM models are not convenient, the transmission of BIM models is hindered, and the utilization value is reduced.
[0023] To solve the above technical problems, the existing solution is: first, perform lightweight processing on the original BIM model; then render it; finally, conduct display discussions, management decisions, computational analysis, etc. to support multi-party collaborative applications and fully explore the value of BIM. Among them, visual rendering is the basis for efficient BIM collaboration, and high-performance rendering is a key link in the current solution.
[0024] However, due to the characteristics of large-scale BIM scenes, such as a large number of components, a complex material system, and high consumption of texture resources, these have greatly hindered the fluency of rendering. There are problems such as insufficient performance in single-threaded rendering and difficulty in troubleshooting when rendering is blocked; in addition, multi-core computer systems are now very popular, but most graphics rendering applications do not utilize these computing resources on the CPU side, wasting available and considerable computing resources.
[0025] In view of this, this embodiment first provides a method for rendering building information model scenes based on parallel computing. Its technical means is to use parallel computing logic and multi-core CPUs to implement multi-threaded rendering to solve the above technical problems, combined with the attachedFigure 1 As shown in the figure, the method includes the following steps:
[0026] Reading and parsing BIM data, obtaining file information according to the file path of the BIM model file data, selecting a corresponding data loader for data loading based on the file information, and splitting the loaded data into several sub-data;
[0027] Data allocation and pipeline layout, allocating several sub-data to several threads (the smallest unit that the computer operating system can perform operation scheduling) one by one, and each thread independently performs pipeline layout processing on the corresponding sub-data;
[0028] Image transmission, transmitting the image data after pipeline layout processing to the scene container module;
[0029] Scene display, displaying all visible objects within the BIM scene range.
[0030] In the data reading process of this embodiment, the file location of the data is obtained according to the file path of the data, and at the same time, the file name of the data is obtained. The file format information is obtained from the suffix of the file name, and a corresponding data loader is selected according to the format of the file.
[0031] The data parsing process of this embodiment includes parsing node information, parsing camera data, parsing mesh data, parsing buffer data, and parsing texture data. Among them, each borrowing point reference in the process of parsing node information corresponds to the mesh data, and at the same time, it can also include a transformation (such as translation or rotation) to reference more sub-nodes; parsing camera data defines the frustum configuration used to render the scene; parsing mesh data references geometric data and texture data, where geometric data is used to describe the shape of 3D objects, and texture data is used to describe the appearance of 3D objects; parsing buffer data defines an abstract data source that can be accessed by various data, including transformation matrices, geometric data, and texture data. It references the actual binary data by referencing a buffer object; parsing texture data tiles format information data.
[0032] After the data parsing step is completed, the parsed sub-data is allocated to each thread. Each thread applies for CPU memory as needed according to the size of the allocated data and performs pipeline layout. Each of the sub-data includes at least one BIM scene object data, and the BIM scene object data includes one or more of terrain object, water body object, building component object (the building component object includes multiple building component groups, and multiple building component groups are managed by the next-level multiple threads), particle object, and light object.
[0033] Among them, each thread includes multiple branch threads. Correspondingly, the above pipeline layout step includes allocating multiple BIM scene object data one-to-one to multiple branch threads for management. Each branch thread manages the life cycle of a pipeline, and each pipeline corresponds to a BIM scene object data.
[0034] Combined with the attached Figure 2 As shown, taking one of the branch threads as an example, in the pipeline layout, the life cycle of the pipeline corresponding to this branch thread includes the following rendering commands, or rather, includes the following rendering steps:
[0035] Start the branch thread, allocate memory for the first pipeline on the branch thread, bind the pipeline and the terrain data obtained by parsing to the terrain object, and deploy rendering commands on the pipeline:
[0036] Create an instance, which is used to query the device information that the user's device can use, that is, the graphics card information;
[0037] Obtain the physical device, that is, obtain the GPU memory area;
[0038] Create a swap chain, and transfer the rendered image to the window that the user wants to browse through the swap chain;
[0039] Create a data buffer, which contains various data: texture images, vertex coordinate information, texture coordinate information, vertex index information, uniform buffer information, etc.;
[0040] Create a depth buffer, create a depth view buffer, which contains the depth information of each pixel of the image;
[0041] Create a frame buffer, and each frame of the image is controlled by the frame buffer. The frame buffer describes the type of image used in the rendering operation, how to use these images, and how to process the content in the image;
[0042] Create a synchronization barrier. During the rendering process, various pipelines or individual rendering commands can be executed simultaneously. Although this improves efficiency, it is very likely to cause confusion in the execution order of the rendering commands. Therefore, a synchronization barrier is needed to monitor the pipeline state and the execution state of the rendering commands. The synchronization barrier can ensure that the correct order of pipelines or rendering commands that are dependent on each other is carried out. For example, if the rendering of the first pipeline needs to be after the second pipeline, a signal can be released when the rendering of the first pipeline is completed through the synchronization barrier, telling the second pipeline that it can start rendering
[0043] Enable the validation layer. The validation layer is used to detect the state of the rendering command, and can return whether it is successful. If it fails, an error prompt message is returned;
[0044] Execute the drawing. After the preparation rendering command queue of a thread is executed, start executing the drawing command
[0045] Destroy unnecessary terrain objects, water objects, building component objects (building component objects include multiple building component groups, and multiple building component groups are bound and managed by multiple threads at the next level), particle objects, light objects and other objects to release and recycle memory.
[0046] Similarly, the rendering processes of other branch threads and pipelines are also as described above, and this embodiment will not describe them one by one.
[0047] Combined with Figure 1 As shown, the method for rendering a building information model scene based on parallel computing in this embodiment also includes an operation judgment step, which includes: judging whether the user operates the scene picture displayed in the previous scene display step; when it is judged that the user has operated, the operation instruction is transmitted from the operation module of the BIM scene container to the pipeline layout device of the BIM object, and the operation instruction includes section analysis, measurement and calculation, component selection, query component attributes, browsing BIM scene, changing terrain, placing water bodies, viewing component trees, drawing linkage, two-dimensional and three-dimensional integrated navigation, etc. Further, the relevant parameters of the pipeline layout are adjusted according to the corresponding instructions, and the transmitted picture is updated; if there is no operation, the original picture is transmitted.
[0048] In addition, the method for rendering a building information model scene based on parallel computing in this embodiment further includes an output determination step, which includes: determining whether to output a picture or a video; if so, transmitting the data of the picture or the video to the user's local computer.
[0049] Through the above rendering method, during the data processing and parsing process, the BIM model file data is split into multiple sub-data, and the computer's multi-core CPU processing power is used to perform multi-threaded rendering processing on multiple sub-data at the same time. Compared with conventional single-threaded rendering processing, it not only improves the processing efficiency and makes full use of the processing resources of the multi-core CPU, but also solves the problem of insufficient single-threaded rendering performance and rendering blocking caused by CPU instruction errors, making it difficult to start optimization.
[0050] Combined with Figure 3 As shown, based on the above rendering method process, this embodiment also provides a system for the above rendering method, which mainly includes functional modules such as a data loading module, a pipeline layout module, an information transmission module and a scene container module.
[0051] The data loading module of this embodiment is used to obtain file information according to the file path of the BIM model file data, and then select the corresponding data loader to load the data based on the file information, and split the loaded data into several sub-data.
[0052] The pipeline layout module of this embodiment is used to allocate the split sub-data to several threads in a one-to-one correspondence. Each thread applies for CPU memory as needed according to the size of the allocated data to perform pipeline layout. Specifically, each thread in this embodiment includes several branch threads. Accordingly, the pipeline layout module of this embodiment includes multiple branch thread management modules. The branch thread management module allocates multiple BIM scene object data to multiple branch threads in a one-to-one correspondence. Among them, each branch thread management module manages the life cycle of a pipeline, and each pipeline corresponds to a BIM scene object data.
[0053] The complete life cycle of a pipeline includes the following rendering commands: create an instance, obtain a physical device (graphics card memory unit), create a swap chain, create a depth buffer, create a frame buffer, create a data buffer, create a synchronization barrier, open a validation layer, execute drawing, and destroy unnecessary objects to release memory. Based on the parallel computing of CPU multi-core, there is no mutual exclusion and it can be carried out simultaneously, thus realizing multi-threaded rendering of multiple pipelines. The rendering commands submitted by each pipeline can be inconsistent and non-uniform. In this way, multiple threads can collaborate at the same time, and each CPU thread can submit rendering commands to its own pipeline, which greatly improves the utilization of the CPU and improves the BIM scene optimization performance.
[0054] The information transmission module of this embodiment is used for image transmission and instruction transmission after pipeline layout processing. Therefore, the information transmission module of this embodiment includes the instruction transmission unit and the image transmission unit shown in the figure, wherein the instruction transmission unit is responsible for transmitting instructions from the operation module of the BIM scene container to the pipeline layout device of the BIM object, and the image transmitter is responsible for transmitting images from the pipeline layout device of the BIM object to the BIM scene container module.
[0055] The scene container module of this embodiment is used to receive the image data transmitted by the information transmission module and display the image data as all visible objects within the BIM scene. Specifically, the scene container module of this embodiment includes a display unit, an operation unit and an output unit.
[0056] The display unit of this embodiment is used to display the drawing and generation results of the pipeline layout module of the BIM object. In order to improve the transmission efficiency, this embodiment uses a picture file with smaller data as the drawing result.
[0057] The operating unit of this embodiment is used to issue operating instructions, which include at least one of sectioning analysis, measurement and calculation, object selection, object query, scene browsing, terrain change, water body placement, component tree viewing, drawing linkage, and two- and three-dimensional integrated navigation. Of course, it can also include other related instructions, which are not listed one by one in this embodiment.
[0058] The output unit of this embodiment is used to generate photo data or video data, and output the photo data or video data to the downloadable area for users to download and use.
[0059] In addition, corresponding to the operation judgment step and the output judgment step in the above method flow, the system for building information model scene rendering based on parallel computing in this embodiment also includes an operation judgment module and an output judgment module (not shown in the figure).
[0060] Among them, the operation judgment module of this embodiment is used to judge whether the user operates the scene picture displayed in the previous scene display step. When it is judged that the user has operated, the information transmission module transmits the operation instruction from the operation module of the scene container module to the pipeline layout module of the BIM object, wherein the operation instruction includes section analysis, measurement and calculation, component selection, component attribute query, browsing BIM scene, changing terrain, placing water body, viewing component tree, drawing linkage, two-dimensional and three-dimensional integrated navigation, etc. Further, after the information transmission module transmits the operation instruction to the pipeline layout module, the pipeline layout module adjusts the relevant parameters of the pipeline layout according to the corresponding instruction and updates the transmitted picture; if there is no operation, the original picture is transmitted.
[0061] The output determination module of this embodiment is used to determine whether to output a picture or a video; if so, the data of the picture or the video is transmitted to the user's local computer.
[0062] In the description of this embodiment, it should be noted that those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment method can be implemented by instructing the control device through a computer, and the program can be stored in a computer-readable storage medium. When the program is executed, it may include the processes of the above-mentioned method embodiments, wherein the storage medium may be a memory, a disk, an optical disk, etc.
[0063] Although the present invention is disclosed as above, the present invention is not limited thereto. Any person skilled in the art can make various changes and modifications without departing from the spirit and scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the scope defined by the claims.
[0064] Finally, it should also be noted that in this text, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, such that a process, method, article or device comprising a series of elements not only includes those elements but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising said element.
[0065] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. For the same or similar parts among the various embodiments, reference may be made to each other.
Claims
1. A method for rendering building information model scenes based on parallel computing, characterized in that, It includes the following steps: Data reading and data parsing. Obtain file information according to the file path of the BIM model file data, select a corresponding data loader for data loading based on the file information, and split the loaded data into several sub-data; Data allocation and pipeline layout. Correspondingly allocate several sub-data to several threads, and each thread independently performs pipeline layout processing on the corresponding sub-data; Image transmission. Transmit the image data after pipeline layout processing to the scene container module; Scene display. Display all visible objects within the BIM scene range; Each of the threads includes several branch threads; the pipeline layout step includes correspondingly allocating multiple BIM scene object data to the multiple branch threads for management, and each branch thread manages the life cycle of a pipeline, and each pipeline corresponds to a BIM scene object data; The life cycle of each pipeline includes the following rendering commands: create an instance, obtain a physical device, create a swap chain, create a depth buffer, create a frame buffer, create a data buffer, create a synchronization barrier, enable the validation layer, execute drawing, and destroy redundant object data.
2. The method for rendering a building information model scenario based on parallel computing according to claim 1, wherein Each of the sub-data includes at least one BIM scene object data, and the BIM scene object data includes one or more of a terrain object, a water body object, a building component object, a particle object, and a lighting object.
3. The method for rendering a building information model scene based on parallel computing according to claim 1, wherein The data parsing includes: parsing node information, parsing camera data, parsing mesh data, parsing buffer data, and parsing texture data.
4. The method for rendering a building information model scenario based on parallel computing according to claim 1, wherein It also includes an operation judgment step, and the operation judgment step includes: Judge whether an operation is performed on the scene picture displayed in the scene display step; If so, adjust the relevant parameters of the pipeline layout according to the operation instruction and update the transmitted picture.
5. The method for rendering a building information model scene based on parallel computing according to claim 1, characterized in that, It also includes an output judgment step, and the output judgment step includes: Judge whether to output a picture or a video; If so, transmit the data of the picture or video to the user's local machine.
6. A system for rendering building information model scenarios based on parallel computing, which is used to implement the method for rendering building information model scenarios based on parallel computing according to any one of claims 1-5, characterized in that, It includes: A data loading module, which is used to obtain file information according to the file path of the BIM model file data, select a corresponding data loader for data loading based on the file information, and split the loaded data into several sub-data; A pipeline layout module, which is used to correspondingly allocate several of the split sub-data to several of the threads, so that each thread independently performs pipeline layout processing on the corresponding sub-data; An information transmission module, which is used for image transmission after pipeline layout processing; A scene container module, which is used to receive the image data transmitted by the information transmission module and display the image data as all visible objects within the BIM scene range.
7. The system for rendering a building information model scenario based on parallel computing according to claim 6, wherein Each of the threads includes several branch threads; The pipeline layout module includes multiple branch thread management modules, and the branch thread management modules correspondingly allocate multiple BIM scene object data to the multiple branch threads; Among them, each branch thread management module manages the life cycle of a pipeline, and each pipeline corresponds to a BIM scene object data.
8. The system for rendering a building information model scene based on parallel computing according to claim 6, wherein, The scene container module includes a display unit, an operation unit, and an output unit; The display unit is used to display the result generated by the pipeline layout module; The operation unit is used to issue operation instructions, and the operation instructions include at least one of section analysis, measurement and calculation, object selection, object query, scene browsing, terrain change, water body placement, component tree viewing, drawing linkage, and two-dimensional and three-dimensional integrated navigation; The output unit is used to generate photo data or video data, and output the photo data or the video data to the downloadable area.
Citation Information
Patent Citations
Quickly configurable and real time rendering safety protection three-dimensional electronic map
CN101286240A
Data rendering method applied to BIM model file
CN112270756A