A virtual scene rendering method and apparatus based on BIM model

By determining the spatial and progressive index labels of the BIM model within the target field of view of the virtual camera, progressive rendering of the BIM model is achieved, solving the problems of slow rendering speed and device limitations, and improving rendering efficiency and device performance.

CN122089991APending Publication Date: 2026-05-26BEIJING 51WORLD DIGITAL TWIN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING 51WORLD DIGITAL TWIN TECH CO LTD
Filing Date
2024-11-26
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

In existing technologies, the loading, display, and unloading processes of BIM models need to change with the perspective of the virtual camera, resulting in slow rendering speed and cumbersome operation. Furthermore, there are format and quantity limitations on device hardware, which affects the display effect.

Method used

By acquiring the target field of view of the virtual camera, the spatial index label and progressive index label of each BIM model are determined. Based on these index labels, the BIM model within the target field of view is progressively rendered, achieving automated loading and rendering.

Benefits of technology

It enables automated rendering of a large number of BIM models, taking into account equipment performance, ensuring rendering effect while alleviating equipment pressure, and providing a more efficient rendering process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122089991A_ABST
    Figure CN122089991A_ABST
Patent Text Reader

Abstract

This application provides a virtual scene rendering method and apparatus based on BIM models. By using progressive index labels for each BIM model and spatial index labels for each component, the rendering precision corresponding to different positions of each BIM model within the target field of view of the virtual camera can be indicated, enabling progressive rendering of multiple BIM models within the target field of view of the virtual camera. Based on this, not only can automated rendering of a large number of components be achieved, but the number of components rendered from different BIM models can also be controlled through progressive rendering, ensuring rendering quality while also considering the processing performance of the equipment, thus helping to alleviate equipment pressure.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of building information and virtual reality technology, and in particular to a method and apparatus for rendering virtual scenes based on BIM models. Background Technology

[0002] With the continuous development of Virtual Reality (VR) technology, it has been applied to various industries, especially the construction industry where the on-site environment is complex. Relying on manual collection and measurement of building information is not only time-consuming and labor-intensive, but also difficult to guarantee accuracy. Based on the virtual scene constructed on the construction site environment, not only can the construction details be understood intuitively, but it is also very convenient to carry out planning and design, construction management and building maintenance.

[0003] In practical applications, to ensure that the constructed virtual scene has a consistent architectural effect with the construction site environment, it is usually necessary to build a large number of Building Information Modeling (BIM) models based on the buildings in the construction site environment to collect detailed construction information. Then, by controlling the loading, display, and unloading of each BIM model, a virtual scene corresponding to the construction site environment is rendered. However, since the loading, display, and unloading processes of different BIM models need to change with the virtual camera's perspective, rendering the virtual scene by controlling the loading, display, and unloading of individual BIM models is not only slow but also affects the display effect. Furthermore, BIM model rendering requires specific device hardware. For device hardware with limitations on BIM model format and loading quantity, manual replacement of BIM models may be required during the rendering process, making the operation cumbersome.

[0004] Therefore, the automated loading and rendering of a large number of BIM models is crucial for improving work efficiency. Summary of the Invention

[0005] In order to achieve automated loading and rendering of BIM models while taking into account equipment performance, this application provides a virtual scene rendering method and device based on BIM models.

[0006] In a first aspect, embodiments of this application provide a virtual scene rendering method based on a BIM model, comprising: obtaining the target field of view of a virtual camera in a target virtual scene; determining spatial index labels for each component in each first BIM model within the target field of view; the spatial index labels indicating the position of the corresponding component in the target virtual scene; determining progressive index labels for each first BIM model; the progressive index labels indicating whether each component of the corresponding first BIM model is rendered within the target field of view; and rendering each first BIM model within the target field of view based on the spatial index labels and the progressive index labels.

[0007] In one optional embodiment, determining the spatial index label of each component in each first BIM model within the target field of view includes: determining the correspondence between each virtual grid in the target virtual scene and each component in each first BIM model; obtaining the position index label of the virtual grid corresponding to each component based on the correspondence; and determining the position index label of the virtual grid corresponding to each component as the spatial index label of the corresponding component.

[0008] In one optional embodiment, determining the progressive index label of each first BIM model includes: determining a first distance between each first BIM model and a virtual camera; and obtaining the progressive index label corresponding to the first BIM model based on the first distance corresponding to each first BIM model.

[0009] In one optional embodiment, rendering each first BIM model within the target field of view is performed based on spatial index tags and progressive index tags, including: determining the number of components to be rendered for each first BIM model and the loading level corresponding to each component in the corresponding first BIM model based on the progressive index tags of each first BIM model; determining each target component to be rendered for each first BIM model based on the number of components to be rendered for each first BIM model and the loading level corresponding to each component in the corresponding first BIM model; and rendering each first BIM model within the target field of view based on the spatial index tags corresponding to each target component of each first BIM model.

[0010] In one optional embodiment, determining the target components to be rendered for each first BIM model based on the number of components to be rendered for each first BIM model and the loading level corresponding to each component in the corresponding first BIM model includes: obtaining first model data for describing the attributes of each component in each first BIM model; and determining the target components to be rendered for each first BIM model based on the first model data, the number of components to be rendered for each first BIM model, and the loading level corresponding to each component in the corresponding first BIM model.

[0011] In an optional embodiment, before loading the target virtual scene for the first time, the method further includes: obtaining second model data of each component of each first BIM model in the target virtual scene; the second model data is used to describe the attributes of the corresponding component; and performing format and parameter unification processing on all the second model data to obtain first model data of the corresponding component with the same format type and parameter standards.

[0012] In an optional embodiment, the method further includes: dividing the pre-rendered virtual scene into grids to obtain a target virtual scene including multiple virtual grids; determining the correspondence between each virtual grid in the target virtual scene and each component in each first BIM model, including: determining the correspondence between the corresponding component and the virtual grid based on the first model data of each component.

[0013] Secondly, embodiments of this application provide a virtual scene rendering device based on a BIM model, comprising: an acquisition module for acquiring the target field of view of a virtual camera in a target virtual scene; a first determination module for determining spatial index labels of each component in each first BIM model within the target field of view; the spatial index labels indicating the position of the corresponding component in the target virtual scene; a second determination module for determining progressive index labels of each first BIM model; the progressive index labels indicating whether each component of the corresponding first BIM model is rendered within the target field of view; and a rendering module for rendering each first BIM model within the target field of view based on the spatial index labels and the progressive index labels.

[0014] In an optional embodiment, when the first determining module determines the spatial index label of each component in each first BIM model within the target field of view, it is used to: determine the correspondence between each virtual grid in the target virtual scene and each component in each first BIM model; based on the correspondence, obtain the position index label of the virtual grid corresponding to each component; and determine the position index label of the virtual grid corresponding to each component as the spatial index label of the corresponding component.

[0015] In an optional embodiment, when determining the progressive index label of each first BIM model, the second determining module is configured to: determine a first distance between each first BIM model and the virtual camera; and obtain the progressive index label corresponding to the corresponding first BIM model based on the first distance corresponding to each first BIM model.

[0016] In an optional embodiment, when the rendering module renders each first BIM model within the target field of view based on spatial index tags and progressive index tags, it is configured to: determine the number of components to be rendered for each first BIM model and the loading level corresponding to each component in the corresponding first BIM model based on the progressive index tags of each first BIM model; determine each target component to be rendered for each first BIM model based on the number of components to be rendered for each first BIM model and the loading level corresponding to each component in the corresponding first BIM model; and render each first BIM model within the target field of view based on the spatial index tags corresponding to each target component of each first BIM model.

[0017] In an optional embodiment, when the rendering module determines the target components to be rendered for each first BIM model based on the number of components to be rendered for each first BIM model and the loading level corresponding to each component in the corresponding first BIM model, it is configured to: obtain first model data describing the attributes of each component in each first BIM model; and determine the target components to be rendered for each first BIM model based on the first model data, the number of components to be rendered for each first BIM model, and the loading level corresponding to each component in the corresponding first BIM model.

[0018] In an optional embodiment, before loading the target virtual scene for the first time, the acquisition module is further configured to: acquire the second model data of each component of each first BIM model in the target virtual scene; the second model data is used to describe the attributes of the corresponding component; and perform format and parameter unification processing on all the second model data to obtain the first model data of the corresponding component with the same format type and parameter standard.

[0019] In an optional embodiment, the first determining module is further configured to: divide the pre-rendered virtual scene into meshes to obtain a target virtual scene including multiple virtual meshes; and determine the correspondence between the corresponding component and the virtual mesh based on the first model data of each component.

[0020] Thirdly, embodiments of this application provide an electronic device, which includes: a memory for storing a computer program product; and a processor for executing the computer program product stored in the memory, wherein when the computer program product is executed, the above-mentioned virtual scene rendering method based on the BIM model is implemented.

[0021] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer program instructions, which, when executed, implement the aforementioned virtual scene rendering method based on a BIM model.

[0022] In this embodiment, the progressive index label of each first BIM model and the spatial index label of each component can indicate the rendering precision of each first BIM model at different positions within the target field of view of the virtual camera, thereby achieving progressive rendering of multiple first BIM models within the target field of view of the virtual camera. Based on this, not only can automated rendering of a large number of components be achieved, but the number of components rendered from different first BIM models can also be controlled through progressive rendering, ensuring rendering quality while also considering the processing performance of the device, thus helping to alleviate device pressure. Attached Figure Description

[0023] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0024] Figure 1 A flowchart illustrating a virtual scene rendering method based on a BIM model, provided in an embodiment of this application.

[0025] Figure 2 This is a schematic diagram of a virtual scene rendered using a BIM model-based virtual scene rendering method provided in an embodiment of this application.

[0026] Figure 3 This is a schematic diagram of the structure of a virtual scene rendering device based on a BIM model, provided in an embodiment of this application.

[0027] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0028] The present application will now be described in further detail with reference to the accompanying drawings and embodiments. Through these descriptions, the features and advantages of the present application will become clearer and more apparent.

[0029] The term “exemplary” as used herein means “serving as an example, embodiment, or illustration.” Any embodiment illustrated herein as “exemplary” is not necessarily to be construed as superior to or better than other embodiments. Although various aspects of embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless specifically indicated otherwise.

[0030] Furthermore, the technical features involved in the different embodiments of this application described below can be combined with each other as long as they do not conflict with each other.

[0031] This application provides a virtual scene rendering method based on a BIM model. This method can achieve progressive rendering of a large number of model components, ensuring rendering effect while taking into account device performance. The steps of the method are described below with reference to the accompanying drawings.

[0032] Figure 1 A flowchart illustrating a virtual scene rendering method based on a BIM model, as provided in this application embodiment, is shown below. Figure 1 As shown, the method includes:

[0033] S1. Obtain the target field of view of the virtual camera in the target virtual scene;

[0034] S2. Determine the spatial index labels of each component in each first BIM model within the target field of view. The spatial index labels are used to indicate the position of the corresponding component in the target virtual scene.

[0035] S3. Determine the progressive index label for each first BIM model. The progressive index label is used to indicate whether each component of the corresponding first BIM model is rendered within the target field of view.

[0036] S4. Render each first BIM model within the target field of view based on spatial index labels and progressive index labels.

[0037] In this embodiment, for clarity, the virtual scene used to render the BIM model is referred to as the target virtual scene, the field of view of the virtual camera at any given moment during rendering is referred to as the target field of view, and each BIM model rendered within the target field of view is referred to as the first BIM model. Therefore, when rendering the target virtual scene, it is necessary to first obtain the target field of view of the virtual camera within the target virtual scene in order to render each first BIM model within the target field of view. Since each first BIM model typically consists of multiple components, especially for complex architectural scenes where each first BIM model may consist of numerous components, determining each first BIM model rendered within the target field of view is essentially determining each component of each first BIM model rendered within the target field of view.

[0038] To determine the components of each first BIM model rendered within the target field of view, in this embodiment, each component of the first BIM model is assigned a corresponding spatial index label to indicate its position in the target virtual scene. Furthermore, to achieve progressive rendering, a progressive index label is also assigned to each first BIM model to indicate whether its components are rendered in the target virtual scene. Based on this, after obtaining the target field of view, the spatial index labels of each component of each first BIM model within the target field of view, as well as the progressive index labels of each first BIM model, can be determined. Then, based on the progressive index labels of each first BIM model, the components that need to be rendered within each component of the corresponding first BIM model are determined. Combining these components' spatial index labels, the position of each component within the target field of view is determined. Finally, each component is rendered to its corresponding position within the target field of view, thereby achieving rendering of each first BIM model within the target field of view.

[0039] The implementation process of the above method and steps will be explained below through specific implementation.

[0040] In practical applications, to render a virtual effect corresponding to the structure and appearance of an actual building within the target field of view, it is necessary to first construct a corresponding BIM model based on the actual building. The model data of these BIM models describes the building's structure, appearance texture, materials, and other information. Therefore, before constructing a BIM model, it is necessary to collect information on the structure and appearance of each building. For example, this information can be obtained by photographing or inspecting the building using cameras, drones, sensors, or by organizing the building's design drawings and construction drawings. However, due to the complexity of architectural scenarios, different methods may be needed to collect this information for different buildings and different construction environments. Consequently, the types of building information collected using different methods may differ; for example, it may be 3D geometric data or point cloud data. Furthermore, constructing a BIM model based on different types of building information may require different modeling tools, and the formats of the BIM models constructed by different modeling tools may differ, meaning the format of the model data may differ.

[0041] Therefore, in order to achieve a universal virtual scene rendering method, in this embodiment, for BIM models of different sources and formats, before loading the target virtual scene for the first time, the second model data of each component of each first BIM model in the target virtual scene can be obtained first. The second model data describes the attributes of the corresponding component, including but not limited to the coordinate values ​​of each vertex in the corresponding component, the component's projection information, texture information, and the corresponding data format. Based on this, all second-type data are processed to unify the format and parameters, resulting in first model data of the corresponding components with the same format type and parameter standards. This data is then used to render each first BIM model within the target field of view based on the first model data of each component after obtaining the target field of view of the virtual camera in the target virtual scene.

[0042] The format of the first model data for each component is not limited, and may include, but is not limited to, lightweight data exchange formats (JavaScript Object Notation, JSON), Extensible Markup Language (XML), Comma-Separated Values ​​(CSV), or custom formats conforming to Industry Foundation Classes (IFC), or even Excel spreadsheets. The specific format used can be selected according to actual needs. Correspondingly, the parameter standard of the first model data is not limited in this embodiment. For example, the model data in the second model data used to describe the building's projection information, coordinate values, etc., can be converted to a custom coordinate system or to the coordinate system of the processing device. Of course, the parameter ratio between the first model data and the second model data can also be flexibly adjusted according to processing requirements. The specific conversion method can be determined according to actual needs, and will not be detailed here.

[0043] Furthermore, to determine the position of each component of the first BIM model in the target virtual scene, the pre-rendered virtual scene can be first divided into grids to obtain a target virtual scene comprising multiple virtual grids. Each virtual grid is configured with a location index label to indicate its position in the target virtual scene. Then, based on the first model data of each component, the correspondence between the corresponding component and the virtual grid is determined. Based on this correspondence, spatial index labels are set for the corresponding components. For example, a correspondence is established between the coordinates of each component and the virtual grid. Then, according to this correspondence, the location index label of each virtual grid is used as the spatial index label of the corresponding component, indicating the position of each component of the first BIM model in the target virtual scene. The specific method of grid division is not limited; for example, a k-dimensional tree (kd-tree) algorithm can be used for grid division. Correspondingly, the grid style is also not limited; for example, it can be divided into regular grids such as triangles and quadrilaterals, or irregular grids, or hierarchical grids and adaptive grids, depending on actual needs. Alternatively, the number of grids in the target virtual scene can be optimized based on edge collapse algorithms to ensure the rendering effect of the target virtual scene.

[0044] In practical applications, progressive rendering can be understood as follows: from the user's perspective, BIM models closer to the user's viewpoint are rendered with higher precision, while those farther away are rendered with lower precision. Correspondingly, in the target virtual scene, the rendering method can be reflected in the fact that the first BIM model closer to the virtual camera renders more components, while the first BIM model farther away renders fewer components. Based on this, to differentiate the rendering methods of different first BIM models, the number of components rendered for first BIM models at different distances from the virtual camera can be distinguished using the Level of Detail (LOD), thus achieving a progressive rendering effect when rendering each first BIM model.

[0045] The following example illustrates how to differentiate and render different first-level BIM models based on the LOD level.

[0046] Assuming the virtual camera has a maximum field of view of 180° and a maximum viewing distance of 500 meters, and taking three Levels of Detail (LOD) as examples: LOD3 corresponds to a viewing distance of 0-50 meters, where each first BIM model renders 300 components within this range; LOD2 corresponds to a viewing distance of 50-200 meters, where each first BIM model renders 150 components within this range; and LOD1 corresponds to a viewing distance of 200-500 meters, where each first BIM model renders 50 components within this range. Of course, the LOD levels and the number of components rendered for each LOD level in the above examples are merely illustrative; the actual rendering method is not limited to these examples and will not be detailed here.

[0047] However, in real-world scenarios, the number of components corresponding to each first BIM model may exceed the number of components specified for rendering at the corresponding LOD level. Therefore, to select the target components corresponding to the number of components specified for rendering at the corresponding LOD level from the numerous components of each first BIM model, the components of each first BIM model can be distinguished by loading levels to identify the rendering order of components within the same first BIM model. This application does not limit the specific method for setting the loading level for each component of each first BIM model. The characteristics of each component can be disregarded, and the loading level of each component in each first BIM model can be directly defined; alternatively, a corresponding loading level can be defined for each component of each first BIM model based on the characteristics of different components. The specific method used is not limited here.

[0048] Optionally, in this embodiment, the loading level of each component is defined based on the texture precision of each component in each first BIM model, the position of each component in the corresponding first BIM model, and the corresponding component type. For example, components with clear textures and uniform distribution throughout the first BIM model have higher loading levels, components with low texture precision but that can reflect the overall outline of the first BIM model have slightly lower loading levels, and simplified components that only serve as identifiers or placeholders in the first BIM model have the lowest loading levels. Thus, when rendering each component of each first BIM model, if the number of components in the corresponding first BIM model exceeds the number of components specified for rendering at the corresponding LOD level, components with higher loading levels can be identified as the target components to be rendered. Of course, the above method of setting the loading level for each component is merely illustrative, and actual applications are not limited to this; the specific method can be determined according to rendering requirements.

[0049] Based on the above, the number of components to be rendered for each first BIM model is determined by the correspondence between the first BIM model and the LOD level, and the target components to be loaded for each first BIM model are determined by the loading level of each component in each first BIM model. These factors together determine the rendering rules corresponding to different positions of the first BIM model within the virtual camera's field of view. Therefore, by using these rendering rules as progressive index labels for each first BIM model, when rendering each first BIM model in the target virtual scene, different first BIM models can be rendered differently based on their corresponding positions within the virtual camera's field of view, thus achieving a progressive rendering effect.

[0050] Based on the above, before rendering each component of each first BIM model within the target field of view of the virtual camera, it is necessary to first determine the progressive index label of each first BIM model and the spatial index label of each component within the target field of view. Then, based on the progressive index label of each first BIM model and the spatial index label of each component, the target components to be rendered for each first BIM model and their rendering positions within the target field of view are determined. Based on this, each target component of each first BIM model within the target field of view can be rendered, achieving a progressive rendering effect.

[0051] Optionally, when determining the spatial index labels of each component in each first BIM model, the correspondence between each virtual mesh in the target virtual scene and each component in each first BIM model can be determined first. Then, based on this correspondence, the position index labels of the virtual meshes corresponding to each component are obtained, and these position index labels are determined as the spatial index labels of the corresponding components. Correspondingly, when determining the progressive index labels of each first BIM model, the rendering rules corresponding to different positions within the target field of view of the virtual camera can be directly obtained as the progressive index labels of the corresponding first BIM model; alternatively, a first distance between each first BIM model and the virtual camera can be determined first, and then the corresponding LOD level can be determined based on the first distance of each first BIM model, and the rendering rules corresponding to the corresponding LOD level can be obtained as the progressive index labels of the corresponding first BIM model. The specific method used is not limited.

[0052] Furthermore, after determining the progressive index labels of each first BIM model and the spatial index labels of each component, the number of components to be rendered in each first BIM model and the corresponding load level of each component in the first BIM model can be determined based on the progressive index labels of each first BIM model. Then, based on the number of components to be rendered in each first BIM model and the corresponding load level of each component in the first BIM model, the target components to be rendered in each first BIM model are determined. Based on the spatial index labels of each target component in each first BIM model, the corresponding target components are rendered to their corresponding positions within the target field of view, thereby achieving rendering of each first BIM model within the target field of view.

[0053] In this embodiment, the method for determining the target components of each first BIM model is not limited. Optionally, first model data describing the attributes of each component of each first BIM model can be obtained first. The first model data includes, but is not limited to, information describing the coordinate values ​​of each vertex in the corresponding component, the projection information of the component, texture information, and the corresponding data format. Based on this, according to the first model data of each component of each first BIM model, the number of components to be rendered in each first BIM model, and the loading level of each component in the corresponding first BIM model, the target components to be rendered in each first BIM model are determined. For example, the loading level of each component of each first BIM model can be determined first based on the first model data of each component of each first BIM model. Then, in descending order of loading level, components corresponding to the number of components to be rendered in the corresponding first BIM model are determined from the components of each first BIM model as the target components of the corresponding first BIM model. The relationship between the loading level of each component and the first model data can be found in the description of the above embodiments, and will not be repeated here.

[0054] Optionally, when determining the target components of each first BIM model, the target components of each first BIM model can also be determined jointly based on the LOD level corresponding to each first BIM model and the loading level of each component. For example, for the three LOD levels mentioned above, for each first BIM model corresponding to LOD3, 300 components with clear textures and evenly distributed throughout the first BIM model can be determined as the target components of the corresponding first BIM model; for each first BIM model corresponding to LOD2, 150 components with low texture precision but capable of representing the overall outline of the corresponding first BIM model can be determined as the target components of the corresponding first BIM model; for each first BIM model corresponding to LOD1, 50 simplified components used only as placeholders can be determined as the target components of the corresponding first BIM model. In this way, when rendering the target components of each first BIM model into the target field of view of the virtual camera, the rendering precision of the first BIM models corresponding to different LOD levels is different, and a progressive rendering effect can be presented throughout the target field of view (see...). Figure 2 ).

[0055] It should be further explained that when determining the target components of each first BIM model based on the progressive index label of each first BIM model, in addition to directly determining the target components of each first BIM model based on the rendering rules defined by the progressive index label of each first BIM model, the number of target components of each first BIM model can also be dynamically adjusted by combining information such as the device's memory size and the processor's processing pressure, so as to achieve progressive rendering while taking into account the device's processing performance.

[0056] In the above embodiments, the example is taken as the virtual camera's viewpoint within any target virtual scene. However, in practical applications, the virtual camera's viewpoint may be stationary or in a constantly changing motion state. When the virtual camera's viewpoint is stationary, the rendering effect within the target viewpoint is the same as described in the above embodiments. When the virtual camera's viewpoint is in motion, the rendering effect within the target viewpoint can adopt the principle described in the above embodiments: the first distance between each first BIM model and the virtual camera is determined in real time, and the rendering effect of each component of the corresponding first BIM model is updated in real time based on the real-time changing first distance, so as to dynamically present a progressive rendering effect within the corresponding target viewpoint as the virtual camera's viewpoint continuously changes.

[0057] For example, when the virtual camera's viewpoint is outside the building, the various components of the building's exterior can be rendered progressively within the corresponding target field of view. As the virtual camera's viewpoint moves closer to the building, the components continue to be rendered progressively, but their dimensions increase with the movement of the virtual camera's viewpoint. When the virtual camera's viewpoint moves from outside to inside the building, the components of the exterior can be rendered progressively and dynamically within the corresponding target field of view, then switched to progressively and dynamically rendering the components of the interior. When the virtual camera's viewpoint is inside the building, as the virtual camera's viewpoint moves within the building, the process of progressively and dynamically rendering the components of the interior can be continuously switched within the corresponding target field of view. Throughout this process, from the user's perspective, the various components of the building appear progressively larger at any given time. Figure 2 The progressive effects of "nearer objects appear larger and farther objects appear smaller" and "nearer objects appear clearer and farther objects appear blurry" are presented within the field of view, making the visual effect more realistic.

[0058] It should be noted that the rendering method of each component of the first BIM model by the virtual camera's perspective in motion can be found in the description of the rendering process of the target field of view of the virtual camera in the above embodiment. It can be understood that rendering the field of view of the virtual camera in motion is actually switching the rendering of the virtual camera in multiple static target field of view. The specific process will not be described in detail.

[0059] In summary, in this embodiment, by using the progressive index labels of each first BIM model and the spatial index labels of each component, the rendering precision corresponding to different positions of each first BIM model within the target field of view of the virtual camera can be indicated, thereby achieving progressive rendering of multiple first BIM models within the target field of view of the virtual camera. Based on this, not only can automated rendering of a large number of components be achieved, but the number of components rendered by different first BIM models can also be controlled through progressive rendering, ensuring rendering quality while also taking into account the processing performance of the device, thus helping to alleviate device pressure.

[0060] It is understood that the above embodiments are merely examples, and modifications can be made to the above embodiments in actual implementation. Those skilled in the art will understand that any modifications to the above embodiments that do not require creative effort fall within the protection scope of this application, and will not be described in detail in the embodiments.

[0061] All the above-mentioned optional technical solutions can be referenced or combined with each other to form optional embodiments of this application, and will not be described in detail here.

[0062] Based on the same inventive concept, this application also provides a virtual scene rendering device based on a BIM model. Since the principle of the problem solved by the virtual scene rendering device is similar to that of the aforementioned virtual scene rendering method, the implementation of the virtual scene rendering device can refer to the implementation of the aforementioned virtual scene rendering method, and the repeated parts will not be described again.

[0063] See Figure 3 , Figure 3 This is a structural block diagram of a virtual scene rendering device provided in an embodiment of this application. Figure 3 As shown, the virtual scene rendering device 300 may include: an acquisition module 301, a first determination module 302, a second determination module 303, and a rendering module 304. The acquisition module 301 is used to acquire the target field of view of the virtual camera in the target virtual scene. The first determination module 302 is used to determine the spatial index labels of each component in each first BIM model within the target field of view; wherein the spatial index labels indicate the position of the corresponding component in the target virtual scene. The second determination module 303 is used to determine the progressive index labels of each first BIM model; wherein the progressive index labels indicate whether each component of the corresponding first BIM model is rendered within the target field of view. The rendering module 304 is used to render each first BIM model within the target field of view based on the spatial index labels and the progressive index labels.

[0064] In an optional embodiment, when determining the spatial index labels of each component in each first BIM model within the target field of view, the first determining module 302 is used to: determine the correspondence between each virtual grid in the target virtual scene and each component in each first BIM model; based on the correspondence, obtain the position index labels of the virtual grids corresponding to each component; and determine the position index labels of the virtual grids corresponding to each component as the spatial index labels of the corresponding components.

[0065] In an optional embodiment, when determining the progressive index label of each first BIM model, the second determining module 303 is used to: determine the first distance between each first BIM model and the virtual camera; and obtain the progressive index label corresponding to the corresponding first BIM model based on the first distance corresponding to each first BIM model.

[0066] In an optional embodiment, when rendering each first BIM model within the target field of view based on spatial index tags and progressive index tags, the rendering module 304 is configured to: determine the number of components to be rendered for each first BIM model and the loading level corresponding to each component in the corresponding first BIM model based on the progressive index tags of each first BIM model; determine each target component to be rendered for each first BIM model based on the number of components to be rendered for each first BIM model and the loading level corresponding to each component in the corresponding first BIM model; and render each first BIM model within the target field of view based on the spatial index tags corresponding to each target component of each first BIM model.

[0067] In an optional embodiment, when the rendering module 304 determines each target component to be rendered for each first BIM model based on the number of components to be rendered for each first BIM model and the loading level corresponding to each component in the corresponding first BIM model, it is configured to: obtain first model data describing the attributes of each component in each first BIM model; and determine each target component to be rendered for each first BIM model based on the first model data, the number of components to be rendered for each first BIM model, and the loading level corresponding to each component in the corresponding first BIM model.

[0068] In an optional embodiment, before loading the target virtual scene for the first time, the acquisition module 301 is further configured to: acquire the second model data of each component of each first BIM model in the target virtual scene; the second model data is used to describe the attributes of the corresponding component; and perform format and parameter unification processing on all the second model data to obtain the first model data of the corresponding component with the same format type and parameter standard.

[0069] In an optional embodiment, the first determining module 302 is further configured to: divide the pre-rendered virtual scene into grids to obtain a target virtual scene including multiple virtual grids; and determine the correspondence between the corresponding component and the virtual grid based on the first model data of each component.

[0070] This application also provides an electronic device, see [link to relevant documentation] Figure 4 , Figure 4 This is a structural block diagram of an electronic device provided in an embodiment of this application. Figure 4 As shown, the electronic device 400 may include a processor 401, a memory 402, and a program or instructions stored in the memory 402 and executable on the processor 401. When the program or instructions are executed by the processor 401, they implement the various processes of the above method embodiments and achieve the same technical effects. To avoid repetition, they will not be described again here.

[0071] It should be noted that the electronic devices in the embodiments of this application include mobile electronic devices and non-mobile electronic devices.

[0072] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the various processes of the above-described BIM model-based virtual scene rendering method embodiments and achieves the same technical effect. To avoid repetition, it will not be described again here.

[0073] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.

[0074] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0075] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0076] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0077] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the apparatus embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the description of the method embodiments. In this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Those skilled in the art can understand the specific meaning of the above terms in this application according to the specific circumstances.

[0078] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application is not limited to any single aspect, nor to any single embodiment, nor to any combination and / or substitution of these aspects and / or embodiments. Moreover, each aspect and / or embodiment of this application can be used alone or in combination with one or more other aspects and / or embodiments thereof.

[0079] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and not to limit them; although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application, and they should all be covered within the scope of this application.

Claims

1. A virtual scene rendering method based on a BIM model, characterized in that, include: Obtain the target field of view of the virtual camera within the target virtual scene; Determine the spatial index labels of each component in each first BIM model within the target field of view; The spatial index label is used to indicate the position of the corresponding component in the target virtual scene; Determine the progressive index labels for each first BIM model; The progressive index label is used to indicate whether each component of the corresponding first BIM model is rendered within the target field of view; Based on the spatial index labels and the progressive index labels, each first BIM model within the target field of view is rendered.

2. The method according to claim 1, characterized in that, Determine the spatial index labels of each component in each first BIM model within the target field of view, including: Determine the correspondence between each virtual grid in the target virtual scene and each component in each first BIM model; Based on the correspondence, obtain the position index label of the virtual mesh corresponding to each component; The position index labels of the virtual meshes corresponding to each component are determined as the spatial index labels of the corresponding components.

3. The method according to claim 1, characterized in that, Determine the progressive index labels for each first BIM model, including: Determine a first distance between each first BIM model and the virtual camera; Based on the first distance corresponding to each first BIM model, obtain the progressive index label corresponding to the first BIM model.

4. The method according to claim 3, characterized in that, Based on the spatial index labels and the progressive index labels, each first BIM model within the target field of view is rendered, including: Based on the progressive index labels of each first BIM model, determine the number of components that need to be rendered in each first BIM model and the corresponding loading level of each component in the first BIM model. Based on the number of components that need to be rendered in each first BIM model and the corresponding loading level of each component in the first BIM model, determine the target components that need to be rendered in each first BIM model. Based on the spatial index labels corresponding to each target component of each first BIM model, each first BIM model within the target field of view is rendered.

5. The method according to claim 4, characterized in that, Based on the number of components that need to be rendered in each first BIM model and the corresponding load level of each component in the first BIM model, the target components that need to be rendered in each first BIM model are determined, including: Obtain first model data to describe the individual component attributes of each first BIM model; Based on the first model data, the number of components that need to be rendered in each first BIM model, and the loading level of each component in the corresponding first BIM model, determine the target components that need to be rendered in each first BIM model.

6. The method according to claim 2, characterized in that, Before the target virtual scene is loaded for the first time, the following are also included: Obtain the second model data of each component of each first BIM model in the target virtual scene; the second model data is used to describe the attributes of the corresponding component; All second model data are processed to unify the format and parameters, resulting in first model data for the corresponding components with the same format type and parameter standards.

7. The method according to claim 6, characterized in that, Also includes: The pre-rendered virtual scene is divided into meshes to obtain a target virtual scene that includes multiple virtual meshes; Determining the correspondence between each virtual grid in the target virtual scene and each component in each first BIM model includes: Based on the first model data of each component, determine the correspondence between the corresponding component and the virtual mesh.

8. A virtual scene rendering device based on a BIM model, characterized in that, include: The acquisition module is used to acquire the target field of view of the virtual camera in the target virtual scene; The first determining module is used to determine the spatial index labels of each component in each first BIM model within the target field of view; The spatial index label is used to indicate the position of the corresponding component in the target virtual scene; The second determination module is used to determine the progressive index labels for each first BIM model; The progressive index label is used to indicate whether each component of the corresponding first BIM model is rendered within the target field of view; The rendering module is used to render each first BIM model within the target field of view based on the spatial index labels and the progressive index labels.

9. An electronic device, characterized in that, The electronic device includes: Memory, used to store computer program products; A processor is configured to execute a computer program product stored in the memory, wherein, when the computer program product is executed, it implements the method described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer program instructions, which, when executed, implement the method described in any one of claims 1-7.