A dynamic deformation method for 3D models in response to real-time data

By reading the three-dimensional model grid data on the Unity platform and controlling the deformation direction and displacement speed, the problem that the three-dimensional model in the prior art cannot respond to deformation monitoring data in real time is solved, and natural and high-precision dynamic deformation is achieved, which is suitable for a variety of engineering applications.

CN119888149BActive Publication Date: 2025-08-08BEIJING JIAOTONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411799307.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-09
Publication Date
2025-08-08
Estimated Expiration
2044-12-09

AI Technical Summary

Technical Problem

The existing three-dimensional model technology cannot respond to the deformation monitoring data of the solid structure in real time and dynamically. The deformation effect is unnatural and the accuracy is low. There is a lag in real time data processing, resulting in limited application scenarios.

Method used

By reading three-dimensional model grid data on the Unity platform, determining the location of deformation points, filtering the grid vertices in the deformation area, controlling the deformation direction and displacement speed, and dynamic deformation is achieved by combining physical simulation and data-driven technology.

Benefits of technology

The real-time response and dynamic deformation of the three-dimensional model to the deformation of the solid structure is realized. The deformation effect is natural and accurate, and it is suitable for a variety of fields, simplifying the data processing process and improving the data processing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119888149B_ABST
    Figure CN119888149B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for dynamic deformation of a 3D model in response to real-time data, comprising: S1: reading 3D model mesh data within Unity and extracting model vertex coordinates; S2: determining the actual monitored deformation point location on the 3D model; S3: screening all mesh vertices within the deformation region that have undergone deformation and displacement based on the actual deformation region affected by the monitored deformation point; S4: determining the deformation and displacement direction of the mesh vertices within the deformation region; S5: determining the deformation and displacement values of the mesh vertices within the deformation region and controlling the deformation and displacement speed of the mesh vertices based on the deformation rate. This method can achieve: significantly improved real-time dynamic deformation capabilities, more natural and precise deformation effects, wide applicability and high versatility, and simplified data processing procedures to improve data processing efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of three-dimensional model deformation, and in particular to a three-dimensional model dynamic deformation method that responds to real-time data. Background Art

[0002] With the rapid development of computer graphics, virtual reality, and augmented reality technologies, 3D models are increasingly being used in various fields. From architectural design and civil engineering to film and television special effects and game development, 3D models have become an essential tool for expressing complex spatial structures and dynamic scenes. However, in the practical application of 3D models, how to achieve dynamic response to deformation monitoring data of physical structures has long been a difficult problem for researchers and engineers.

[0003] From the perspective of 3D scene construction, the application of 3D models has evolved from the initial visualization of construction results to management and control applications based on visualization scenes, and then to integrated management and control of visualization construction and operation and maintenance throughout the scene lifecycle. However, existing research on 3D model scene construction mainly focuses on the construction of static scene models and the unidirectional effect of dynamic data on static models. Static 3D models cannot dynamically respond to deformation monitoring data of physical structures, and cannot dynamically and intuitively visualize the structural changes of the model.

[0004] Research in the field of dynamic deformation of 3D models by domestic and international scholars has primarily focused on the following areas: first, simulation technology based on physics engines, which simulates the physical properties of materials to achieve dynamic deformation of models; second, data-driven deformation methods, which directly drive model deformation by inputting deformation data; and third, predictive deformation combined with machine learning algorithms, which uses trained models to predict future deformation trends. However, most of these methods suffer from high computational complexity, poor real-time performance, and unnatural deformation effects, making them difficult to meet the needs of practical applications. Existing research results largely focus on the dynamic construction and high-precision simulation of 3D models.

[0005] The problems existing in the prior art are as follows:

[0006] (1) Insufficient dynamic response capabilities of static 3D models: Current 3D modeling technologies mostly focus on the construction and display of static scenes and are unable to respond to deformation monitoring data of physical structures in real time and dynamically. This technical limitation results in an inability to intuitively reflect the actual dynamic changes of structures in application scenarios that require real-time monitoring of structures, such as bridge health monitoring and building structure deformation analysis, thus affecting the effective use of data and the timeliness of decision-making.

[0007] (2) Unnatural deformation and low accuracy: Traditional 3D model deformation methods usually rely on preset animations or scripts and cannot accurately simulate the actual deformation of physical structures caused by external factors (such as gravity, wind load, temperature changes, etc.). In addition, these methods often result in stiff and unnatural deformation effects, which are difficult to meet the needs of high-precision monitoring and display.

[0008] (3) Lag in real-time data processing: Existing technologies often experience delays in processing real-time deformation monitoring data due to excessive algorithm complexity or limited data processing capabilities, resulting in untimely deformation feedback. This lag limits the effectiveness of 3D models in areas that require rapid response to deformation changes, such as earthquake early warning and geological disaster monitoring.

[0009] (4) Limited application scenarios due to technical limitations: Due to the above technical difficulties, static 3D models are limited in many application scenarios that require high precision, real-time performance, and dynamic response. These fields include but are not limited to engineering construction, transportation, geological exploration, and environmental protection, all of which require 3D models to accurately reflect the changes in actual structures in real time to support effective monitoring, early warning, and decision-making. Summary of the Invention

[0010] The present invention aims to provide a three-dimensional model dynamic deformation method that responds to real-time data to solve the above problems.

[0011] The technical solution of the present invention is: a three-dimensional model dynamic deformation method in response to real-time data, comprising:

[0012] S1: Read the 3D model mesh data in Unity and extract the model vertex coordinates;

[0013] S2: Determine the actual monitoring deformation point position on the three-dimensional model;

[0014] S3: Based on the actual deformation area affected by the monitored deformation point, all mesh vertices that have undergone deformation displacement in the deformation area are screened;

[0015] S4: Determine the deformation displacement direction of the mesh vertices within the deformation area;

[0016] S5: Determine the deformation displacement value of the mesh vertices within the deformation area, and control the deformation displacement speed of the mesh vertices according to the deformation rate.

[0017] Preferably, S1 specifically includes: importing the three-dimensional model into Unity, obtaining the triangular mesh data of the three-dimensional model based on the Mesh class, extracting the local coordinates of the model mesh vertices, and multiplying the local coordinates with the transformation matrix to obtain the world coordinates of the model mesh vertices;

[0018] Unity's coordinate system includes two expressions: local coordinates and world coordinates. The local coordinate system is the coordinate system relative to its parent object and is used to describe the internal position relationship of the object. The world coordinate system corresponds to the coordinate system of the entire Unity world space and is not affected by the object hierarchy. To convert local coordinates to world coordinates to determine the specific position of the model in Unity space, you can use the following calculation formula:

[0019] P w =M parent ·P l +P parentw

[0020] P w and P l Represent the world coordinates and local coordinates of the model, M parent and P parent They represent the coordinate transformation matrix and world coordinates of the model's parent object respectively.

[0021] Preferably, S2 is specifically as follows: determining the actual monitoring deformation point position in the three-dimensional model, outputting the local coordinates of the deformation monitoring point through the collision of rays and the model, and multiplying the local coordinates of the actual monitoring deformation point with the transformation matrix to obtain the world coordinates of the actual monitoring deformation point; wherein, determining the actual monitoring deformation point position is to convert the corresponding position of the real-world monitoring point into the corresponding coordinate position after the three-dimensional model; that is, a monitoring point is set at each interval of the real tunnel slope, and the deformation data transmitted by the monitoring point must accurately correspond to the three-dimensional model.

[0022] Preferably, S3 is specifically as follows: traversing the mesh vertex coordinate array, calculating the Euclidean distance between the actual deformation monitoring point and the mesh vertex, and screening all mesh vertices within the deformation area according to the actual deformation area affected by each actual monitoring deformation point; wherein, the three-dimensional model will eventually be imported into the rendering engine in the form of a mesh, and the mesh is composed of a series of vertices and triangular faces connecting different vertices; the mesh vertices have coordinates.

[0023] Preferably, S4 specifically includes:

[0024] S41: Determine the position of the deformation point in the triangular mesh: traverse all triangular mesh vertices, record the coordinates of the monitored deformation point as P, and the coordinates of any triangular mesh vertex as A, B, and C, and calculate the cross product of the vectors PA, PB, and PC. If the results have the same sign, the deformation point is located in the triangular mesh;

[0025] S42: Calculate the vertical vector of the triangular mesh: Calculate two vectors in a clockwise direction according to the coordinates of the three vertices of the triangular mesh where the monitoring deformation point is located. The vertical vector of the triangular mesh is obtained by cross-producting the two vectors, and the direction points to the outside of the model.

[0026] S43: Determine the deformation displacement direction of each mesh vertex in the deformation area: normalize the vertical vector of the triangular mesh; when the deformation value of the monitoring deformation point is negative, the mesh vertex is deformed and displaced along the normalized vertical vector, and the model deformation form is stretching; when the deformation value of the monitoring deformation point is positive, the deformation displacement direction of the mesh vertex is the opposite of the normalized vertical vector, and the model deformation form is compression.

[0027] Preferably, S5 specifically includes: a given deformation value for the deformation monitoring point based on the actual deformation monitoring value; a deformation displacement value for each mesh vertex within the deformation range decreases as the distance between the deformation monitoring point and the mesh vertex increases; a deformation displacement value for the mesh vertex farthest from the deformation monitoring point within the deformation range is zero, and the deformation displacement values of other mesh vertices are linearly interpolated based on their distance from the deformation monitoring point; a given deformation rate based on the actual deformation monitoring value, and the deformation rate is added to the mesh vertex that has undergone deformation and displacement. The deformation rate controls the movement speed of the mesh vertex along the deformation and displacement direction. When the deformation displacement of the mesh vertex reaches the set value, the three-dimensional model structure deformation is completed.

[0028] Preferably, in S42, when the mesh vertices are deformed and displaced, the direction of the vertical vector of the triangular mesh changes accordingly; during the process of the mesh vertices being deformed and displaced, the mesh vertex coordinates are updated in real time and the vertical vector of the triangular mesh is calculated.

[0029] The beneficial effects of the present invention are:

[0030] (1) Significantly improved real-time dynamic deformation capability: Compared with the dynamic creation method of BIM models for highway tunnel projects based on the Unity platform (existing technology 1), the present invention has significantly improved real-time dynamic deformation capability. The present invention can not only dynamically create models, but more importantly, it can achieve real-time response and dynamic deformation of three-dimensional models to physical structure deformation monitoring data, supporting high-precision monitoring and timely decision-making in complex environments (such as bridge health monitoring, building structure deformation analysis, etc.).

[0031] (2) More natural and accurate deformation effects: Traditional methods and existing technologies mostly rely on preset animations or complex physical calculations, resulting in stiff, unnatural deformation effects and low accuracy. This invention precisely controls the deformation direction and displacement values of mesh vertices, combines physical simulation and data-driven technology, and makes the deformation effect more natural and realistic, conforming to actual physical laws, and meeting the needs of high-precision monitoring and display.

[0032] (3) Broad applicability and high versatility: Existing technologies are often limited to specific application scenarios (such as highway tunnel engineering), while the technical solution of the present invention has broad applicability and can be applied to dynamic deformation of three-dimensional models in various fields such as bridges, architecture, and geology. At the same time, the method of the present invention does not rely on specific algorithm implementation and has higher versatility and scalability.

[0033] (4) Simplified data processing and improved efficiency: This invention integrates a data processing module into Unity, simplifying the integration of deformation monitoring data and 3D model mesh data and enabling real-time data transmission and processing. Compared to the complex data processing algorithms and processes used in existing technologies, this invention significantly improves data processing efficiency and accuracy, providing strong support for rapid response to deformation changes. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 A schematic flow chart of a method for dynamic deformation of a three-dimensional model in response to real-time data provided by an embodiment of the present invention;

[0035] Figure 2 This is a cube mesh vertex displacement effect diagram provided by an embodiment of the present invention;

[0036] Figure 3 A diagram illustrating the code implementation of mesh vertex displacement provided by an embodiment of the present invention;

[0037] Figure 4 A visualization diagram of a tunnel and a real-scene model grid provided by an embodiment of the present invention

[0038] Figure 5 A diagram showing the location and instantiation of monitoring points provided by an embodiment of the present invention;

[0039] Figure 6 A diagram showing the division of deformation regions controlled by monitoring points provided in an embodiment of the present invention;

[0040] Figure 7 This is a real-time deformation effect diagram provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0041] The present invention will be further described below with reference to the accompanying drawings and specific embodiments so that those skilled in the art can better understand the present invention and implement it. The embodiments of the present invention are not limited thereto.

[0042] Example 1

[0043] like Figure 1As shown, the present invention includes obtaining 3D model mesh data and extracting vertex coordinates, determining the coordinates of actual detection deformation points on the 3D model, screening mesh vertices that have undergone deformation and displacement, determining the deformation displacement direction of the mesh vertices, and determining the deformation value and deformation rate of the mesh vertices; and finally, judging whether the deformation of the model structure is completed by judging whether the deformation displacement of the mesh vertices reaches a set value.

[0044] like Figure 2 As shown in the figure, in three-dimensional space, the deformation of a cube is taken as an example: it has a total of 6 faces, each of which contains two triangular faces. For two triangular faces on the same square face, their normals are the same, so overlapping mesh vertices do not need to be stored repeatedly. However, the normals of different square faces are different. When deformation rules are only applied to the four vertices of a single face, the model may have problems such as cracks or openings, affecting the integrity of the model. Therefore, overlapping vertices need to be recorded repeatedly; to ensure the continuity and closure of the model, when applying the deformation rule of a specific vertex, the vertices that overlap with it need to be given the same displacement rule. Taking the cube as an example, it contains a total of twenty-four mesh vertices. Figure 2 The example shown shows the result after selecting the vertices on the right face and shifting them by (0.5, 0.5, 0.5) along the X, Y, and Z axes.

[0045] Figure 3 The code implementation for the above operations.

[0046] like Figure 4 As shown, a three-dimensional tunnel model that realizes dynamic deformation based on settlement monitoring data is taken as an example. The method of the present invention can also be used for other types of models such as bridges, and is not limited to tunnels.

[0047] like Figure 5 As shown, a point on the tunnel outline is selected as the reference point and designated as the parent object for all monitoring points. The reference point is now the coordinate origin relative to the monitoring point. Based on this, the monitoring point is translated along the X and Y axes on the model by a fixed distance according to the location data of the monitoring point layout to determine its position. Using Grade IV surrounding rock as an example, the positioning effect is visualized by instantiating a red ball model at the monitoring point coordinate position.

[0048] in, Figure 5 The yellow triangle frame in the middle is the reference point.

[0049] The reason for the above translation is to locate the five monitoring points 1, 2, 3, 4 and A in the figure. Assuming that the reference point is in the plane coordinate (0, 0), point 2 starts from the reference point, translates 1m to the right, and translates 2m upward (if right and upward are positive directions), then the coordinate representation of monitoring point 2 is (1m, 2m); for issues related to the Z axis, refer to the "layout length" part of the claims. Assuming that the constructed layout length is 3m, the next reference point of the straight tunnel is at the same horizontal position 3m adjacent to the current reference point.

[0050] like Figure 6 As shown in the figure, in actual construction measurements, the values recorded at a monitoring point only represent the measurement value at that specific location and cannot fully reflect the deformation of the overall tunnel cross-section profile. For the cross section, the deformation area controlled by each measuring point is bounded by the midpoint of the arc between the measuring point and the adjacent measuring point.

[0051] Taking a tunnel as an example, the deformation area of the plane control of each measuring point is bounded by the midpoint of the arc between the measuring point and the adjacent measuring point, as shown in the figure. The longitudinal control area is the length of the tunnel section to be staked out. Different accuracy requirements can be set in Unity. The setting on the left side of the figure is 3m.

[0052] like Figure 7 As shown in Figure 2, according to the actual monitoring data, within the deformation area of the monitoring point, the grid vertices show a cumulative deformation effect (real-time dynamic deformation).

[0053] Furthermore, in S4, triangles are the fundamental geometric unit for constructing and representing complex 3D shapes in 3D computer graphics. Vertex deformation calculations for triangular meshes are relatively simple, as each vertex is connected only to three adjacent vertices. This makes deformation calculations more efficient in real-time dynamic deformation scenarios. This allows for better simulation of various deformations, such as stretching, compression, and bending, with improved numerical stability.

[0054] According to the cross product of vectors and the right-hand screw rule, AB^AM (^ represents the cross product, and the arrow symbol above the vector letter is omitted here) points outward from the screen, AB^AN also points outward from the screen, but AB^AO points inward from the screen. Therefore, M and N are on the same side of line AB, and M and O are on opposite sides of line AB. In actual calculations, only the positive and negative values of the cross product need to be considered. Assuming the coordinates of the above points are A(0,0), B(4,0), M(1,2), N(3,4), and O(3,-4), then:

[0055] AB^AM=(4,0)^(1,2)=4*2-0*1=8

[0056] AB^AN=(4,0)^(3,4)=4*4–0*3=16

[0057] AB^AO=(4,0)^(3,-4)=4*-4–0*3=–16

[0058] From the above values, we can see that the direction of the vector after the cross product can be determined by the sign of the value. That is, if the results of the cross product AB^AM and AB^AN have the same sign, then points M and N are on the same side of the line, otherwise they are not on the same side. In particular, if point M is on line AB, the value of AB^AM is 0. (If it is in a three-dimensional coordinate system, the cross product is a vector, and the sign of the dot product of the two vectors can be used to determine whether the two vectors point to the same side.) Therefore, to determine whether a point is inside the triangle: If P is inside triangle ABC, the following three conditions are met: P and A are on the same side as BC, P and B are on the same side as AC, and PC is on the same side as AB. If any one of them is not met, it means that P is not inside the triangle.

[0059] Normalization means mapping the "absolute value" of the actual deformation data range to 0~1. The absolute value is used here because deformation can be divided into stretching and contraction (positive and negative deformation). Therefore, when the deformation is negative, we give a combination of deformation value and deformation direction. For example, (3mm, +) means positive deformation of 3mm, and (3mm, -) means negative deformation of 3mm. Normalization assumes that the deformation range is (-8mm, 6mm) and the maximum absolute value is 8mm. After normalization, the absolute value of the deformation ranges from (0, 1), where the maximum positive deformation value is 0.75=6 / 8.

[0060] In S5, in the actual deformation process, the points closer to the deformation source (i.e., the deformation monitoring point) are usually more affected and have a larger deformation displacement; while the points farther away from the deformation source are less affected and have a smaller deformation displacement.

[0061] For the monitored deformation point, we focus on its deformation. Within the deformation range, the deformation displacement of the mesh vertex farthest from the monitored deformation point is set to zero, which can be considered a boundary condition. For other mesh vertices, their deformation displacement is not given directly, but is calculated by linear interpolation of their distance from the monitored deformation point.

[0062] Obviously, those skilled in the art may make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalents, this application is intended to include these modifications and variations.

Claims

1. A method for dynamic deformation of a three-dimensional model in response to real-time data, characterized in that: include: S1: Read the 3D model mesh data in Unity and extract the model vertex coordinates; S2: Determine the actual monitoring deformation point position on the three-dimensional model; S3: Based on the actual deformation area affected by the monitored deformation point, all mesh vertices that have deformed and displaced within the deformation area are screened; S4: Determine the deformation displacement direction of the mesh vertices within the deformation area; S5: determining the deformation displacement value of the mesh vertices within the deformation area, and controlling the deformation displacement speed of the mesh vertices according to the deformation rate; Among them, S4 specifically includes: S41: Determine the position of the deformation point in the triangular mesh: traverse all triangular mesh vertices, record the coordinates of the monitored deformation point as P, and the coordinates of any triangular mesh vertex as A, B, and C, and calculate the cross product of the vectors PA, PB, and PC. If the results have the same sign, the deformation point is located in the triangular mesh; S42: Calculate the vertical vector of the triangular mesh: Calculate two vectors in a clockwise direction according to the coordinates of the three vertices of the triangular mesh where the monitoring deformation point is located. The vertical vector of the triangular mesh is obtained by cross-producting the two vectors, and the direction points to the outside of the model. S43: Determine the deformation displacement direction of each mesh vertex in the deformation area: normalize the vertical vector of the triangular mesh; when the deformation value of the monitoring deformation point is negative, the mesh vertex is deformed and displaced along the normalized vertical vector, and the model deformation form is stretching; when the deformation value of the monitoring deformation point is positive, the deformation displacement direction of the mesh vertex is the opposite of the normalized vertical vector, and the model deformation form is compression.

2. A three-dimensional model dynamic deformation method in response to real-time data according to claim 1, characterized in that: S1 specifically includes: importing the 3D model into Unity, obtaining the triangular mesh data of the 3D model based on the Mesh class, extracting the local coordinates of the model mesh vertices, and multiplying the local coordinates with the transformation matrix to obtain the world coordinates of the model mesh vertices; Unity's coordinate system includes two expressions: local coordinates and world coordinates. The local coordinate system is the coordinate system relative to its parent object and is used to describe the internal position relationship of the object. The world coordinate system corresponds to the coordinate system of the entire Unity world space and is not affected by the object hierarchy. To convert local coordinates to world coordinates to determine the specific position of the model in Unity space, you can use the following calculation formula: P w =M parent ·P l +P parentw P w and P l Represent the world coordinates and local coordinates of the model, M parent and P parent They represent the coordinate transformation matrix and world coordinates of the model's parent object respectively.

3. The method for dynamic deformation of a three-dimensional model in response to real-time data according to claim 1, characterized in that: S2 is specifically as follows: determining the actual monitoring deformation point position in the three-dimensional model, outputting the local coordinates of the deformation monitoring point through ray collision with the model, and multiplying the local coordinates of the actual monitoring deformation point with the transformation matrix to obtain the world coordinates of the actual monitoring deformation point; wherein, determining the actual monitoring deformation point position is to convert the corresponding position of the real-world monitoring point to the corresponding coordinate position after the three-dimensional model; that is, setting a monitoring point at each interval of the real tunnel slope, and the deformation data transmitted by the monitoring point must accurately correspond to the three-dimensional model.

4. The method for dynamic deformation of a three-dimensional model in response to real-time data according to claim 1, characterized in that: S3 specifically involves traversing the mesh vertex coordinate array, calculating the Euclidean distance between the actual deformation monitoring point and the mesh vertex, and filtering all mesh vertices within the deformation area based on the actual deformation area affected by each actual monitoring deformation point. The 3D model will eventually be imported into the rendering engine in the form of a mesh, which is composed of a series of vertices and triangular faces connecting different vertices. Mesh vertices have coordinates.

5. The method for dynamic deformation of a three-dimensional model in response to real-time data according to claim 1, characterized in that: S5 specifically includes: the deformation value of the deformation monitoring point is given based on the actual deformation monitoring value, and the deformation displacement value of each mesh vertex within the deformation range decreases as the distance between the deformation monitoring point and the mesh vertex increases; the deformation displacement value of the mesh vertex farthest from the monitoring deformation point within the deformation range is zero, and the deformation displacement values of other mesh vertices are linearly interpolated according to their distance from the monitoring deformation point; the deformation rate is given based on the actual deformation monitoring value, and the deformation rate is added to the mesh vertex that undergoes deformation and displacement, and the deformation rate controls the moving speed of the mesh vertex along the deformation and displacement direction; when the deformation displacement of the mesh vertex reaches the set value, a three-dimensional model structure deformation is completed.

6. The method for dynamic deformation of a three-dimensional model in response to real-time data according to claim 1, characterized in that: In S42, when the mesh vertices are deformed and displaced, the direction of the vertical vector of the triangular mesh changes accordingly; during the process of the mesh vertices being deformed and displaced, the mesh vertex coordinates are updated in real time and the vertical vector of the triangular mesh is calculated.