A three-dimensional model lightweight visualization method, device, terminal and storage medium
By converting the target building information model into a polygonal mesh model and performing geometric simplification on its multiple levels of detail, the problems of slow rendering speed and low display efficiency caused by the large amount of three-dimensional model data in the existing technology are solved, and high-quality 3D visualization.
Patent Information
- Application Number
- CN202410029422.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-08
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2044-01-08
AI Technical Summary
The prior art cannot ensure high-quality visualization of the model while reducing the amount of three-dimensional model data, resulting in slow rendering speed and low display efficiency.
By converting the target building information model into a polygonal mesh model, and performing geometric simplification on its multiple levels of detail, the geometrically simplified model is determined and then rendered to obtain a three-dimensional visualization model.
It effectively reduces the amount of data processed while maintaining high-quality visualization effects, and solves the problems of slow rendering speed and low display efficiency in the existing technology.
Smart Images

Figure CN118052942B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of lightweight visualization of three-dimensional models, and in particular to a lightweight visualization method, device, terminal and storage medium for three-dimensional models. Background Art
[0002] The City Information Model (CIM) is based on city information data and is an organic combination of three-dimensional city space models and city information. The City Information Model is mainly composed of large-scale geographic information system data (GIS data) + small-scale building information model data (BIM data) + Internet of Things data (IoT data). The data granularity is refined to a component, a door, and a window inside a single building in the city, upgrading the traditional static digital city to a perceptible, dynamic online, virtual-real interactive digital twin city model, providing a data foundation and decision-making basis for agile urban management and refined governance.
[0003] BIM (Building Information Modeling) is an important foundation of the urban three-dimensional data system in various CIM visualization management platforms. It covers the entire life cycle information of urban buildings, such as design, construction and operation. The model has the characteristics of high geometric accuracy, many types of components, large model volume and complex structure. For city-level three-dimensional scenes, the number of model components and the number of triangles can usually reach hundreds of millions. The massive amount of three-dimensional data can easily lead to problems such as low display efficiency and slow rendering speed when the CIM visualization platform is performing visualization rendering.
[0004] So far, a large number of lightweight visualization algorithms for 3D models have been developed in the fields of computer vision and computer geometry, aiming at fast loading and smooth rendering of city-level 3D models. The algorithms mainly simplify the geometric structure of 3D models or optimize the rendering engine to achieve smooth visualization of the scene. The 3D model geometry simplification method can effectively reduce the amount of model data and relieve the pressure of computer storage, but such methods often sacrifice geometric accuracy to lightweight 3D models and cannot achieve satisfactory visual effects. The rendering engine optimization method uses multi-level of detail (LOD) loading and instantiation loading strategies to reduce the pressure of massive data loading scheduling, but such methods cannot effectively reduce the amount of data stored in the model, and are prone to loading incoherence during scene browsing. In summary, the existing methods cannot reduce the amount of 3D model data while ensuring high-quality visualization of the model.
[0005] Therefore, the existing technology still needs to be improved and developed. Summary of the invention
[0006] The technical problem to be solved by the present invention is to provide a lightweight visualization method, device, terminal and storage medium for three-dimensional models in response to the above-mentioned defects of the prior art, aiming to solve the problem that the prior art is unable to reduce the amount of three-dimensional model data while ensuring high-quality visualization effect of the model.
[0007] The technical solution adopted by the present invention to solve the problem is as follows:
[0008] In a first aspect, an embodiment of the present invention provides a lightweight visualization method for a three-dimensional model, wherein the method comprises:
[0009] Acquire a target building information model, and convert the target building information model into a polygonal mesh model;
[0010] Performing geometric simplification on each level of detail corresponding to the polygonal mesh model to determine a geometrically simplified model;
[0011] The geometrically simplified model is rendered to determine a three-dimensional visualization model corresponding to the target building information model.
[0012] In one implementation method, converting the target building information model into a polygonal mesh model includes:
[0013] The target building information model is subjected to Delaunay triangulation to determine the polygonal mesh model.
[0014] In one implementation method, geometrically simplifying each level of detail corresponding to the polygonal mesh model to determine a geometrically simplified model includes:
[0015] Performing geometric simplification on each of the multi-detail levels corresponding to the polygonal mesh model, respectively, to determine a geometrically simplified sub-model corresponding to each of the multi-detail levels, wherein the polygonal mesh model includes an indoor multi-detail level and an outdoor multi-detail level;
[0016] The geometrically simplified model is determined according to each of the geometrically simplified sub-models.
[0017] In an implementation method, geometrically simplifying the multi-detail level to determine the geometrically simplified sub-model corresponding to the multi-detail level includes:
[0018] extracting a multi-detail level contour corresponding to the multi-detail level;
[0019] Determining a plurality of planar components in the multi-detail level according to the multi-detail level contour;
[0020] Each of the planar components is simplified to determine the geometrically simplified sub-model corresponding to the multi-detail level.
[0021] In an implementation method, extracting a multi-detail level contour corresponding to the multi-detail level includes:
[0022] Calculate the wall area corresponding to each wall surface of each wall in the multi-detail level;
[0023] Obtaining the coordinates of the corner points of each wall in the multi-detail level, and determining the coordinates of the indoor center point according to the coordinates of each corner point;
[0024] The multi-detail level contour corresponding to the multi-detail level is determined according to the wall areas and the indoor center point coordinates.
[0025] In one implementation method, the simplifying of each of the planar components to determine the geometrically simplified sub-model corresponding to the multi-detail level includes:
[0026] Simplifying each of the plane components by using a quadratic error metric algorithm to determine a simplified plane component corresponding to each of the plane components, wherein the simplified plane component includes a plurality of attached simplified plane components and a plurality of non-attached simplified plane components;
[0027] Determining the affiliation relationship between each of the attached simplified plane components and each of the non-attached simplified plane components according to the corner point coordinates of each of the non-attached simplified plane components;
[0028] The geometrically simplified sub-model is determined according to each of the attached simplified plane components, each of the non-attached simplified plane components, and each of the subordinate relationships.
[0029] In one implementation method, rendering the geometrically simplified model to determine the three-dimensional visualization model corresponding to the target building information model includes:
[0030] Get model texture information;
[0031] Parallax mapping is performed on each of the simplified planar components in the geometric simplified model according to the model texture information to determine the three-dimensional visualization model corresponding to the target building information model.
[0032] In a second aspect, an embodiment of the present invention further provides a lightweight visualization device for a three-dimensional model, wherein the lightweight visualization device for a three-dimensional model comprises:
[0033] A model conversion module, used to obtain a target building information model and convert the target building information model into a polygonal mesh model;
[0034] A geometric simplification module, used to geometrically simplify each level of detail corresponding to the polygonal mesh model to determine a geometrically simplified model;
[0035] The model rendering module is used to render the geometrically simplified model and determine the three-dimensional visualization model corresponding to the target building information model.
[0036] In a third aspect, an embodiment of the present invention further provides a terminal, comprising a memory and one or more processors; the memory stores one or more programs; the program comprises instructions for executing any of the three-dimensional model lightweight visualization methods described above; and the processor is used to execute the program.
[0037] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium on which a plurality of instructions are stored, wherein the instructions are suitable for being loaded and executed by a processor to implement any of the above-mentioned lightweight visualization methods for three-dimensional models.
[0038] Beneficial effects of the present invention: The embodiment of the present invention obtains a target building information model and converts the target building information model into a polygonal mesh model; geometrically simplifies each multi-detail level corresponding to the polygonal mesh model to determine a geometrically simplified model; and renders the geometrically simplified model to determine a three-dimensional visualization model corresponding to the target building information model. Since the present invention divides the polygonal mesh model into multiple multi-detail levels for geometric simplification and then renders the simplified model to obtain a three-dimensional visualization model, it can effectively reduce the amount of data to be processed without affecting the visualization effect of the model. Therefore, it can effectively solve the problem that the existing technology cannot reduce the amount of data of the three-dimensional model while ensuring the high-quality visualization effect of the model. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0040] Figure 1 It is a flow chart of a lightweight visualization method for a three-dimensional model provided in an embodiment of the present invention.
[0041] Figure 2 It is a schematic diagram of the Delaunay triangulation principle provided by an embodiment of the present invention.
[0042] Figure 3 It is a schematic diagram of a wall model provided by an embodiment of the present invention.
[0043] Figure 4 It is a schematic diagram of wall tightness inspection provided by an embodiment of the present invention.
[0044] Figure 5 The embodiment of the present invention provides a simplified plan view of the edge before folding.
[0045] Figure 6 The simplified plan view after edge folding provided by an embodiment of the present invention.
[0046] Figure 7 It is a schematic diagram of dependency judgment provided by an embodiment of the present invention.
[0047] Figure 8 It is a schematic diagram of wall reconstruction provided by an embodiment of the present invention.
[0048] Fig. 9 It is an overall flow chart of the disparity mapping provided by an embodiment of the present invention.
[0049] Fig.10 It is a schematic diagram of the virtual visual effect provided by an embodiment of the present invention.
[0050] Fig.11 It is an overall technical flow chart provided by an embodiment of the present invention.
[0051] Fig.12 It is a schematic diagram of the internal modules of the lightweight visualization device for three-dimensional models provided in an embodiment of the present invention.
[0052] Fig.13 It is a principle block diagram of a terminal provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0053] The present invention discloses a lightweight visualization method, device, terminal and storage medium for a three-dimensional model. In order to make the purpose, technical solution and effect of the present invention clearer and more specific, the present invention is further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0054] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present invention refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be intermediate elements. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.
[0055] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as generally understood by those skilled in the art in the art to which the present invention belongs. It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with the meanings in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless specifically defined as herein.
[0056] The City Information Model (CIM) is based on city information data and is an organic combination of three-dimensional city space models and city information. The City Information Model is mainly composed of large-scale GIS data + small-scale BIM data + IoT data, which refines the data granularity to a component, a door, or a window inside a single building in the city, and upgrades the traditional static digital city to a perceptible, dynamic, online, virtual-real interactive digital twin city model, providing a data foundation and decision-making basis for agile urban management and refined governance.
[0057] BIM is an important foundation of the urban three-dimensional data system in various CIM visualization management platforms. It covers the entire life cycle information of urban buildings, including design, construction and operation. The model has the characteristics of high geometric accuracy, many types of components, large model volume and complex structure. For city-level three-dimensional scenes, the number of model components and triangles can usually reach hundreds of millions. The massive amount of three-dimensional data can easily lead to problems such as low display efficiency and slow rendering speed when the CIM visualization platform is performing visualization rendering.
[0058] So far, a large number of lightweight visualization algorithms for 3D models have been developed in the fields of computer vision and computer geometry, aiming at fast loading and smooth rendering of city-level 3D models. The algorithms mainly simplify the geometric structure of 3D models or optimize the rendering engine to achieve smooth visualization of the scene. The 3D model geometry simplification method can effectively reduce the amount of model data and relieve the pressure of computer storage, but such methods often sacrifice geometric accuracy to lightweight 3D models and cannot achieve satisfactory visual effects. The rendering engine optimization method uses multi-level of detail (LOD) loading and instantiation loading strategies to reduce the pressure of massive data loading scheduling, but such methods cannot effectively reduce the amount of data stored in the model, and are prone to loading incoherence during scene browsing. In summary, the existing methods cannot reduce the amount of 3D model data while ensuring high-quality visualization of the model.
[0059] In view of the above-mentioned defects of the prior art, the present invention provides a lightweight visualization method, device, terminal and storage medium for three-dimensional models. The method obtains a target building information model and converts the target building information model into a polygonal mesh model; geometrically simplifies each multi-detail level corresponding to the polygonal mesh model to determine a geometrically simplified model; and renders the geometrically simplified model to determine a three-dimensional visualization model corresponding to the target building information model. Since the present invention divides the polygonal mesh model into multiple multi-detail levels for geometric simplification and then renders the simplified model to obtain a three-dimensional visualization model, it can effectively reduce the amount of data to be processed without affecting the visualization effect of the model. Therefore, it can effectively solve the problem that the prior art cannot reduce the amount of data of the three-dimensional model while ensuring the high-quality visualization effect of the model.
[0060] like Figure 1 As shown, the method includes:
[0061] Step S100: acquiring a target building information model, and converting the target building information model into a polygonal mesh model;
[0062] Building Information Model (BIM) is an important three-dimensional data foundation in the construction of smart cities, digital twins, and CIM visualization platforms. In addition to the geometric shape of the building, BIM data also has data types such as attributes and time series, but due to the use of different formats and standards, it is difficult to exchange and analyze data between different software tools. At the same time, BIM is relatively complex. In addition to geometric data, it also contains a large amount of attribute information, which makes it difficult to perform spatial analysis on such data when resources are limited. Three-dimensional Mesh data (polygonal mesh data) is a data structure used to represent the surface geometry of a three-dimensional object. It is usually composed of a series of interconnected vertices, edges, and faces to form a grid-like structure. This grid-like structure defines the shape of the object, allowing highly detailed geometric modeling, while having the characteristics of simple structure and easy analysis. Therefore, this embodiment obtains the target building information model to be visualized, and converts the target building information model into a polygonal mesh model (three-dimensional Mesh model) so as to simplify the model for analysis.
[0063] In one implementation, converting the target building information model into a polygonal mesh model includes:
[0064] The target building information model is subjected to Delaunay triangulation to determine the polygonal mesh model.
[0065] Specifically, Figure 2 As shown, the target building information model is subjected to Delaunay triangulation, and the specific steps of determining the polygonal mesh model include:
[0066] 1) Initialization: Determine the non-convex boundary of the target building information model; extract the corner points of each component in the target building information model to form a point set (these corner points are the turning points of the target building information model itself, such as the eight corner points that constitute a wall), and construct the first three points in the point set into an initial triangle to ensure that this triangle contains all the points.
[0067] 2) Insert point by point: Insert the remaining points into the current triangle set one by one. For each point inserted, perform the following steps:
[0068] a. Positioning: Find the triangle that contains the point: Start from the initial triangle and continue along the edge to the triangle that contains the point until it is found.
[0069] b. Construction: For the triangle found that contains the point, connect the point with the three vertices of the triangle to form a quadrilateral.
[0070] c. Flip: If the circumscribed circle of the newly constructed quadrilateral contains other vertices, a flip operation is required. The flip operation adjusts the edges of the quadrilateral to satisfy the Delaunay condition. This usually involves deleting old triangles and adding new triangles.
[0071] d. Update edges: Update the edge set based on the insertion points and the newly constructed edges.
[0072] 3) Processing boundaries: In the process of inserting points, some triangles located on the convex hull may be generated. These triangles need to be removed to obtain the final Delaunay triangulation. The above process is repeated until all components of the target building model are meshed to generate a polygonal mesh model.
[0073] 4) Output results: Add the semantic information of each component of the target building model (such as properties of tables, chairs, walls, beams, etc.) to the corresponding polygonal mesh model and output it.
[0074] like Figure 1 As shown, the method specifically also includes:
[0075] Step S200, geometrically simplifying each detail level corresponding to the polygonal mesh model to determine a geometrically simplified model;
[0076] In simple terms, the polygonal mesh model can be divided into several multi-detail levels according to the model structure or the characteristics of each area of the model. After geometric simplification of each multi-detail level, the geometrically simplified model can be obtained by combining the simplified multi-detail levels.
[0077] In one implementation, geometrically simplifying each level of detail corresponding to the polygonal mesh model to determine a geometrically simplified model includes:
[0078] Performing geometric simplification on each multi-detail level corresponding to the polygonal mesh model, respectively, to determine a geometrically simplified sub-model corresponding to each multi-detail level, wherein the polygonal mesh model includes an indoor multi-detail level and an outdoor multi-detail level;
[0079] The geometrically simplified model is determined according to each of the geometrically simplified sub-models.
[0080] Specifically, this embodiment takes into account that the wall has a thickness, such as Figure 3 As shown, when the camera perspective is outdoors, the components on the inner side of the model's wall cannot be seen due to line of sight obstruction; when the camera perspective is indoors, the user cannot see the components on the outer side of the model's wall, and the polygonal mesh model is divided into an indoor multi-detail level and an outdoor multi-detail level. The indoor multi-detail level and the outdoor multi-detail level are simplified respectively to obtain an indoor geometric simplified sub-model corresponding to the indoor multi-detail level and an outdoor geometric simplified sub-model corresponding to the outdoor multi-detail level. The indoor geometric simplified sub-model and the outdoor geometric simplified sub-model are integrated to obtain a geometric simplified model corresponding to the polygonal mesh model. This embodiment can determine the multi-detail level that needs to be visualized currently according to the camera perspective. This embodiment can effectively reduce computer resource consumption and reduce the complexity of rendering models by simplifying different multi-detail levels respectively. At the same time, each multi-detail level is simplified respectively, which solves the problem that the traditional multi-detail level method needs to establish multi-detail levels of different levels, the amount of original data is large, and the scene browsing is prone to model loading incoherence, which affects the visualization effect.
[0081] In one implementation, geometrically simplifying the multi-detail level and determining the geometrically simplified sub-model corresponding to the multi-detail level includes:
[0082] extracting a multi-detail level contour corresponding to the multi-detail level;
[0083] Determining a plurality of planar components in the multi-detail level according to the multi-detail level contour;
[0084] Each of the planar components is simplified to determine the geometrically simplified sub-model corresponding to the multi-detail level.
[0085] This embodiment first extracts the multi-detail level contour corresponding to the multi-detail level, and determines the simplification range corresponding to the multi-detail level through the multi-detail level contour. According to the simplification range, several corresponding components in the multi-detail level are determined. In order not to affect the visualization effect of the model, this embodiment lightweights the planar components with simple model structures. The random sampling consensus algorithm (RANSAC) is an iterative method for estimating mathematical model parameters. It can find the most suitable parameters for describing a plane from a point cloud or Mesh data mixed with noise and local structure. This embodiment uses the random sampling consensus algorithm to divide the components in the multi-detail level into planar components and non-planar components. Then simplify the planar components to determine the geometric simplified sub-model corresponding to the multi-detail level.
[0086] In one implementation, extracting a multi-detail level contour corresponding to the multi-detail level includes:
[0087] Calculate the wall area corresponding to each wall surface of each wall in the multi-detail level;
[0088] Obtaining the coordinates of the corner points of each wall in the multi-detail level, and determining the coordinates of the indoor center point according to the coordinates of each corner point;
[0089] The multi-detail level contour corresponding to the multi-detail level is determined according to the wall areas and the indoor center point coordinates.
[0090] Specifically, extracting the multi-detail level contour corresponding to the multi-detail level includes the following steps:
[0091] 1) Calculate the wall area of each wall at each level of detail. The wall area calculation process includes: Considering that each wall is usually a cube composed of at least 6 faces, each wall consists of a set of spatial points P = {P1, P2, ..., P k The elimination step is to first select the coordinates of the three corner points on each face of the wall, and then obtain the plane equation α i , according to the plane equation α i Obtain the wall area corresponding to the six faces of the wall, and the plane equation α i The formula is as follows:
[0092] α i :A i X+B i Y+C i Z+D i =0
[0093] Among them, A i , B i , C iis the plane normal vector component, which determines the direction of the plane. i is the constant term of the plane, and (X, Y, Z) is the coordinate of any point on the plane.
[0094] 2) Obtain the coordinates of the corner points corresponding to each wall in the multi-detail level, and calculate the coordinates of the indoor center point according to the coordinates of each corner point. i It can calculate the maximum value Z in the OBB outer bounding box (Oriented Bounding Bix) of the polygonal mesh model max With the minimum value Z min The calculation formula is as follows:
[0095]
[0096] Among them, (O i .X,O i .Y,O i .Z) is the center point coordinate.
[0097] 3) Obtain the multi-detail level contour corresponding to the multi-detail level according to the coordinates of the indoor center point and the area of each wall. The specific process is: analyze the wall area of each wall. Generally speaking, the wall with a smaller area is usually embedded in the building from the side and is not visible. The two faces with the largest area are the front of the wall, so the two faces with the largest wall area in each wall are retained. Calculate the distance between the two faces and the center point of the room, and the face farthest from the indoor center point coordinates is established as the outer surface of the wall, and then retain it. Repeat the above steps for each wall of the multi-detail level to obtain the multi-detail level contour corresponding to the multi-detail level. Among them, the distance calculation formula is as follows:
[0098]
[0099] Where d is the distance from the point to the plane, (X0, Y0, Z0) is the center point O i ’s coordinates, AX+BY+CZ+D are the parameters of the wall plane equation.
[0100] In one implementation, when multiple wall outer surfaces are obtained, each wall outer surface is judged; when multiple wall outer surfaces are located on the same side and the highest points of the wall outer surfaces are different, the multiple wall outer surfaces are filled.
[0101] Specifically, due to the vertical non-uniformity of the walls in many large buildings, the walls have multiple outer surfaces. Figure 4As shown in the figure, Wall A and Wall B have an adjacency relationship because of the common face c. The process of obtaining the outer surface of the wall can only obtain face a and face b. There is a gap between face a and face b, which causes the three-dimensional entity to be not closed. Therefore, when extracting the outer surface, this gap needs to be repaired. Traverse all the outer surfaces of the walls. If the lowest point of the outer surface of the wall is still higher than the highest point of the outer surfaces of the remaining walls, this indicates that there are at least two vertical walls in the building, and then determine whether they are on the same side. Otherwise, there is only one vertical wall on one side of the building. If there are multiple vertical surfaces on the same side, fill the gaps between the outer surfaces of the walls. According to the above steps, the outer surfaces of the floor and ceiling components can also be extracted and optimized.
[0102] In one implementation, the simplifying each of the planar components to determine the geometrically simplified sub-model corresponding to the multi-detail level includes:
[0103] Simplifying each of the plane components by using a quadratic error metric algorithm to determine a simplified plane component corresponding to each of the plane components, wherein the simplified plane component includes a plurality of attached simplified plane components and a plurality of non-attached simplified plane components;
[0104] Determining the affiliation relationship between each of the attached simplified plane components and each of the non-attached simplified plane components according to the corner point coordinates of each of the non-attached simplified plane components;
[0105] The geometrically simplified sub-model is determined according to each of the attached simplified plane components, each of the non-attached simplified plane components, and each of the subordinate relationships.
[0106] This embodiment uses a quadratic error metric (QEM) algorithm to simplify the plane component to obtain a simplified plane component, specifically including: using the sum of squares of distances from a point to a plane as an error metric, selecting a vertex pair (v1, v2) with the minimum folding cost in the mesh model of the plane component, and then merging them into a new vertex v, such as Figure 5 and Figure 6 Iterate according to the above steps until a simplified plane component with the number of vertices that meets the simplification rate is obtained.
[0107] Plane parts can be divided into attached plane parts and non-attached plane parts. Simplifying plane parts can get several attached simplified plane parts and several non-attached simplified plane parts. Attached plane parts are attached to non-attached planes. For example, in the outdoor multi-detail level, non-attached planes include floors, ceilings, walls, etc.; attached planes include doors, windows, blackboards, etc. Generally speaking, different multi-detail levels include different plane parts.
[0108] After simplifying the plane components, determine the affiliation between each attached simplified plane component and the non-attached simplified plane component in the simplified plane component, extract the corner point coordinates of the non-attached simplified plane components respectively, and then locate the non-attached simplified plane component corresponding to each attached simplified plane component. For example, locate the association between the door and window components and the wall surface. This association is the affiliation between the attached simplified plane component and the non-attached simplified plane component. The specific method for determining the affiliation includes: calculating the distance between the coordinates (Location) of the bottom center point of the attached simplified plane component and the straight line where the non-attached simplified plane component is located. The non-attached simplified plane component with the closest distance is the attached simplified plane component to which the attached simplified plane component is attached. Figure 7 As shown, x0-x3 are the coordinates of the bottom corner points of the wall, and L is the coordinates of the center point of the simplified plane component attached to the wall. Figure 7 The right side of shows the distance from a point to a line in three-dimensional space; Figure 7 The left side shows that when judging the attachment relationship between the wall-attached simplified plane component and the wall, the distance (dashed line) from L to each wall (Wall 0-Wall 3) needs to be judged in turn. The wall with the shortest distance is the attached wall of the attached simplified plane component. The straight line where the wall is located can be represented by the straight line where the starting point coordinates and the end point coordinates of the corner points of the wall are located. The calculation formula for the distance between the center point coordinates of the attached simplified plane component and the straight line where the wall is located is as follows.
[0109]
[0110] After determining the subordinate relationship between the attached simplified plane component and the wall, add the coordinates of the corner points of the attached simplified plane component to the corresponding wall point set, and then reuse the Delaunay triangulation to update the triangulation network. Iterate the above method until all walls are updated, such as Figure 8 shown.
[0111] In one implementation, when the multi-detail level is an indoor multi-detail level, the plane components also include moving components. The moving components are, for example, objects such as tables, chairs, benches, and cabinets. When simplifying the indoor multi-detail level, the moving plane components are also simplified to obtain moving simplified plane components. Thus, the geometric simplified sub-model corresponding to the indoor multi-detail level is determined according to the moving simplified plane components, the attached simplified plane components, the non-attached simplified plane components, and the affiliation between the attached simplified plane components and the non-attached simplified plane components.
[0112] like Figure 1 As shown, the method specifically also includes:
[0113] Step S300: Render the geometrically simplified model to determine a three-dimensional visualization model corresponding to the target building information model.
[0114] In short, this embodiment renders the geometrically simplified model to obtain a three-dimensional visualization model corresponding to the target building information model, so as to ensure that the user can obtain a visual experience that is as realistic as possible.
[0115] In one implementation, rendering the geometrically simplified model to determine the three-dimensional visualization model corresponding to the target building information model includes:
[0116] Get model texture information;
[0117] Parallax mapping is performed on each of the simplified planar components in the geometric simplified model according to the model texture information to determine a three-dimensional visualization model corresponding to the target building information model.
[0118] Specifically, this embodiment obtains the model texture information of the geometrically simplified model before geometric simplification, and uses parallax mapping to render each simplified plane component in the geometrically simplified model based on the model texture information, thereby increasing the surface details and geometric details of the geometrically simplified model.
[0119] Unlike ordinary texture mapping, parallax mapping can simulate the geometric shape of the surface of an object, making it look more complex and realistic. In 3D graphics rendering, the surface of an object is usually represented by a triangular mesh. Each pixel value in the parallax map corresponds to a height offset on the corresponding surface. During the rendering process, by adjusting the position of the surface at each pixel, small undulations, bumps and details such as Fig. 9 shown.
[0120] For different levels of detail, this embodiment has different application methods for parallax mapping. For example, when the level of detail is an outdoor level of detail, this embodiment prepares the texture map, normal map, height map, roughness and other materials required for parallax mapping according to the data sources such as the tilt model, elevation model, structural model or orthophoto; constructs a parallax function to generate a parallax map to simulate a three-dimensional effect on a two-dimensional plane, and finally adds a parallax map to the generated low-poly wall model to obtain a highly realistic visualization effect; for perspective components such as windows, texture sampling is performed on the walls and movable components of the room to generate a cube map; with the help of a parallax function, a virtual visual effect of a real indoor scene is simulated on a window component with a simple structure, such as Fig.10 shown.
[0121] When the multi-detail level is an indoor multi-detail level, the wall parallax texture map is used to create a realistic sense of wall bumps, and the outdoor cube map or panorama is used in the window component to render a highly realistic outdoor effect. For each simplified indoor moving plane component, the height map, texture map and other materials of each plane of the original component are calculated, added to the simplified low-poly surface, and the parallax mapping function is used to generate the real visual effect of the surface. The overall technical flow chart is as follows Fig.11 shown.
[0122] Based on the above embodiments, the present invention also provides a lightweight visualization device for a three-dimensional model, such as Fig.12 As shown, the device comprises:
[0123] The model conversion module 01 is used to obtain a target building information model and convert the target building information model into a polygonal mesh model;
[0124] A geometric simplification module 02 is used to geometrically simplify each level of detail corresponding to the polygonal mesh model to determine a geometrically simplified model;
[0125] The model rendering module 03 is used to render the geometrically simplified model and determine the three-dimensional visualization model corresponding to the target building information model.
[0126] Based on the above embodiment, the present invention further provides a terminal, whose principle block diagram can be shown as follows: Fig.13 As shown. The terminal includes a processor, a memory, a network interface, and a display screen connected via a system bus. Among them, the processor of the terminal is used to provide computing and control capabilities. The memory of the terminal includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the terminal is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a lightweight visualization method for a three-dimensional model is implemented. The display screen of the terminal can be a liquid crystal display screen or an electronic ink display screen.
[0127] Those skilled in the art will understand that Fig.13 The principle block diagram shown in the figure is only a block diagram of a partial structure related to the scheme of the present invention, and does not constitute a limitation on the terminal to which the scheme of the present invention is applied. The specific terminal may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0128] In one implementation, the memory of the terminal stores one or more programs, and is configured to be executed by one or more processors. The one or more programs include instructions for performing a lightweight visualization method for a three-dimensional model.
[0129] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided by the present invention can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0130] In summary, the present invention discloses a lightweight visualization method, device, terminal and storage medium for three-dimensional models. The method obtains a target building information model and converts the target building information model into a polygonal mesh model; geometrically simplifies each multi-detail level corresponding to the polygonal mesh model to determine a geometrically simplified model; and renders the geometrically simplified model to determine a three-dimensional visualization model corresponding to the target building information model. Since the present invention divides the polygonal mesh model into multiple multi-detail levels for geometric simplification and then renders the simplified model to obtain a three-dimensional visualization model, it can effectively reduce the amount of data to be processed without affecting the visualization effect of the model. Therefore, it can effectively solve the problem that the prior art cannot reduce the amount of data of the three-dimensional model while ensuring the high-quality visualization effect of the model.
[0131] It should be understood that the application of the present invention is not limited to the above examples. For ordinary technicians in this field, improvements or changes can be made based on the above description. All these improvements and changes should fall within the scope of protection of the claims attached to the present invention.
Claims
1. A lightweight visualization method for a three-dimensional model, characterized in that: The method comprises: Acquire a target building information model, and convert the target building information model into a polygonal mesh model; Performing geometric simplification on each level of detail corresponding to the polygonal mesh model to determine a geometrically simplified model; Rendering the geometrically simplified model to determine a three-dimensional visualization model corresponding to the target building information model; The step of geometrically simplifying each level of detail corresponding to the polygonal mesh model to determine a geometrically simplified model includes: Performing geometric simplification on each of the multi-detail levels corresponding to the polygonal mesh model, respectively, to determine a geometrically simplified sub-model corresponding to each of the multi-detail levels, wherein the polygonal mesh model includes an indoor multi-detail level and an outdoor multi-detail level; Determine the geometrically simplified model according to each of the geometrically simplified sub-models; The step of geometrically simplifying the multi-detail level to determine the geometrically simplified sub-model corresponding to the multi-detail level includes: extracting a multi-detail level contour corresponding to the multi-detail level; Determining a plurality of planar components in the multi-detail level according to the multi-detail level contour; Simplifying each of the planar components to determine the geometrically simplified sub-model corresponding to the multi-detail level; The extracting the multi-detail level contour corresponding to the multi-detail level includes: Calculating the wall area corresponding to each wall surface of each wall in the multi-detail level; Obtaining the coordinates of the corner points of each wall in the multi-detail level, and determining the coordinates of the indoor center point according to the coordinates of each corner point; Determine the multi-detail level contour corresponding to the multi-detail level according to the wall area and the indoor center point coordinates; The rendering of the geometrically simplified model to determine the three-dimensional visualization model corresponding to the target building information model includes: Get model texture information; Parallax mapping is performed on each simplified plane component in the geometric simplified model according to the model texture information to determine the three-dimensional visualization model corresponding to the target building information model.
2. The lightweight visualization method of three-dimensional model according to claim 1, characterized in that: The step of converting the target building information model into a polygonal mesh model comprises: The target building information model is subjected to Delaunay triangulation to determine the polygonal mesh model.
3. The lightweight visualization method of three-dimensional model according to claim 1, characterized in that: The step of simplifying each of the planar components and determining the geometrically simplified sub-model corresponding to the multi-detail level includes: Simplifying each of the plane components by using a quadratic error metric algorithm to determine the simplified plane components corresponding to each of the plane components, wherein the simplified plane components include a plurality of attached simplified plane components and a plurality of non-attached simplified plane components; Determining the affiliation relationship between each of the attached simplified plane components and each of the non-attached simplified plane components according to the corner point coordinates of each of the non-attached simplified plane components; The geometrically simplified sub-model is determined according to each of the attached simplified plane components, each of the non-attached simplified plane components, and each of the subordinate relationships.
4. A lightweight visualization device for three-dimensional models, characterized in that: The device comprises: A model conversion module, used to obtain a target building information model and convert the target building information model into a polygonal mesh model; A geometric simplification module, used to geometrically simplify each level of detail corresponding to the polygonal mesh model to determine a geometrically simplified model; A model rendering module, used to render the geometrically simplified model and determine a three-dimensional visualization model corresponding to the target building information model; The step of geometrically simplifying each level of detail corresponding to the polygonal mesh model to determine a geometrically simplified model includes: Performing geometric simplification on each of the multi-detail levels corresponding to the polygonal mesh model, respectively, to determine a geometrically simplified sub-model corresponding to each of the multi-detail levels, wherein the polygonal mesh model includes an indoor multi-detail level and an outdoor multi-detail level; Determine the geometrically simplified model according to each of the geometrically simplified sub-models; The step of geometrically simplifying the multi-detail level to determine the geometrically simplified sub-model corresponding to the multi-detail level includes: extracting a multi-detail level contour corresponding to the multi-detail level; Determining a plurality of planar components in the multi-detail level according to the multi-detail level contour; Simplifying each of the planar components to determine the geometrically simplified sub-model corresponding to the multi-detail level; The extracting the multi-detail level contour corresponding to the multi-detail level includes: Calculating the wall area corresponding to each wall surface of each wall in the multi-detail level; Obtaining the coordinates of the corner points of each wall in the multi-detail level, and determining the coordinates of the indoor center point according to the coordinates of each corner point; Determine the multi-detail level contour corresponding to the multi-detail level according to the wall area and the indoor center point coordinates; The rendering of the geometrically simplified model to determine the three-dimensional visualization model corresponding to the target building information model includes: Get model texture information; Parallax mapping is performed on each simplified plane component in the geometric simplified model according to the model texture information to determine the three-dimensional visualization model corresponding to the target building information model.
5. A terminal, characterized in that: The terminal includes a memory and one or more processors; the memory stores one or more programs; the program contains instructions for executing the lightweight visualization method of three-dimensional models as described in any one of claims 1-3; and the processor is used to execute the program.
6. A computer-readable storage medium having a plurality of instructions stored thereon, characterized in that: The instructions are suitable for being loaded and executed by a processor to implement the steps of the three-dimensional model lightweight visualization method described in any one of claims 1 to 3 above.
Citation Information
Patent Citations
Collection and lightweight system and method for three-dimensional space data based on CIM (common information model) platform
CN116089555A