Grid mapping method of BIM model
By sampling and mapping the surface of the BIM model, and region division and independent mapping are performed in the logical space, the problem of large resource occupancy of existing BIM model grid mapping methods is solved, and efficient mapping and detailed performance is achieved.
Patent Information
- Application Number
- CN202411482681.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-23
- Publication Date
- 2025-02-18
AI Technical Summary
The grid mapping method of the existing BIM model consumes a large resource and is limited in application, making it difficult to achieve efficient maps and detailed performance.
By sampling the BIM model surface, points in three-dimensional space are mapped into two-dimensional position UV, and regions are divided and independently defined maps are performed in logical space, skipping blank voxels between regions, reducing processing or calculations, Finally, apply the map.
It realizes efficient mapping of the BIM model, reduces resource usage, improves the realism and detailed performance of the map, and avoids local and global overlap in the UV space, reducing the amount of cutting.
Smart Images

Figure CN119478181A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to a grid mapping method for a BIM model. Background Art
[0002] In recent years, with the rapid development of computer graphics, image processing and artificial intelligence, new possibilities have been provided for the mesh mapping of BIM models. Through advanced algorithms and technologies, it is possible to accurately capture and process the surface details of BIM models, thereby generating more realistic and delicate texture maps.
[0003] However, although emerging technologies provide new solutions for mesh mapping of BIM models, their application in the industry is still limited. Many BIM model mesh mapping methods remain at a relatively basic and simple level. For example, in order to apply 2D textures on 3D models, UV mapping is required. Traditional UV mapping is defined by assigning UV positions to mesh vertices, which is a resource-intensive method.
[0004] Based on this, the present invention proposes an innovative BIM model grid mapping method to solve the problem of large resource occupation. Summary of the invention
[0005] The present invention aims at the deficiencies in the prior art and provides the following technical solutions:
[0006] A method for mesh mapping of a BIM model comprises the following steps:
[0007] Sample the surface of the BIM model and map each point p on the surface to a two-dimensional position UV through the function f(p);
[0008] Mapping the three-dimensional space B containing the domain of the function f(p) into the physical space P, then dividing the space into regions, and independently defining mapping in each region to achieve discontinuity of the function f(p) between regions;
[0009] Skipping blank voxels between the regions to reduce processing or calculation of the region;
[0010] Finally, apply the texture.
[0011] As an improvement of the above technical solution, the function f(p) satisfies the following conditions:
[0012] Ω=[0,1] 2 (1)
[0013] (u,v)=f(p) f:R 3 →Ω (2)
[0014] Wherein, formula (1) represents a unit square area on a two-dimensional plane, and a three-dimensional point p is mapped to a unit square area, whose boundary is formed by x and y taking values from 0 to 1 respectively, and formula (2) represents that the point p in the three-dimensional space is mapped to the two-dimensional plane through the function f(p) and a corresponding two-dimensional coordinate (u, v) is obtained.
[0015] As an improvement of the above technical solution, the three-dimensional space B includes a BIM model surface.
[0016] As an improvement of the above technical solution, before the three-dimensional space B is mapped to the physical space P, it is first mapped to the logical space L through the function σ(p), wherein the logical space L satisfies:
[0017] L=[0,S x -1]×[0,S y -1]×[0,S z -1] (3)
[0018] In formula (3), S[x, y, z] is the logical resolution of the volume-encoded UV-map, that is, the display device optimizes and enlarges the image through software or hardware technology to make the image quality appear higher. A unit cube in the logical space L, whose eight corners are at integer positions, is a voxel;
[0019] The relationship between the function f(p) and the function σ(p) satisfies the following conditions:
[0020] f(p)=τ(σ(p)) (4)
[0021] In equation (4), the function τ:P→Ω is defined piecewise, within each voxel of the logical space L, as the angle stored in the voxel.
[0022] As an improvement of the above technical solution, the relationship between the corner of the voxel containing the point q in the logical space L and the corresponding two-dimensional coordinates (u, v) at the UV position (a, b, c) stored in the three-dimensional space B satisfies:
[0023]
[0024] In formula (5), is the fractional part of the x, y, or z coordinate of point q and satisfies
[0025] As an improvement of the above technical solution, the UV values of the three-dimensional space B are stored as textures of two-channel 3D volume textures with the same resolution.
[0026] As an improvement of the above technical solution, the point q in the logical space L is mapped to the physical space P through a function φ, and the function φ satisfies:
[0027]
[0028] In formula (6), the logical space L is divided into a plurality of k×k×k voxel blocks, each block is regarded as a region, and each region is separated by a unit size gap plus φ;
[0029] is a component-level operator, and the function f(p) satisfies the following conditions:
[0030] f(p)=τ(φ(σ(p))) (7)
[0031] In equation (7), φ is used to skip blank voxels so that the function τ(p) will not be calculated in the gap voxels.
[0032] As an improvement to the above technical solution, any UV value stored in the physical space P belongs to only one region, and interpolation τ never occurs between UV values belonging to different regions.
[0033] Beneficial effects of the present invention:
[0034] 1. During fragment processing, the evaluation of f(p) simply applies a scale translation q=σ(p) and a single trilinear interpolation texture access at q, returning τ(q). This operation replaces the traditional per-vertex UV linear interpolation and takes advantage of the trilinear interpolation of texture values supported by native hardware, which is highly optimized in terms of speed and GPU / texture RAM bandwidth.
[0035] 2. Combining computer graphics and image processing technology, it can achieve efficient mapping of BIM models while ensuring the realism and detail of the mapping. When mapping, it avoids local and global overlap in UV space, keeps the amount of cutting low, and also makes most of the texture area covered to avoid wasting texture. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 It is a flow chart of a method for mesh mapping of a BIM model;
[0037] Figure 2 A schematic diagram of mapping logical space L to physical space P in a grid mapping method of a BIM model. DETAILED DESCRIPTION
[0038] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below. 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.
[0039] Currently, the application in the industry is still limited. The mesh mapping methods of many BIM models are still at a relatively basic and simple level. For example, in order to apply 2D textures on 3D models, UV mapping is required. Traditional UV mapping is defined by assigning UV positions to mesh vertices, which is a resource-intensive method.
[0040] See also Figure 1 As shown, in order to solve the above technical problems, a technical solution of a grid mapping method of a BIM model is provided:
[0041] A method for mesh mapping of a BIM model comprises the following steps:
[0042] Step S100, sampling the surface of the BIM model, and mapping each point p on the surface to a two-dimensional position UV through a function f(p).
[0043] This solution introduces volume-coded UV mapping, in which a specific three-dimensional point p located on the surface of the BIM model is mapped to the corresponding function f(p) in the two-dimensional position UV that satisfies the following conditions:
[0044] Ω=[0,1] 2 (1)
[0045] (u,v)=f(p) f:R 3 →Ω (2)
[0046] Formula (1) represents a unit square area on a two-dimensional plane, whose boundaries are formed by x and y taking values from 0 to 1 respectively, and a three-dimensional point p is mapped to a unit square area. Formula (2) represents mapping a point p in three-dimensional space to a two-dimensional plane through the function f(p) and obtaining a corresponding two-dimensional coordinate (u, v).
[0047] Among them, formula (1) is called the UV-map of the BIM model surface, and UV-map is a form of surface parameterization.
[0048] UV mapping on polygonal meshes is usually represented by assigning UV positions as attributes of each vertex, that is, using vertex attributes to store and manage the position of each vertex in UV space in order to correctly fit the texture to the BIM model surface. On the BIM model surface, the UV coordinate position of each point is calculated by standard linear interpolation method to determine the correct UV position. Cutting is encoded by duplicating some vertices and assigning different UV attributes to two geometrically consistent copies.
[0049] In the fragment processing process, it is necessary to calculate the value of the function f(p) at a certain point p on the surface of a given BIM model, and then obtain the final position (u, v) through processing or operation. The required cutting is the discontinuity point of the function f(p).
[0050] Step S200, mapping the three-dimensional space B including the domain of the function f(p) into the physical space P, then dividing the space into regions, and independently defining mapping in each region to achieve discontinuity of the function f(p) between regions.
[0051] The three-dimensional space B includes the BIM model surface, that is, the domain of the function f(p) is a three-dimensional space B including the BIM model surface, and the three-dimensional space B can be understood as a three-dimensional axial box.
[0052] Before the three-dimensional space B is mapped to the physical space P, it is first mapped to the logical space L through the function σ(p), where the logical space L satisfies:
[0053] L=[0,S x -1]×[0,S y -1]×[0,S z -1] (3)
[0054] In formula (3), S[x, y, z] is the logical resolution of the volume-encoded UV-map, that is, the display device optimizes and enlarges the image through software or hardware technology to make the image quality look higher. The number of units subdivided in each direction has nothing to do with the resolution of the two-dimensional texture. A unit cube in the logical space L, whose eight corners are at integer positions, is a voxel.
[0055] This mapping can be used for logical processing, analysis, or calculation, rather than directly processing the geometric or physical properties of the physical space.
[0056] The function σ(p) is obtained by a conformal scaling and translation operation σ: B→L.
[0057] Conformal scaling is the process of scaling an object by proportionally increasing its size while preserving its shape. In two-dimensional space, this means scaling an object so that all its angles remain the same and the proportions of its line segments remain the same. Conformal transformations preserve the angles, curvatures, and orientation of an object, and are an important geometric transformation that preserves shape and proportion.
[0058] Translation is the process of moving an object to a new location along a specified direction. The distance moved is represented by a vector. During the translation process, the shape and size of the object do not change, only its position changes.
[0059] In two-dimensional or three-dimensional space, translation can be achieved by adding a displacement vector, such as adding the same translation vector to the coordinates of all points.
[0060] The relationship between the function f(p) and the function σ(p) satisfies the following conditions:
[0061] f(p)=τ(σ(p)) (4)
[0062] In equation (4), the function τ:P→Ω is defined piecewise, within each voxel of the logical space L, as the angle stored in the voxel.
[0063] The piecewise definition means that the definition of the function τ(p) is not global, but is divided into different segments or parts according to certain conditions or regions. In the construction logic space L, a voxel is a discretized three-dimensional space unit, similar to a pixel in a three-dimensional space.
[0064] The relationship between the corner of the voxel containing the point q in the logical space L and the corresponding two-dimensional coordinates (u, v) at the UV position (a, b, c) stored in the three-dimensional space B satisfies:
[0065]
[0066] In formula (5), is the fractional part of the x, y, or z coordinate of point q and satisfies
[0067] The UV values of the three-dimensional space B are stored as textures of two-channel 3D volume textures with the same resolution, so that the textures have the same resolution and can be used for subsequent rendering, calculation or analysis.
[0068] In fragment processing, the evaluation of the function f(p) only requires applying a scale translation q=σ(p) and a single trilinear interpolation texture access at point q, and then returning the value of the function τ(p) at point q.
[0069] That is, the translation scale is to scale and translate the point q, which is implemented by multiplication and addition to map the point q to a new position.
[0070] Trilinear interpolation texture access is the process of getting a texel value from a three-dimensional texture at point q. Trilinear interpolation is a method of getting a smooth interpolation value in a texture, where the texture value at point q is calculated by taking a weighted average of the surrounding texels.
[0071] The final result of calculating the function f(p) is the return value of the function τ(p) at point q, that is, the calculation result of the function f(p) is obtained by accessing the trilinear interpolation texture of the point q after the scale translation.
[0072] The point q in the logical space L is mapped to the physical space P by a function φ, and the function φ satisfies:
[0073]
[0074] In formula (6), the logical space L is divided into a plurality of k×k×k voxel blocks, each block is regarded as a region, and each region is separated by a unit size gap plus a function φ;
[0075] is a component-level operator, and the function f(p) satisfies the following conditions:
[0076] f(p)=τ(φ(σ(p))) (7)
[0077] In equation (7), the function φ is used to skip blank voxels, so that the function τ(p) will not be calculated in the gap voxels.
[0078] In one embodiment, k=2, and the logical space L of res7×7×5 (composed of 6×6×4 voxels) is mapped to the physical space P.
[0079] See also Figure 2 As shown, different regions are alternately painted with green and blue, and different voxels within a region are alternately painted with darker and lighter shades.
[0080] Since the above function f(p) is continuous everywhere, in general, it is necessary to introduce discontinuities in the function f(p), which corresponds to cuts in the UV mapping of the BIM model surface. For a given small integer, the logical space L is divided into k×k×k voxel blocks, each of which is a region.
[0081] The mapping is defined independently in each region so as to achieve that the function f(p) is discontinuous between regions.
[0082] Step S300 , skipping the blank voxels between the regions to reduce the processing or calculation of the region.
[0083] Combined with formula (7), the function f(p) is redefined, and the function φ is used to skip blank voxels (gap voxels), so that the function τ(p) will not be calculated or processed in the blank voxels, thereby achieving a high degree of optimization in terms of processing speed and GPU / texture RAM bandwidth.
[0084] Any UV value stored in the physical space P belongs to only one region, and interpolation τ never occurs between UV values belonging to different regions, that is, no interpolation operation occurs between regions with different UV values.
[0085] Step S400, finally applying the map.
[0086] Under the constraints of the function f(p) and the BIM model surface, a parameterized feature geometry is sought to find a solution that meets the specified requirements. While avoiding local and global overlaps in UV space, the amount of cutting is kept low so that most of the texture area is covered to avoid wasting texture.
[0087] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them.
Claims
1. A method for mesh mapping of a BIM model, characterized in that: The following steps are involved: Sample the surface of the BIM model and map each point p on the surface to a two-dimensional position UV through the function f(p); Mapping the three-dimensional space B containing the domain of the function f(p) into the physical space P, then dividing the space into regions, and independently defining mapping in each region to achieve discontinuity of the function f(p) between regions; Skipping blank voxels between the regions to reduce processing or calculation of the region; Finally, apply the texture.
2. The method for mesh mapping of a BIM model according to claim 1, characterized in that: The function f(p) satisfies the following conditions: Ω=[0,1] 2 (1) (u,v)=f(p) f:R 3 →Ω (2) Wherein, formula (1) represents a unit square area on a two-dimensional plane, whose boundary is formed by x and y taking values from 0 to 1 respectively, and formula (2) represents mapping a point p in three-dimensional space to a two-dimensional plane through the function f(p) and obtaining a corresponding two-dimensional coordinate (u, v).
3. The method for mesh mapping of a BIM model according to claim 1, characterized in that: The three-dimensional space B includes the BIM model surface.
4. The method for mesh mapping of a BIM model according to claim 3, characterized in that: Before the three-dimensional space B is mapped to the physical space P, it is first mapped to the logical space L through the function σ(p), where the logical space L satisfies: L=[0,S x -1]×[0,S y -1]×[0,S z -1] (3) In formula (3), S[x, y, z] is the logical resolution of the volume encoding UV-map, and a unit cube in the logical space L, whose eight corners are at integer positions, is a voxel; The relationship between the function f(p) and the function σ(p) satisfies the following conditions: f(p)=τ(σ(p)) (4) In equation (4), the function τ:P→Ω is defined piecewise, within each voxel of the logical space L, as the angle stored in the voxel.
5. The method for mesh mapping of a BIM model according to claim 4, characterized in that: The relationship between the corner of the voxel containing the point q in the logical space L and the corresponding two-dimensional coordinates (u, v) at the UV position (a, b, c) stored in the three-dimensional space B satisfies: In formula (5), is the fractional part of the x, y, or z coordinate of point q and satisfies 6. The method for mesh mapping of a BIM model according to claim 5, characterized in that: The UV values of the three-dimensional space B are stored as a texture of a two-channel 3D volume texture of the same resolution.
7. The method for mesh mapping of a BIM model according to claim 4, characterized in that: The point q in the logical space L is mapped to the physical space P by a function φ, and the function φ satisfies: In formula (6), the logical space L is divided into a plurality of k×k×k voxel blocks, each block is regarded as a region, and each region is separated by a unit size gap plus φ; is a component-level operator, and the function f(p) satisfies the following conditions: f(p)=τ(φ(σ(p))) (7) In equation (7), φ is used to skip blank voxels so that the function τ(p) will not be calculated in the gap voxels.
8. The method for mesh mapping of a BIM model according to claim 7, characterized in that: Any UV value stored in the physical space P belongs to only one region, and interpolation τ never occurs between UV values belonging to different regions.