WO2022088971A1 - 一种道具吸附的方法、装置、设备及存储介质 - Google Patents

一种道具吸附的方法、装置、设备及存储介质 Download PDF

Info

Publication number
WO2022088971A1
WO2022088971A1 PCT/CN2021/116138 CN2021116138W WO2022088971A1 WO 2022088971 A1 WO2022088971 A1 WO 2022088971A1 CN 2021116138 W CN2021116138 W CN 2021116138W WO 2022088971 A1 WO2022088971 A1 WO 2022088971A1
Authority
WO
WIPO (PCT)
Prior art keywords
prop
mesh
grid
data
base object
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2021/116138
Other languages
English (en)
French (fr)
Inventor
宋立
李灵
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Zitiao Network Technology Co Ltd
Original Assignee
Beijing Zitiao Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Zitiao Network Technology Co Ltd filed Critical Beijing Zitiao Network Technology Co Ltd
Priority to US18/034,345 priority Critical patent/US12430864B2/en
Publication of WO2022088971A1 publication Critical patent/WO2022088971A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating three-dimensional [3D] models or images for computer graphics
    • G06T19/20Editing of three-dimensional [3D] images, e.g. changing shapes or colours, aligning objects or positioning parts
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three-dimensional [3D] modelling for computer graphics
    • G06T17/20Finite element generation, e.g. wire-frame surface description, tesselation
    • G06T17/205Re-meshing
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/04Context-preserving transformations, e.g. by using an importance map
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2219/00Indexing scheme for manipulating 3D models or images for computer graphics
    • G06T2219/20Indexing scheme for editing of 3D models
    • G06T2219/2004Aligning objects, relative positioning of parts
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2219/00Indexing scheme for manipulating 3D models or images for computer graphics
    • G06T2219/20Indexing scheme for editing of 3D models
    • G06T2219/2016Rotation, translation, scaling
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2219/00Indexing scheme for manipulating 3D models or images for computer graphics
    • G06T2219/20Indexing scheme for editing of 3D models
    • G06T2219/2021Shape modification

Definitions

  • the present disclosure relates to the technical field of data processing, and in particular, to a method, device, device and storage medium for prop adsorption.
  • Prop adsorption refers to the adsorption of special effects props to the target object to form the effect that the special effects props fit the target object such as the user's face.
  • prop snapping can only be achieved through vertex tracking. Specifically, a vertex on the special effect prop is fixed on the target object, and then the size of the special effect prop is consistent with the target object by scaling, thereby realizing the prop adsorption function.
  • the present disclosure provides a method, device, device and storage medium for prop adsorption, which can realize the prop adsorption function in a finer granularity and improve the effect of prop adsorption.
  • the present disclosure provides a method for prop adsorption, the method comprising:
  • the deformation information and the mesh data of the first prop mesh control the first prop mesh to perform deformation migration, and obtain Grid data of the second prop grid; wherein, the first prop grid is adsorbed to the base object grid;
  • the target object to which the second prop corresponding to the second prop grid is adsorbed is displayed;
  • the target object mesh has a corresponding relationship.
  • the method further includes:
  • the mesh data of the first prop mesh, and the mesh data of the base object mesh determine the corresponding relationship between the triangular faces of the first prop mesh and the base object mesh .
  • control initial prop grid is deformed relative to the base object grid to obtain grid data of the first prop grid, including:
  • At least two designated points on the initial prop grid are fixed to the base object grid as deformation anchor points of the initial prop grid; the deformation anchor points are used in the process of deforming the initial prop grid is fixed to the initial prop grid;
  • the initial prop mesh is controlled to be deformed relative to the base object mesh, and based on the mesh data of the base object mesh and the deformed mesh data of the initial prop mesh , determine the grid data of the first prop grid; the first prop corresponding to the first prop grid is formed based on the initial prop corresponding to the initial prop grid.
  • the initial prop mesh is controlled to deform relative to the base object mesh based on the principle of energy minimization, and based on the mesh data of the base object mesh and the deformed mesh
  • the grid data of the initial prop grid determine the grid data of the first prop grid, including:
  • the grid data of the target prop grid is processed according to the rotation matrix to obtain the grid data of the deformed prop grid;
  • the target prop grid is updated using the deformed prop grid, and the execution based on the principle of energy minimization, the grid data of the target prop grid and all The step of determining the rotation matrix corresponding to the vertices of the triangular faces on the target prop mesh, the mesh data of the base object mesh, until it is determined that the preset iterative condition is currently met, the transformation of the deformed prop mesh
  • the mesh data is determined as mesh data of the first prop mesh.
  • the first prop mesh includes a plurality of components, and the control is controlled based on the corresponding relationship between the triangular faces of the first prop mesh and the base object mesh and the deformation information.
  • Deformation migration is performed on the first prop grid to obtain the grid data of the second prop grid, including:
  • the control Deformation migration is performed on the first prop grid to obtain the grid data of the second prop grid, including:
  • the first prop mesh is controlled based on the corresponding relationship between the first prop mesh and the triangular surface of the base object mesh, the deformation information and the mesh data of the first prop mesh
  • the grid is deformed and migrated to obtain the grid data of the second prop grid.
  • the present disclosure provides a prop adsorption device, the device comprising:
  • the acquisition module is used to acquire the grid data of the target object grid and the grid data of the base object grid;
  • a first determining module configured to determine the deformation information of the target object grid relative to the basic object grid based on the grid data of the base object grid and the grid data of the target object grid;
  • a first control module configured to control the first prop based on the corresponding relationship between the first prop mesh and the triangular surface of the base object mesh, the deformation information and the mesh data of the first prop mesh
  • the grid performs deformation migration to obtain grid data of the second prop grid; wherein, the first prop grid is adsorbed to the base object grid;
  • a display module configured to display the target object to which the second prop corresponding to the second prop grid is adsorbed based on the grid data of the second prop grid and the grid data of the target object grid; the The target object has a corresponding relationship with the target object grid.
  • the device further includes:
  • a second control module configured to control the initial prop grid to deform relative to the base object grid to obtain grid data of the first prop grid
  • a second determination module configured to determine the first prop mesh and the base object mesh based on the energy minimization principle, the mesh data of the first prop mesh and the mesh data of the base object mesh The correspondence between the triangular faces of the lattice.
  • the present disclosure provides a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the instructions are executed on a terminal device, the terminal device is made to implement the above method.
  • the present disclosure provides a device comprising: a memory, a processor, and a computer program stored on the memory and executable on the processor, when the processor executes the computer program, Implement the above method.
  • the embodiment of the present disclosure provides a method for prop adsorption.
  • the grid data of the target object grid and the grid data of the base object grid are obtained, and then, based on the grid data of the base object grid and the The mesh data of the target object mesh determines the deformation information of the target object mesh relative to the base object mesh.
  • the first prop mesh is controlled to perform deformation migration, to obtain Grid data of the second prop grid; wherein, the first prop grid is adsorbed to the base object grid.
  • the target object to which the second prop corresponding to the second prop grid is adsorbed is displayed.
  • the embodiments of the present disclosure are based on the determined deformation information of the target object mesh relative to the base object mesh, the correspondence between the first prop mesh and the base object mesh, and the first prop mesh adsorbed to the base object mesh.
  • the grid data of the grid by controlling the deformation and migration of the first prop mesh, can obtain the second prop mesh that is adsorbed to the target object grid, which realizes the function of prop adsorption in a more fine-grained manner and improves the effect of prop adsorption. .
  • FIG. 1 is a flowchart of a method for prop adsorption according to an embodiment of the present disclosure
  • FIG. 2 is a flowchart of a method for determining grid data of a first prop grid according to an embodiment of the present disclosure
  • FIG. 3 is a flowchart of a method for grid data of a first prop grid according to an embodiment of the present disclosure
  • FIG. 4 is an effect diagram of a second prop that is adsorbed on the face of a target user according to an embodiment of the present disclosure
  • FIG. 5 is a schematic structural diagram of a prop adsorption device according to an embodiment of the present disclosure.
  • FIG. 6 is a schematic structural diagram of a prop adsorption device according to an embodiment of the present disclosure.
  • the present disclosure provides a method for prop adsorption. Specifically, first, the deformation information of the target object grid relative to the base object grid is determined, and the first prop The corresponding relationship between the triangle surface of the mesh and the base object mesh, and the triangle surface data of the first prop mesh adsorbed to the base object mesh, and then, based on the above deformation information, the triangle surface correspondence and the first prop mesh , control the first prop mesh to perform deformation migration, and obtain the mesh data of the second prop mesh. Finally, based on the mesh data of the second prop mesh and the mesh data of the target object mesh, display the adsorption The target object with the second prop implements the prop adsorption function.
  • This embodiment of the present disclosure first determines the first prop mesh that is adsorbed to the base object mesh, and then based on the relationship between the first prop mesh and the base object mesh, and the relationship between the base object mesh and the target object mesh, The first prop mesh is deformed and migrated to obtain a second prop mesh that is adsorbed to the target object mesh. It can be seen that the embodiment of the present disclosure implements the prop adsorption function in a finer-grained manner by means of the deformation and migration of the prop grid, and improves the effect of prop adsorption.
  • an embodiment of the present disclosure provides a method for prop adsorption.
  • a flowchart of a method for prop adsorption provided by an embodiment of the present disclosure includes:
  • the base object is a relatively standard object
  • the target object may be an object generated based on the target user.
  • the base object and the target object can have the same or similar characteristics.
  • the base object may be a base face
  • the target object may be a target user's face.
  • the base object and the target object may also be other body parts or other types of objects, which are not limited in this embodiment of the present disclosure.
  • the target object grid refers to a 3D solid grid of the target object, also called a 3D grid, and similarly, the base object grid refers to the 3D grid of the base object.
  • the mesh data may include triangular face indices and vertex data.
  • the points located on the 3D mesh are called vertices
  • the triangle formed by three adjacent vertices on the 3D mesh is called a triangle surface
  • each vertex on the 3D mesh has an index respectively, and the three triangles that form the same triangle surface
  • the index of the vertex is used to compose the triangle index corresponding to the triangle.
  • the vertex data includes the correspondence between vertex indices and vertex coordinates.
  • S102 Determine deformation information of the target object grid relative to the basic object grid based on the grid data of the base object grid and the grid data of the target object grid.
  • the deformation information of the target object grid relative to the base object grid can be determined.
  • the difference data between the coordinates of the vertices corresponding to the triangular faces with the same triangular face index in the mesh data of the target object mesh and the mesh data of the base object mesh can be determined as the target object mesh.
  • Deformation information relative to the base object mesh is used to indicate how the vertex coordinates of each triangular face in the base object grid are changed to obtain the vertex coordinates of the triangular faces with the same index in the target object grid.
  • S103 Control the first prop mesh to perform deformation migration based on the corresponding relationship between the first prop mesh and the triangular surface of the base object mesh, the deformation information, and the mesh data of the first prop mesh , to obtain the grid data of the second prop grid; wherein, the first prop grid is adsorbed to the base object grid.
  • the first prop mesh is adsorbed to the base object mesh, and based on the mesh data of the first prop mesh and the mesh data of the base object mesh, the first prop mesh and the base object mesh can be obtained
  • the triangular correspondence of refers to the correspondence relation between triangular faces with the same index, and is used to represent the difference data between the vertex coordinates corresponding to the triangular faces with the same index.
  • the correspondence between the triangular faces of the first prop mesh and the base object mesh may be the difference data between the vertex coordinates corresponding to the triangular faces with the same index in the first prop mesh and the base object mesh.
  • the deformation information of the target object mesh relative to the base object mesh may be difference data between the vertex coordinates corresponding to the triangular faces with the same index in the target object mesh and the base object mesh. Then it can be based on the difference data between the vertex coordinates corresponding to the triangle faces with the same index in the first prop mesh and the base object mesh, and the correspondence between the target object mesh and the triangle faces with the same index in the base object mesh.
  • the difference data between the vertex coordinates of the first prop mesh and the vertex coordinates corresponding to the triangular faces with the same index in the second prop mesh that can be adsorbed to the target object mesh are calculated.
  • the difference data between the vertex coordinates corresponding to the triangular faces with the same index in the first prop mesh and the second prop mesh that can be adsorbed to the target object mesh can represent the vertex coordinates of each triangular face in the base object mesh After how to change, the vertex coordinates of the triangular faces with the same index in the target object mesh can be obtained.
  • the first prop mesh can be controlled to perform deformation migration.
  • the grid data of the first prop network after the deformation migration is acquired, and the grid data of the first prop network after the deformation migration is used as the grid data of the second prop grid.
  • S104 Based on the grid data of the second prop grid and the grid data of the target object grid, display the target object to which the second prop corresponding to the second prop grid is adsorbed; the target object and The target object grids have a corresponding relationship.
  • the second prop and the target object grid corresponding to the second prop grid are respectively rendered based on the grid data of the second prop grid and the grid data of the target object grid
  • the target object to which the second prop corresponding to the second prop network is adsorbed is obtained.
  • Display the second prop and the target object with the second prop attached Specifically, for example, the second prop and the target object can be displayed on the interface, and a display effect of fitting the second prop to the target object can be shown to the user.
  • the deformation information of the target object mesh relative to the base object mesh, the corresponding relationship between the triangle surface of the first prop mesh and the base object mesh, and the first prop are determined.
  • the grid data of the grid and then, based on the above-mentioned deformation information, the corresponding relationship between the triangular surfaces and the grid data of the first prop grid, the first prop grid is controlled to perform deformation migration, and the grid data of the second prop grid is obtained.
  • the target object adsorbed with the second prop is displayed to realize the prop adsorption function.
  • This embodiment of the present disclosure first determines the first prop mesh that is adsorbed to the base object mesh, and then based on the relationship between the first prop mesh and the base object mesh, and the relationship between the base object mesh and the target object mesh, The first prop mesh is deformed and migrated to obtain a second prop mesh that is adsorbed to the target object mesh. It can be seen that the embodiment of the present disclosure implements the prop adsorption function in a finer-grained manner by means of the deformation and migration of the prop grid, and improves the effect of prop adsorption.
  • the initial prop mesh can be controlled to deform relative to the base object mesh to obtain mesh data of the first prop mesh.
  • a flowchart of a method for determining grid data of a first prop grid provided by an embodiment of the present disclosure, the method includes:
  • S201 Fix at least two designated points on the initial prop grid to the base object grid as deformation anchor points of the initial prop grid.
  • the initial prop mesh is usually a 3D mesh corresponding to a native prop designed by a designer. Before applying the initial prop mesh to the target object mesh, it needs to be deformed into a base object mesh that can be attached to it. After the first prop grid is transformed and migrated, a second prop grid that can be adsorbed to the target object grid is obtained to realize the prop adsorption function.
  • At least two vertices on the initial prop mesh are determined as designated points for fixing on the base object mesh during the deformation process of the initial prop mesh.
  • the specified points on the initial prop mesh are then fixed to the base object mesh as deformation anchors for the initial prop mesh.
  • Deform anchor points are used to anchor to the initial object mesh during the deformation of the initial prop mesh.
  • the projection point coordinates of each designated point in the initial prop grid to the base object grid are sequentially calculated along the z-axis direction as the deformation anchor point of the initial prop grid.
  • the specified points on the initial prop mesh are usually the points on the fitting surface of the base face.
  • the specified point may be specified by default or specified based on user input, which is not limited here.
  • the following formula (1) can be used to represent moving the deformation anchor point on the initial prop grid to the vertex at the corresponding position on the first prop grid:
  • v' i is the vertex corresponding to the i-th deformation anchor point of the initial prop mesh in the first prop mesh
  • C is the deformation anchor point on the initial prop mesh
  • Ci is the i-th deformation anchor point
  • S202 Control the initial prop mesh to deform relative to the base object mesh based on the principle of energy minimization, and based on the mesh data of the base object mesh and the deformed mesh of the initial prop mesh grid data, which determines the grid data of the first prop grid.
  • Mesh data of the first prop mesh is determined based on mesh data of the base object mesh and mesh data of the deformed initial prop mesh.
  • the first prop corresponding to the first prop grid is obtained by deforming the initial prop corresponding to the initial prop grid.
  • the mesh data of the first prop mesh is further determined. Referring to FIG. 3 , a flowchart of a method for grid data of a first prop grid provided by an embodiment of the present disclosure, the method includes:
  • the determination of the rotation matrix corresponding to the vertices of the triangular faces on the target prop mesh is based on the principle of energy minimization, so as to ensure that the edges formed by the vertices of the triangular faces and their adjacent points deform on the target prop mesh. Changes are minimal in the process.
  • the following formula (2) can be used to calculate the rotation matrix corresponding to the vertices of the triangular face on the target prop mesh based on the principle of energy minimization:
  • point j belongs to the adjacent point set N(i) of point i
  • p represents the vertex of the initial prop mesh
  • p' represents the vertex corresponding to p on the first prop mesh in the current iteration state
  • w ij represents point i and The weight coefficient of the edge formed by the point j.
  • e ij represents the edge formed by vertex i and adjacent point j on the initial prop mesh, namely p j -p i ; correspondingly, e' ij represents the edge corresponding to e ij on the first prop mesh in the current iteration state Edge, w ij represents the weight coefficient of edge e ij , point j belongs to the adjacent point set N(i) of point i;
  • Formula (4) can be simplified as the product of three matrices, where P i is a matrix of size 3XN(i) composed of all adjacent edges of point i, and correspondingly, P i ' is the value of point i in the current iteration state.
  • a matrix composed of all adjacent edges, D i is a diagonal matrix whose diagonal elements are the weights of all adjacent edges of point i.
  • the rotation matrix R i of the point i is the product of the two unitary matrices U i and V i obtained by the singular value decomposition of the Si matrix, see formula (3).
  • S303 Based on the principle of energy minimization, process the grid data of the target prop grid according to the rotation matrix to obtain the grid data of the deformed prop grid.
  • the mesh of the deformed prop mesh obtained by deforming the target prop mesh based on the rotation matrix R i is calculated. grid data.
  • the target prop grid when the target prop grid is deformed according to the rotation matrix to the deformed prop grid, it is also realized based on the principle of energy minimization. Specifically, the following formula (5) can be used to express the deformation energy in the deformation process:
  • the formula (6) that is satisfied when it is minimized can be obtained by derivation of the deformation energy formula (5):
  • the preset iteration condition may include reaching a preset number of iterations, and/or the deformation energy is lower than a preset threshold.
  • the deformation iteration of the target prop mesh can be ended, and this The deformed prop grid obtained by the round is determined as the first prop grid, and the grid data of the first prop grid is obtained; otherwise, S302 and subsequent steps will continue to be performed, so as to continue to perform the next round of deformation on the deformed prop grid. Deformation iterations.
  • the embodiment of the present disclosure further determines the corresponding relationship between the triangular faces of the first prop mesh and the base object mesh. Specifically, in a possible implementation manner, the triangle between the first prop mesh and the base object mesh is determined based on the principle of energy minimization, the mesh data of the first prop mesh, and the mesh data of the base object mesh. face-to-face relationship.
  • the first prop mesh is transformed into a base object mesh, so as to obtain a triangular surface correspondence between the first prop mesh and the base object mesh.
  • the corresponding relationship of the triangular faces can be expressed as a set M of triangular faces:
  • M ⁇ (s 1 , t 1 ), (s 2 , t 2 ), ..., (s
  • s i represents the triangular surface with index i in the base object grid
  • t i represents the triangular surface with index i in the first prop grid
  • represents the number of corresponding triangular surfaces
  • deformation energy in the principle of energy minimization includes the following formula:
  • the first aspect is the control of the deformation smoothness, which is used to constrain the adjacent triangular faces in the deformation of the first prop mesh to have equal transformations, as shown in the following formula (8):
  • v 1 , v 2 and v 3 respectively represent the three vertices that form the same triangular face, and the v1 point passes a unit distance along the normal line of the triangular face to obtain the point v 4 , which represents the transformation of the triangular face in the vertical direction, and Corresponding to the deformed vertices of v 1 , v 2 and v 3 respectively.
  • the second aspect is the shape-preserving constraint, which is used to prevent the first prop mesh from being over-deformed in order to satisfy the deformation smoothness in a certain vertex i, as shown in the following formula:
  • T i denotes the transformation of the triangular face with index i
  • denotes the number of triangular faces of the first prop mesh.
  • the third aspect is the control of the nearest available points, wherein the available vertices refer to the vertices that satisfy the angle between the triangular face and the normal direction of less than 90 degrees, and the third aspect is used to make the vertices of the first prop mesh close to the base object mesh
  • the nearest available vertices on see the following formula:
  • C i represents the nearest available vertex of the i-th vertex V i on the base object mesh on the first prop mesh.
  • the fourth aspect is the control of component association items.
  • the first prop mesh is composed of multiple components, the relative relationship between the components before and after deformation is maintained, so that components without user intervention can be deformed normally, as shown in the following formula :
  • F ti represents the transformation of the triangular face with index i in the first prop mesh
  • n t is the normal vector of the triangular face t and h is the connecting triangular face and vector of centroids.
  • the deformation also includes a mandatory constraint part defined by the user, that is, the selected vertex Xmk on the first prop mesh is forced to be equal to the vertex mk on the base object mesh, and k is selected by the user.
  • the index of the point set is defined by the user, that is, the selected vertex Xmk on the first prop mesh is forced to be equal to the vertex mk on the base object mesh, and k is selected by the user.
  • the embodiment of the present disclosure further provides a method for determining the relative relationship between adjacent components in multiple components, so that the deformation migration is performed on the first prop mesh.
  • it can be based on the corresponding relationship between the triangular surface of the first prop mesh and the base object mesh, the deformation information of the target object mesh relative to the base object mesh, and the relative relationship between adjacent components in multiple components. Perform deformation migration to ensure that the relative relationship between adjacent components remains unchanged.
  • an embodiment of the present disclosure provides a method for controlling the The first prop grid performs deformation migration to obtain the grid data of the second prop grid, including:
  • the shortest vertex distance d a, b between any pair of components a, b is first calculated, and expressed by the following formula (16):
  • edge(a,b) represents the edge formed by the connection of vertices a and b.
  • vertex a For vertex a, if there is a vertex b that is not connected to it in K and satisfies the following equations (18) and (19), then it is connected to the vertex b in K;
  • ⁇ a is the preset threshold, generally 1.5 times the maximum side length in the component corresponding to point a, and ⁇ b is defined similarly;
  • a set of point pairs Pab is established for any components a and b.
  • the set Pab is empty, and when a, b are connected, put the point pair ⁇ v a k , v b l ⁇ satisfying the following formula (20) into the set Pab, and get Relative relationship between adjacent components:
  • the energy minimization is to control the first prop mesh to perform deformation migration based on the corresponding relationship between the first prop mesh and the triangular surface of the base object mesh, the deformation information and the mesh data of the first prop mesh , and finally get the mesh data of the second prop mesh.
  • the definition of deformation energy also includes four parts:
  • w 1 -w 4 are the weight coefficients in E 1 -E 4 respectively.
  • the first item E 1 is used to measure the deformation difference between the target object mesh and the first prop mesh relative to the base object mesh. Obviously, when the difference is smaller, the deformation of the first prop mesh relative to the base object mesh The more similar the deformation of the target object mesh relative to the base object mesh. Specifically, the following formula (22) is used to express:
  • M is the set of triangular faces determined in the above embodiment and used to represent the corresponding relationship between the first prop mesh and the triangular faces of the base object mesh
  • F is the transformation of the corresponding triangular faces in M.
  • the second item E 2 is used to represent the triangles in the first prop mesh that do not form a corresponding relationship with the triangles in the base object mesh. This constraint makes the transformation of these triangles converge with the transformation of the adjacent triangles, See the formula below:
  • H represents the set of triangular faces in the first prop mesh that do not form a corresponding relationship with the triangular faces in the base object mesh.
  • the third item E 3 is used to maintain the spatial relationship between the components in the first prop grid. Specifically, it is realized by constraining the length change before and after the deformation of each point pair in the set Pab obtained in the above embodiment, as shown in the following formula (24 ):
  • E 4 is used to protect the surface details of the assembly consisting entirely of triangular faces in H, see the following formula:
  • TH represents the set of triangular faces without corresponding relationship
  • Ta represents the triangular faces in TH
  • L is the Laplacian operator
  • L Ta represents the Laplacian operator for the triangular faces Ta
  • represents Laplace coordinates, which are calculated as follows:
  • the target object grid in the embodiment of the present disclosure may be the target user's face grid
  • the basic object grid may be the basic face grid.
  • the mesh is deformed and migrated to obtain a second prop mesh that can be adsorbed on the target user's face mesh.
  • FIG. 4 an effect diagram of a second prop attached to a face of a target user provided by an embodiment of the present disclosure.
  • the embodiments of the present disclosure are based on the determined deformation information of the target user's face mesh relative to the basic face mesh, the corresponding relationship between the first prop mesh and the triangular surface of the basic face mesh, and the adsorption on the basic face mesh.
  • the grid data of the first prop grid of the first prop grid can be obtained by controlling the deformation and migration of the first prop grid to obtain the second prop grid adsorbed on the face grid of the target user, which realizes the function of prop adsorption in a more fine-grained manner. , which improves the effect of prop adsorption and enhances the user experience.
  • a schematic structural diagram of a prop adsorption device provided in an embodiment of the present disclosure includes:
  • an acquisition module 501 configured to acquire grid data of the target object grid and grid data of the base object grid;
  • the first determination module 502 is used to determine the deformation information of the target object grid relative to the basic object grid based on the grid data of the base object grid and the grid data of the target object grid;
  • the first control module 503 is configured to control the first prop mesh based on the corresponding relationship between the first prop mesh and the triangular surface of the base object mesh, the deformation information and the mesh data of the first prop mesh
  • the prop grid performs deformation migration to obtain grid data of the second prop grid; wherein, the first prop grid is adsorbed to the base object grid;
  • the display module 504 is configured to display the target object to which the second prop corresponding to the second prop grid is adsorbed based on the grid data of the second prop grid and the grid data of the target object grid;
  • the target object has a corresponding relationship with the target object grid.
  • the device further includes:
  • a second control module configured to control the initial prop grid to deform relative to the base object grid to obtain grid data of the first prop grid
  • a second determination module configured to determine the first prop mesh and the base object mesh based on the energy minimization principle, the mesh data of the first prop mesh and the mesh data of the base object mesh The correspondence between the triangular faces of the lattice.
  • the second control module includes:
  • the fixing submodule is used to fix at least two specified points on the initial prop grid to the base object grid as deformation anchor points of the initial prop grid; the deformation anchor points are used for During the deformation process of the prop grid, it is fixed to the initial prop grid;
  • the first determination submodule is configured to control the initial prop mesh to deform relative to the base object mesh based on the principle of energy minimization, and based on the mesh data of the base object mesh and the deformed
  • the grid data of the initial prop grid determines the grid data of the first prop grid; the first prop corresponding to the first prop grid is based on the initial prop shape corresponding to the initial prop grid.
  • the first determination submodule includes:
  • a second determination submodule configured to determine the initial prop grid as the target prop grid
  • the third determination sub-module is configured to determine, based on the energy minimization principle, the mesh data of the target prop mesh, and the mesh data of the base object mesh, the corresponding vertices of the triangular faces on the target prop mesh. the rotation matrix;
  • a processing sub-module configured to process the grid data of the target prop grid according to the rotation matrix based on the principle of energy minimization to obtain the grid data of the deformed prop grid;
  • the fourth determination sub-module is configured to update the target prop grid with the deformed prop grid when it is determined that the preset iteration condition is not currently met, and continue to trigger the third determination sub-module until it is determined that the current conformity is met In the preset iteration condition, the grid data of the deformed prop grid is determined as the grid data of the first prop grid.
  • the first prop grid includes multiple components, and the first control module is specifically used for:
  • the first control module is specifically used for:
  • the first prop mesh is controlled based on the corresponding relationship between the first prop mesh and the triangular surface of the base object mesh, the deformation information and the mesh data of the first prop mesh
  • the grid is deformed and migrated to obtain the grid data of the second prop grid.
  • the grid data of the target object grid and the grid data of the base object grid are obtained, and then, based on the grid data of the base object grid and the target object
  • the mesh data of the object mesh determines the deformation information of the target object mesh relative to the base object mesh.
  • the first prop mesh is controlled to perform deformation migration, to obtain Grid data of the second prop grid; wherein, the first prop grid is adsorbed to the base object grid.
  • the target object to which the second prop corresponding to the second prop grid is adsorbed is displayed.
  • the embodiments of the present disclosure are based on the determined deformation information of the target object mesh relative to the base object mesh, the correspondence between the first prop mesh and the base object mesh, and the first prop mesh adsorbed to the base object mesh.
  • the grid data of the grid by controlling the deformation and migration of the first prop mesh, can obtain the second prop mesh that is adsorbed to the target object grid, which realizes the function of prop adsorption in a more fine-grained manner and improves the effect of prop adsorption. .
  • embodiments of the present disclosure also provide a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the instructions are executed on a terminal device, the terminal device is made to implement the present invention.
  • the method for prop adsorption described in the embodiments is disclosed.
  • an embodiment of the present disclosure also provides a prop adsorption device, as shown in FIG. 6 , which may include:
  • Processor 601 , memory 602 , input device 603 and output device 604 The number of processors 601 in the device for prop adsorption may be one or more, and one processor is taken as an example in FIG. 6 .
  • the processor 601 , the memory 602 , the input device 603 and the output device 604 may be connected by a bus or in other ways, wherein the connection by a bus is taken as an example in FIG. 6 .
  • the memory 602 can be used to store software programs and modules, and the processor 501 executes various functional applications and data processing of the prop-adsorption device by running the software programs and modules stored in the memory 602 .
  • the memory 602 may mainly include a stored program area and a stored data area, wherein the stored program area may store an operating system, an application program required for at least one function, and the like. Additionally, memory 602 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
  • the input device 603 can be used to receive input numerical or character information, and generate signal input related to user setting and function control of the prop-adsorbing device.
  • the processor 601 loads the executable files corresponding to the processes of one or more application programs into the memory 602 according to the following instructions, and the processor 601 executes the executable files stored in the memory 602 application, so as to realize various functions of the above-mentioned props adsorption device.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Graphics (AREA)
  • Software Systems (AREA)
  • Architecture (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Geometry (AREA)
  • Processing Or Creating Images (AREA)
  • Hooks, Suction Cups, And Attachment By Adhesive Means (AREA)

Abstract

一种道具吸附的方法、装置、设备及存储介质,所述方法包括:获取目标对象网格的网格数据和基础对象网格的网格数据(S101);基于所述基础对象网格的网格数据与目标对象网格的网格数据,确定所述目标对象网格相对于所述基础对象网格的形变信息(S102);基于第一道具网格与所述基础对象网格的三角面对应关系、所述形变信息和所述第一道具网格的网格数据,控制所述第一道具网格进行形变迁移,得到第二道具网格的网格数据(S103);基于所述第二道具网格的网格数据和所述目标对象网格的网格数据,展示吸附有所述第二道具网格对应的第二道具的目标对象(S104)。利用上述方法,可以通过控制吸附于基础对象网格的第一道具网格形变迁移的方式,得到吸附于目标对象网格的第二道具网格,更细粒度的实现道具吸附功能,改善道具吸附的效果。

Description

一种道具吸附的方法、装置、设备及存储介质
本申请要求于2020年10月30日提交中国专利局、申请号为202011193129.0、申请名称为“一种道具吸附的方法、装置、设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本公开涉及数据处理技术领域,尤其涉及一种道具吸附的方法、装置、设备及存储介质。
背景技术
道具吸附是指将特效道具吸附到目标对象上,以形成特效道具贴合目标对象如用户人脸的效果。
目前,道具吸附只能通过顶点跟踪的方式实现。具体的,将特效道具上的一个顶点固定在目标对象上,然后通过比例缩放的方式实现特效道具与目标对象大小一致,从而实现道具吸附功能。
但是,上述道具吸附的实现方式粒度较粗,特效道具贴合目标对象的效果较差。
发明内容
为了解决上述技术问题或者至少部分地解决上述技术问题,本公开提供了一种道具吸附的方法、装置、设备及存储介质,能够更细粒度的实现道具吸附功能,改善道具吸附的效果。
第一方面,本公开提供了一种道具吸附的方法,所述方法包括:
获取目标对象网格的网格数据和基础对象网格的网格数据;
基于所述基础对象网格的网格数据与所述目标对象网格的网格数据,确定所述目标对象网格相对于所述基础对象网格的形变信息;
基于第一道具网格与所述基础对象网格的三角面对应关系、所述形变信息和所述第一道具网格的网格数据,控制所述第一道具网格进行形变迁移,得到第二道具网格的网格数据;其中,所述第一道具网格吸附于所述基础对象网格;
基于所述第二道具网格的网格数据和所述目标对象网格的网格数据,展示吸附有所述第二道具网格对应的第二道具的目标对象;所述目标对象与所述目标对象网格具有对应关系。
一种可选的实施方式中,所述基于所述第一道具网格与所述基础对象网格的三角面对应关系、所述形变信息和所述第一道具网格的网格数据,控制所述第一道具网格相对于所述目标对象网格进行形变迁移之前,还包括:
控制初始道具网格相对于所述基础对象网格进行形变,得到第一道具网格的网格数据;
基于能量最小化原则、所述第一道具网格的网格数据和所述基础对象网格的网格数据, 确定所述第一道具网格与所述基础对象网格的三角面对应关系。
一种可选的实施方式中,所述控制初始道具网格相对于所述基础对象网格进行形变,得到第一道具网格的网格数据,包括:
将初始道具网格上的至少两个指定点固定于所述基础对象网格,作为所述初始道具网格的形变锚点;所述形变锚点用于在所述初始道具网格形变的过程中固定于所述初始道具网格;
基于能量最小化原则,控制所述初始道具网格相对于所述基础对象网格发生形变,并基于所述基础对象网格的网格数据和形变后的所述初始道具网格的网格数据,确定第一道具网格的网格数据;所述第一道具网格对应的第一道具为基于所述初始道具网格对应的初始道具形变得到。
一种可选的实施方式中,所述基于能量最小化原则,控制所述初始道具网格相对于所述基础对象网格发生形变,并基于所述基础对象网格的网格数据和形变后的所述初始道具网格的网格数据,确定第一道具网格的网格数据,包括:
将所述初始道具网格确定为目标道具网格;
基于能量最小化原则、所述目标道具网格的网格数据和所述基础对象网格的网格数据,确定所述目标道具网格上的三角面的顶点对应的旋转矩阵;
基于能量最小化原则,根据所述旋转矩阵对所述目标道具网格的网格数据处理,得到形变后道具网格的网格数据;
在确定当前未符合预设迭代条件时,利用所述形变后道具网格更新所述目标道具网格,并继续执行所述基于能量最小化原则、所述目标道具网格的网格数据和所述基础对象网格的网格数据,确定所述目标道具网格上三角面的顶点对应的旋转矩阵的步骤,直到确定当前符合所述预设迭代条件时,将所述形变后道具网格的网格数据确定为第一道具网格的网格数据。
一种可选的实施方式中,所述第一道具网格包括多个组件,所述基于第一道具网格与所述基础对象网格的三角面对应关系和所述形变信息,控制所述第一道具网格进行形变迁移,得到第二道具网格的网格数据,包括:
基于第一道具网格与所述基础对象网格的三角面对应关系、所述形变信息以及所述多个组件中相邻组件之间的相对关系,控制所述第一道具网格进行形变迁移,得到第二道具网格的网格数据。
一种可选的实施方式中,所述基于第一道具网格与所述基础对象网格的三角面对应关系、所述形变信息和所述第一道具网格的网格数据,控制所述第一道具网格进行形变迁移,得到第二道具网格的网格数据,包括:
根据能量最小化原则,基于第一道具网格与所述基础对象网格的三角面对应关系、所述形变信息和所述第一道具网格的网格数据,控制所述第一道具网格进行形变迁移,得到第二道具网格的网格数据。
第二方面,本公开提供了一种道具吸附的装置,所述装置包括:
获取模块,用于获取目标对象网格的网格数据和基础对象网格的网格数据;
第一确定模块,用于基于所述基础对象网格的网格数据与所述目标对象网格的网格数据,确定所述目标对象网格相对于所述基础对象网格的形变信息;
第一控制模块,用于基于第一道具网格与所述基础对象网格的三角面对应关系、所述形变信息和所述第一道具网格的网格数据,控制所述第一道具网格进行形变迁移,得到第二道具网格的网格数据;其中,所述第一道具网格吸附于所述基础对象网格;
展示模块,用于基于所述第二道具网格的网格数据和所述目标对象网格的网格数据,展示吸附有所述第二道具网格对应的第二道具的目标对象;所述目标对象与所述目标对象网格具有对应关系。
一种可选的实施方式中,所述装置还包括:
第二控制模块,用于控制初始道具网格相对于所述基础对象网格进行形变,得到第一道具网格的网格数据;
第二确定模块,用于基于能量最小化原则、所述第一道具网格的网格数据和所述基础对象网格的网格数据,确定所述第一道具网格与所述基础对象网格的三角面对应关系。
第三方面,本公开提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,当所述指令在终端设备上运行时,使得所述终端设备实现上述的方法。
第四方面,本公开提供了一种设备,包括:存储器,处理器,及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时,实现上述的方法。
本公开实施例提供的技术方案与现有技术相比具有如下优点:
本公开实施例提供了一种道具吸附的方法,首先,获取目标对象网格的网格数据和基础对象网格的网格数据,然后,基于所述基础对象网格的网格数据与所述目标对象网格的网格数据,确定所述目标对象网格相对于所述基础对象网格的形变信息。进而,基于第一道具网格与基础对象网格的三角面对应关系、所述形变信息和所述第一道具网格的网格数据,控制所述第一道具网格进行形变迁移,得到第二道具网格的网格数据;其中,所述第一道具网格吸附于所述基础对象网格。最终,基于第二道具网格的网格数据和所述目标对象网格的网格数据,展示吸附有所述第二道具网格对应的第二道具的目标对象。
本公开实施例基于确定的目标对象网格相对于基础对象网格的形变信息,第一道具网格与基础对象网格的三角面对应关系,以及吸附于基础对象网格的第一道具网格的网格数据,通过控制第一道具网格形变迁移的方式,能够得到吸附于目标对象网格的第二道具网格,更细粒度的实现了道具吸附的功能,改善了道具吸附的效果。
附图说明
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理。
为了更清楚地说明本公开实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,对于本领域普通技术人员而言,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1为本公开实施例提供的一种道具吸附的方法流程图;
图2为本公开实施例提供的一种确定第一道具网格的网格数据的方法流程图;
图3为本公开实施例提供的一种第一道具网格的网格数据的方法流程图;
图4为本公开实施例提供的一种吸附于目标用户人脸的第二道具的效果图;
图5为本公开实施例提供的一种道具吸附的装置结构示意图;
图6为本公开实施例提供的一种道具吸附的设备结构示意图。
具体实施方式
为了能够更清楚地理解本公开的上述目的、特征和优点,下面将对本公开的方案进行进一步描述。需要说明的是,在不冲突的情况下,本公开的实施例及实施例中的特征可以相互组合。
在下面的描述中阐述了很多具体细节以便于充分理解本公开,但本公开还可以采用其他不同于在此描述的方式来实施;显然,说明书中的实施例只是本公开的一部分实施例,而不是全部的实施例。
为了实现更细粒度的道具吸附功能,优化道具吸附的效果,本公开提供了一种道具吸附的方法,具体的,首先,确定目标对象网格相对于基础对象网格的形变信息,第一道具网格与基础对象网格的三角面对应关系,以及吸附于基础对象网格的第一道具网格的三角面数据,然后,基于上述形变信息、三角面对应关系和第一道具网格的三角面数据,控制第一道具网格进行形变迁移,得到第二道具网格的网格数据,最终,基于第二道具网格的网格数据和目标对象网格的网格数据,展示吸附有第二道具的目标对象,实现道具吸附功能。
本公开实施例首先确定吸附于基础对象网格的第一道具网格,然后基于第一道具网格和基础对象网格之间的关系、基础对象网格和目标对象网格之间的关系,将第一道具网格进行形变迁移,得到吸附于目标对象网格的第二道具网格。可见,本公开实施例通过道具网格形变迁移的方式,更细粒度的实现了道具吸附功能,提高了道具吸附的效果。
基于此,本公开实施例提供了一种道具吸附的方法,参考图1,为本公开实施例提供的一种道具吸附的方法流程图,该方法包括:
S101:获取目标对象网格的网格数据和基础对象网格的网格数据。
本公开实施例中,基础对象是较为标准的对象,目标对象可以是基于目标用户生成的对象。基础对象和目标对象可以具有相同或相似特征。例如,基础对象可以为基础人脸,而目标对象可以为目标用户人脸,当然,基础对象和目标对象也可以为其他身体部位,或者其他类型的对象等,本公开实施例对此不作限制。
目标对象网格是指目标对象的3维立体网格,也称为3D网格,同样的,基础对象网格是指基础对象的3D网格。
本公开实施例中,网格数据可以包括三角面索引和顶点数据。其中,位于3D网格上的点称为顶点,3D网格上相邻的三个顶点构成的三角形称为三角面,3D网格上的各个顶点分 别具有索引,构成同一个三角面的三个顶点的索引用于组成该三角面对应的三角面索引。而顶点数据包括顶点索引与顶点坐标的对应关系。
S102:基于所述基础对象网格的网格数据与所述目标对象网格的网格数据,确定所述目标对象网格相对于所述基础对象网格的形变信息。
本公开实施例中,在获取到目标对象网格的网格数据和基础对象网格的网格数据之后,可以确定目标对象网格相对于基础对象网格的形变信息。
实际应用中,可以将目标对象网格的网格数据和基础对象网格的网格数据中,具有相同三角面索引的三角面对应的顶点坐标之间的差异数据,确定为目标对象网格相对于基础对象网格的形变信息。具体的,形变信息用于表示基础对象网格中各个三角面的顶点坐标经过怎样变化能够得到目标对象网格中相同索引的三角面的顶点坐标。
S103:基于第一道具网格与所述基础对象网格的三角面对应关系、所述形变信息和所述第一道具网格的网格数据,控制所述第一道具网格进行形变迁移,得到第二道具网格的网格数据;其中,所述第一道具网格吸附于所述基础对象网格。
本公开实施例中,第一道具网格吸附于基础对象网格,基于第一道具网格的网格数据和基础对象网格的网格数据,能够得到第一道具网格与基础对象网格的三角面对应关系。其中,该三角面对应关系是指具有相同索引的三角面之间的对应关系,用于表示具有相同索引的三角面对应的顶点坐标之间的差异数据。
实际应用中,第一道具网格与基础对象网格的三角面对应关系可以为第一道具网格与基础对象网格中具有相同索引的三角面对应的顶点坐标之间的差异数据。目标对象网格相对于基础对象网格的形变信息可以为目标对象网格与基础对象网格中具有相同索引的三角面对应的顶点坐标之间的差异数据。则可以基于第一道具网格与基础对象网格中具有相同索引的三角面对应的顶点坐标之间的差异数据,以及目标对象网格与基础对象网格中具有相同索引的三角面对应的顶点坐标之间的差异数据,计算第一道具网格与能够吸附于目标对象网格的第二道具网格中具有相同索引的三角面对应的顶点坐标之间的差异数据。第一道具网格与能够吸附于目标对象网格的第二道具网格中具有相同索引的三角面对应的顶点坐标之间的差异数据,能够表示基础对象网格中各个三角面的顶点坐标经过怎样变化能够得到目标对象网格中相同索引的三角面的顶点坐标。进而基于第一道具网格与能够吸附于目标对象网格的第二道具网格中具有相同索引的三角面对应的顶点坐标之间的差异数据,能够控制第一道具网络进行形变迁移。获取形变迁移后的第一道具网络的网格数据,将形变迁移后的第一道具网络的网格数据作为第二道具网格的网格数据。
S104:基于所述第二道具网格的网格数据和所述目标对象网格的网格数据,展示吸附有所述第二道具网格对应的第二道具的目标对象;所述目标对象与所述目标对象网格具有对应关系。
在确定第二道具网格的网格数据之后,基于第二道具网格的网格数据和目标对象网格的网格数据,分别渲染第二道具网格对应的第二道具和目标对象网格对应的目标对象,得到吸附有第二道具网络对应的第二道具的目标对象。展示第二道具和吸附有第二道具的目标对象。具体的,例如可以将第二道具和目标对象显示于界面上,向用户展示一种将第二 道具贴合于目标对象的显示效果。
本公开实施例提供的道具吸附的方法中,首先,确定目标对象网格相对于基础对象网格的形变信息,第一道具网格与基础对象网格的三角面对应关系,以及第一道具网格的网格数据,然后,基于上述形变信息、三角面对应关系和第一道具网格的网格数据,控制第一道具网格进行形变迁移,得到第二道具网格的网格数据,最终,基于第二道具网格的网格数据和目标对象网格的网格数据,展示吸附有第二道具的目标对象,实现道具吸附功能。
本公开实施例首先确定吸附于基础对象网格的第一道具网格,然后基于第一道具网格和基础对象网格之间的关系、基础对象网格和目标对象网格之间的关系,将第一道具网格进行形变迁移,得到吸附于目标对象网格的第二道具网格。可见,本公开实施例通过道具网格形变迁移的方式,更细粒度的实现了道具吸附功能,提高了道具吸附的效果。
本公开实施例中,在确定第一道具网格与基础对象网格的三角面对应关系之前,首先确定能够吸附于基础对象网格的第一道具网格的网格数据。具体的,在一种可能的实现方式中,可以控制初始道具网格相对于基础对象网格进行形变,得到第一道具网格的网格数据。
进一步的,参考图2,为本公开实施例提供的一种确定第一道具网格的网格数据的方法流程图,该方法包括:
S201:将初始道具网格上的至少两个指定点固定于所述基础对象网格,作为所述初始道具网格的形变锚点。
本公开实施例中,初始道具网格通常为设计师设计的原生道具对应的3D网格,在将初始道具网格应用于目标对象网格之前,首先需要将其形变为能够吸附于基础对象网格的第一道具网格,后续将第一道具网格进行形变迁移后,得到能够吸附于目标对象网格的第二道具网格,实现道具吸附功能。
本公开实施例中,在确定初始道具网格后,确定初始道具网格上的至少两个顶点作为指定点,用于在初始道具网格形变的过程中固定于基础对象网格上。然后将初始道具网格上的指定点固定于基础对象网格,作为初始道具网格的形变锚点。形变锚点用于在初始道具网格形变的过程中固定于初始对象网格。
一种可选的实施方式中,在世界坐标系中,沿z轴方向依次计算初始道具网格中各个指定点到基础对象网格上的投影点坐标,作为初始道具网格的形变锚点。
具体的,假设初始道具网格上的指定点之一为顶点P,P点与三角形ABC共面的公式为αA+βB+γZ=P,则首先固定P点的Z轴坐标,然后针对基础对象网格上的各个三角面,分别判断P点是否位于三角面内,即满足α+β+γ=1。在找到P点在其内部的三角面之后,固定P点的XY轴坐标,计算其Z轴坐标z'以满足在三维空间内αA+βB+γZ=P'的公式,最终完成初始道具网格上指定点到基础对象网格上的投影。
实际应用中,假设基础对象网格为基础人脸网格,则初始道具网格上的指定点通常为基础人脸的贴合面上的点。其中,指定点可以为默认指定,也可以为基于用户输入指定,在此不做限制。
一种可选的实施方式中,可以利用如下公式(1)表示将初始道具网格上的形变锚点移动到第一道具网格上对应位置的顶点:
v′ i=C i(i∈C)          (1)
其中,v' i为第一道具网格中与初始道具网格的第i个形变锚点对应的顶点,C为初始道具网格上的形变锚点,Ci为第i个形变锚点。
S202:基于能量最小化原则,控制所述初始道具网格相对于所述基础对象网格发生形变,并基于所述基础对象网格的网格数据和形变后的所述初始道具网格的网格数据,确定第一道具网格的网格数据。
在控制初始道具网络相对于基础对象网格发生形变时,是基于能量最小化原则实现的,以保证初始道具网络相对于基础对象网络发生形变中的改变最小。
基于基础对象网格的网格数据和形变后的初始道具网格的网格数据,确定第一道具网格的网格数据。其中,第一道具网格对应的第一道具则是初始道具网格对应的初始道具形变后得到的。本公开实施例中,在确定第一道具网格上与初始道具网格上的形变锚点对应的顶点之后,进一步的确定第一道具网格的网格数据。参考图3,为而本公开实施例提供的一种第一道具网格的网格数据的方法流程图,该方法包括:
S301:将所述初始道具网格确定为目标道具网格。
S302:基于能量最小化原则、所述目标道具网格的网格数据和所述基础对象网格的网格数据,确定所述目标道具网格上的三角面的顶点对应的旋转矩阵。
本公开实施例中,在确定目标道具网格上的三角面的顶点对应的旋转矩阵,是基于能量最小化原则的,以保证三角面的顶点与其邻接点构成的边在目标道具网格形变的过程中改变最小。
一种可选的实施方式中,可以利用如下公式(2)实现基于能量最小化原则计算目标道具网格上三角面的顶点对应的旋转矩阵:
Figure PCTCN2021116138-appb-000001
其中,点j属于点i的邻接点集N(i),p表示初始道具网格的顶点,p'表示当前迭代状态下第一道具网格上与p对应的顶点,w ij表示点i与点j所构成的边的权重系数。
经推导,最小化上述公式(2)中的能量E(C i,C i')的条件可表示为以下两个公式,即公式(3)和公式(4):
Figure PCTCN2021116138-appb-000002
Figure PCTCN2021116138-appb-000003
其中,e ij表示初始道具网格上的顶点i和邻接点j构成的边,即p j-p i;相应地,e' ij表示当前迭代状态下第一道具网格上与e ij对应的边,w ij表示边e ij的权重系数,点j属于点i的邻接点集N(i);
公式(4)可简化为三个矩阵的乘积,其中,P i为点i的所有邻接边所组成的大小为3XN(i)的矩阵,相应地,P i'为当前迭代状态下点i的所有邻接边组成的矩阵,D i为对角矩阵,其对角元为点i的所有邻接边权重。进而,点i的旋转矩阵R i即为S i矩阵经奇异值分解所得的两个酉矩阵U i与V i的乘积,见公式(3)。
S303:基于能量最小化原则,根据所述旋转矩阵对所述目标道具网格的网格数据处理,得到形变后道具网格的网格数据。
本公开实施例中,在确定目标道具网格上的三角面的顶点对应的旋转矩阵R i之后,计算基于该旋转矩阵R i对目标道具网格进行形变后得到的形变后道具网格的网格数据。
本公开实施例中,在根据旋转矩阵对目标道具网格进行形变得到形变后道具网格时,也是基于能量最小化原则实现的。具体的,可以利用如下公式(5)表示形变过程中的形变能量:
Figure PCTCN2021116138-appb-000004
其中,上述公式(5)中的各个参数可以参照上述公式(2)-(4)进行理解,在此不再重复解释。
本公开实施例中,通过对形变能量公式(5)求导可以得出其最小化时满足的公式(6):
Figure PCTCN2021116138-appb-000005
进而,可以将求解形变后道具网格上的顶点坐标的问题转化为一个稀疏非齐次线性方程组的求解问题,即Lp′=b,具体的实现方式在此不再赘述。
S304:在确定当前未符合预设迭代条件时,利用所述形变后道具网格更新所述目标道具网格,并继续执行S302以及后续步骤。
S305:在确定当前符合所述预设迭代条件时,将所述形变后道具网格的网格数据确定为第一道具网格的网格数据。
本公开实施例中,预设迭代条件可以包括达到预设迭代次数,和/或,形变能量低于预设阈值。
实际应用中,在每轮迭代的过程中,如果确定本轮迭代次数达到预设迭代次数,或者网格的形变能量低于预设阈值,则可以结束对目标道具网格的形变迭代,将本轮得到的形变后道具网格确定为第一道具网格,得到第一道具网格的网格数据;否则,将继续执行S302以及后续步骤,以便继续对形变后道具网格进行下一轮的形变迭代。
基于上述实施例中得到的第一道具网格的网格数据,本公开实施例进一步的确定第一道具网格与基础对象网格的三角面对应关系。具体的,在一种可能的实现方式中,基于能量最小化原则、第一道具网格的网格数据和基础对象网格的网格数据,确定第一道具网格与基础对象网格的三角面对应关系。
实际应用中,基于能量最小化原则,将第一道具网格形变为基础对象网格,从而得到第一道具网格与基础对象网格的三角面对应关系。其中,该三角面对应关系可以表现为一个三角面的集合M:
M={(s 1,t 1),(s 2,t 2),...,(s |M|,t |M|)}
其中,s i表示基础对象网格中索引为i的三角面,t i表示第一道具网格中索引为i的三角面,|M|表示具有对应关系的三角面的个数;
另外,能量最小化原则中对形变能量的定义包括以下公式:
Figure PCTCN2021116138-appb-000006
第一方面是对形变平滑度的控制,用以约束第一道具网格形变中相邻的三角面具有相等的变换,见下式(8):
Figure PCTCN2021116138-appb-000007
其中,|T|表示第一道具网格的三角面数量,T i表示索引为i的三角面的变换,T j类似,adj(i)表示与顶点i邻接的顶点集;公式(8)中的各个参数的计算方式如下所示,其中,v 4为三角面法线方向上定义的一点:
Figure PCTCN2021116138-appb-000008
Figure PCTCN2021116138-appb-000009
Figure PCTCN2021116138-appb-000010
其中,v 1、v 2和v 3分别表示组成同一三角面的三个顶点,v1点沿三角面法线正向过一个单位距离取得点v 4,表示三角面在垂直方向上的变换,
Figure PCTCN2021116138-appb-000011
Figure PCTCN2021116138-appb-000012
分别对应v 1、v 2和v 3形变后的顶点。
第二方面是对保形的约束,用于防止第一道具网格为满足某个顶点i中的形变平滑而过分形变,见下式:
Figure PCTCN2021116138-appb-000013
其中,I表示单位矩阵,T i表示索引为i的三角面的变换,|T|表示第一道具网格的三角面数量。
第三方面是对最近邻可用点的控制,其中,可用顶点是指满足与三角面法向夹角小于90度的顶点,第三方面用于使第一道具网格的顶点接近基础对象网格上的最近邻可用顶点,见下式:
Figure PCTCN2021116138-appb-000014
其中,C i表示基础对象网格上第i个顶点V i在第一道具网格上的最近邻可用顶点。
第四方面是对组件关联项的控制,用于第一道具网格由多组件构成时,保持形变前后各组件之间的相对关系,使其中不含用户干预的组件能够正常形变,见下式:
Figure PCTCN2021116138-appb-000015
其中,F ti表示第一道具网格中索引为i的三角面的变换,
Figure PCTCN2021116138-appb-000016
表示第一道具网格中的组件a和b对应的点对集Pab中某一点对
Figure PCTCN2021116138-appb-000017
的邻接三角面对,并且
Figure PCTCN2021116138-appb-000018
满足下式:
Figure PCTCN2021116138-appb-000019
其中,n t是三角面t的法向量,h是连接三角面
Figure PCTCN2021116138-appb-000020
Figure PCTCN2021116138-appb-000021
的质心的向量。
除上述四个方面的能量项约束外,形变还包括由用户定义的强制约束部分,即第一道具网格上选定的顶点Xmk强制等于基础对象网格上的顶点mk,k为用户选定点集的索引。
基于上述第四方面对组件关联项的控制,本公开实施例还提供了一种多个组件中相邻组件之间的相对关系的确定方式,从而使得在第一道具网格进行形变迁移的过程中,能够基于第一道具网格与所述基础对象网格的三角面对应关系、目标对象网格相对于基础对象网格的形变信息以及多个组件中相邻组件之间的相对关系进行形变迁移,保证相邻组件之间的相对关系不变。
具体的,在第一道具网格包括多个组件时,本公开实施例提供一种基于第一道具网格与所述基础对象网格的三角面对应关系和所述形变信息,控制所述第一道具网格进行形变迁移,得到第二道具网格的网格数据,包括:
基于第一道具网格与所述基础对象网格的三角面对应关系、所述形变信息以及所述多个组件中相邻组件之间的相对关系,控制所述第一道具网格进行形变迁移,得到第二道具网格的网格数据。
本公开实施例中,如果确定第一道具网格具有多个组件,则首先计算任意一对组件a,b之间的最短顶点距离d a,b,利用如下公式(16)表示:
Figure PCTCN2021116138-appb-000022
然后,以各组件为顶点,组件间最短顶点距离为边权重,构建图并建立其最小生成树,记为K;
进而,对K内各个顶点计算该顶点到K内其余各顶点距离中的最大值,记为该顶点的最大距离d a,如下公式(17)所示:
Figure PCTCN2021116138-appb-000023
其中,edge(a,b)表示顶点a,b连接而成的边。
针对顶点a,若存在与其在K内不相连的顶点b满足下式(18)和(19),则与该顶点b在K内连接;
d a,b≤d aa          (18)
d a,b≤d bb           (19)
其中,ε a为预设阈值,一般取1.5倍a点对应组件内的最大边长,ε b定义类似;
依照上述步骤建立表示组件间关系的子图K后,对任意组件a,b建立点对集合Pab。当a,b在K内不相连时,集合Pab为空,而当a,b相连时,将满足下式(20)的点对{v a k,v b l}放入集合Pab中,得到相邻组件之间的相对关系:
Figure PCTCN2021116138-appb-000024
在得到多个组件中相邻组件之间的相对关系后,再基于第一道具网格、基础对象网格的三角面对应关系,形变信息和多个组件中相邻组件之间的相对关系,控制第一道具网格进行形变,得到第二道具网格的网格数据。
在另一种可能的实现方式中,在基于上述方式分别确定第一道具网格与基础对象网格的三角面关系、目标对象网格相对于基础对象网格的形变信息之后,基于能量最小化原则,基于第一道具网格与所述基础对象网格的三角面对应关系、所述形变信息和所述第一道具网格的网格数据,控制所述第一道具网格进行形变迁移,最终得到第二道具网格的网格数据。
首先,基于能量最小化原则,控制第一道具网格进行形变迁移后得到第二道具网格的过程中,形变能量的定义同样包含四个部分:
E=w 1E 1+w 2E 2+w 3E 3+w 4E 4       (21)
其中,w 1-w 4分别为E 1-E 4中的权重系数。
其中,第一项E 1用于衡量目标对象网格与第一道具网格相对于基础对象网格的形变差异,显然,当差异越小时,第一道具网格相对于基础对象网格的形变与目标对象网格相对于基础对象网格的形变越相似。具体的利用以下公式(22)表示:
Figure PCTCN2021116138-appb-000025
其中,M为上述实施例中确定的用于表示第一道具网格与所述基础对象网格的三角面对应关系的三角面的集合,F为M中对应三角面的变换。
另外,第二项E 2用于表示第一道具网格中与基础对象网格中的三角面没有形成对应关系的三角面,该项约束使这些三角面的变换与邻接三角面的变换趋同,见下式:
Figure PCTCN2021116138-appb-000026
其中,H表示第一道具网格中与基础对象网格中的三角面没有形成对应关系的三角面的集合。
另外,第三项E 3用于保持第一道具网格中各组件间的空间关系,具体通过约束上述实施例中所得集合Pab中各点对的形变前后的长度变化实现,见下式(24):
Figure PCTCN2021116138-appb-000027
另外,第四项E 4用于保护全部由H中的三角面组成的组件的表面细节,见下式:
Figure PCTCN2021116138-appb-000028
其中,T H表示没有对应关系的三角面的集合,T a表示T H中的三角面,L为拉普拉斯算子,L Ta表示对三角面T a的拉普拉斯算子,δ表示拉普拉斯坐标,其计算方式如下所示:
Figure PCTCN2021116138-appb-000029
值得注意的是,上述公式(1)-(26)中相同的参数的定义可以彼此参考。
实际应用场景中,本公开实施例中的目标对象网格可以为目标用户人脸网格,基础对象网格可以为基础人脸网格,通过将吸附于基础人脸网格上的第一道具网格进行形变迁移,得到能够吸附于目标用户人脸网格上的第二道具网格。如图4所示,为本公开实施例提供的一种吸附于目标用户人脸的第二道具的效果图。
本公开实施例基于确定的目标用户人脸网格相对于基础人脸网格的形变信息,第一道具网格与基础人脸网格的三角面对应关系,以及吸附于基础人脸网格的第一道具网格的网格数据,通过控制第一道具网格形变迁移的方式,能够得到吸附于目标用户人脸网格的第二道具网格,更细粒度的实现了道具吸附的功能,改善了道具吸附的效果,提升了用户的使用体验。
与上述方法实施例基于同一个发明构思,本公开还提供了一种道具吸附的装置,参考图5,为本公开实施例提供的一种道具吸附的装置结构示意图,所述装置包括:
获取模块501,用于获取目标对象网格的网格数据和基础对象网格的网格数据;
第一确定模块502,用于基于所述基础对象网格的网格数据与所述目标对象网格的网 格数据,确定所述目标对象网格相对于所述基础对象网格的形变信息;
第一控制模块503,用于基于第一道具网格与所述基础对象网格的三角面对应关系、所述形变信息和所述第一道具网格的网格数据,控制所述第一道具网格进行形变迁移,得到第二道具网格的网格数据;其中,所述第一道具网格吸附于所述基础对象网格;
展示模块504,用于基于所述第二道具网格的网格数据和所述目标对象网格的网格数据,展示吸附有所述第二道具网格对应的第二道具的目标对象;所述目标对象与所述目标对象网格具有对应关系。
一种可选的实施方式中,所述装置还包括:
第二控制模块,用于控制初始道具网格相对于所述基础对象网格进行形变,得到第一道具网格的网格数据;
第二确定模块,用于基于能量最小化原则、所述第一道具网格的网格数据和所述基础对象网格的网格数据,确定所述第一道具网格与所述基础对象网格的三角面对应关系。
一种可选的实施方式中,所述第二控制模块,包括:
固定子模块,用于将初始道具网格上的至少两个指定点固定于所述基础对象网格,作为所述初始道具网格的形变锚点;所述形变锚点用于在所述初始道具网格形变的过程中固定于所述初始道具网格;
第一确定子模块,用于基于能量最小化原则,控制所述初始道具网格相对于所述基础对象网格发生形变,并基于所述基础对象网格的网格数据和形变后的所述初始道具网格的网格数据,确定第一道具网格的网格数据;所述第一道具网格对应的第一道具为基于所述初始道具网格对应的初始道具形变得到。
一种可选的实施方式中,所述第一确定子模块,包括:
第二确定子模块,用于将所述初始道具网格确定为目标道具网格;
第三确定子模块,用于基于能量最小化原则、所述目标道具网格的网格数据和所述基础对象网格的网格数据,确定所述目标道具网格上的三角面的顶点对应的旋转矩阵;
处理子模块,用于基于能量最小化原则,根据所述旋转矩阵对所述目标道具网格的网格数据处理,得到形变后道具网格的网格数据;
第四确定子模块,用于在确定当前未符合预设迭代条件时,利用所述形变后道具网格更新所述目标道具网格,并继续触发所述第三确定子模块,直到确定当前符合所述预设迭代条件时,将所述形变后道具网格的网格数据确定为第一道具网格的网格数据。
一种可选的实施方式中,所述第一道具网格包括多个组件,所述第一控制模块,具体用于:
基于第一道具网格与所述基础对象网格的三角面对应关系、所述形变信息以及所述多个组件中相邻组件之间的相对关系,控制所述第一道具网格进行形变迁移,得到第二道具网格的网格数据。
一种可选的实施方式中,所述第一控制模块,具体用于:
根据能量最小化原则,基于第一道具网格与所述基础对象网格的三角面对应关系、所述形变信息和所述第一道具网格的网格数据,控制所述第一道具网格进行形变迁移,得到 第二道具网格的网格数据。
本公开实施例提供的道具吸附的装置中,首先,获取目标对象网格的网格数据和基础对象网格的网格数据,然后,基于所述基础对象网格的网格数据与所述目标对象网格的网格数据,确定所述目标对象网格相对于所述基础对象网格的形变信息。进而,基于第一道具网格与基础对象网格的三角面对应关系、所述形变信息和所述第一道具网格的网格数据,控制所述第一道具网格进行形变迁移,得到第二道具网格的网格数据;其中,所述第一道具网格吸附于所述基础对象网格。最终,基于第二道具网格的网格数据和所述目标对象网格的网格数据,展示吸附有所述第二道具网格对应的第二道具的目标对象。
本公开实施例基于确定的目标对象网格相对于基础对象网格的形变信息,第一道具网格与基础对象网格的三角面对应关系,以及吸附于基础对象网格的第一道具网格的网格数据,通过控制第一道具网格形变迁移的方式,能够得到吸附于目标对象网格的第二道具网格,更细粒度的实现了道具吸附的功能,改善了道具吸附的效果。
除了上述方法和装置以外,本公开实施例还提供了一种计算机可读存储介质,计算机可读存储介质中存储有指令,当所述指令在终端设备上运行时,使得所述终端设备实现本公开实施例所述的道具吸附的方法。
另外,本公开实施例还提供了一种道具吸附的设备,参见图6所示,可以包括:
处理器601、存储器602、输入装置603和输出装置604。道具吸附的设备中的处理器601的数量可以一个或多个,图6中以一个处理器为例。在本公开的一些实施例中,处理器601、存储器602、输入装置603和输出装置604可通过总线或其它方式连接,其中,图6中以通过总线连接为例。
存储器602可用于存储软件程序以及模块,处理器501通过运行存储在存储器602的软件程序以及模块,从而执行道具吸附的设备的各种功能应用以及数据处理。存储器602可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序等。此外,存储器602可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。输入装置603可用于接收输入的数字或字符信息,以及产生与道具吸附的设备的用户设置以及功能控制有关的信号输入。
具体在本实施例中,处理器601会按照如下的指令,将一个或一个以上的应用程序的进程对应的可执行文件加载到存储器602中,并由处理器601来运行存储在存储器602中的应用程序,从而实现上述道具吸附的设备的各种功能。
需要说明的是,在本文中,诸如“第一”和“第二”等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物 品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
以上所述仅是本公开的具体实施方式,使本领域技术人员能够理解或实现本公开。对这些实施例的多种修改对本领域的技术人员来说将是显而易见的,本文中所定义的一般原理可以在不脱离本公开的精神或范围的情况下,在其它实施例中实现。因此,本公开将不会被限制于本文所述的这些实施例,而是要符合与本文所公开的原理和新颖特点相一致的最宽的范围。

Claims (10)

  1. 一种道具吸附的方法,其特征在于,所述方法包括:
    获取目标对象网格的网格数据和基础对象网格的网格数据;
    基于所述基础对象网格的网格数据与所述目标对象网格的网格数据,确定所述目标对象网格相对于所述基础对象网格的形变信息;
    基于第一道具网格与所述基础对象网格的三角面对应关系、所述形变信息和所述第一道具网格的网格数据,控制所述第一道具网格进行形变迁移,得到第二道具网格的网格数据;其中,所述第一道具网格吸附于所述基础对象网格;
    基于所述第二道具网格的网格数据和所述目标对象网格的网格数据,展示吸附有所述第二道具网格对应的第二道具的目标对象;所述目标对象与所述目标对象网格具有对应关系。
  2. 根据权利要求1所述的方法,其特征在于,所述基于所述第一道具网格与所述基础对象网格的三角面对应关系、所述形变信息和所述第一道具网格的网格数据,控制所述第一道具网格相对于所述目标对象网格进行形变迁移之前,还包括:
    控制初始道具网格相对于所述基础对象网格进行形变,得到第一道具网格的网格数据;
    基于能量最小化原则、所述第一道具网格的网格数据和所述基础对象网格的网格数据,确定所述第一道具网格与所述基础对象网格的三角面对应关系。
  3. 根据权利要求2所述的方法,其特征在于,所述控制初始道具网格相对于所述基础对象网格进行形变,得到第一道具网格的网格数据,包括:
    将初始道具网格上的至少两个指定点固定于所述基础对象网格,作为所述初始道具网格的形变锚点;所述形变锚点用于在所述初始道具网格形变的过程中固定于所述初始道具网格;
    基于能量最小化原则,控制所述初始道具网格相对于所述基础对象网格发生形变,并基于所述基础对象网格的网格数据和形变后的所述初始道具网格的网格数据,确定第一道具网格的网格数据;所述第一道具网格对应的第一道具为基于所述初始道具网格对应的初始道具形变得到。
  4. 根据权利要求3所述的方法,其特征在于,所述基于能量最小化原则,控制所述初始道具网格相对于所述基础对象网格发生形变,并基于所述基础对象网格的网格数据和形变后的所述初始道具网格的网格数据,确定第一道具网格的网格数据,包括:
    将所述初始道具网格确定为目标道具网格;
    基于能量最小化原则、所述目标道具网格的网格数据和所述基础对象网格的网格数据,确定所述目标道具网格上的三角面的顶点对应的旋转矩阵;
    基于能量最小化原则,根据所述旋转矩阵对所述目标道具网格的网格数据处理,得到形变后道具网格的网格数据;
    在确定当前未符合预设迭代条件时,利用所述形变后道具网格更新所述目标道具网格,并继续执行所述基于能量最小化原则、所述目标道具网格的网格数据和所述基础对象网格的网格数据,确定所述目标道具网格上三角面的顶点对应的旋转矩阵以及后续的步骤,直 到确定当前符合所述预设迭代条件时,将所述形变后道具网格的网格数据确定为第一道具网格的网格数据。
  5. 根据权利要求1-4任一项所述的方法,其特征在于,所述第一道具网格包括多个组件,所述基于第一道具网格与所述基础对象网格的三角面对应关系和所述形变信息,控制所述第一道具网格进行形变迁移,得到第二道具网格的网格数据,包括:
    基于第一道具网格与所述基础对象网格的三角面对应关系、所述形变信息以及所述多个组件中相邻组件之间的相对关系,控制所述第一道具网格进行形变迁移,得到第二道具网格的网格数据。
  6. 根据权利要求1-4任一项所述的方法,其特征在于,所述基于第一道具网格与所述基础对象网格的三角面对应关系、所述形变信息和所述第一道具网格的网格数据,控制所述第一道具网格进行形变迁移,得到第二道具网格的网格数据,包括:
    根据能量最小化原则,基于第一道具网格与所述基础对象网格的三角面对应关系、所述形变信息和所述第一道具网格的网格数据,控制所述第一道具网格进行形变迁移,得到第二道具网格的网格数据。
  7. 一种道具吸附的装置,其特征在于,所述装置包括:
    获取模块,用于获取目标对象网格的网格数据和基础对象网格的网格数据;
    第一确定模块,用于基于所述基础对象网格的网格数据与所述目标对象网格的网格数据,确定所述目标对象网格相对于所述基础对象网格的形变信息;
    第一控制模块,用于基于第一道具网格与所述基础对象网格的三角面对应关系、所述形变信息和所述第一道具网格的网格数据,控制所述第一道具网格进行形变迁移,得到第二道具网格的网格数据;其中,所述第一道具网格吸附于所述基础对象网格;
    展示模块,用于基于所述第二道具网格的网格数据和所述目标对象网格的网格数据,展示吸附有所述第二道具网格对应的第二道具的目标对象;所述目标对象与所述目标对象网格具有对应关系。
  8. 根据权利要求7所述的装置,其特征在于,所述装置还包括:
    第二控制模块,用于控制初始道具网格相对于所述基础对象网格进行形变,得到第一道具网格的网格数据;
    第二确定模块,用于基于能量最小化原则、所述第一道具网格的网格数据和所述基础对象网格的网格数据,确定所述第一道具网格与所述基础对象网格的三角面对应关系。
  9. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有指令,当所述指令在终端设备上运行时,使得所述终端设备实现如权利要求1-6任一项所述的方法。
  10. 一种设备,其特征在于,包括:存储器,处理器,及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时,实现如权利要求1-6任一项所述的方法。
PCT/CN2021/116138 2020-10-30 2021-09-02 一种道具吸附的方法、装置、设备及存储介质 Ceased WO2022088971A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US18/034,345 US12430864B2 (en) 2020-10-30 2021-09-02 Prop attachment method and apparatus, device, and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011193129.0A CN112530016B (zh) 2020-10-30 2020-10-30 一种道具吸附的方法、装置、设备及存储介质
CN202011193129.0 2020-10-30

Publications (1)

Publication Number Publication Date
WO2022088971A1 true WO2022088971A1 (zh) 2022-05-05

Family

ID=74979302

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/116138 Ceased WO2022088971A1 (zh) 2020-10-30 2021-09-02 一种道具吸附的方法、装置、设备及存储介质

Country Status (3)

Country Link
US (1) US12430864B2 (zh)
CN (1) CN112530016B (zh)
WO (1) WO2022088971A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112530016B (zh) * 2020-10-30 2022-11-11 北京字跳网络技术有限公司 一种道具吸附的方法、装置、设备及存储介质

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130120457A1 (en) * 2010-02-26 2013-05-16 Jovan Popovic Methods and Apparatus for Manipulating Images and Objects Within Images
US20180012407A1 (en) * 2016-07-08 2018-01-11 Microsoft Technology Licensing, Llc Motion Capture and Character Synthesis
CN110288716A (zh) * 2019-06-14 2019-09-27 北京达佳互联信息技术有限公司 图像处理方法、装置、电子设备及存储介质
CN111383308A (zh) * 2018-12-29 2020-07-07 华为技术有限公司 生成动画表情的方法和电子设备
CN111652791A (zh) * 2019-06-26 2020-09-11 广州虎牙科技有限公司 人脸的替换显示、直播方法、装置、电子设备和存储介质
CN111754431A (zh) * 2020-06-17 2020-10-09 北京百度网讯科技有限公司 一种图像区域替换方法、装置、设备及存储介质
CN111768476A (zh) * 2020-07-07 2020-10-13 北京中科深智科技有限公司 一种基于网格变形的表情动画重定向方法及系统
CN112530016A (zh) * 2020-10-30 2021-03-19 北京字跳网络技术有限公司 一种道具吸附的方法、装置、设备及存储介质

Family Cites Families (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE19634615A1 (de) * 1996-08-27 1998-03-05 Faist M Gmbh & Co Kg Schallabsorbierender Bauteil
US20090213138A1 (en) * 2008-02-22 2009-08-27 Pixar Mesh transfer for shape blending
US9401044B1 (en) * 2011-09-26 2016-07-26 The Research Foundation For The State University Of New York Method for conformal visualization
US9185009B2 (en) 2012-06-20 2015-11-10 Google Inc. Status aware media play
US10121279B1 (en) * 2014-07-14 2018-11-06 Ansys, Inc. Systems and methods for generating a mesh
CN104881894B (zh) * 2015-05-26 2017-06-27 浙江大学 三维网格模型序列的渐变方法
CN106484511A (zh) * 2016-09-30 2017-03-08 华南理工大学 一种谱姿态迁移方法
US10600242B2 (en) * 2017-11-10 2020-03-24 Autodesk, Inc. Adaptive mesh non-regularized booleans
CN108829893B (zh) 2018-06-29 2021-01-29 北京百度网讯科技有限公司 确定视频标签的方法、装置、存储介质和终端设备
US20200020173A1 (en) * 2018-07-16 2020-01-16 Zohirul Sharif Methods and systems for constructing an animated 3d facial model from a 2d facial image
CN109360166B (zh) * 2018-09-30 2021-06-22 北京旷视科技有限公司 一种图像处理方法、装置、电子设备和计算机可读介质
CN111353071A (zh) 2018-12-05 2020-06-30 阿里巴巴集团控股有限公司 标签生成方法及装置
CN109859322B (zh) * 2019-01-22 2022-12-06 广西大学 一种基于变形图的谱姿态迁移方法
CN109948454B (zh) * 2019-02-25 2022-11-22 深圳大学 表情数据库的增强方法、训练方法、计算设备及存储介质
CN111325846B (zh) * 2020-02-13 2023-01-20 腾讯科技(深圳)有限公司 表情基确定方法、虚拟形象驱动方法、装置及介质
CN112199526B (zh) 2020-09-30 2023-03-14 抖音视界有限公司 一种多媒体内容发布的方法、装置、电子设备及存储介质

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130120457A1 (en) * 2010-02-26 2013-05-16 Jovan Popovic Methods and Apparatus for Manipulating Images and Objects Within Images
US20180012407A1 (en) * 2016-07-08 2018-01-11 Microsoft Technology Licensing, Llc Motion Capture and Character Synthesis
CN111383308A (zh) * 2018-12-29 2020-07-07 华为技术有限公司 生成动画表情的方法和电子设备
CN110288716A (zh) * 2019-06-14 2019-09-27 北京达佳互联信息技术有限公司 图像处理方法、装置、电子设备及存储介质
CN111652791A (zh) * 2019-06-26 2020-09-11 广州虎牙科技有限公司 人脸的替换显示、直播方法、装置、电子设备和存储介质
CN111754431A (zh) * 2020-06-17 2020-10-09 北京百度网讯科技有限公司 一种图像区域替换方法、装置、设备及存储介质
CN111768476A (zh) * 2020-07-07 2020-10-13 北京中科深智科技有限公司 一种基于网格变形的表情动画重定向方法及系统
CN112530016A (zh) * 2020-10-30 2021-03-19 北京字跳网络技术有限公司 一种道具吸附的方法、装置、设备及存储介质

Also Published As

Publication number Publication date
US20230377297A1 (en) 2023-11-23
CN112530016B (zh) 2022-11-11
US12430864B2 (en) 2025-09-30
CN112530016A (zh) 2021-03-19

Similar Documents

Publication Publication Date Title
US11450078B2 (en) Generating height maps from normal maps based on virtual boundaries
JP7546151B2 (ja) 動画移行方法及び装置、機器、記憶媒体並びにコンピュータプログラム
WO2024169159A1 (zh) 一种基于投影的模型表面样条线生成方法
US7236170B2 (en) Wrap deformation using subdivision surfaces
US20210299962A1 (en) Systems, methods, and media for controlling support structures and build orientation in manufacturing
US9330466B2 (en) Methods and apparatus for 3D camera positioning using a 2D vanishing point grid
US11100707B2 (en) Computer graphics method for terrain rendering
CN113327315A (zh) 多层次细节模型生成方法和装置
WO2014117559A1 (en) 3d-rendering method and device for logical window
WO2018205493A1 (zh) 图形绘制方法、装置及设备
CN115127565A (zh) 高精地图数据生成方法、装置、电子设备及存储介质
US20130181989A1 (en) Efficiently Reconstructing Three-Dimensional Structure and Camera Parameters from Images
CN115129291A (zh) 一种三维倾斜摄影测量模型可视化优化方法、装置和设备
CN114979592A (zh) 图像曲面几何校正方法、装置、电子设备及存储介质
WO2022088971A1 (zh) 一种道具吸附的方法、装置、设备及存储介质
US20260051126A1 (en) Editing three-dimensional models utilizing implicit function handles
US20260065612A1 (en) Responsive Video Canvas Generation
CN111191395B (zh) 一种嵌套模型建模方法及设备
CN110310353A (zh) 一种bim模型数据的优化方法及系统
US9292968B2 (en) Mapping processing method and device
CN111260547B (zh) 用于呈现大脑图像的方法、装置和计算机可读存储介质
JP4340397B2 (ja) 三角形メッシュ簡単化装置およびプログラム
CN111968209A (zh) 一种模型的渲染方法、装置、设备及存储介质
US10930073B1 (en) Multi-resolution surface clipping with asynchronous incremental on-demand marking of spatial index nodes
CN115761122B (zh) 三维辅助尺的实现方法、装置、设备和介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21884702

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21884702

Country of ref document: EP

Kind code of ref document: A1

WWG Wipo information: grant in national office

Ref document number: 18034345

Country of ref document: US