Construction method and device for constructing building scene based on visualization engine

CN121685869BActive Publication Date: 2026-09-25BEIJING GENERAL MUNICIPAL ENG DESIGN & RES INST
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202511532727.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-24
Publication Date
2026-09-25
Estimated Expiration
2045-10-24

AI Technical Summary

Technical Problem

[0003]然而,当前技术在实现建筑信息模型从建筑信息模型软件至可视化引擎这一转换,特别是自动化传递与应用方面,仍存在诸多挑战和不足,数据转换流程低效,需要人工干预

Benefits of technology

[0022]根据本申请的技术方案,对建筑信息模型的构件进行遍历获取构件信息,对所获取的构件信息进行结构化封装以得到结构化数据结构,输出所述结构化数据结构中的内容,基于可视化引擎读取所输出的结构化数据结构中的内容,基于可视化引擎结合所读取的内容通过基于语义材质类别从可视化引擎的预设材质库中匹配引擎材质构建建筑信息模型对应的建筑场景,如此,实现了构建建筑场景;此外,在构建建筑场景的过程中,不需要人工干预,且转换过程简单、直接,如此,实现了提高建筑信息模型从建筑信息模型软件至可视化引擎的转换效率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121685869B_ABST
    Figure CN121685869B_ABST
Patent Text Reader

Abstract

The application discloses a construction method and device for constructing a building scene based on a visualization engine. The construction method comprises the following steps: traversing components of a building information model, obtaining component information, and structurally packaging the obtained component information to obtain a structured data structure. For any component, the component information comprises component attributes, geometric information and material information. The content in the structured data structure is output. The content in the output structured data structure is read based on the visualization engine. Based on the visualization engine, engine materials are matched from a preset material library of the visualization engine based on the semantic material category in combination with the read content, so as to construct a building scene corresponding to the building information model. In this way, the conversion efficiency of the building information model from building information model software to the visualization engine is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of rendering architectural scenes, and more specifically, to a method and apparatus for constructing architectural scenes based on a visualization engine. Background Technology

[0002] Importing detailed building models created using Building Information Modeling (BIM) software (such as Autodesk Revit) into 3D visualization engines (such as Unity) for real-time display, virtual walkthroughs, or interactive experiences has become an important requirement for the architecture, engineering, and construction industries, as well as related digital twin applications.

[0003] However, current technologies still face many challenges and shortcomings in realizing the transformation of Building Information Modeling (BIM) from BIM software to visualization engines, especially in terms of automated transmission and application. The data conversion process is inefficient and requires manual intervention.

[0004] Therefore, improving the conversion efficiency of Building Information Modeling (BIM) from BIM software to visualization engines has become a technical problem that needs to be solved in this field. Summary of the Invention

[0005] In view of this, this application proposes a construction method and apparatus for building architectural scenes based on a visualization engine, so as to improve the conversion efficiency of building information model from building information modeling software to visualization engine.

[0006] In a first aspect, embodiments of this application provide a method for constructing an architectural scene based on a visualization engine. This method includes: traversing components of a building information model (BIM) to obtain component information; structurally encapsulating the obtained component information to obtain a structured data structure, wherein for any given component, the component information includes component attributes, geometric information, and material information, and the material information includes a predefined semantic material category; outputting the content in the structured data structure; reading the content in the output structured data structure based on the visualization engine; and constructing the architectural scene corresponding to the BIM based on the building information model by matching engine materials from a preset material library of the visualization engine based on the semantic material category, in conjunction with the read content and the semantic material category.

[0007] Optionally, the acquired component information is structurally encapsulated to obtain a structured data structure, including: aggregating the acquired component information into a top-level scene data container, and performing structural encapsulation based on the top-level scene data container to obtain a structured data structure.

[0008] Optionally, the components of the building information model are traversed to obtain component information, and the obtained component information is structurally encapsulated to obtain a structured data structure, including: performing the following operations on each component in the building information model: obtaining the component attributes of the component and storing the obtained component attributes in the temporary component data structure corresponding to the component; for each material corresponding to the component, performing the following operations: obtaining the material object, material attributes, and rendering appearance parameters, and storing the obtained material object, material attributes, and rendering appearance parameters in the material data structure corresponding to the material; if the unique identifier of the material does not exist in the global material information set, adding the unique identifier of the material to the global material information set; for each geometry corresponding to the material, obtaining the geometry... The geometric data of the body is obtained and stored in the geometric data structure corresponding to the material. The geometric data structure corresponding to the material is associated with the material data structure corresponding to the material. The geometric data structure corresponding to the material is added to the global geometry definition set. The material data structure corresponding to the material is associated with the temporary component data structure corresponding to the component. The temporary component data structure corresponding to the component is added to the global object hierarchy structure set. The values ​​of the global material information set are filled into the material list of the top-level scene data container object. The values ​​of the global geometry definition set are filled into the geometry definition list of the top-level scene data container object. The values ​​of the global object hierarchy structure set are filled into the child object list of the scene root object of the top-level scene data container object.

[0009] Optionally, outputting the content of the structured data structure includes: serializing the top-level scene data container object into a target format string; and writing the main data string of the target format string into a preset main data file based on a preset data organization method to output the content of the structured data structure.

[0010] Optionally, based on the visualization engine, reading the content of the output structured data structure includes: reading the preset master data file and deserializing the content of the preset master data file into a scene data structure corresponding to the top-level scene data container object structure.

[0011] Optionally, based on the visualization engine and the read content, a building scene corresponding to the building information model is constructed by matching engine materials from the preset material library of the visualization engine based on the semantic material category. This includes: traversing the material information list of the scene data structure, and for each material in the material information list, performing the following: matching engine materials for the material from the preset material library of the visualization engine based on the material object of the material; applying the material attributes of the material to the engine material; associating the unique identifier of the material with the engine material, and storing the unique identifier of the material and the engine material in the runtime material cache of the visualization engine; traversing the object hierarchy of the scene data structure, creating a corresponding visualization engine scene object for each object information in the object hierarchy; and reading the visualization engine... The process involves: obtaining scene geometry data corresponding to the scene object; creating a mesh object corresponding to the visualization engine scene object; obtaining a vertex coordinate list, normal list, and UV coordinate list from the scene geometry data and filling them into the mesh object; obtaining a geometry index list from the scene geometry data and filling it into the mesh object; assigning the mesh object to the mesh filter component of the visualization engine scene object; adding a mesh renderer component to the visualization engine scene object; for each material in the object information, obtaining the corresponding engine material from the runtime material cache based on the material's unique identifier and applying the obtained engine material to the mesh renderer component; setting the parent-child relationship of the visualization engine scene object according to the hierarchical relationship of the object information; and attaching the component attributes in the object information as metadata to the visualization engine scene object.

[0012] Optionally, for each geometry corresponding to the material, the geometric data of the geometry is acquired, and the acquired geometric data is stored in the geometric data structure corresponding to the material, including: acquiring the vertex coordinates and vertex index, normal and normal index, UV coordinates and UV index of the geometry; storing the acquired vertex coordinates and vertex index into the vertex coordinate list and vertex index list of the geometric data structure corresponding to the material, respectively; storing the acquired normal and normal index into the normal list and normal index list of the geometric data structure corresponding to the material, respectively; and storing the acquired UV coordinates and UV index into the UV coordinate list and UV index list of the geometric data structure corresponding to the material, respectively.

[0013] Secondly, this application also provides a construction device for building architectural scenes based on a visualization engine. The device includes: a traversal module for traversing components of a building information model, acquiring component information, and structurally encapsulating the acquired component information to obtain a structured data structure. For any given component, the component information includes component attributes, geometric information, and material information, with the material information including predefined semantic material categories; an output module for outputting the content of the structured data structure; a reading module for reading the content of the output structured data structure based on the visualization engine; and a construction module for constructing an architectural scene corresponding to the building information model based on the visualization engine, combined with the read content, and matching engine materials from a preset material library of the visualization engine based on the semantic material categories.

[0014] Optionally, the traversal module performs structured encapsulation on the acquired component information to obtain a structured data structure, including: aggregating the acquired component information into a top-level scene data container, and performing structured encapsulation on the top-level scene data container to obtain a structured data structure.

[0015] Optionally, the components of the building information model are traversed to obtain component information, and the obtained component information is structurally encapsulated to obtain a structured data structure, including: performing the following operations on each component in the building information model: obtaining the component attributes of the component and storing the obtained component attributes in the temporary component data structure corresponding to the component; for each material corresponding to the component, performing the following operations: obtaining the material object, material attributes, and rendering appearance parameters, and storing the obtained material object, material attributes, and rendering appearance parameters in the material data structure corresponding to the material; if the unique identifier of the material does not exist in the global material information set, adding the unique identifier of the material to the global material information set; for each geometry corresponding to the material, obtaining the geometry... The geometric data of the body is obtained and stored in the geometric data structure corresponding to the material. The geometric data structure corresponding to the material is associated with the material data structure corresponding to the material. The geometric data structure corresponding to the material is added to the global geometry definition set. The material data structure corresponding to the material is associated with the temporary component data structure corresponding to the component. The temporary component data structure corresponding to the component is added to the global object hierarchy structure set. The values ​​of the global material information set are filled into the material list of the top-level scene data container object. The values ​​of the global geometry definition set are filled into the geometry definition list of the top-level scene data container object. The values ​​of the global object hierarchy structure set are filled into the child object list of the scene root object of the top-level scene data container object.

[0016] Optionally, outputting the content of the structured data structure includes: serializing the top-level scene data container object into a target format string; and writing the main data string of the target format string into a preset main data file based on a preset data organization method to output the content of the structured data structure.

[0017] Optionally, based on the visualization engine, reading the content of the output structured data structure includes: reading the preset master data file and deserializing the content of the preset master data file into a scene data structure corresponding to the top-level scene data container object structure.

[0018] Optionally, based on the visualization engine and the read content, a building scene corresponding to the building information model is constructed by matching engine materials from the preset material library of the visualization engine based on the semantic material category. This includes: traversing the material information list of the scene data structure, and for each material in the material information list, performing the following: matching engine materials for the material from the preset material library of the visualization engine based on the material object of the material; applying the material attributes of the material to the engine material; associating the unique identifier of the material with the engine material, and storing the unique identifier of the material and the engine material in the runtime material cache of the visualization engine; traversing the object hierarchy of the scene data structure, creating a corresponding visualization engine scene object for each object information in the object hierarchy; and reading the visualization engine... The process involves: obtaining scene geometry data corresponding to the scene object; creating a mesh object corresponding to the visualization engine scene object; obtaining a vertex coordinate list, normal list, and UV coordinate list from the scene geometry data and filling them into the mesh object; obtaining a geometry index list from the scene geometry data and filling it into the mesh object; assigning the mesh object to the mesh filter component of the visualization engine scene object; adding a mesh renderer component to the visualization engine scene object; for each material in the object information, obtaining the corresponding engine material from the runtime material cache based on the material's unique identifier and applying the obtained engine material to the mesh renderer component; setting the parent-child relationship of the visualization engine scene object according to the hierarchical relationship of the object information; and attaching the component attributes in the object information as metadata to the visualization engine scene object.

[0019] Optionally, for each geometry corresponding to the material, the geometric data of the geometry is acquired, and the acquired geometric data is stored in the geometric data structure corresponding to the material, including: acquiring the vertex coordinates and vertex index, normal and normal index, UV coordinates and UV index of the geometry; storing the acquired vertex coordinates and vertex index into the vertex coordinate list and vertex index list of the geometric data structure corresponding to the material, respectively; storing the acquired normal and normal index into the normal list and normal index list of the geometric data structure corresponding to the material, respectively; and storing the acquired UV coordinates and UV index into the UV coordinate list and UV index list of the geometric data structure corresponding to the material, respectively.

[0020] Thirdly, embodiments of this application also provide a machine-readable storage medium storing instructions that cause a machine to execute the above-described construction method.

[0021] Fourthly, embodiments of this application also provide an electronic device, the electronic device comprising: a processor; a memory for storing executable instructions of the processor; the processor being configured to read the executable instructions from the memory and execute the executable instructions to implement the above-described construction method.

[0022] According to the technical solution of this application, the components of the building information model are traversed to obtain component information. The obtained component information is then encapsulated in a structured manner to obtain a structured data structure. The content of the structured data structure is output. The content of the output structured data structure is read based on a visualization engine. Based on the visualization engine and the read content, the engine materials are matched from the preset material library of the visualization engine based on semantic material categories to construct the building scene corresponding to the building information model. In this way, the construction of the building scene is realized. In addition, no manual intervention is required in the process of constructing the building scene, and the conversion process is simple and direct. Thus, the conversion efficiency of the building information model from building information model software to visualization engine is improved.

[0023] Other features and advantages of this application will be described in detail in the following detailed description section. Attached Figure Description

[0024] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application, and the illustrative embodiments and descriptions thereof are used to explain this application. In the drawings: Figure 1 This is a flowchart of a preferred embodiment of a method for constructing an architectural scene based on a visualization engine, according to this application. Figure 2 This is a logical diagram illustrating the structured data structure obtained according to a preferred embodiment of this application; Figure 3 This is a logical diagram illustrating the construction of a building scene corresponding to a building information model according to a preferred embodiment of this application. Figure 4 This is a block diagram of a construction apparatus for building architectural scenes based on a visualization engine, according to a preferred embodiment of this application. Detailed Implementation

[0025] The technical solution of this application will now be described in detail with reference to the accompanying drawings and embodiments.

[0026] In a first aspect, embodiments of this application provide a method for constructing architectural scenes based on a visualization engine.

[0027] Figure 1 This is a flowchart illustrating a preferred embodiment of a method for constructing an architectural scene based on a visualization engine, according to this application. Figure 1 As shown, the construction method includes the following.

[0028] In step S10, the components of the Building Information Model (BIM) are traversed to obtain component information. This obtained component information is then structurally encapsulated to obtain a structured data structure. For any given component, the component information includes component attributes, geometric information, and material information. Component attributes include the component's unique identifier, name, category, family name, type name, instance name, and elevation. Material information includes predefined semantic material categories. For example, semantic pre-classification of materials has already been completed in the BIM system using certain methods (e.g., AI methods). In the embodiments of this application, the predefined semantic material categories are used directly.

[0029] In step S11, the contents of the structured data structure are output.

[0030] In step S12, the contents of the output structured data structure are read based on the visualization engine.

[0031] In step S13, based on the visualization engine and combined with the read content, the building scene corresponding to the building information model is constructed by matching engine materials from the preset material library of the visualization engine based on semantic material categories.

[0032] Optionally, in this embodiment, the acquired component information is structurally encapsulated to obtain a structured data structure, which can be implemented based on a top-level scene data container in architectural modeling software. Specifically, this includes the following: aggregating the acquired component information into the top-level scene data container, and performing structured encapsulation based on the top-level scene data container to obtain a structured data structure.

[0033] In this embodiment, the BIM model can be deeply traversed by implementing the standard export context interface provided by the BIM software API, and information can be extracted and organized according to a predefined data structure specification optimized for the target visualization engine. The export context initialization (Start function logic) may include the following: Creating a top-level scene data container object to store the data of the entire scene. Initializing scene metadata, recording information such as version and generator. Creating a scene root object representing the entire BIM project, storing document title, view ID, etc. Extracting and storing all elevation information and project base point information in the scene data container. Initializing core data sets (e.g., using data structures such as dictionaries or lists) for storing global material information, geometry definitions, and object hierarchy, namely, the global material information set, the global geometry definition set, and the global object hierarchy set. Initializing a transformation matrix stack for managing hierarchical transformations and pushing an identity matrix onto it.

[0034] Optionally, in this embodiment, the components of the building information model are traversed to obtain component information, and the obtained component information is structurally encapsulated to obtain a structured data structure, which may include the following: [Combined with...] Figure 2 An example is provided.

[0035] In step S201, it is determined whether there is a component to be processed. If yes, step S202 is executed; otherwise, step S213 is executed.

[0036] In step S202, the component attributes of the component are obtained and stored in the temporary component data structure corresponding to the component.

[0037] The component attributes include the component's unique identifier, name, category, family name, type name, instance name, and elevation. Furthermore, the component's location and transformation information can be extracted.

[0038] Optionally, in the embodiments of this application, for specific types of components (such as walls, beams, columns, foundations, etc.), it is also possible to extract their structural analysis parameters and detailed positioning information, which can be used for more refined reproduction or analysis in the visualization engine.

[0039] In step S203, it is determined whether there is a material to be processed. If yes, proceed to step S204; otherwise, proceed to step S209.

[0040] In step S204, the material object, material attributes, and rendering appearance parameters are obtained, and then stored in the material data structure corresponding to the material. The material data structure is a sub-object of the temporary component data structure.

[0041] Obtain the material object. This material object is assumed to have been preprocessed through previous steps, meaning that its specific attributes (such as "material category" or custom parameters) already contain a standardized semantic material category (e.g., "concrete," "metal," "glass," etc.). The material object is a data structure that includes the semantic material category. Optionally, in this embodiment, a material information instance conforming to a predefined data structure specification can be created. The pre-classified semantic material category (i.e., the material object) is stored in the "Category" field of this material information instance; this is the core of passing the semantic material category from the BIM side to the visualization engine. The semantic material category is a key index for achieving subsequent intelligent matching.

[0042] Obtain the material properties, which include the material's unique identifier, name, color, transparency / opacity, UV transformation parameters, and other attributes.

[0043] Obtain the rendering appearance resources of the material, extract and record rendering appearance parameters such as the real-world size and path information of the texture map, and prepare to copy the texture file to the specified output subdirectory.

[0044] In step S205, if the unique identifier of the material does not exist in the global material information set, the unique identifier of the material is added to the global material information set.

[0045] Optionally, in this embodiment, the current processing context can also be set, the unique identifier of the current material can be set as the key index of the material context of the current processing, and the temporary data container associated with the current material can be ensured to be ready.

[0046] In step S206, for each geometry corresponding to the material, the geometric data of the geometry is obtained, the obtained geometric data is stored in the geometric data structure corresponding to the material, and the geometric data structure corresponding to the material is associated with the material data structure corresponding to the material.

[0047] Optionally, in this embodiment of the application, for each geometry corresponding to the material, obtaining the geometry data of the geometry and storing the obtained geometry data in the geometry data structure corresponding to the material may include the following:

[0048] Obtain the vertex coordinates and vertex indices, normals and normal indices, and UV coordinates and UV indices of the geometry. Optionally, in this embodiment, the obtained vertex coordinates can be converted to world coordinates using the current cumulative transformation matrix. The obtained vertex coordinates and vertex indices are stored in the vertex coordinate list and vertex index list of the geometry data structure corresponding to the material, respectively. The obtained normals and normal indices are stored in the normal list and normal index list of the geometry data structure corresponding to the material, respectively. The obtained UV coordinates and UV indices are stored in the UV coordinate list and UV index list of the geometry data structure corresponding to the material, respectively.

[0049] In this embodiment, vertex coordinates, normals, and UV coordinates are obtained, and these coordinates are deduplicated and indexed. For each geometry (i.e., a triangular facet), the coordinates of the three vertices undergo necessary unit conversions and optional coordinate system adjustments. Then, an addition operation is performed through a vertex lookup table module to obtain the unique index of the vertex within the current material context. Similar lookup and indexing processes are performed on the normals and UV coordinates of each vertex, and the results are stored in the normal lookup table module and the UV lookup table module, respectively. These generated indexes are sequentially stored in the vertex index list, normal index list, and UV index list of the geometric data structure corresponding to the current material part of the current component. In this way, shared vertex coordinates, normals, and UV coordinate data are stored only once, effectively reducing data redundancy. Furthermore, in this embodiment, these generated vertex indexes are sequentially stored in the geometry index list of the geometric data structure corresponding to the current material part of the current component, used to describe the composition of the triangular facet.

[0050] Iterate through all processed material contexts under the current component. For each material context, store the deduplicated vertex coordinates (extracted, transformed, and scaled from the vertex lookup table module) into the vertex list of the corresponding geometric data structure; store the deduplicated normal coordinates (extracted from the normal lookup table module) into the normal list of the corresponding geometric structure; and store the deduplicated UV coordinates (extracted from the UV lookup table module and normalized according to the material's real-world texture size) into the UV list of the corresponding geometric structure.

[0051] Associate the geometric data structure corresponding to the material with its parent object (representing a material part of the component), that is, the material data structure, and record the number of vertices and faces (i.e. the number of geometry).

[0052] In step S207, the geometric data structure corresponding to the material is added to the global geometry definition set.

[0053] In step S208, the material data structure corresponding to the material is associated with the temporary component data structure corresponding to the component. A sub-object representing a material part of the component is added to the sub-object list of the component's temporary component data structure.

[0054] Optionally, in this embodiment, user-defined parameters of the current component can also be extracted and stored in the custom data field of the temporary component data structure corresponding to the current component.

[0055] In step S209, the temporary component data structure corresponding to the component is added to the global object hierarchy structure collection.

[0056] In step S210, the values ​​of the global material information set are populated into the material list of the top-level scene data container object.

[0057] In step S211, the values ​​of the global geometry definition set are populated into the geometry definition list of the top-level scene data container object.

[0058] In step S212, the values ​​of the global object hierarchy set are populated into the child object list of the scene root object of the top-level scene data container object.

[0059] In addition, after processing the current component, its transformation matrix is ​​displayed.

[0060] In step S213, all components are processed, and the structured encapsulation is completed.

[0061] In this embodiment of the application, when the processing of a certain component is completed, the transformation of that component is popped from the transformation matrix stack.

[0062] In this embodiment, the material list of the top-level scene data container object is filled with all the contents of the global material information set, the geometry definition list of the top-level scene data container object is filled with all the contents of the global geometry definition set, and the child object list of the scene root object of the top-level scene data container object is filled with all the contents of the global object hierarchy structure set, thus forming a complete scene hierarchy.

[0063] It should be noted that the sequential relationship between some steps in the embodiments of this application is merely an example and is not intended to limit this application. For example, the order of steps S210, S211, and S212 can be interchanged.

[0064] Optionally, in this embodiment, outputting the content of the structured data structure may include the following: Serializing the top-level scene data container object into a target format string. Based on a preset data organization method, writing the main data string of the target format string into a preset main data file to output the content of the structured data structure.

[0065] In this embodiment, a standard serialization library (such as Newtonsoft.Json) can be used to serialize the entire top-level scene data container object into a string of a target structured data format (such as JSON), i.e., a target format string. During serialization, it is possible to configure whether to perform formatting (enhancing the output) and whether to ignore null values.

[0066] In this embodiment, the main data string of the target format string is written into a preset main data file for output. This writing can be based on a preset data organization method. For example, the preset data organization method could be to output independent geometry files. If the preset data organization method is to output independent geometry files, then for each geometry definition in the scene, its detailed vertex coordinates, normals, UV coordinates, and index list, etc., will be serialized separately, named with its unique identifier, and saved as an independent external file in a designated subfolder under the directory where the preset main data file is located. The preset main data file only retains references to these external files.

[0067] Specifically, in the embodiments of this application, the following may be included: determining whether a preset data organization method is configured to output independent geometry files.

[0068] If configured to output independent geometry files, the following steps are performed: Based on the default master data file already containing references to geometry, the global set of geometry definitions is traversed, and the detailed geometric data (detailed vertex coordinates, normals, UV coordinates, and index lists, etc.) of each geometry definition is serialized separately into an external file. The filename of the external file can be a unique identifier for the geometry. The external file is then stored in a specified subfolder within the directory containing the default master data file.

[0069] If not configured to output a separate geometry file, all detailed geometry data in the global geometry definition set will be embedded into the preset master data file.

[0070] Optionally, in this embodiment, if the texture file path is recorded, an attempt is made to copy the texture map file from the original path to a specified subfolder in the directory where the preset master data file is located, such as a specified subfolder like "texture" in the output directory, to ensure that the visualization engine can find the texture map according to the relative path.

[0071] Optionally, in this embodiment of the application, reading the contents of the output structured data structure based on the visualization engine may include the following:

[0072] The preset master data file is read, and its contents are deserialized into a scene data structure corresponding to the top-level scene data container object structure.

[0073] Specifically, the data import module in the visualization engine is responsible for reading the preset master data file. It then uses the corresponding deserialization library to deserialize the contents of the preset master data file into an in-memory data object corresponding to the top-level scene data container object structure, i.e., the scene data structure.

[0074] Optionally, in this embodiment, based on the visualization engine and the read content, the building scene corresponding to the building information model is constructed by matching engine materials from the visualization engine's preset material library based on semantic material categories. This may include the following: traversing the material information list of the scene data structure and processing each material in the material information list. Figure 3 An example is provided.

[0075] In step S301, it is determined whether there are still imported materials to be processed. If yes, proceed to step S302; otherwise, proceed to step S315.

[0076] In step S302, based on the material object, the engine material is matched with the material from the preset material library of the visualization engine.

[0077] Within the visualization engine, an internal material library is predefined or configured, known as the visualization engine's preset material library. This preset material library contains a series of PBR materials or custom shaders optimized for different material categories (such as "glass," "concrete," and "metal"). The visualization engine's import module iterates through the list of material information in the scene data structure. Based on the pre-classified material category name (predefined semantic material category, i.e., material object) stored in the "Category" field of each imported material, it selects or instantiates a corresponding engine material (i.e., a material sphere) from the visualization engine's internal material library.

[0078] In step S303, the material properties of the material are applied to the engine material. Basic properties such as color and transparency / opacity are set for the selected engine material. These property values ​​also come from the imported material information, specifically from the material properties.

[0079] Optionally, in this embodiment, if the imported material has texture information, then based on the imported texture path information, an attempt is made to load the texture map from a specified relative path and apply the texture map to the engine material. Specifically, the texture map is assigned to the corresponding channel of the engine material instance. Furthermore, if UV transformation parameters are present, the UV transformation parameters are also applied.

[0080] In step S304, the material's unique identifier is associated with the engine material, and the material's unique identifier and the engine material are stored in the visualization engine's runtime material cache. The processed engine material instance is stored in a runtime material cache with its original unique identifier as the key for later use.

[0081] In step S305, the object hierarchy of the scene data structure is traversed, and a corresponding visualization engine scene object is created for each object information in the object hierarchy.

[0082] The import module of the visualization engine recursively traverses the object hierarchy in the scene data structure and creates a corresponding visualization engine scene object (such as GameObject in Unity) for each object.

[0083] Optionally, in this embodiment of the application, the name, label, etc. of the visualization engine scene object can also be set.

[0084] In step S306, the scene geometry data corresponding to the scene object in the visualization engine is read.

[0085] For the object information that needs to be rendered (usually leaf nodes, containing references to geometry definitions and material information): If configured to load geometry data from a separate file, the corresponding separate geometry data file (i.e., a separate external file) is read based on the geometry's unique identifier and deserialized as scene geometry data. If the geometry data is already embedded in a preset master data file, it is directly obtained from the preset master data file, and the obtained content is used as scene geometry data.

[0086] In step S307, a mesh object corresponding to the visualization engine scene object is created. Specifically, a new engine-compatible mesh object is created for the visualization engine scene object.

[0087] In step S308, the vertex coordinate list, normal list, and UV coordinate list are obtained from the scene geometry data and populated into the mesh object.

[0088] Specifically, vertex coordinates are extracted from the imported scene geometry data (with necessary coordinate system transformations, such as adjusting the Y-axis upwards), and used to populate the vertex coordinate list of the mesh object. Normal and UV coordinates are extracted from the imported scene geometry data and used to populate the mesh object. If normals or UV coordinates are missing, or if they need to be recalculated, the visualization engine's built-in normal and bounding box recalculation function is invoked, i.e., the visualization engine API is called to recalculate the mesh's normals and bounding box.

[0089] In step S309, a list of geometry indices is obtained from the scene geometry data and populated into the mesh object. In other words, geometry indices are extracted from the imported scene geometry data and used to populate the geometry index list of the mesh object.

[0090] In step S310, the mesh object is assigned to the mesh filter component of the visualization engine scene object. Specifically, a mesh filter component is added to the newly created visualization engine scene object, and the newly created mesh object is assigned to it.

[0091] In step S311, a MeshRenderer component is added to the scene object of the visualization engine.

[0092] In step S312, for each material in the object information, based on the material's unique identifier, the engine material corresponding to the material is obtained from the runtime material cache, and the obtained engine material is applied to the mesh renderer component.

[0093] Automatic material assignment can include the following: Retrieving the unique identifier of the material it references from the current object's information. Using the material's unique identifier, finding the corresponding engine material instance from the runtime material cache. Assigning this engine material to the scene object's mesh renderer's material properties. If the raw geometry data is marked for two-sided rendering, setting the engine material or mesh renderer accordingly to achieve a two-sided effect.

[0094] In step S313, the parent-child relationship of the visualization engine scene objects is set according to the hierarchical relationship of the object information. In the BIM model, there is a natural hierarchical structure between components; for example, a window is embedded in a wall, and a wall belongs to a specific floor. When exporting data from the BIM source, this hierarchical relationship is completely preserved through the "global object hierarchy collection." Step S313 is to reconstruct this hierarchical relationship in the visualization engine. Specifically, after creating scene objects (GameObjects) representing each component (i.e., visualization engine scene objects) in the engine, the hierarchical relationship between the visualization engine scene objects is set according to the exported hierarchical data. For example, the parent object of the visualization engine scene object representing the "window" is set to the visualization engine scene object representing the "wall." By setting the parent-child relationship, these independent entities (visual engine scene objects) are organized according to the original structure of the BIM model, forming a complete and structured scene tree.

[0095] In step S314, the component attributes in the object information are attached as metadata to the visualization engine scene object.

[0096] The component attributes (custom data) carried in the object information can be attached as metadata to the visualization engine scene object (e.g., through a custom script component) for querying and display by interactive scripts in the visualization engine scene. Furthermore, the object's positioning (translation, rotation, scaling) information is also parsed from the object information and applied to the transformation components of the visualization engine scene object.

[0097] In step S315, the construction of the architectural scene is completed. The architectural scene is constructed in the visualization engine. The architectural model has the correct geometric shape, materials applied based on semantic pre-classification, and carries interactive BIM information. The visualization engine automatically constructs a 3D architectural scene containing the correct materials and BIM information.

[0098] Optionally, in this application embodiment, the export parameters for exporting building information model data can be pre-configured, wherein the export parameters include: preset data organization method, preset master data file, output path, name, and level of detail.

[0099] Specifically, the export parameters are configured interactively in the user interface. The plugin pops up a user parameter configuration interface, allowing users to configure the export parameters. For Level of Detail (LOD), the user selects the level of detail of the exported geometry. For Preset Data Organization, the user can choose whether to output the detailed geometric data of each component as a separate external file and retain only the index in the preset master data file; or choose to embed all geometric data into the preset master data file.

[0100] Output path selection: Users specify the output path and name of the preset master data file through the standard file save dialog box. Core data processing context initialization: The plugin instantiates a custom export context processor module, which will be responsible for processing all data exported from the BIM software. The preset master data file, output path, and name—these three parameters together determine the storage location and filename of the final generated data file.

[0101] Level of Detail (LOD) is a parameter used in the "Geometry Mesh Processing" step. BIM software APIs typically allow setting a view or an export option to control the level of detail in the geometry when exporting. Our plugin passes the "Level of Detail" parameter configured in the UI to the BIM API to obtain triangular mesh data with the corresponding level of detail.

[0102] Optionally, in this embodiment, startup and view verification may also be included. The user activates the main command execution module of this plugin in the 3D view of the BIM software. The program first checks whether the currently active view is a 3D view; if not, it switches to a 3D view to ensure the integrity of the exported data.

[0103] This application provides a method for efficiently converting a 3D building model containing pre-classified and repaired materials into structured data within Building Information Modeling (BIM) design software (such as Autodesk Revit), and automatically reconstructing a 3D scene, applying intelligent materials based on a preset material library, and associating BIM information within a target 3D visualization engine (such as Unity). This method includes a data export module for the BIM side and a data import and scene construction module for the visualization engine side. The technical solution provided by this application aims to offer architects, designers, and visualization professionals an efficient and intelligent bridge, enabling them to fully utilize the rich information of BIM models and the powerful rendering and interactive capabilities of 3D visualization engines.

[0104] The core objective of this application's implementation method is to provide a complete automated scene construction and intelligent material application solution, from the BIM design environment to the target 3D visualization engine. This solution not only includes efficiently exporting structured data carrying pre-classified material information and BIM attributes from BIM software, but more importantly, it also includes intelligently parsing this data at the target visualization engine level and, in conjunction with the engine's internal preset material library, automatically completing the reconstruction of the 3D model, precise material assignment, and the association of BIM information.

[0105] The technical solutions provided in this application mainly include the following points: 1) Seamless and automated transfer of BIM data and semantics to the visualization engine; through a well-defined structured data format and clear data contracts, ensuring that the geometry, pre-classified material information, hierarchical relationships, and BIM attributes of the BIM model can be accurately and completely parsed by the target visualization engine. 2) Automatic application of intelligent materials based on pre-classification in the visualization engine; utilizing the semantically classified material information exported from the BIM software (especially the material's "category" attribute), the target visualization engine automatically searches for and applies the corresponding materials from the preset material library (including PBR materials, custom shaders, etc.), thereby achieving batch, automated, and high-fidelity restoration of material effects. 3) Automatic reconstruction of the BIM model in the visualization engine while retaining its core information; not only reconstructing the geometric shape, but also restoring the model's hierarchical structure in the visualization engine, and attaching the component's category, family, instance name, and user-specified key parameters as interactive data to the engine's scene objects, providing a foundation for subsequent interactive information display and application. 4) Provides flexible data organization methods to optimize the performance and loading of visualization engine scenes: Allows the decomposition of component geometry data in large BIM models into independent, on-demand loadable units, and provides an overall index to support resource management and performance optimization of visualization engine scenes. 5) Builds a complete, end-to-end automated workflow: From one-click export from BIM software to automatic scene generation and intelligent material matching in the target visualization engine, it minimizes manual intervention and significantly shortens the cycle from BIM design to high-quality, interactive visualization results.

[0106] The technical solutions provided by the embodiments of this application have achieved significant technical progress and beneficial effects in practical applications, specifically including the following aspects.

[0107] 1) It achieves end-to-end automated scene construction and material application. Not only does it automate the data export from the BIM end, but more importantly, it also incorporates the scene reconstruction from the target visualization engine end, especially the intelligent material matching and application process based on semantic classification, into the automated process. This greatly reduces the manual intervention throughout the entire process from BIM model to interactive visualization scene.

[0108] 2) Significant Improvement in Material Fidelity and Visualization Quality. Leveraging pre-classification results, the core advantage of this method lies in its ability to fully utilize the semantic material classification results already achieved in BIM software through other advanced methods (such as AI-based automatic material classification and repair methods). The exported data contains standardized material category information. Precise Matching and PBR Application on the Visualization Engine Side: Based on this accurate classification information, the data import and scene construction modules on the visualization engine side can automatically select and apply corresponding engine materials from the preset PBR material library or custom shaders. This avoids the tedious manual re-assignment and adjustment of materials in the visualization engine, greatly ensuring the consistency between the final visualization effect and the BIM design intent, and improving the realism and physical accuracy of the rendering. Automatic Texture Association: The method can extract and attempt to copy relevant texture map files, and record texture paths, UV scaling, and offset information in the exported data, providing the possibility for automatically restoring texture details in the visualization engine.

[0109] 3) Significantly simplified workflow and improved efficiency. One-click BIM export integrates complex data extraction, transformation, and structured encapsulation processes within the BIM plugin. Automated engine import and configuration: the data import and scene building modules on the visualization engine side automatically complete model import, mesh reconstruction, material assignment, and BIM information association. Compared to traditional workflows relying on universal 3D formats, overall efficiency can be improved by several times or even tens of times, especially when dealing with complex models containing a large number of components with different materials.

[0110] 4) Complete Preservation and Utilization of BIM Semantic Information. This method not only exports geometry and materials, but also fully exports the hierarchical relationships, categories, families, types, instance names, and custom user data of components. This rich semantic information means that in the visualization engine scenario, the model is no longer a simple "empty shell," but can perform advanced applications such as interactive queries, information highlighting, and conditional display, providing data support for building true digital twin scenarios and information-rich interactive experiences.

[0111] 5) Performance optimization potential for real-time rendering. LOD control allows users to select the level of detail (LOD) during export, providing initial control over model complexity. Modular data output and loading: when geometric data is exported as separate files, large models are broken down into multiple smaller data blocks. This enables the visualization engine to implement advanced resource management strategies such as on-demand loading, streaming loading, or selective loading, effectively reducing initial loading time and memory usage, and improving the smoothness of large scenes.

[0112] 6) Through precise export from the BIM end and intelligent automated import and scene construction from the visualization engine end, this application realizes a complete workflow from efficient and high-fidelity BIM to real-time visualization application.

[0113] In summary, the embodiments of this application, through a novel end-to-end method encompassing BIM data export and visualization engine scene construction, fully utilize the preprocessed and semantically classified material information in the BIM model, significantly improving the efficiency, quality, and information fidelity from BIM design to real-time visualization applications. The technical solution provided by these embodiments can be applied to the intersection of Building Information Modeling (BIM) and 3D visualization, real-time rendering engine technology, and data interoperability. Specifically, it involves a method for efficiently and accurately converting pre-semantically classified and repaired material information from a BIM model, along with geometric and attribute data, into structured data. This data is then used in a target 3D visualization engine (such as Unity) to automate 3D scene reconstruction, intelligent matching and application based on a preset material library, and BIM information association.

[0114] Secondly, embodiments of this application also provide a construction device for building architectural scenes based on a visualization engine.

[0115] Figure 4 This is a block diagram of a construction apparatus for building architectural scenes based on a visualization engine, according to an embodiment of this application. Figure 4 As shown, the construction device includes a traversal module 10, an output module 20, a reading module 30, and a construction module 40. The traversal module 10 traverses the components of the building information model, obtains component information, and performs structured encapsulation of the obtained component information to obtain a structured data structure. For any given component, the component information includes component attributes, geometric information, and material information. The material information includes predefined semantic material categories. The output module 20 outputs the content of the structured data structure. The reading module 30 reads the content of the output structured data structure based on a visualization engine. The construction module 40, based on the visualization engine and the read content, matches engine materials from the visualization engine's preset material library based on semantic material categories to construct the building scene corresponding to the building information model.

[0116] Optionally, the traversal module performs structured encapsulation on the acquired component information to obtain a structured data structure, including: aggregating the acquired component information into a top-level scene data container, and performing structured encapsulation on the top-level scene data container to obtain a structured data structure.

[0117] Optionally, the components of the Building Information Model (BIM) are traversed to obtain component information. The obtained component information is then structurally encapsulated to obtain a structured data structure, including: performing the following operations on each component in the BIM: obtaining the component attributes and storing the obtained component attributes in the temporary component data structure corresponding to the component; for each material corresponding to the component, performing the following operations: obtaining the material object, material attributes, and rendering appearance parameters, and storing the obtained material object, material attributes, and rendering appearance parameters in the material data structure corresponding to the material; adding the material's unique identifier to the global material information set if the material's unique identifier does not exist in the global material information set; and for each geometry corresponding to the material, obtaining... Retrieve the geometric data of the geometry, store the acquired geometric data in the geometric data structure corresponding to the material, and associate the geometric data structure corresponding to the material with the material data structure corresponding to the material; add the geometric data structure corresponding to the material to the global geometry definition set; associate the material data structure corresponding to the material with the temporary component data structure corresponding to the component; add the temporary component data structure corresponding to the component to the global object hierarchy structure set; populate the material list of the top-level scene data container object with the values ​​of the global material information set; populate the geometry definition list of the top-level scene data container object with the values ​​of the global geometry definition set; populate the child object list of the scene root object of the top-level scene data container object with the values ​​of the global object hierarchy structure set.

[0118] Optionally, the content of the structured data structure is output, including: serializing the top-level scene data container object into a target format string; and writing the main data string of the target format string into a preset main data file based on a preset data organization method, so as to output the content of the structured data structure.

[0119] Optionally, based on the visualization engine, the content of the output structured data structure is read, including: reading the preset master data file and deserializing the content of the preset master data file into a scene data structure corresponding to the top-level scene data container object structure.

[0120] Optionally, based on the visualization engine and the read content, a building scene corresponding to the building information model is constructed by matching engine materials from the visualization engine's preset material library based on semantic material categories. This includes: traversing the material information list of the scene data structure, and for each material in the material information list, performing the following: matching engine materials from the visualization engine's preset material library based on the material object; applying the material attributes of the material to the engine material; associating the material's unique identifier with the engine material, and storing the material's unique identifier and the engine material in the visualization engine's runtime material cache; traversing the object hierarchy of the scene data structure, creating a corresponding visualization engine scene object for each object information in the object hierarchy; and reading the visualization engine scene object. The process involves: generating scene geometry data corresponding to the image; creating a mesh object corresponding to the visualization engine scene object; obtaining vertex coordinate lists, normal lists, and UV coordinate lists from the scene geometry data and populating them into the mesh object; obtaining a geometry index list from the scene geometry data and populating it into the mesh object; assigning the mesh object to the mesh filter component of the visualization engine scene object; adding a mesh renderer component to the visualization engine scene object; for each material in the object information, obtaining the corresponding engine material from the runtime material cache based on the material's unique identifier and applying the obtained engine material to the mesh renderer component; setting the parent-child relationship of the visualization engine scene object according to the hierarchical relationship of the object information; and attaching the component attributes in the object information as metadata to the visualization engine scene object.

[0121] Optionally, for each geometry corresponding to the material, the geometric data of the geometry is obtained and stored in the geometric data structure corresponding to the material, including: obtaining the vertex coordinates and vertex indexes, normals and normal indices, UV coordinates and UV indices of the geometry; storing the obtained vertex coordinates and vertex indices in the vertex coordinate list and vertex index list of the geometric data structure corresponding to the material, respectively; storing the obtained normals and normal indices in the normal list and normal index list of the geometric data structure corresponding to the material, respectively; and storing the obtained UV coordinates and UV indices in the UV coordinate list and UV index list of the geometric data structure corresponding to the material, respectively.

[0122] The specific working principle and benefits of the construction device for building architectural scenes based on a visualization engine provided in this application are similar to those of the construction method for building architectural scenes based on a visualization engine provided in this application, and will not be repeated here.

[0123] Thirdly, embodiments of this application also provide a machine-readable storage medium storing instructions that cause a machine to execute the above-described construction method.

[0124] Fourthly, embodiments of this application also provide an electronic device, the electronic device comprising: a processor; a memory for storing processor-executable instructions; and a processor for reading executable instructions from the memory and executing the executable instructions to implement the above-described construction method.

[0125] The preferred embodiments of this application have been described in detail above. However, this application is not limited to the specific details of the above embodiments. Within the scope of the technical concept of this application, various simple modifications can be made to the technical solution of this application, and these simple modifications all fall within the protection scope of this application.

[0126] It should also be noted that the various specific technical features described in the above embodiments can be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, this application will not describe the various possible combinations separately.

[0127] Furthermore, various different implementations of this application can be combined in any way, as long as they do not violate the spirit of this application, they should also be regarded as the content disclosed in this application.

Claims

1. A method for constructing architectural scenes based on a visualization engine, characterized in that, The construction method includes: The components of the building information model are traversed to obtain component information. The obtained component information is then encapsulated in a structured manner to obtain a structured data structure. For any given component, the component information includes component attributes, geometric information, and material information. The material information includes predefined semantic material categories. Output the contents of the structured data structure; Based on the visualization engine, the content of the output structured data structure is read; Based on the visualization engine and the read content, the building scene corresponding to the building information model is constructed by matching engine materials from the preset material library of the visualization engine based on the semantic material category. The process of structurally encapsulating the acquired component information to obtain a structured data structure includes: aggregating the acquired component information into a top-level scene data container, and structurally encapsulating the top-level scene data container to obtain a structured data structure. Specifically, the building information model's components are traversed to obtain component information, and the obtained component information is structurally encapsulated to obtain a structured data structure, including: Perform the following operations on each component in the building information model: Obtain the component attributes of the component and store the obtained component attributes in the temporary component data structure corresponding to the component; For each material corresponding to the component, perform the following operations: Obtain the material object, material properties, and rendering appearance parameters, and store the obtained material object, material properties, and rendering appearance parameters into the material data structure corresponding to the material; If the unique identifier of the material does not exist in the global material information set, add the unique identifier of the material to the global material information set; For each geometry corresponding to the material, obtain the geometry data of the geometry, store the obtained geometry data in the geometry data structure corresponding to the material, and associate the geometry data structure corresponding to the material with the material data structure corresponding to the material. Add the geometric data structure corresponding to the material to the global geometry definition set; Associate the material data structure corresponding to the material with the temporary component data structure corresponding to the component; Add the temporary component data structure corresponding to the component to the global object hierarchy structure collection; Populate the values ​​of the global material information set into the material list of the top-level scene data container object; Fill the values ​​of the global geometry definition set into the geometry definition list of the top-level scene data container object; Fill the child object list of the scene root object of the top-level scene data container object with the values ​​of the global object hierarchy set; The process of outputting the content of the structured data structure includes: serializing the top-level scene data container object into a target format string; and writing the main data string of the target format string into a preset main data file based on a preset data organization method, so as to output the content of the structured data structure. Among them, reading the content of the output structured data structure based on the visualization engine includes: reading the preset master data file and deserializing the content of the preset master data file into a scene data structure corresponding to the top-level scene data container object structure; Specifically, based on the visualization engine and the read content, the building scene corresponding to the building information model is constructed by matching engine materials from the preset material library of the visualization engine based on the semantic material category, including: Iterate through the material information list of the scene data structure, and for each material in the material information list, perform the following: Based on the material object, match engine materials for the material from the preset material library of the visualization engine; Apply the material properties of the material to the engine material; Associate the unique identifier of the material with the engine material, and store the unique identifier of the material and the engine material in the runtime material cache of the visualization engine; Traverse the object hierarchy of the scene data structure and create a corresponding visualization engine scene object for each object information in the object hierarchy; Read the scene geometry data corresponding to the scene object in the visualization engine; Create the mesh object corresponding to the scene object of the visualization engine; Obtain the vertex coordinate list, normal list, and UV coordinate list from the scene geometry data, and populate them into the mesh object; Obtain a list of geometry indices from the scene geometry data and populate it into the mesh object; Assign the mesh object to the mesh filter component of the visualization engine scene object; Add a mesh renderer component to the visualization engine scene object; For each material in the object information, based on the unique identifier of the material, the engine material corresponding to the material is obtained from the runtime material cache, and the obtained engine material is applied to the mesh renderer component; The parent-child relationship of the visualization engine scene objects is set according to the hierarchical relationship of the object information; The component attributes in the object information are appended as metadata to the visualization engine scene object.

2. The construction method according to claim 1, characterized in that, For each geometry corresponding to the material, the geometric data of the geometry is acquired, and the acquired geometric data is stored in the geometric data structure corresponding to the material, including: Obtain the vertex coordinates and vertex indices, normals and normal indices, and UV coordinates and UV indices of the geometry. The obtained vertex coordinates and vertex indices are stored in the vertex coordinate list and vertex index list of the geometric data structure corresponding to the material, respectively. The acquired normals and normal indices are stored in the normal list and normal index list of the geometric data structure corresponding to the material, respectively. The obtained UV coordinates and UV indices are stored in the UV coordinate list and UV index list of the geometric data structure corresponding to the material, respectively.

3. A construction device for building architectural scenes based on a visualization engine, characterized in that, The construction device includes: The traversal module is used to traverse the components of the building information model, obtain component information, and encapsulate the obtained component information in a structured way to obtain a structured data structure. For any component, the component information includes component attributes, geometric information and material information, and the material information includes predefined semantic material categories. The output module is used to output the contents of the structured data structure; The reading module is used to read the contents of the output structured data structure based on the visualization engine; The construction module is used to construct the building scene corresponding to the building information model based on the visualization engine and the read content, by matching engine materials from the preset material library of the visualization engine based on the semantic material category; The traversal module performs structured encapsulation of the acquired component information to obtain a structured data structure, including: aggregating the acquired component information into a top-level scene data container, and performing structured encapsulation based on the top-level scene data container to obtain a structured data structure. Specifically, the building information model's components are traversed to obtain component information, and the obtained component information is structurally encapsulated to obtain a structured data structure, including: Perform the following operations on each component in the building information model: Obtain the component attributes of the component and store the obtained component attributes in the temporary component data structure corresponding to the component; For each material corresponding to the component, perform the following operations: Obtain the material object, material properties, and rendering appearance parameters, and store the obtained material object, material properties, and rendering appearance parameters into the material data structure corresponding to the material; If the unique identifier of the material does not exist in the global material information set, add the unique identifier of the material to the global material information set; For each geometry corresponding to the material, obtain the geometry data of the geometry, store the obtained geometry data in the geometry data structure corresponding to the material, and associate the geometry data structure corresponding to the material with the material data structure corresponding to the material. Add the geometric data structure corresponding to the material to the global geometry definition set; Associate the material data structure corresponding to the material with the temporary component data structure corresponding to the component; Add the temporary component data structure corresponding to the component to the global object hierarchy structure collection; Populate the values ​​of the global material information set into the material list of the top-level scene data container object; Fill the values ​​of the global geometry definition set into the geometry definition list of the top-level scene data container object; Fill the child object list of the scene root object of the top-level scene data container object with the values ​​of the global object hierarchy set; The process of outputting the content of the structured data structure includes: serializing the top-level scene data container object into a target format string; and writing the main data string of the target format string into a preset main data file based on a preset data organization method, so as to output the content of the structured data structure. Among them, reading the content of the output structured data structure based on the visualization engine includes: reading the preset master data file and deserializing the content of the preset master data file into a scene data structure corresponding to the top-level scene data container object structure; Specifically, based on the visualization engine and the read content, the building scene corresponding to the building information model is constructed by matching engine materials from the preset material library of the visualization engine based on the semantic material category, including: Iterate through the material information list of the scene data structure, and for each material in the material information list, perform the following: Based on the material object, match engine materials for the material from the preset material library of the visualization engine; Apply the material properties of the material to the engine material; Associate the unique identifier of the material with the engine material, and store the unique identifier of the material and the engine material in the runtime material cache of the visualization engine; Traverse the object hierarchy of the scene data structure and create a corresponding visualization engine scene object for each object information in the object hierarchy; Read the scene geometry data corresponding to the scene object in the visualization engine; Create the mesh object corresponding to the scene object of the visualization engine; Obtain the vertex coordinate list, normal list, and UV coordinate list from the scene geometry data, and populate them into the mesh object; Obtain a list of geometry indices from the scene geometry data and populate it into the mesh object; Assign the mesh object to the mesh filter component of the visualization engine scene object; Add a mesh renderer component to the visualization engine scene object; For each material in the object information, based on the unique identifier of the material, the engine material corresponding to the material is obtained from the runtime material cache, and the obtained engine material is applied to the mesh renderer component; The parent-child relationship of the visualization engine scene objects is set according to the hierarchical relationship of the object information; The component attributes in the object information are appended as metadata to the visualization engine scene object.

4. The construction apparatus according to claim 3, characterized in that, For each geometry corresponding to the material, the geometric data of the geometry is acquired, and the acquired geometric data is stored in the geometric data structure corresponding to the material, including: Obtain the vertex coordinates and vertex indices, normals and normal indices, and UV coordinates and UV indices of the geometry. The obtained vertex coordinates and vertex indices are stored in the vertex coordinate list and vertex index list of the geometric data structure corresponding to the material, respectively. The acquired normals and normal indices are stored in the normal list and normal index list of the geometric data structure corresponding to the material, respectively. The obtained UV coordinates and UV indices are stored in the UV coordinate list and UV index list of the geometric data structure corresponding to the material, respectively.

5. A machine-readable storage medium, characterized in that, The machine-readable storage medium stores instructions that cause the machine to perform the construction method of claim 1 or 2.

6. An electronic device, characterized in that, The electronic device includes: processor; Memory used to store the processor's executable instructions; The processor is configured to read the executable instructions from the memory and execute the executable instructions to implement the construction method according to claim 1 or 2.

Citation Information

Patent Citations

  • Method for automatically modeling by utilizing BIM data based on UE4

    CN112465981A