Unity-based BIM model Web end lightweight display method
Through multi-level integration and Unity's Lod management, asynchronous loading and URP rendering pipelines, the problems of reduced LoD details and lagging material texture loading in the BIM model web display are solved, and efficient and high-quality BIM model display is achieved.
Patent Information
- Application Number
- CN202411590664.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-08
- Publication Date
- 2025-03-04
AI Technical Summary
The prior art has problems of lowering LoD details and lagging material texture loading in the lightweight display of BIM models, which affects the use effect.
The multi-level integration method is used to lighten the BIM model. Through Unity's built-in Lod multi-level detail management and asynchronous loading function, material and texture data are optimized, and URP rendering pipelines are used to improve rendering performance.
It realizes efficient data compression and rendering of the BIM model, ensures the quality and performance of the model, and significantly improves the web-side display effect.
Smart Images

Figure CN119557525A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of digital construction engineering and relates to a method for lightweight display of a BIM model on a Web side. Background Art
[0002] The BIM model can play a good role in guiding the construction of construction projects with complex building structures and numerous mechanical and electrical pipelines. The BIM model has been widely used in the field of construction engineering.
[0003] The BIM model of a construction project includes a civil engineering model and an electromechanical model. The BIM model contains a large amount of detailed data (such as polygons, attribute information, etc.). Opening and using the BIM model requires installing software and configuring a computer with good performance. Therefore, browsing the BIM model on a lightweight Web terminal has become an important way and method for efficiently using the BIM model. For example, the publication number (CN111898052B) discloses a method for online display of a lightweight BIM model on the WEB terminal, the method comprising: 1) performing multi-level compression on the BIM model data to obtain a lightweight BIM model; 2) storing the data corresponding to the lightweight BIM model in a database table; 3) optimizing the scene space and components respectively; 4) realizing the display of the BIM model on the WEB terminal through dynamic display and dynamic resource scheduling. Although this technical solution can improve the loading and display efficiency of the BIM model, the loading and rendering method of this technical solution has the problems of reduced LoD details and jamming of material texture loading, which has a certain impact on the use effect of the Web terminal. Summary of the invention
[0004] The purpose of the present invention is to provide a lightweight display method for a BIM model Web based on Unity to solve the problems existing in the above-mentioned technology. A multi-level integration method (material, texture, geometry and attribute data) is used to lightweight the BIM model, remove redundant data, achieve efficient data compression, and ensure the integrity of the BIM model geometry data and material texture information. Through Unity's built-in Lod multi-level detail management, the model rendering detail level is adjusted to ensure the quality of the BIM model while reducing the rendering burden. Using Unity's asynchronous loading function, Addressable efficiently loads resources, effectively reduces the amount of transmitted data, and improves loading speed and rendering performance. Using Unity's URP rendering pipeline, URP provides BIM models with better material effects and performance, which is suitable for cross-platform projects. These greatly improve the display effect of the final lightweight BIM model on the Web.
[0005] The technical solution adopted by the present invention is:
[0006] A lightweight display method for a BIM model on a Web side includes the following steps:
[0007] S1: Project drawing creation;
[0008] S2: Use BIM software to build a model hierarchy;
[0009] S3: Multi-level integration and compression of BIM models;
[0010] S4: Import the lightweight BIM model into Unity for rendering;
[0011] S5: Use Unity UI to design UI interface elements;
[0012] S6: Set up the WebGL platform in Unity and package the WebGL project;
[0013] S7: Deploy the file to the cloud server.
[0014] The beneficial effect of the present invention is that it adopts multi-level integration and lightweighting to ensure the integrity of BIM model geometry data and material texture information. Through Unity's built-in Lod multi-level detail management, the model rendering detail level is adjusted to ensure the quality of the BIM model while reducing the rendering burden. By using Unity's asynchronous loading function, the amount of transmitted data is effectively reduced, and the loading speed and rendering performance are improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 It is a schematic diagram of an embodiment of a lightweight display method of a BIM model Web terminal based on Unity in an embodiment of the present invention;
[0016] Figure 2 It is a schematic diagram of an embodiment of multi-stage integrated compression and lightweighting in an embodiment of the present invention;
[0017] Figure 3 It is a schematic diagram of an embodiment of Unity scene rendering in an embodiment of the present invention. DETAILED DESCRIPTION
[0018] The present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work should fall within the scope of protection of the present invention.
[0019] See also Figure 1 As shown, a lightweight display method of a BIM model on a Web side includes the following steps:
[0020] Step S101: Project drawings are the basis for creating a BIM model. Project drawings include civil engineering drawings and electromechanical drawings. Civil engineering drawings contain the following project information: (1) Building plan: showing the overall layout of the building, room distribution, door and window locations, etc.; (2) Elevation: showing the appearance of each side of the building, including the height and details of walls, windows and exterior finishes; (3) Section: showing the internal structure of the building, showing the relationship between floors and vertical structure; (4) Structural drawing: providing the load-bearing structure information of the building, such as foundation, columns, beams, floor slabs, etc.; (5) Node detail drawing: describing the detailed practices of key structures, such as doors, windows, stairs, roofs, etc. The mechanical and electrical drawings contain the following project information: (1) HVAC drawings: describing the layout of the HVAC system, including ventilation ducts, equipment, air conditioning units, etc.; (2) Water supply and drainage drawings: showing the layout of the water supply and drainage systems inside and outside the building, including pipes, pump stations, water tanks, etc.; (3) Electrical drawings: showing the wiring of the power system, the location of the distribution box, the layout of lamps, sockets, etc.; (4) Firefighting drawings: including fire water systems, sprinkler systems, smoke detectors, emergency evacuation lighting, etc. Create civil engineering BIM models and mechanical and electrical BIM models based on the civil engineering drawings and mechanical and electrical drawings respectively.
[0021] Step S102: The creation of a BIM model is an important step. First, based on the civil engineering drawings and electromechanical drawings, use BIM software to construct the geometric shapes of civil engineering components such as building walls, floor slabs, columns, and the geometric shapes of electromechanical systems such as pipes, equipment, and lines. Through the construction of geometric shapes, the physical elements in the design drawings are digitally reproduced. Secondly, in order to make the BIM model have more information, attribute data related to floors, areas, and systems need to be set. These attribute information not only helps the layering and classification management of the model, builds the hierarchical structure of the BIM model, but also provides data support for the later model display. Next, the civil engineering model and the electromechanical model are integrated and bound by base point correspondence or origin correspondence to form a complete BIM model. This integration process can ensure the coordination and consistency of different professional models, avoid design conflicts, and provide a more comprehensive view. The binding of different professional BIM models is an indispensable link.
[0022] Step S103: Exporting the BIM model to a common 3D file format is an important step. First, you need to select the 3D view mode in the BIM software to ensure that the geometry and material details of all components can be clearly presented in the current perspective. Next, select a suitable file format for export, such as FBX, GLTF / GLB, etc. These formats are widely compatible in a variety of 3D platforms and applications. Then, set the exported file type, file name, and select an appropriate save location. In the export settings, special attention should be paid to adjusting the multi-level integration compression option to reduce the file size while keeping the geometry and material information of the model as intact as possible. Appropriate compression can not only optimize file storage, but also increase the speed of model loading and rendering. After completing these configurations, click the Export button to generate a compressed lightweight 3D model file. After the export is completed, the file should be checked to ensure that the model maintains integrity and clear materials in the 3D state, and maintains usability and fluency in other platforms or software to ensure the integrity and usability of the final lightweight model file.
[0023] Step S104: Import the lightweight BIM model file into Unity. First, make sure to select the appropriate import settings to optimize the display effect of the model. Select Unpack Completely in Prefab in the model to display the model attribute information. Then adjust the basic parameters of the model, including scaling, rotation, and position, to ensure that the model is correctly aligned in the scene. Then, configure the camera, select the best viewing angle and field of view, and ensure that the camera settings match the design requirements. For lighting and shadow effects, different types of light sources, such as directional light, point light, or spotlight, can be added according to scene requirements to improve the realism of the model. Next, in order to make the lightweight model have a good display effect, optimize the model to add materials and textures, select the appropriate material type, and accurately apply the relevant texture maps to the model surface. In order to improve the rendering effect and performance, URP (Universal Render Pipeline) can be used for rendering. This function can provide more efficient rendering management and support more complex lighting and shadow effects. Finally, use the Game view and Scene view in Unity to preview the rendering effect in real time, observe the performance of the model under different lighting and viewing angles, and ensure that its visual effect in the final application meets the design and performance requirements.
[0024] Step S105: Use Unity UI components to build a visual interface and integrate the data information of the BIM model into the interface. First, add Unity's UI components, select and design appropriate UI elements, including panels, buttons, text boxes, images, etc., to build an intuitive visual interface. These elements will be used to display the data information of the BIM model. Then, read and extract the BIM model data information, such as model properties, dimensions, material information, project stages, etc., through scripts or plug-ins in Unity. Next, write a C# script to associate the extracted BIM data with UI elements to display the model data information. For example, when you click on a model component, its attribute information (such as material, size) will be automatically displayed in the UI interface. The geometric shape and data information of the BIM model are displayed separately. The three-dimensional form of the model and various data information associated with it can be seen on the interface at the same time, so that users can understand the model details more intuitively.
[0025] Step S106: The Unity project is successfully packaged as a WebGL application that can be run on the Web side to achieve cross-platform online display. First, switch to the WebGL platform. Open the "Build Settings" window of Unity, find and select the "WebGL" platform in the platform list. Click the "Switch Platform" button to switch the current project to the WebGL platform to ensure that the project is adapted to the operating environment of the Web side. Then, configure the WebGL settings. Click "Player Settings" to open the detailed setting options of the WebGL platform. In the "Resolution and Presentation" section, set the resolution, full screen mode, WebGL template, etc. of the application, and select a suitable resolution to ensure that Web users have a good visual experience. In "Other Settings", configure rendering-related settings, such as graphics API, color space, etc., and select performance optimization and compatibility-related options according to project requirements. Finally, package the WebGL project. After configuring all settings, click the "Build" button, select the save path and start packaging the WebGL project. Unity will export the project as a file that can be run in a web browser, including HTML, JavaScript, and resource files.
[0026] Step S107: Deploy the WebGL file (including HTML, JavaScript and data files) to the cloud server, publish the port link, and realize the Web-side display. First, select and set up a suitable cloud server provider, such as AWS, Azure, Google Cloud, Alibaba Cloud, etc. These platforms provide an environment suitable for deploying Web applications. You need to configure the server according to your needs, such as selecting Linux or Windows server, setting server memory, bandwidth, etc. Next, upload the file to the server. Use an FTP client (such as FileZilla) or directly through a command line tool (such as SSH, SCP, etc.) to upload the folder generated by WebGL to the specified directory of the cloud server. Make sure that HTML, JavaScript and data files are uploaded to the Web server directory in the server. Then, configure a Web server (such as Nginx, Apache) on the cloud server to handle HTTP requests and host WebGL files. Edit the server's configuration file, specify the HTML file as the default entry file, and ensure that the WebGL application can be accessed through the URL. Next, open the port and ensure that the server's firewall rules allow access to the HTTP or HTTPS port you specified. Finally, after configuring the Web server, access the published WebGL application through the server's IP address or bound domain name.
[0027] BIM model multi-level integration compression is designed to compress and simplify BIM model data, reduce file size, speed up loading, and reduce computing load during rendering. This process is particularly suitable for Unity's real-time display needs.
[0028] like Figure 2 As shown, an embodiment of multi-level integrated compression and lightweighting in the embodiment of the present invention includes the following:
[0029] Step S201: Geometry simplification reduces the complexity of the model by reducing the number of polygons. This method is often used for multi-level detail management. First, polygon reduction. Analyze the geometry of the BIM model, especially the model details, and remove redundant faces and vertices. For example, for structural parts inside the building that cannot be seen in the display, such as hidden pipelines, internal supports, etc., these details can be removed or simplified. Secondly, mesh topology optimization. Merge unnecessary split faces to reduce the number of faces of the model. Simplify the mesh while ensuring the visual effect to make the topology clearer and simpler. For each level of detail, you can define a proportional reduction in the number of faces:
[0030]
[0031] in, is the number of vertices or polygons at the i-th level, and r is the simplification rate (0 < r < 1, typical values are 0.5 or 0.25), is the number of vertices or polygons at the finest level.
[0032] Step S202: Attribute data simplification mainly reduces levels, reduces data storage redundancy, and improves data reading efficiency. By simplifying the data levels, deeply nested attributes are flattened to reduce data complexity and storage space. For example, integrating the area information and floor information of components into one attribute instead of multi-level nesting. The process includes eliminating irrelevant attributes, retaining core attributes, and merging similar attributes. The attribute structure simplification formula:
[0033] T simplified ={N→(A 1 →A 2 →···→A n )};
[0034] where N is the component of the model, A n is the attribute data, and n is the level index of the attribute.
[0035] Step S203: Material optimization includes reducing the number of materials and merging shared materials. By sharing materials, the number of "Draw Call" (rendering calls) during rendering is reduced. Suppose there are n components in the model, and each component uses a different material, the number of rendering calls is n. After optimization, similar materials are merged, and the number of independent materials is reduced to m, then the number of rendering calls is reduced to m: n > m; this operation of reducing the number of materials significantly reduces the rendering burden on the GPU.
[0036] Step S204: Texture optimization. By lowering the resolution of the texture and using the ETC (Ericsson Texture Compression) compression algorithm, the file size is reduced while ensuring texture clarity. ETC2 compresses a group of 4x4 pixel image blocks into 64-bit data. These 64 bits are used to store color information, transparency (for RGBA format), and pixel dithering mode. For the RGB mode, the compression formula is as follows:
[0037] BlockSize = 64 bits = 8 bytes;
[0038] where 5 bits are used to store each reference color (red, green, blue), that is, each color channel uses 5 bits, and a specific lookup table or exponential range is used to encode color differences. The color change of each pixel is calculated through the Differential Mode.
[0039] ETC2 uses two color interpolation methods to calculate pixel color: Direct Mode and Differential Mode.
[0040] The direct mode stores two colors and then generates multiple interpolated colors by interpolating them:
[0041] C final =C 0 +f×(C 1 -C 0 );
[0042] Among them, C 0 and C 1 is the stored reference color, and f is the difference coefficient.
[0043] In difference mode, two colors are calculated using a base color and the color difference, and then the final color is calculated using interpolation:
[0044] C 1 =C 0 +△;
[0045] Among them, C 1 is the result of applying the color difference based on the base color, C 0 represents the starting or reference color value, and △ is the change from the reference color to the target color.
[0046] In addition, optimize UV mapping and arrange texture coordinates reasonably to ensure that the texture can be efficiently mapped to the model surface without causing unnecessary distortion. The effect of UV mapping optimization can be quantified by reducing invalid texture space:
[0047]
[0048] Among them, UV is a two-dimensional texture coordinate system, the total UV area is the space occupied by all UV coordinates used for texture mapping in the texture image, and the effective UV area is the area occupied by the UV coordinates of the visible part on the model surface. optimized It should be as close to 100% as possible.
[0049] Step S205: Combine the optimization and simplification of geometry, texture, and attribute data to ensure that the BIM model maintains visual and functional effects while reducing file size and computing overhead, improving real-time rendering performance, and meeting the needs of the later Unity display platform.
[0050] Step S206: Remove redundant data from the BIM model to reduce the complexity and storage requirements of the model. Through careful analysis and screening, we will remove unused materials, redundant vertices and faces to optimize the data structure of the model. Finally, the model is lightweight.
[0051] like Figure 3 As shown, an embodiment of Unity scene rendering in an embodiment of the present invention includes the following:
[0052] Step S301: First, open the Project window, and find and open the "Project" window at the bottom of the Unity editor. Next, drag the lightweight BIM model file to the "Assets" folder, or right-click the "Assets" folder and select "Import New Asset" to import it. Then, in the "Assets" window, find the imported BIM model file. In the "Inspector" window, check the following settings: Scale Factor (adjust the scale factor as needed), Materials (select the "Import Materials" option to import materials, or select "None" to use custom materials), Optimize Mesh (check this option to optimize mesh data), Generate Colliders (collision body is required, check this option). Finally, from the "Assets" window, drag the imported BIM model to the "Hierarchy" window.
[0053] Step S302: Add LOD Group component. First, Unity adds the "LOD Group" component. Unity generates two LOD levels by default: LOD0 (highest detail) and LOD1 (medium detail), and you can add more LOD levels as needed. Then, configure the three parameters of Renderers, Screen Size, and Transition Width (optional). Renderers, add the model's renderer to the LOD Group, and each LOD level corresponds to different model details. Screen Size, adjust this value to define when to switch to a lower LOD level. Generally, the smaller the value, the farther the distance to switch to low details. Transition Width (optional), set the transition width between LODs to make switching detail levels smoother.
[0054] Step S303: Configure the asynchronous loading function. In the Project window, select the resources (such as materials, textures) that need to be loaded asynchronously. In the Inspector window, find the "Addressable" option and check "Addressable" to mark the resource as addressable. Click the steps "Window" -> "Asset Management" -> "Addressables" -> "Groups" to open the Addressables Groups window and select the "+" button to create a new group. Using the Addressable system, resources can be loaded and released more efficiently, ensuring that resources are quickly acquired and released when needed, thereby improving overall performance.
[0055] Step S304: Optimize model geometry and material textures. First, check the geometry of the model, remove unnecessary polygons, and ensure that the model at each LOD level is reasonably simplified. Use Unity's ProBuilder or other modeling tools to modify the model's geometry and optimize the number of faces and structure. Then, select each texture and adjust the "Max Size" and "Compression" settings to ensure that the best quality is retained with the smallest file size. Try to merge materials and merge similar textures into a texture atlas to reduce material switching during rendering. Use simple shaders (such as Unlit Shader) or custom shaders to reduce the computational burden.
[0056] Step S305: Set rendering parameters. First, configure the lighting. In the Hierarchy panel, right-click and select "Light" to add directional light, point light, or spotlight according to the scene requirements. Adjust the lighting intensity, color, and shadow settings to ensure that the model can obtain natural light and shadow effects under different viewing angles. Next, set the camera. Select the camera in the Hierarchy and adjust its Transform properties to determine the appropriate viewing angle. Configure the camera's "ClearFlags", "CullingMask", and "Depth" settings in the Inspector to ensure that the camera can correctly render the required objects in the scene. Adjust "Field of View" and "Aspect Ratio" to capture model details. Then, use the URP pipeline to render the model. Make sure that the project is configured to use the Universal Render Pipeline (URP). In the "RenderPipeline Asset" settings of the URP, configure rendering parameters (such as ShadowDistance, Lighting, etc.) to optimize the rendering effect. Use URP-supported Shaders on the material to ensure the best performance and visual effects in the URP.
[0057] Step S306: Performance testing. Perform a comprehensive performance test, monitor performance in Unity's Profiler, check indicators such as frame rate, memory usage, and loading time, and based on the analysis results, determine whether the LOD level, resource loading strategy, or other settings need to be adjusted to improve performance.
[0058] Step S307: Determine whether the LOD (level of detail) level and loading strategy need to be adjusted. GPU performance and RAM capacity directly affect the supported level of detail, so the LOD should be dynamically adjusted according to the device performance. A close-up view uses a high-detail LOD to display details, while a long-distance view can switch to a low-detail LOD to reduce rendering overhead. Dynamic LOD adjustment logic:
[0059] LOD level =min(max(ceil(d / d threshold ),0),n)
[0060] Where, d is the distance between the camera and the object, d threshold is the threshold for defining LOD switching, and n is the maximum LOD level.
Claims
1. A lightweight display method for a BIM model on a Web, characterized in that: The following steps are involved: S1: Project drawing creation; S2: Use BIM software to build a model hierarchy; S3: Multi-level integration and compression of BIM models; S4: Import the lightweight BIM model into Unity for rendering; S5: Use Unity UI to design UI interface elements; S6: Set up the WebGL platform in Unity and package the WebGL project; S7: Deploy the file to the cloud server.
2. A BIM model web-side lightweight display method according to claim 1, characterized in that: Step S1: The project drawings include civil engineering drawings and electromechanical drawings. The civil engineering drawings contain the following project information: (1) Building plan: showing the overall layout of the building, room distribution, door and window locations, etc.; (2) Elevation: showing the appearance of each side of the building, including the height and details of the walls, windows and exterior finishes; (3) Section: showing the internal structure of the building, showing the relationship between floors and vertical structure; (4) Structural drawing: providing the load-bearing structure information of the building, such as foundation, columns, beams, floor slabs, etc.; (5) Node detail: describing the detailed practices of key structures, such as doors and windows. , stairs, roof, etc.; the electromechanical drawings contain the following project information: (1) HVAC drawings: describing the layout of the HVAC system, including ventilation ducts, equipment, air conditioning units, etc.; (2) Water supply and drainage drawings: showing the layout of the water supply and drainage systems inside and outside the building, including pipes, pump stations, water tanks, etc.; (3) Electrical drawings: showing the wiring of the power system, the location of the distribution box, the layout of lamps, sockets, etc.; (4) Fire protection drawings: including fire water systems, sprinkler systems, smoke detectors, emergency evacuation lighting, etc.; Create civil BIM models and electromechanical BIM models based on the civil drawings and electromechanical drawings respectively.
3. A BIM model web-side lightweight display method according to claim 1, characterized in that: Step S2: First, based on the civil engineering drawings and electromechanical drawings, use BIM software to construct the geometric shapes of civil engineering components such as building walls, floors, columns, and the geometric shapes of electromechanical systems such as pipelines, equipment, and lines; through the construction of geometric shapes, the physical elements in the design drawings are digitally reproduced; secondly, in order to make the BIM model have more information, attribute data related to floors, areas, and systems needs to be set; These attribute information not only helps in the layering and classification management of the model and building the hierarchical structure of the BIM model, but also provides data support for the subsequent model display; next, through the method of base point correspondence or origin correspondence, the civil engineering model and the electromechanical model are integrated and bound to form a complete BIM model.
4. A BIM model web-side lightweight display method according to claim 1, characterized in that: Step S3: First, select the 3D view mode in the BIM software to ensure that the geometry and material details of all components can be clearly presented in the current perspective; then, select a suitable file format for export, such as FBX, GLTF / GLB, etc., which are widely compatible in various 3D platforms and applications; then, set the exported file type, file name, and select an appropriate save location; in the export settings, special attention should be paid to adjusting the multi-level integration compression option to reduce the file size while keeping the geometry and material information of the model as intact as possible; appropriate compression can not only optimize file storage, but also improve the model loading and rendering speed; after completing these configurations, click the export button to generate a compressed lightweight 3D model file; after the export is completed, the file should be checked to ensure that the model maintains integrity and clear materials in the 3D state, and maintains usability and fluency in other platforms or software to ensure the integrity and usability of the final lightweight model file.
5. The method for lightweight display of a BIM model on a Web side according to claim 1, characterized in that: Step S4: First, make sure to select the appropriate import settings to optimize the display effect of the model. Select Unpack Completely in the Prefab to display the model property information. Then adjust the basic parameters of the model, including scale, rotation, and position, to ensure that the model is correctly aligned in the scene. Then, configure the camera, select the best viewing angle and field of view, and ensure that the camera settings match the design requirements. For lighting and shadow effects, different types of light sources, such as directional light, point light, or spotlight, can be added according to scene requirements to improve the realism of the model. Next, in order to make the lightweight model have a good display effect, optimize the model to add materials and textures, select the appropriate material type, and accurately apply the relevant texture maps to the model surface. In order to improve the rendering effect and performance, you can use URP (Universal Render Pipeline) for rendering. This function can provide more efficient rendering management and support more complex lighting and shadow effects. Finally, use the Game view and Scene view in Unity to preview the rendering effect in real time, observe the performance of the model under different lighting and viewing angles, and ensure that its visual effect in the final application meets the design and performance requirements.
6. A BIM model web-based lightweight display method according to claim 1, characterized in that: Step S5: Use Unity UI components to build a visualization interface and integrate the data information of the BIM model into the interface; first, add Unity UI components, select and design appropriate UI elements, including panels, buttons, text boxes, images, etc., to build an intuitive visualization interface; these elements will be used to display the data information of the BIM model; then, read and extract the BIM model data information, such as model properties, dimensions, material information, project stages, etc., through scripts or plug-ins in Unity; next, write a C# script to associate the extracted BIM data with UI elements to realize the display of model data information, such as clicking on a model component, its attribute information (such as material, size) will be automatically displayed in the UI interface; the geometric shape and data information of the BIM model are displayed separately, and the three-dimensional form of the model and various data information associated with it can be seen on the interface at the same time, so that users can understand the model details more intuitively.
7. The method for lightweight display of a BIM model on a Web terminal according to claim 1, characterized in that: Step S6: Successfully package the Unity project into a WebGL application that can run on the Web side to achieve cross-platform online display; First, switch to the WebGL platform; Open the "Build Settings" window of Unity, find and select the "WebGL" platform in the platform list. Click the "Switch Platform" button to switch the current project to the WebGL platform to ensure that the project is adapted to the operating environment of the Web side; Then, configure the WebGL settings and click "Player Settings" to open the detailed setting options of the WebGL platform; In the "Resolution and Presentation" section, set the resolution, full screen mode, WebGL template, etc. of the application, and select the appropriate resolution to ensure that the Web users have a good visual experience; In "Other Settings", configure rendering-related settings, such as graphics API, color space, etc., and select performance optimization and compatibility-related options according to project requirements; Finally, package the WebGL project; After configuring all settings, click the "Build" button, select the save path and start packaging the WebGL project; Unity will export the project as a file that can be run in a Web browser, including HTML, JavaScript, and resource files.
8. The method for lightweight display of a BIM model on a Web terminal according to claim 1, characterized in that: Step S7: Deploy the WebGL file (including HTML, JavaScript and data files) to the cloud server, publish the port link, and realize the Web display; First, select and set up a suitable cloud server provider, such as AWS, Azure, GoogleCloud, Alibaba Cloud, etc.; These platforms provide an environment suitable for deploying Web applications; You need to configure the server according to your needs, such as selecting Linux or Windows server, setting server memory, bandwidth, etc.; Next, upload the file to the server; Use an FTP client (such as FileZilla) or directly through command line tools (such as SSH, SCP, etc.) to upload the folder generated by WebGL to the specified directory of the cloud server; Make sure that HTML, JavaScript and data files are uploaded to the Web server directory in the server; Then, configure the Web server (such as Nginx, Apache) on the cloud server to handle HTTP requests and host WebGL files; Edit the server's configuration file, specify the HTML file as the default entry file, and ensure that the WebGL application can be accessed through the URL. Next, open the port and ensure that the server's firewall rules allow access to the HTTP or HTTPS port you specified; Finally, after configuring the Web server, access the published WebGL application through the server's IP address or bound domain name; BIM model multi-level integration compression is designed to compress and simplify BIM model data, reduce file size, speed up loading, and reduce computing load during rendering. This process is particularly suitable for Unity's real-time display needs.
9. A BIM model web-based lightweight display method according to claim 1, characterized in that: The steps include: Step S201: Geometry simplification reduces the complexity of the model by reducing the number of polygons. This method is often used for multi-level detail management. First, polygon reduction: analyze the geometry of the BIM model, especially the model details, and remove redundant faces and vertices. For example, for the structural parts of the building that cannot be seen in the display, such as hidden pipelines, internal supports, etc., these details can be removed or simplified. Secondly, mesh topology optimization, merge unnecessary split faces, reduce the number of model faces, simplify the mesh while ensuring the visual effect, and make the topology structure clearer and simpler. For each level of detail, the proportional reduction of the number of faces can be defined: wherein, is the number of vertices or polygons at the i-th level, r is the simplification rate (0 < r < 1, typical values are 0.5 or 0.25), is the number of vertices or polygons at the finest level; Step S202: Attribute data simplification mainly reduces the hierarchy, reduces data storage redundancy and improves data reading efficiency. By simplifying the data hierarchy, deeply nested attributes are flattened to reduce data complexity and storage space. For example, the area information and floor information of the component are integrated into one attribute instead of multi-layer nesting. The process includes eliminating irrelevant attributes, retaining core attributes, merging similar attributes, and simplifying the attribute structure formula: T simplified ={N→(A1→A2→···→A n )}; Among them, N is the model component, A n is the attribute data, n is the hierarchical index of the attribute; Step S203: Material optimization includes reducing the number of materials and merging shared materials. The number of "DrawCalls" during rendering is reduced by sharing materials. Assuming that there are n components in the model, each component uses a different material, and the number of rendering calls is n, after optimization, similar materials are merged, and the number of independent materials is reduced to m, then the number of rendering calls is reduced to m: n>m. This operation of reducing the number of materials significantly reduces the rendering burden of the GPU. Step S204: Texture optimization, by lowering the texture resolution and using the ETC (Ericsson Texture Compression) compression algorithm, the file size is reduced while ensuring the texture clarity; ETC2 compresses a group of 4x4 pixel image blocks into 64-bit data, which are used to store color information, transparency (for RGBA format) and pixel dithering mode. For RGB mode, the compression formula is as follows: BlockSize=64bits=8bytes; Among them, 5 bits are used to store each reference color (red, green, blue), that is, each color channel uses 5 bits, and a specific lookup table or index range is used to encode the color difference. The color change of each pixel is calculated by the difference mode (DifferentialMode); ETC2 uses two color interpolation methods to calculate pixel color: Direct Mode and Differential Mode; The direct mode stores two colors and then generates multiple interpolated colors by interpolating them: C final =C0+f×(C1-C0); Among them, C0 and C1 are the stored reference colors, and f is the difference coefficient; In difference mode, two colors are calculated using a base color and the color difference, and then the final color is calculated using interpolation: C1=C0+△; Where C1 is the result after applying the color difference based on the base color, C0 represents the starting or reference color value, and △ is the change from the base color to the target color; In addition, optimize UV mapping and arrange texture coordinates reasonably to ensure that the texture can be efficiently mapped to the model surface without causing unnecessary distortion; the effect of UV mapping optimization can be quantified by reducing invalid texture space: Among them, UV is a two-dimensional texture coordinate system, the total UV area is the space occupied by all UV coordinates used for texture mapping in the texture image, and the effective UV area is the area occupied by the UV coordinates of the visible part of the model surface; the optimized effective UV utilization rate U optimized It should be as close to 100% as possible; Step S205: Optimize and simplify geometry, texture, and attribute data to ensure that the BIM model maintains visual and functional effects while reducing file size and computing overhead, improving real-time rendering performance, and meeting the needs of the later Unity display platform; Step S206: Remove redundant data from the BIM model to reduce the complexity and storage requirements of the model. Through careful analysis and screening, we will remove unused materials, redundant vertices and faces to optimize the data structure of the model; finally, the model is lightweight.
10. The method for lightweight display of a BIM model on a Web terminal according to claim 1, characterized in that: The steps include: Step S301: First, open the Project window, find and open the "Project" window at the bottom of the Unity editor, then drag the lightweight BIM model file to the "Assets" folder, or right-click the "Assets" folder and select "Import New Asset" to import it, then find the imported BIM model file in the "Assets" window, and check the following settings in the "Inspector" window: Scale Factor (adjust the scale factor as needed), Materials (select the "Import Materials" option to import materials, or select "None" to use custom materials), Optimize Mesh (check this option to optimize mesh data), Generate Colliders (need collision body, check this option), finally, from the "Assets" window, drag the imported BIM model to the "Hierarchy" window; Step S302: Add LOD Group component. First, Unity adds the "LOD Group" component. Unity generates two LOD levels by default: LOD0 (highest detail) and LOD1 (medium detail). You can add more LOD levels as needed. Then, configure the three parameters of Renderers, Screen Size, and Transition Width (optional). Renderers adds the renderer of the model to the LOD Group. Each LOD level corresponds to different model details. Screen Size adjusts this value to define when to switch to a lower LOD level. Generally, the smaller the value, the farther the distance to switch to low details. Transition Width (optional) sets the transition width between LODs to make the switching of detail levels smoother. Step S303: Configure the asynchronous loading function. In the Project window, select the resources (such as materials and textures) that need to be loaded asynchronously. In the Inspector window, find the "Addressable" option and check "Addressable" to mark the resource as addressable. Click the step "Window"->"Asset Management"->"Addressables"->"Groups" to open the Addressables Groups window. Select the "+" button to create a new group. Using the Addressable system, you can load and release resources more efficiently, ensuring that resources are quickly acquired and released when needed, thereby improving overall performance. Step S304: Optimize model geometry and material textures; First, check the geometry of the model, remove unnecessary polygons, ensure that the model at each LOD level is reasonably simplified, use Unity's ProBuilder or other modeling tools to modify the geometry of the model, and optimize the number of faces and structure. Then, select each texture, adjust the "Max Size" and "Compression" settings to ensure the best quality with the smallest file size; merge materials as much as possible, merge similar textures into a texture atlas to reduce material switching during rendering; use simple Shaders (such as Unlit Shader) or custom Shaders to reduce the computational burden; Step S305: Set rendering parameters; First, configure lighting. In the Hierarchy panel, right-click and select "Light" to add directional light, point light or spotlight according to the scene requirements; adjust the lighting intensity, color and shadow settings to ensure that the model can obtain natural light and shadow effects under different viewing angles; Next, set the camera. Select the camera in the Hierarchy and adjust its Transform properties to determine the appropriate viewing angle; Configure the camera's "ClearFlags", "Culling Mask" and "Depth" settings in the Inspector to ensure that the camera can correctly render the required objects in the scene, and adjust "Field of View" and "Aspect Ratio" to capture model details; Then, use the URP pipeline to render the model, and ensure that the project is configured to use Universal Render Pipeline (URP); In the "Render PipelineAsset" setting of URP, configure rendering parameters (such as Shadow Distance, Lighting, etc.) to optimize the rendering effect; Use URP-supported Shaders on the material to ensure the best performance and visual effects in URP; Step S306: Performance testing: Perform a comprehensive performance test, monitor the performance in Unity's Profiler, check the frame rate, memory usage, loading time and other indicators, and determine whether to adjust the LOD level, resource loading strategy or other settings to improve performance based on the analysis results; Step S307: Determine whether the LOD (level of detail) level and loading strategy need to be adjusted; GPU performance and RAM capacity directly affect the supported level of detail, so LOD should be adjusted dynamically according to device performance. High-detail LOD is used for close-up views to display details, while low-detail LOD can be switched to for long-distance views to reduce rendering overhead. Dynamic LOD adjustment logic: LOD level =min(max(ceil(d / d threshold ),0),n) Where, d is the distance between the camera and the object, d threshold is the threshold for defining LOD switching, and n is the maximum LOD level.
Citation Information
Patent Citations
A WEB-side online display method for lightweight BIM models
CN111898052B
Cited By
Self-adaptive texture atlas compression system and method based on Unity engine
CN120047590A
An Adaptive Texture Atlas Compression System and Method Based on the Unity Engine
CN120047590B
Electrical model lightweight translation software method based on IFC data format
CN121118394A
Display method and system based on building three-dimensional model at mobile terminal
CN121904268A
Park model lightweight method and device, electronic equipment and storage medium
CN121997441A