Model matching method and system and computer program product

By automatically matching the vertexes of the target object and the base object in three-dimensional animation technology based on the vertex correspondence and ray detection method, the problems of point order inconsistency and topological structure changes during mixed deformation are solved, and the accuracy and efficiency of model matching are improved.

CN119478147APending Publication Date: 2025-02-18NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411596810.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-08
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

In three-dimensional animation technology, the point order of the target object and the base object are inconsistent or the topological structure changes during mixed deformation, resulting in complex and inefficient manual matching.

Method used

By acquiring the first model and the second model, the corresponding second plane in the second model is determined based on the first vertex in the first model, and the corresponding second vertex is determined based on the vertex distance, and the model is then deformed based on the vertex correspondence relationship. .

Benefits of technology

The rapid matching of model vertices is achieved, which improves the accuracy and efficiency of model matching, and reduces the complexity and labor cost of manual matching.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119478147A_ABST
    Figure CN119478147A_ABST
Patent Text Reader

Abstract

The invention provides a model matching method and system and a computer program product, and relates to the technical field of computer animation. The model matching method comprises the steps that a first model and a second model are obtained, one model is a basic model, and the other model is a deformation model; determining a second plane corresponding to a first vertex in the second model based on the first vertex in the first model; determining a second vertex corresponding to the first vertex in the second plane based on the distance between the first vertex and one or more vertexes in the second plane; and based on the corresponding relationship between the first vertex in the first model and the second vertex in the second model, deforming the first model or the second model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer animation technology, and in particular to a model matching method, system and computer program product. Background Art

[0002] In the field of 3D animation technology, blend deformation is a deformation technology that is widely used in character animation, facial expression production, and morphological deformation. It creates one or more target objects and performs interpolation calculations to deform the base object to varying degrees. When performing blend deformation, the point order of the target object and the base object must be consistent. When the point order is inconsistent, or the topological structure of the target object and the base object changes, it is usually necessary to copy the base object, then manually adjust the vertices of the copied object to match the shape of the target object, and then blend the base object with the copied object. However, such manual matching operations are too complicated and the matching efficiency is low.

[0003] In view of this, some embodiments of the present specification provide a model matching method, system and computer program product, aiming to improve. Summary of the invention

[0004] One or more embodiments of the present specification provide a model matching method, the method comprising: obtaining a first model and a second model, one of which is a base model and the other is a deformation model; determining a second plane corresponding to the first vertex in the second model based on a first vertex in the first model; determining a second vertex corresponding to the first vertex in the second plane based on a distance between the first vertex and one or more vertices in the second plane; and deforming the first model or the second model based on a correspondence between a first vertex in the first model and a second vertex in the second model.

[0005] According to the method provided by one or more embodiments of the present specification, determining a second plane in the second model corresponding to the first vertex based on the first vertex in the first model includes: emitting a virtual ray from the first vertex in the first model to the second model, and taking the plane in the second model that touches the virtual ray as the second plane.

[0006] According to the method provided by one or more embodiments of the present specification, taking the plane in the second model that touches the virtual ray as the second plane includes: taking the plane in the second model that first touches the virtual ray as the second plane.

[0007] According to the method provided by one or more embodiments of the present specification, emitting a virtual ray from a first vertex in a first model to a second model includes: determining an emission direction of the virtual ray based on a normal direction of the first vertex; and emitting a virtual ray from the first vertex in the first model to the second model according to the emission direction of the virtual ray.

[0008] According to the method provided by one or more embodiments of this specification, obtaining the first model and the second model includes: adjusting the relative position of the first model and the second model so that one of the models is located inside the other model.

[0009] According to the method provided by one or more embodiments of the present specification, determining the emission direction of the virtual ray based on the normal direction of the first vertex includes: if the first model is located inside the second model, determining the normal direction of the first vertex as the emission direction of the virtual ray; if the second model is located inside the first model, determining the opposite direction of the normal direction of the first vertex as the emission direction of the virtual ray.

[0010] According to the method provided in one or more embodiments of the present specification, obtaining the first model and the second model includes: marking the areas in the first model and the second model where it is desired to establish a correspondence with each other; adjusting the relative positions of the first model and the second model so that there are no obstructions between the marked areas corresponding to each other in the first model and the second model.

[0011] According to the method provided by one or more embodiments of the present specification, determining a second plane in the second model corresponding to the first vertex based on the first vertex in the first model includes: determining a second plane in the corresponding marked area in the second model corresponding to the first vertex in the marked area in the first model based on the first vertex in the marked area in the first model.

[0012] According to the method provided by one or more embodiments of the present specification, determining the emission direction of the virtual ray based on the normal direction of the first vertex includes: if the marked area in the first model is located inside the corresponding marked area in the second model, determining the normal direction of the first vertex in the marked area in the first model as the emission direction of the virtual ray; if the marked area in the second model is located inside the corresponding marked area in the first model, determining the opposite direction of the normal direction of the first vertex in the marked area in the first model as the emission direction of the virtual ray.

[0013] According to the method provided by one or more embodiments of the present specification, determining a second plane in a second model corresponding to a first vertex based on a first vertex in a first model includes: configuring a weight for the first vertex in the first model based on an area in the first model where a corresponding relationship is desired to be established; filtering the first vertex in the first model based on the weight of the first vertex to obtain the filtered first vertex in the first model; and determining a second plane in the second model corresponding to the filtered first vertex based on the filtered first vertex.

[0014] According to the method provided in one or more embodiments of the present specification, determining a second vertex in the second plane corresponding to the first vertex based on the distance between the first vertex and the second plane includes: calculating the first distance between the first vertex and one or more second vertices in the second plane; and determining the second vertex corresponding to the minimum first distance as the second vertex corresponding to the first vertex.

[0015] According to the method provided by one or more embodiments of the present specification, deforming the first model or the second model based on the correspondence between the first vertex in the first model and the second vertex in the second model includes: when the first model is the base model, based on the position of the second vertex corresponding to the first vertex, changing the position of the first vertex in the first model; when the second model is the base model, based on the position of the first vertex, changing the position of the second vertex corresponding to the first vertex in the second model.

[0016] According to the method provided by one or more embodiments of the present specification, deforming the first model or the second model based on the correspondence between the first vertex in the first model and the second vertex in the second model includes: when the second model is the base model, based on the correspondence between the first vertex in the first model and the second vertex in the second model, the first animation data corresponding to the first vertex is passed to the second vertex corresponding to the first vertex, so that the second vertex updates the position of the second vertex according to the first animation data; when the first model is the base model, based on the correspondence between the first vertex in the first model and the second vertex in the second model, the second animation data corresponding to the second vertex is passed to the first vertex corresponding to the second vertex, so that the first vertex updates the position of the first vertex according to the second animation data.

[0017] According to the method provided by one or more embodiments of the present specification, the animation data includes offset information or rotation information.

[0018] The method provided according to one or more embodiments of the present specification further includes: storing a correspondence between a first vertex in the first model and a second vertex in the second model.

[0019] One or more embodiments of the present specification also provide a model matching system, the system comprising: a model acquisition module, used to acquire a first model and a second model, one of which is a base model and the other is a deformation model; a plane determination module, used to determine a second plane corresponding to the first vertex in the second model based on a first vertex in the first model; a vertex determination module, used to determine a second vertex corresponding to the first vertex in the second plane based on a distance between the first vertex and one or more vertices in the second plane; and a deformation module, used to deform the first model or the second model based on the correspondence between the first vertex in the first model and the second vertex in the second model.

[0020] One or more embodiments of the present specification also provide a computer program product, including a computer program, which, when at least a portion of the computer program is executed by a processor, can implement the model matching method described in some embodiments of the present specification. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] This specification will be further explained by way of exemplary embodiments, which will be described in detail by way of the accompanying drawings. The same numbers in the drawings represent the same structures or steps.

[0022] Figure 1 It is an exemplary flow chart of a model matching method shown in some embodiments of this specification.

[0023] Figure 2 It is a schematic diagram of a model matching interface shown in some embodiments of this specification.

[0024] Figure 3 It is a schematic diagram of a three-dimensional model shown in some embodiments of this specification.

[0025] Figure 4 It is an exemplary flow chart of a second plane determination method shown in some embodiments of this specification.

[0026] Figure 5 This is another schematic diagram of a model matching interface according to some embodiments of this specification.

[0027] Figure 6 It is an exemplary flow chart of a second plane determination method shown in some embodiments of this specification.

[0028] Figure 7 This is another schematic diagram of a model matching interface according to some embodiments of this specification.

[0029] Figure 8 is an exemplary block diagram of a model matching system according to some embodiments of the present specification. DETAILED DESCRIPTION

[0030] In order to more clearly illustrate the technical solutions of the embodiments of this specification, the embodiments will be described in detail below with reference to the accompanying drawings. Obviously, the contents described below are some examples or embodiments of this specification. For ordinary technicians in this field, without paying creative work, the technical solutions or means disclosed in this specification can also be applied to other scenarios based on these technical contents.

[0031] It should be understood that the "system", "device", "unit" and / or "module" used in this specification is a method for distinguishing different components, elements, parts, portions or assemblies at different levels. However, if other words can achieve the same purpose, the words can be replaced by other expressions.

[0032] Unless otherwise specified, technical terms used in this specification to describe components, elements, etc. do not refer to the singular, but may also include the plural. Generally speaking, terms such as "include", "comprise", etc. only indicate that the steps, elements, or components that have been clearly identified are included, and these steps, elements, and components do not constitute an exclusive list, such as the method or device described may also include other steps or components.

[0033] Flowcharts are used in this specification to illustrate the operation steps performed by the device or system of the relevant embodiments, but unless otherwise specified, the order used to describe these steps should not be understood as a limitation on the order in which the steps are performed. A person of ordinary skill in the art can adjust the order in which these steps are performed based on the knowledge and information conveyed by the embodiments of this specification, and the adjustment includes but is not limited to swapping the order, merging multiple steps, and splitting a certain step.

[0034] Computer 3D animation technology, also known as 3D computer animation, refers to the technology of simulating scenes and shapes in 3D space over time through computers. This technology is widely used in movie special effects, virtual reality, animation and video games. The scenes or shapes in 3D animation are often represented by 3D models. 3D models can be, for example, character models (such as characters and animals in animation), static object models (such as buildings, furniture, props, etc.), environment models (such as trees, terrain, buildings, etc.), etc. 3D models can include multiple polygonal meshes (also called Mesh), and polygonal meshes can be, for example, triangular meshes or quadrilateral meshes. Polygonal meshes can be composed of vertices, edges, and faces. Two vertices are connected by edges, and multiple edges form a face, thereby forming a mesh. The vertex of the mesh can store data such as vertex position information, identification information, normal information, texture coordinates, and color information. This information can be stored in the vertex attributes in the form of fields to define the characteristics of the vertex. Among them, the position information of the vertex can be represented by the coordinate value of the vertex in the model coordinate system (or called the local coordinate system). The model coordinate system can be a coordinate system preset in the 3D animation production software and corresponding to the 3D model itself. Each 3D model has its own local coordinate system, and the position of the vertex can be defined relative to the origin of the 3D model (such as the geometric center of the 3D model or a specified reference point). The change of the position of one or more vertices in the 3D model can cause the 3D model to produce different deformations, thereby simulating different morphological changes. For example, different expressions can be simulated by changing the position of one or more vertices in the facial model. For example, in a frame animation, the walking state of the character, the change state of the muscles, etc. can be simulated by adjusting the position of one or more vertices in different parts of the body.

[0035] Blended deformation is a deformation technique in three-dimensional computer animation. It creates one or more target objects and performs interpolation calculations to deform the base object to varying degrees. When performing blended deformation, the point order of the target object and the base object needs to be consistent. Among them, the point order (or vertex index) refers to the order or index of each vertex in the model. Specifically, the position of each vertex in the three-dimensional model is assigned a specific sequence number, which is called the point order, which determines the arrangement of the vertices in the data structure. In some embodiments, when the point order of the target object is inconsistent with that of the base object, or the topological structure of the target object and the base object changes, directly blending the base object with the target object cannot correctly map the vertex relationship between the two, so that the base object cannot be deformed correctly. At this time, it is necessary to adjust the position of the vertices of the base object in three-dimensional space according to the shape of the target object to match the shape of the target object, and then deform the base object.

[0036] In some embodiments, the shape of the target object can be matched manually. Specifically, the base object can be copied to obtain a copy object consistent with the base object point sequence, and then the vertices of the copy object are manually adjusted to match the shape of the target object, and then the base object and the copy object are mixed and deformed, but the process of manual matching is too complicated, and the matching efficiency is low. When the shape of a large number of target objects needs to be matched, more manpower costs will be consumed, and the matching efficiency will also be greatly reduced. In other embodiments, a wrapping deformer can also be used to assist in matching the shape of the target object. Specifically, the target object can be "wrapped" around the base object as a shell, and the shape of the target object is roughly adjusted to the shape of the base object, and then the spatial relative position relationship between the vertices of the adjusted target object and the vertices of the base object is mapped, and then the shape of the adjusted target object is gradually restored to the original shape, so that the base object can be deformed synchronously according to the dynamic changes of the target object, thereby obtaining the result after the base object follows the target object to be deformed. However, when using this method to map the spatial relative position relationship between the vertices of the adjusted target object and the vertices of the base object, the mapping is performed by taking the average value between multiple vertices. This results in the loss of many details of the original target object when restoring the target object, reducing the accuracy of model matching. In addition, the calculation of the wrapping deformer involves the calculation of a large number of vertices. When real-time rendering or processing of a large number of animations is required, the computational burden of the wrapping deformer will be greatly increased, which reduces the operating efficiency of the wrapping deformer.

[0037] To this end, some embodiments of the present specification propose a model matching method, which determines a second plane in the second model corresponding to the first vertex based on the first vertex in the first model, and determines a second vertex in the second plane corresponding to the first vertex based on the distance between the first vertex and one or more vertices in the second plane, and then deforms the first model or the second model based on the correspondence between the first vertex in the first model and the second vertex in the second model, so as to quickly match the vertices in the first model and the second model, thereby improving the accuracy and efficiency of model matching.

[0038] Figure 1 It is an exemplary flow chart of a model matching method shown in some embodiments of this specification. Figure 1 The process 100 shown can be executed by a computing device, for example, it can be implemented by a model matching system 800 deployed on the computing device. In some embodiments, the computing device can be a desktop computer, a laptop computer, a mobile phone, a VR device, a tablet computer, etc. In some embodiments, the computing device can be a user-end device, or a server-end device or a cloud device. In some embodiments, part of the process 100 can be executed by a computing device as a user end, and another part can be executed by a computing device as a server end. Figure 1As shown, process 100 may include the following steps.

[0039] Step 110 , obtaining a first model and a second model, wherein one is a base model and the other is a deformable model. In some embodiments, step 110 may be implemented by the model obtaining module 810 .

[0040] In some embodiments, the first model may be a three-dimensional model, and the first model may include one or more first vertices. Three or more first vertices may be connected to form a first plane (also called a mesh), for example, three first vertices are connected to form a triangular plane, or four first vertices are connected to form a quadrilateral plane, and the first model may include one or more first planes. Similar to the first model, the second model may be a three-dimensional model, and the second model may include one or more second vertices. Three or more second vertices may form a second plane (also called a mesh), and the second model may include one or more second planes. In some embodiments, the first model may be a base model, and the second model may be a deformable model, and the first model may be deformed based on the corresponding relationship between the vertices in the first model and the second model. In other embodiments, the first model may be a deformable model, and the second model may be a base model, and the second model may be deformed based on the corresponding relationship between the vertices in the first model and the second model. The specific instructions for deforming the first model or the second model will be described in detail in step 140.

[0041] In some embodiments, when acquiring the first model and the second model, the positional relationship between the first model and the second model may also be determined. According to a certain embodiment, the relative position of the first model and the second model may be adjusted so that one of the models is located inside the other model. Exemplarily, the inside of the model may be a side extending in the opposite direction of the normal direction of the vertex of the model. Figure 2 is a schematic diagram of a model matching interface according to some embodiments of this specification. Figure 2As shown, the normal direction of the vertex B3 of the three-dimensional model 2-2 is as shown by the arrow R2, the inner side of the three-dimensional model 2-2 may be a side extending in the opposite direction of the direction indicated by the arrow R2, and the outer side of the three-dimensional model 2-2 may be a side of the direction indicated by the arrow R2, then the three-dimensional model 2-1 is located on the outer side of the three-dimensional model 2-2; similarly, the normal direction of the vertex A1 of the three-dimensional model 2-1 may be the opposite direction of the direction indicated by the arrow R1, and the inner side of the three-dimensional model 2-1 may be a side of the direction indicated by the arrow R1, then the three-dimensional model 2-2 is located on the inner side of the three-dimensional model 2-1. According to another embodiment, the areas in the first model and the second model where it is desired to establish a corresponding relationship with each other may be marked, and the relative positions of the first model and the second model may be adjusted so that there is no obstruction between the marked areas corresponding to each other in the first model and the second model, and the description of this part will be described in detail in the subsequent process 600.

[0042] In some other embodiments, the positional relationship between the first model and the second model can also be determined based on the positional relationship between the center of the first model and the center of the second model. Wherein, the center of the first model can be the geometric center of the first model, and the geometric center can be the center point of the bounding box of the first model. The bounding box is a geometric body used to describe the boundary of a three-dimensional object, usually with a simple shape (such as a cuboid or a sphere) to enclose a complex model. The center of the first model can also be the center of mass of the first model, which is also called the center of mass. The center of mass can be the average position calculated based on the positions of the first vertices of the first model, which can reflect the true center of gravity position of the first model. The center of the first model can also be other customized center positions, which are not specifically limited here. The center of the second model is similar to the center of the first model and will not be repeated here. Exemplarily, when the appearance of the first model and the second model is relatively similar, the center of the first model can be overlapped with the center of the second model, or the distance between the center of the first model and the center of the second model is limited to be less than the first preset threshold, so that the positions of the first model and the second model overlap or are as close as possible.

[0043] In some other embodiments, the positional relationship between the first model and the second model may also be determined based on the distance between the first model and the second model. Specifically, the distance between the first model and the second model may be the distance between the first vertex and the second vertex that are expected to establish a corresponding relationship with each other, for example, the distance between the first vertex and the second vertex that are expected to establish a corresponding relationship with each other is limited to be less than a second preset threshold, or the average value of the distances between a plurality of first vertices and the corresponding second vertices that are expected to establish a corresponding relationship with each other is limited to be less than a second preset threshold, so that the positions of the first model and the second model are as close as possible.

[0044] Step 120 , based on the first vertex in the first model, determine a second plane in the second model corresponding to the first vertex. In some embodiments, step 120 may be implemented by the plane determination module 820 .

[0045] In some embodiments, the second plane corresponding to the first vertex can be determined based on ray detection. Specifically, a virtual ray can be emitted from the first vertex in the first model to the second model, and the plane in the second model that touches the virtual ray can be used as the second plane. Among them, the basic idea of ​​ray detection can be to emit a virtual ray from a point (emission point) in a three-dimensional space along a direction, and in the direction of the virtual ray, when it intersects with any object in the three-dimensional space, the corresponding intersection information is returned. The intersection information may include the intersection position, the identification or index of the plane where the intersection is located, etc., and the second plane in the second model that touches the virtual ray can be determined based on the intersection information. In some embodiments, the plane in the second model that is first touched by the virtual ray can be further used as the second plane, so as to determine the second plane closest to the first vertex from which the virtual ray is emitted, so as to subsequently search for the second vertex corresponding to the first vertex from which the virtual ray is emitted based on the second plane, simplify the process of searching for corresponding vertices, avoid traversing all vertices of the second model, reduce the amount of calculation, and improve the efficiency of model matching.

[0046] In some embodiments, when performing ray detection, the emission direction of the virtual ray can be determined based on the normal direction of the first vertex, and the virtual ray can be emitted from the first vertex in the first model to the second model according to the emission direction of the virtual ray. The normal is a unit vector used to indicate the orientation of a point on the model surface, usually pointing to the outside of the three-dimensional model surface. The normal vector of a vertex can be obtained by weighted averaging the normal vectors of multiple planes that share the vertex, and the normal vector of the first vertex can be obtained by reading the attribute information of the first vertex. Figure 2 As shown, the normal direction of the vertex B3 in the model 2-2 may be as indicated by the arrow R2, and the normal direction of the vertex A1 in the model 2-1 may be the opposite direction of the direction indicated by the arrow R1. It should be understood that Figure 2 The arrows, circles for vertices, characters for marking vertices, and lines pointing to the model are only identifiers to assist understanding, to clarify the annotated objects in the model matching interface diagram, and should not be understood as part of the model matching interface. There are also identifiers with similar functions in the subsequent model matching interface diagrams, and their functions are similar to this, so they will not be repeated in the future.

[0047] In some embodiments, the emission direction of the virtual ray can be further determined based on the positional relationship between the first model and the second model and the normal direction of the first vertex. Specifically, if the first model is located inside the second model, the normal direction of the first vertex can be determined as the emission direction of the virtual ray; if the second model is located inside the first model, the opposite direction of the normal direction of the first vertex can be determined as the emission direction of the virtual ray. For example, Figure 2 As shown, when model 2-1 is the first model and model 2-2 is the second model, the second model 2-2 is located inside the first model 2-1. When a virtual ray is emitted from the first vertex A1, the direction opposite to the normal direction of the first vertex A1, that is, the direction indicated by the arrow R1, can be determined as the emission direction of the virtual ray. Further, a virtual ray is emitted from the vertex A1 to the second model 2-2 in the direction indicated by the arrow R1. The plane that the virtual ray first touches is the second plane formed by connecting the second vertices B1, B2, B3, and B4 in the second model 2-2. See further. Figure 2 When model 2-2 is the first model and model 2-1 is the second model, the first model 2-2 is located inside the second model 2-1. When a virtual ray is emitted from the first vertex B3, the normal direction of the first vertex B3, that is, the direction indicated by the arrow R2, can be determined as the emission direction of the virtual ray. Further, the virtual ray is emitted from the first vertex B3 to the second model 2-1 in the direction indicated by the arrow R2. The plane that the virtual ray first touches is the second plane formed by connecting the second vertices A1, A2, A3, and A4 in the second model 2-1.

[0048] In some embodiments, when performing ray detection, the emission direction of the virtual ray can also be determined based on the center of the second model. Specifically, the first vertex can be used as the emission point, and the direction from the first vertex to the center of the second model can be used as the emission direction of the virtual ray. For the description of the center of the second model, reference can be made to the above description, which will not be repeated here.

[0049] In some embodiments, virtual rays can be emitted from multiple first vertices in the first model to the second model simultaneously according to the emission direction of the virtual rays, or virtual rays can be emitted from multiple first vertices in the first model to the second model one by one according to the emission direction of the virtual rays, which is not specifically limited here. In some embodiments, when emitting virtual rays, each first vertex emitting virtual rays can emit a ray according to the emission direction of the virtual ray to determine a second plane corresponding to the first vertex emitting the virtual ray. In other embodiments, when emitting virtual rays, each first vertex emitting virtual rays can emit multiple rays according to the emission direction of the virtual ray to determine multiple second planes corresponding to the first vertex emitting the virtual ray, and the multiple second planes can be further screened, and the screened one or more second planes are used as the second planes corresponding to the first vertex emitting the virtual ray.

[0050] Step 130 , determining a second vertex in the second plane corresponding to the first vertex based on the distance between the first vertex and one or more vertices in the second plane. In some embodiments, step 130 may be implemented by vertex determination module 830 .

[0051] In some embodiments, the first distance between the first vertex and one or more second vertices in the second plane can be calculated, and the second vertex corresponding to the minimum first distance can be determined as the second vertex corresponding to the first vertex. Specifically, the first distance between the first vertex and each second vertex can be determined according to the position of the first vertex and the position of one or more second vertices in the second plane. Among them, the position of the vertex can be obtained by reading the attribute information of the vertex, and the first distance can be calculated according to a preset distance function, for example, the first distance between the first vertex and each second vertex is calculated by a Euclidean distance function. After calculating each first distance, the second vertex corresponding to the minimum first distance is determined as the second vertex corresponding to the first vertex, so as to find the second vertex closest to the first vertex emitting the virtual ray in the second model. When the second plane is a triangular plane or a quadrilateral plane, for a first vertex, only three to four first distances need to be calculated to find the second vertex corresponding to the first vertex. Therefore, in this way, the amount of calculation can be greatly reduced and the efficiency of finding the corresponding vertex can be improved.

[0052] For example, Figure 2As shown, when model 2-1 is the first model and model 2-2 is the second model, the first vertex A1 in the first model 2-1 corresponds to the second plane formed by connecting the second vertices B1, B2, B3, and B4 in the second model 2-2, then the first distances between the first vertex A1 and the second vertices B1, B2, B3, and B4 can be calculated respectively. Assuming that the first distance between the first vertex A1 and the second vertex B1 is the smallest, the second vertex B1 is determined as the second vertex corresponding to the first vertex A1. As another example, Figure 2 As shown, when model 2-2 is the first model and model 2-1 is the second model, the first vertex B3 in the first model 2-2 corresponds to the second plane formed by connecting the second vertices A1, A2, A3, and A4 in the second model 2-1. The first distances between the first vertex B3 and the second vertices A1, A2, A3, and A4 can be calculated respectively. Assuming that the first distance between the first vertex B3 and the second vertex A3 is the smallest, the second vertex A3 is determined as the second vertex corresponding to the first vertex B3.

[0053] In some embodiments, the second vertex corresponding to the first vertex may be marked in the second model, or the first vertex at the position where the virtual ray is emitted may be marked in the first model. Exemplarily, the second vertex corresponding to the first vertex in the second model may be highlighted to observe which second vertices have established a corresponding relationship with the first vertex. For some second vertices that have not established a corresponding relationship with the first vertex, the corresponding first vertex may be further specified separately.

[0054] In some embodiments, when the vertex density of the first model is less than the vertex density of the second model, or the difference between the vertex density of the first model and the vertex density of the second model is less than a third preset threshold, among the corresponding first vertices and second vertices, one second vertex may correspond to one first vertex. The vertex density may be the number of vertices contained in a unit area in a three-dimensional model. In other embodiments, when the difference between the vertex density of the first model and the vertex density of the second model is greater than or equal to a third preset threshold, and the vertex density of the first model is greater than the vertex density of the second model, multiple first vertices at multiple positions where virtual rays are sent may correspond to the same second vertex, that is, among the corresponding first vertices and second vertices, one second vertex may correspond to multiple first vertices.

[0055] In some embodiments, the correspondence between the first vertex in the first model and the second vertex in the second model can be further stored. Specifically, a correspondence can be established based on the identifier of the first vertex and the identifier of the second vertex, and the correspondence can be stored in a dictionary, wherein the identifier of the vertex can be the point sequence of the vertex. Exemplarily, the point sequence of the second vertex is V1, which corresponds to a first vertex, and the point sequence of the first vertex is W1, then the correspondence stored in the dictionary can be V1:W1; for another example, the point sequence of the second vertex is V2, which corresponds to multiple first vertices, and the point sequences of the multiple first vertices are W2, W3, and W4 respectively, then the correspondence stored in the dictionary can be V2: [W2, W3, W4].

[0056] Step 140 , based on the correspondence between the first vertex in the first model and the second vertex in the second model, deform the first model or the second model. In some embodiments, step 140 may be implemented by the deformation module 840 .

[0057] In some embodiments, deforming the first model or the second model may be directly changing the positions of vertices in the first model or the second model.

[0058] According to a certain embodiment, when the first model is a base model, the position of the first vertex in the first model can be changed based on the position of the second vertex corresponding to the first vertex, so as to deform the first model. The position of the first vertex can be the vertex coordinates of the first vertex, the position of the second vertex can be the vertex coordinates of the second vertex, the vertex coordinates of the second vertex can be read from the vertex attributes of the second vertex, and the vertex coordinates of the first vertex can be changed to the vertex coordinates of the second vertex. Specifically, among the first and second vertices corresponding to each other, when a second vertex corresponds to a first vertex, the vertex coordinates of a first vertex corresponding to the second vertex can be changed to the vertex coordinates of the second vertex; when a second vertex corresponds to multiple first vertices, the vertex coordinates of multiple first vertices corresponding to the second vertex can be changed to the vertex coordinates of the second vertex.

[0059] Combine the following Figure 2 Give a specific example, such as Figure 2As shown, model 2-2 can be the first model, and model 2-1 can be the second model. Assuming that among the first vertices and the second vertices corresponding to each other, one second vertex corresponds to one first vertex. Taking the first vertex B3 in the first model 2-2 as an example, the first vertex B3 corresponds to the second vertex A3. Then, the vertex coordinates of the first vertex B3 can be changed to the vertex coordinates of the second vertex A3, so that the position of the first vertex B3 moves to the position of the second vertex A3. Similarly, the vertex coordinates of other first vertices that have established a corresponding relationship with the second vertex in the first model 2-2 are all changed to the vertex coordinates of the corresponding second vertex, thereby changing the shape of the first model. Figure 3 is a schematic diagram of a three-dimensional model according to some embodiments of the present specification. The shape of the first model 2-2 after changing the positions of each first vertex can be as follows: Figure 3 shown.

[0060] According to another embodiment, when the second model is a base model, the position of the second vertex corresponding to the first vertex in the second model can be changed based on the position of the first vertex, so as to deform the second model. The position of the first vertex can be the vertex coordinates of the first vertex, the position of the second vertex can be the vertex coordinates of the second vertex, the vertex coordinates of the first vertex can be read from the vertex attribute of the first vertex, and the vertex coordinates of the second vertex can be changed to the vertex coordinates of the first vertex. Specifically, in some embodiments, among the first and second vertices corresponding to each other, when a second vertex corresponds to a first vertex, the vertex coordinates of the second vertex can be changed to the vertex coordinates of the first vertex. In other embodiments, when a second vertex corresponds to multiple first vertices, any first vertex can be further specified as the first vertex corresponding to the second vertex among the multiple first vertices corresponding to the second vertex, and the vertex coordinates of the second vertex can be changed to the vertex coordinates of the specified first vertex. In some other embodiments, when a second vertex corresponds to multiple first vertices, the vertex coordinates of the multiple first vertices can also be weighted averaged, and the vertex coordinates of the second vertex can be changed to the vertex coordinates after the weighted average calculation of the vertex coordinates of the multiple first vertices.

[0061] Combine the following Figure 2 Give a specific example, such as Figure 2As shown, model 2-1 may be the first model, and model 2-2 may be the second model. Assuming that among the first vertices and the second vertices corresponding to each other, one second vertex corresponds to one first vertex. Taking the second vertex B1 in the second model 2-2 as an example, the second vertex B1 corresponds to the first vertex A1. Then, the vertex coordinates of the second vertex B1 may be changed to the vertex coordinates of the first vertex A1, so that the position of the second vertex B1 moves to the position of the first vertex A1. Similarly, the vertex coordinates of the other second vertices in the second model 2-2 that have established a corresponding relationship with the first vertex are all changed to the vertex coordinates of the corresponding first vertex, thereby changing the shape of the second model. Figure 3 is a schematic diagram of a three-dimensional model according to some embodiments of this specification. The shape of the changed second model 2-2 can be as follows Figure 3 shown.

[0062] In some embodiments, the deformation of the first model or the second model may also be based on the correspondence between the first vertex in the first model and the second vertex in the second model, and the animation data is transmitted between the first model and the second model. The animation data may include offset information or rotation information. The offset information may refer to the position offset of the vertex in each frame of animation. For example, the position of a vertex M in the first frame of animation is , the position in the second frame of animation is , then the offset information of vertex M in the second frame animation is ΔP= - The rotation information may refer to the rotation direction and rotation angle of the vertex in each frame of animation. The rotation direction may be around the X-axis, Y-axis or Z-axis, and the rotation angle refers to the angle of rotation in the rotation direction. The rotation information may be converted into a rotation matrix using a preset conversion formula.

[0063] In some embodiments, when the first model is the base model, based on the correspondence between the first vertex in the first model and the second vertex in the second model, the second animation data corresponding to the second vertex can be passed to the first vertex corresponding to the second vertex, so that the first vertex updates the position of the first vertex according to the second animation data, thereby deforming the first model. Specifically, among the first and second vertices corresponding to each other, when a second vertex corresponds to a first vertex, the vertex coordinates of the first vertex can be updated based on the vertex coordinates of the first vertex and the second animation data; when a second vertex corresponds to multiple first vertices, the vertex coordinates of each first vertex can be updated based on the vertex coordinates of the multiple first vertices and the second animation data corresponding to the second vertex.

[0064] For example, assuming that the second animation data is offset information, and the first vertex C1 corresponds to the second vertex D1, the vertex coordinates of the first vertex C1 can be added to the offset information corresponding to the second vertex D1 to obtain the updated vertex coordinates of the first vertex C1; for another example, assuming that the second animation data is rotation information, the rotation information can be represented by a rotation matrix, and the vertex coordinates of the first vertex C1 can be multiplied by the rotation matrix corresponding to the second vertex D1 to obtain the updated vertex coordinates of the first vertex C1. By calculating and updating the positions of each first vertex in the first model in each frame, the motion state of the first model in the animation is determined.

[0065] In some embodiments, when the second model is the base model, the first animation data corresponding to the first vertex can be passed to the second vertex corresponding to the first vertex based on the correspondence between the first vertex in the first model and the second vertex in the second model, so that the second vertex updates the position of the second vertex according to the first animation data, thereby deforming the second model. Specifically, among the first and second vertices that correspond to each other, when a second vertex corresponds to a first vertex, the vertex coordinates of the second vertex can be updated based on the vertex coordinates of the second vertex and the first animation data; when a second vertex corresponds to multiple first vertices, any first vertex can be further specified as the first vertex corresponding to the second vertex among the multiple first vertices corresponding to the second vertex. The scheme of updating the position of the second vertex according to the first animation data is similar to that of updating the position of the first vertex according to the second animation data, which will not be repeated here.

[0066] Figure 4 It is an exemplary flow chart of a second plane determination method shown in some embodiments of this specification. Figure 4 The process 400 shown may be executed by a computing device, for example, may be implemented by a plane determination module 820 in a model matching system 800 arranged on the computing device. Figure 4 As shown, process 400 may include the following steps.

[0067] Step 410: assigning a weight to a first vertex in the first model based on an area in the first model where a corresponding relationship is desired to be established.

[0068] In some embodiments, the region in the first model where the corresponding relationship is expected to be established may be the region in the first model where the deformation is expected to be performed. The weight of each first vertex may be configured by setting a different vertex color for each first vertex. Exemplarily, the color of the first vertex in the region where the corresponding relationship is expected to be established in the first model may be set to white, with white indicating a weight of 1, and the color of the other first vertices may be set to black, with black indicating a weight of 0.

[0069] Figure 5FIG. 1 is another schematic diagram of a model matching interface according to some embodiments of this specification. Figure 5 As shown, model 5-2 is the first model and model 5-1 is the second model. The color of the first vertex in the area where the corresponding relationship is desired to be established in the first model 5-2 can be set to white, and the colors of other first vertices in the first model 5-2 can be set to black. The weight of the first vertex set to white is 1, and the weight of the first vertex set to black is 0.

[0070] Step 420 , filtering the first vertices in the first model based on the weight of the first vertex to obtain the filtered first vertices in the first model.

[0071] Specifically, the first vertex with a weight of 0 may be filtered to obtain the first vertex with a weight of 1 in the first model. For example, Figure 5 As shown, the first vertices with black vertex colors in the first model 5 - 2 may be filtered, and the first vertices with white vertex colors may be retained and used as the filtered first vertices in the first model.

[0072] Step 430 : determining a second plane corresponding to the filtered first vertex in the second model based on the filtered first vertex.

[0073] In some embodiments, a virtual ray can be emitted from the first vertex after filtering in the first model to the second model, and the plane in the second model that touches the virtual ray is used as the second plane. The specific method for determining the second plane is similar to that described above, and specific reference can be made to the description in step 110 above, which will not be repeated here. Determining the second plane corresponding to the filtered first vertex in the second model based on the filtered first vertex can greatly reduce the amount of calculation, improve the efficiency of searching for the second plane, and thereby improve the efficiency of determining the corresponding vertices in the first model and the second model.

[0074] Figure 6 It is an exemplary flow chart of a second plane determination method shown in some embodiments of this specification. Figure 6 The process 600 shown can be executed by a computing device, for example, it can be implemented by a model matching system 800 deployed on the computing device. Figure 6 As shown, process 600 may include the following steps.

[0075] Step 610 , marking the regions in the first model and the second model where it is desired to establish a corresponding relationship with each other. In some embodiments, step 610 may be implemented by the model acquisition module 810 .

[0076] In some embodiments, the region in the first model where a correspondence is desired to be established may be a region in the first model where deformation is desired, and the region in the second model where a correspondence is desired to be established may be a region corresponding to the region in the first model where deformation is desired. Specifically, the same vertex color may be configured for the first vertex and the second vertex in the region in the first model and the second model where a correspondence is desired to be established. Figure 7 FIG. 1 is another schematic diagram of a model matching interface according to some embodiments of this specification. Figure 7 As shown, the areas in the first model where a corresponding relationship is expected to be established may include areas 7-11 and 7-21, and the areas in the second model where a corresponding relationship is expected to be established may include areas 7-12 corresponding to area 7-11, and areas 7-22 corresponding to area 7-21. In some embodiments, the first vertex and the second vertex in areas 7-11 and 7-12 may be configured with the same vertex color, for example, a first color, and the first vertex and the second vertex in areas 7-21 and 7-22 may be configured with the same vertex color, for example, a second color, wherein the first color and the second color may be any value in RGB colors, and the first color may be different from the second color.

[0077] Step 620 , adjusting the relative position of the first model and the second model so that there is no obstruction between the corresponding marked areas in the first model and the second model. In some embodiments, step 620 may be implemented by the model acquisition module 810 .

[0078] In some embodiments, the first model and the second model may be placed close to or overlapped based on the areas in the first model and the second model where a correspondence relationship is desired to be established, so that there is no obstruction between the marked areas corresponding to each other in the first model and the second model. The obstruction may be, for example, a plane or an object that may collide with the virtual ray. For example, the following may be adjusted: Figure 7 The relative positions of the two 3D models shown in ( Figure 7 What is shown in FIG. 1 is the relative position relationship of the first two models being adjusted, such as moving the 3D model on the left to the right, so that there is no obstruction between the areas 7-11 and 7-12 in the two 3D models where a corresponding relationship is desired to be established, and there is no obstruction between the areas 7-21 and 7-22 where a corresponding relationship is desired to be established.

[0079] Step 630: Determine, based on the first vertex in the marked area in the first model, a second plane in the corresponding marked area in the second model that corresponds to the first vertex in the marked area in the first model.

[0080] In some embodiments, the first vertex in the marked area of ​​the first model and the second vertex in the marked area of ​​the second model may have the same vertex color, which may be a target color, and the target color may be any value in RGB color. Figure 7 As shown, the first vertex in region 7-11 and the second vertex in region 7-12 have the same vertex color, for example, the first color, and the first vertex in region 7-21 and the second vertex in region 7-22 have the same vertex color, for example, the second color. Further, a virtual ray may be emitted from the first vertex whose vertex color is the target color to the second model, and a plane in the second model that is touched by the virtual ray and is formed by connecting multiple second vertices whose vertex colors are the target color is used as the second plane.

[0081] In some embodiments, the emission direction of the virtual ray may be determined based on the positional relationship between the marked region in the first model and the corresponding marked region in the second model.

[0082] According to one embodiment, if the marked area in the first model is located inside the corresponding marked area in the second model, the normal direction of the first vertex in the marked area in the first model is determined as the emission direction of the virtual ray. The inside of the marked area can be a side extending in the opposite direction of the normal direction of the vertex in the marked area. For example, Figure 7 As shown, assuming that the left three-dimensional model is the first model and the right three-dimensional model is the second model, when the first model is moved to the right so that the first model is close to the second model, if area 7-11 is located on the side of the reverse extension of the normal direction of the vertex in area 7-12, then area 7-11 is located inside area 7-12, and at this time, the normal direction of the first vertex in area 7-11 is determined as the emission direction of the virtual ray corresponding to the first vertex in area 7-11. Further, a virtual ray is emitted from the first vertex located in area 7-11 (such as the vertex marked as the first color in the first model) to the second model, and the plane formed by connecting multiple second vertices in the second model that touch the virtual ray and are located in area 7-12 (such as the vertices marked as the first color in the second model) is used as the second plane.

[0083] According to another embodiment, if the marked area in the second model is located inside the corresponding marked area in the first model, the direction opposite to the normal direction of the first vertex in the marked area in the first model is determined as the emission direction of the virtual ray. The inside of the marked area may be a side extending in the opposite direction of the normal direction of the vertex in the marked area. For example, Figure 7As shown, assuming that the three-dimensional model on the left is the first model and the three-dimensional model on the right is the second model, when the first model is moved to the right so that the first model is close to the second model, if area 7-22 is located on the side of the reverse extension of the normal direction of the vertex in area 7-21, then area 7-22 is located inside area 7-21, and at this time, the reverse direction of the normal direction of the first vertex in area 7-21 is determined as the emission direction of the virtual ray corresponding to the first vertex in area 7-21. Further, a virtual ray is emitted from the first vertex located in area 7-21 (such as the vertex marked as the first color in the first model) to the second model, and a plane formed by connecting multiple second vertices in the second model (such as the vertices marked as the first color in the second model) that touch the virtual ray and are located in area 7-22 is used as the second plane. For other descriptions on determining the second plane, please refer to the description in the previous step 110, which will not be repeated here.

[0084] This specification also provides a model matching system. Figure 8 is an exemplary block diagram of a model matching system according to some embodiments of this specification. Figure 8 As shown, in some embodiments, the model matching system 800 may include a model acquisition module 810 , a plane determination module 820 , a vertex determination module 830 , and a deformation module 840 .

[0085] The model acquisition module 810 is used to acquire a first model and a second model, one of which is a base model and the other is a deformable model.

[0086] The plane determining module 820 is used to determine a second plane corresponding to the first vertex in the second model based on the first vertex in the first model.

[0087] The vertex determination module 830 is configured to determine a second vertex in the second plane corresponding to the first vertex based on the distance between the first vertex and one or more vertices in the second plane.

[0088] The deformation module 840 is used to deform the first model or the second model based on the correspondence between the first vertex in the first model and the second vertex in the second model.

[0089] In some optional embodiments, the plane determination module 820 is further configured to emit a virtual ray from the first vertex in the first model to the second model, and use the plane in the second model that touches the virtual ray as the second plane.

[0090] In some optional embodiments, the plane determination module 820 is further configured to use the plane in the second model that is first touched by the virtual ray as the second plane.

[0091] In some optional embodiments, the plane determination module 820 is further used to determine the emission direction of the virtual ray based on the normal direction of the first vertex; and emit the virtual ray from the first vertex in the first model to the second model according to the emission direction of the virtual ray.

[0092] In some optional embodiments, the model acquisition module 810 is further used to adjust the relative position of the first model and the second model so that one of the models is located inside the other model.

[0093] In some optional embodiments, the plane determination module 820 is also used to, if the second model is located outside the first model, determine the normal direction of the first vertex as the emission direction of the virtual ray; if the second model is located inside the first model, determine the opposite direction of the normal direction of the first vertex as the emission direction of the virtual ray.

[0094] In some optional embodiments, the model acquisition module 810 is also used to mark the areas in the first model and the second model where it is desired to establish a correspondence with each other; and adjust the relative positions of the first model and the second model so that there are no obstructions between the corresponding marked areas in the first model and the second model.

[0095] In some optional embodiments, the plane determination module 820 is further used to determine, based on the first vertex in the marked area in the first model, a second plane in the corresponding marked area in the second model corresponding to the first vertex in the marked area in the first model.

[0096] In some optional embodiments, the plane determination module 820 is also used to, if the marked area in the first model is located inside the corresponding marked area in the second model, determine the normal direction of the first vertex in the marked area in the first model as the emission direction of the virtual ray; if the marked area in the second model is located inside the corresponding marked area in the first model, determine the opposite direction of the normal direction of the first vertex in the marked area in the first model as the emission direction of the virtual ray.

[0097] In some optional embodiments, the plane determination module 820 is also used to configure a weight for a first vertex in the first model based on an area in the first model where a corresponding relationship is desired to be established; filter the first vertex in the first model based on the weight of the first vertex to obtain the filtered first vertex in the first model; and determine a second plane in the second model corresponding to the filtered first vertex based on the filtered first vertex.

[0098] In some optional embodiments, the vertex determination module 830 is further used to calculate a first distance between the first vertex and one or more second vertices in the second plane; and determine the second vertex corresponding to the minimum first distance as the second vertex corresponding to the first vertex.

[0099] In some optional embodiments, the deformation module 830 is also used to, when the second model is the base model, change the position of the first vertex in the first model based on the position of the second vertex corresponding to the first vertex; when the second model is the base model, change the position of the second vertex in the second model corresponding to the first vertex based on the position of the first vertex.

[0100] In some optional embodiments, the deformation module 840 is also used to, when the second model is the base model, based on the correspondence between the first vertex in the first model and the second vertex in the second model, pass the first animation data corresponding to the first vertex to the second vertex corresponding to the first vertex, so that the second vertex updates its position according to the first animation data; when the first model is the base model, based on the correspondence between the first vertex in the first model and the second vertex in the second model, pass the second animation data corresponding to the second vertex to the first vertex corresponding to the second vertex, so that the first vertex updates its position according to the second animation data.

[0101] In some optional embodiments, the model matching system 800 may further include a storage module 850 for storing a correspondence between a first vertex in the first model and a second vertex in the second model.

[0102] For more information about each module, see Figures 1 to 7 The relevant description of will not be repeated here. It should be understood that Figure 8 The system and its modules shown can be implemented in various ways. For example, in some embodiments, the system and its modules can be implemented by hardware, software, or a combination of software and hardware. Among them, the hardware part can be implemented using dedicated logic; the software part can be stored in a memory and executed by an appropriate instruction execution system, such as a microprocessor or dedicated design hardware. Those skilled in the art will understand that the above methods and systems can be implemented using computer executable instructions and / or control codes contained in a processor, such as a disk, CD or DVD-ROM, etc., and such codes are provided in a carrier medium or a memory of a programmable device. The system and its modules of this specification can not only be implemented by hardware circuits such as ultra-large-scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, etc., or programmable hardware devices such as field programmable gate arrays, programmable logic devices, etc., but can also be implemented by software executed by various types of processors, and can also be implemented by a combination of the above hardware circuits and software (e.g., firmware).

[0103] It should be noted that the above description of the system and its modules is only for convenience of description and does not limit this specification to the scope of the embodiments. It is understandable that for those skilled in the art, after understanding the principle of the system, it is possible to arbitrarily combine the modules without deviating from this principle to form a subsystem connected to other modules. Or some modules may be split to obtain more modules or multiple units under the module. Such variations are all within the scope of the disclosure of this specification.

[0104] Some embodiments of the present specification also provide a computer program product, including computer instructions. When at least part of the computer instructions are executed by a processor, the present specification can be implemented. Figures 1 to 7 In some embodiments, the computer program product may only involve computer instructions, which may be carried by a storage medium or a processing device. In other embodiments, the computer program product may also be a storage medium or a processing device containing the aforementioned computer instructions. The processing device may include one or more processors and a storage medium.

[0105] In some embodiments, the processor may be a combination of one or more of the following processors: a central processing unit (CPU), an application specific integrated circuit (ASIC), an application specific instruction set processor (ASIP), a graphics processing unit (GPU), a physical processing unit (PPU), a digital signal processor (DSP), a field programmable gate array (FPGA), a programmable logic device (PLD), a programmable logic controller (PLC), a reduced instruction set computer (RISC), and a microprocessor.

[0106] In some embodiments, the storage medium may include a combination of one or more of the following: a mass storage, a removable storage, a volatile read-write memory, and a read-only memory (ROM). Exemplary mass storage may include a magnetic disk, an optical disk, a solid-state hard disk, and the like. Exemplary removable storage may include a flash disk, a floppy disk, an optical disk, a memory card, a compressed hard disk, a magnetic tape, and the like. Exemplary volatile read-write memory may include a random access memory (RAM). Exemplary random access memory may include a dynamic random access memory (DRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), a static random access memory (SRAM), a thyristor random access memory (T-RAM), and a zero capacitance memory (Z-RAM), and the like. Exemplary read-only memory may include a masked read-only memory (MROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a compact disk read-only memory (CD-ROM), and a digital multifunction hard disk read-only memory, and the like.

[0107] The beneficial effects that may be brought about by the embodiments of this specification include but are not limited to: (1) determining the second plane corresponding to the first vertex in the second model based on the first vertex in the first model, and determining the second vertex corresponding to the first vertex in the second plane based on the distance between the first vertex and one or more vertices in the second plane, and then deforming the first model or the second model based on the correspondence between the first vertex in the first model and the second vertex in the second model, thereby quickly matching the vertices in the first model and the second model, thereby improving the accuracy and efficiency of model matching; (2) by calculating the first distance between the first vertex and each second vertex in the corresponding second plane, determining the second vertex corresponding to the minimum first distance as the second vertex corresponding to the first vertex, thereby greatly improving the accuracy and efficiency of model matching; Reduce the amount of calculation and improve the efficiency of searching for corresponding vertices; (3) By configuring weights for the first vertices in the first model, some of the first vertices are filtered to obtain the filtered first vertices in the first model, and the corresponding second plane is determined based on the filtered first vertices, thereby reducing the amount of calculation and improving the efficiency of searching for the second plane, thereby improving the efficiency of determining the corresponding vertices in the first model and the second model; (4) By marking the first model and the second model, and determining the second plane corresponding to the first vertex based on the same marked area in the first model and the second model, the accuracy of searching for corresponding vertices is improved, while reducing the amount of calculation and improving the efficiency of searching for the second plane, thereby improving the efficiency of determining the corresponding vertices in the first model and the second model. It should be noted that different embodiments may produce different beneficial effects. In different embodiments, the beneficial effects that may be produced may be any one or a combination of the above, or any other beneficial effects that may be obtained.

[0108] The basic concepts have been described above. Obviously, for those skilled in the art, the above detailed disclosure is only for example and does not constitute a limitation of this specification. Although not explicitly stated here, those skilled in the art may make various modifications, improvements and corrections to this specification. Such modifications, improvements and corrections are taught in this specification, so such modifications, improvements and corrections still belong to the spirit and scope of the exemplary embodiments of this specification.

Claims

1. A model matching method, characterized in that: The method comprises: Obtain a first model and a second model, one of which is a base model and the other is a deformation model; Determine, based on a first vertex in the first model, a second plane in the second model corresponding to the first vertex; determining a second vertex in the second plane corresponding to the first vertex based on a distance between the first vertex and one or more vertices in the second plane; The first model or the second model is deformed based on a correspondence between a first vertex in the first model and a second vertex in the second model.

2. The method according to claim 1, characterized in that The determining, based on the first vertex in the first model, a second plane corresponding to the first vertex in the second model comprises: A virtual ray is emitted from a first vertex in the first model to the second model, and a plane in the second model that touches the virtual ray is used as the second plane.

3. The method according to claim 2, characterized in that The taking the plane in the second model that touches the virtual ray as the second plane comprises: The plane in the second model that the virtual ray touches first is taken as the second plane.

4. The method according to claim 2, characterized in that: The emitting a virtual ray from a first vertex in the first model to the second model comprises: Determining the emission direction of the virtual ray based on the normal direction of the first vertex; The virtual ray is emitted from a first vertex in the first model to the second model according to the emission direction of the virtual ray.

5. The method according to claim 4, characterized in that The obtaining of the first model and the second model comprises: The relative positions of the first model and the second model are adjusted so that one of the models is located inside the other model.

6. The method according to claim 5, characterized in that The determining the emission direction of the virtual ray based on the normal direction of the first vertex comprises: If the first model is located inside the second model, determining the normal direction of the first vertex as the emission direction of the virtual ray; If the second model is located inside the first model, the opposite direction of the normal direction of the first vertex is determined as the emission direction of the virtual ray.

7. The method according to claim 4, characterized in that The obtaining of the first model and the second model comprises: Marking regions in the first model and the second model where a corresponding relationship is desired to be established between them; The relative positions of the first model and the second model are adjusted so that there are no obstructions between the corresponding marked areas in the first model and the second model.

8. The method according to claim 7, characterized in that The determining, based on the first vertex in the first model, a second plane corresponding to the first vertex in the second model comprises: A second plane corresponding to the first vertex in the marked area in the first model and in the corresponding marked area in the second model is determined based on the first vertex in the marked area in the first model.

9. The method according to claim 7, characterized in that: The determining the emission direction of the virtual ray based on the normal direction of the first vertex comprises: If the marked area in the first model is located inside the corresponding marked area in the second model, determining the normal direction of the first vertex in the marked area in the first model as the emission direction of the virtual ray; If the marked area in the second model is located inside the corresponding marked area in the first model, the opposite direction of the normal direction of the first vertex in the marked area in the first model is determined as the emission direction of the virtual ray.

10. The method according to claim 1, characterized in that The determining, based on the first vertex in the first model, a second plane corresponding to the first vertex in the second model comprises: assigning a weight to a first vertex in the first model based on an area in the first model where a corresponding relationship is desired to be established; Filtering the first vertices in the first model based on the weights of the first vertices to obtain filtered first vertices in the first model; A second plane corresponding to the filtered first vertex in the second model is determined based on the filtered first vertex.

11. The method according to claim 1, characterized in that: The determining, based on the distance between the first vertex and the second plane, a second vertex corresponding to the first vertex in the second plane comprises: calculating a first distance between the first vertex and one or more second vertices in the second plane; The second vertex corresponding to the minimum first distance is determined as the second vertex corresponding to the first vertex.

12. The method according to claim 1, characterized in that The deforming the first model or the second model based on the correspondence between the first vertex in the first model and the second vertex in the second model includes: When the first model is a base model, based on the position of a second vertex corresponding to the first vertex, changing the position of the first vertex in the first model; When the second model is the base model, the position of a second vertex corresponding to the first vertex in the second model is changed based on the position of the first vertex.

13. The method according to claim 1, characterized in that The deforming the first model or the second model based on the correspondence between the first vertex in the first model and the second vertex in the second model includes: When the second model is the base model, based on the correspondence between a first vertex in the first model and a second vertex in the second model, first animation data corresponding to the first vertex is transmitted to a second vertex corresponding to the first vertex, so that the second vertex updates its position according to the first animation data; When the first model is the base model, based on the correspondence between the first vertex in the first model and the second vertex in the second model, the second animation data corresponding to the second vertex is passed to the first vertex corresponding to the second vertex, so that the first vertex updates the position of the first vertex according to the second animation data.

14. The method according to claim 11, characterized in that The animation data includes offset information or rotation information.

15. The method according to claim 1, characterized in that Also includes: The correspondence between the first vertex in the first model and the second vertex in the second model is stored.

16. A model matching system, characterized in that: The system comprises: A model acquisition module, used to acquire a first model and a second model, one of which is a base model and the other is a deformation model; a plane determination module, used to determine a second plane corresponding to the first vertex in the second model based on a first vertex in the first model; a vertex determination module, configured to determine a second vertex in the second plane corresponding to the first vertex based on a distance between the first vertex and one or more vertices in the second plane; A deformation module is used to deform the first model or the second model based on the correspondence between the first vertex in the first model and the second vertex in the second model.

17. A computer program product, characterized in that The invention comprises a computer program, and when at least a part of the computer program is executed by a processor, the method according to any one of claims 1 to 15 can be implemented.