WO2022143179A1 - Virtual character model creation method and apparatus, electronic device, and storage medium - Google Patents

Virtual character model creation method and apparatus, electronic device, and storage medium Download PDF

Info

Publication number
WO2022143179A1
WO2022143179A1 PCT/CN2021/138417 CN2021138417W WO2022143179A1 WO 2022143179 A1 WO2022143179 A1 WO 2022143179A1 CN 2021138417 W CN2021138417 W CN 2021138417W WO 2022143179 A1 WO2022143179 A1 WO 2022143179A1
Authority
WO
WIPO (PCT)
Prior art keywords
model
skin
created
character model
template
Prior art date
Application number
PCT/CN2021/138417
Other languages
French (fr)
Chinese (zh)
Inventor
林炳坤
黄镇
冯哲
柴金祥
Original Assignee
魔珐(上海)信息科技有限公司
上海墨舞科技有限公司
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 魔珐(上海)信息科技有限公司, 上海墨舞科技有限公司 filed Critical 魔珐(上海)信息科技有限公司
Publication of WO2022143179A1 publication Critical patent/WO2022143179A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T13/00Animation
    • G06T13/203D [Three Dimensional] animation
    • G06T13/403D [Three Dimensional] animation of characters, e.g. humans, animals or virtual beings

Definitions

  • the present disclosure relates to the field of three-dimensional animation, and in particular, to a method, device, electronic device and storage medium for creating a virtual character model.
  • Character rigging is a technique used in 3D animation and refers to the process of creating the bone structure of a character model. Driving the model through bone driving cannot express the effect of real-world biological bones driving muscle and skin, so in skeletal animation, it is necessary to modify the effect. Through digital skeleton movement and the modification of the skin surface, the character model can simulate the effect of the real world biological skeleton driving the muscle skin.
  • the present disclosure proposes a method, apparatus, electronic device and storage medium for creating a virtual character model.
  • a method for creating a virtual character model comprising:
  • the character model to be created at least includes a skin mesh
  • a template model is determined, and the template model includes a skin mesh, a bone matched with the skin mesh, a skin weight corresponding to the skin mesh, and each joint point. modification;
  • a character model is created according to the skin mesh, bones, skin weights and modifications of the character model to be created.
  • the method further includes:
  • the topology of the skin mesh of the character model to be created is inconsistent with the topology of the skin mesh of the template model, determine that the topology of the skin mesh of the template model is that of the character model to be created. the topology of the skin mesh;
  • the shape of the skin mesh of the template model is modified according to the shape of the skin mesh of the character model to be created.
  • determining the bones and skin weights of the character model to be created according to the skin meshes, bones, and skin weights of the template model including:
  • the bones of the character model to be created are determined according to the bone elongation ratio and the bone rotation angle and the bones of the template model.
  • the displacement compensation of the vertices relative to the vertices of the skin mesh of the template model including:
  • the joint point coordinates of the template model after bone stretching and rotation obtained according to the bone elongation ratio and the bone rotation angle are obtained according to the bone elongation ratio, the bone rotation angle, and the displacement compensation.
  • the joint point coordinates obtained by weighting the skin mesh vertex coordinates around the joint points of the template model after the bone stretching and rotation are the same;
  • the skin mesh vertex coordinates of the template model are the same as the skin mesh vertex coordinates of the character model to be created;
  • the coordinates of the skin mesh vertices of the template model are obtained according to the stretch ratio of the bones, the rotation angle of the bones and the displacement compensation.
  • determining the bones of the character model to be created according to the bone elongation ratio and the bone rotation angle and the bones of the template model including:
  • the degree of coincidence between the shape of the skin mesh of the modified template model and the shape of the skin mesh of the character model to be created is greater than a predetermined threshold, nest the bones of the deformed template model into the to-be-created character model.
  • the bones of the character model to be created are determined.
  • determining the modification of the character model to be created according to the modification of the template model including:
  • the corresponding second edge vector matrix, the first edge vector matrix and the second edge vector matrix are determined according to the edge vector and the surface normal of the corresponding grid unit.
  • the second edge vector matrix corresponding to each grid cell in the skin grid of including:
  • the flip transformation matrix of each grid unit in the skin grid of the character model to be created is based on the first side vector matrix and the first edge vector matrix of each grid unit in the skin grid of the character model to be created.
  • the second side vector matrix is obtained, and the flip transformation matrix of each grid unit in the skin grid of the template model is based on the first side vector matrix and the second side vector of each grid unit in the skin grid of the template model. matrix is obtained.
  • the second edge vector matrix corresponding to each grid cell in the skin grid of including:
  • the flip transformation matrix of the character model to be created is obtained according to the first edge vector matrix and the second edge vector matrix of each grid unit in the skin mesh of the character model to be created.
  • the skin weight of the character model to be created is determined according to the skin weight of the template model.
  • an apparatus for creating a virtual character model comprising:
  • a first character model determination module configured to determine a character model to be created, where the character model to be created at least includes a skin mesh
  • a template model determination module configured to determine a template model according to the character model to be created, where the template model includes a skin mesh, a skeleton matching the skin mesh, and a skin corresponding to the skin mesh Weights and modifications corresponding to each joint point;
  • a second character model determination module configured to determine the bones and skin weights of the character model to be created according to the skin meshes, bones, and skin weights of the template model
  • a third role model determination module configured to determine the modification of the to-be-created role model according to the modification of the template model
  • the character model creation module is used for creating a character model according to the skin mesh, skeleton, skin weight and modification of the character model to be created.
  • the apparatus further includes:
  • a topology determination module configured to determine that the topology of the skin mesh of the template model is the The topology of the skin mesh of the character model to be created;
  • a first skin mesh modification module configured to modify the shape of the skin mesh of the template model according to the shape of the skin mesh of the character model to be created.
  • the second role model determination module includes:
  • the first determination submodule is used to determine the bone elongation ratio and the bone rotation angle of the bones of the character model to be created relative to the bones of the template model, and the vertices of the skin mesh of the character model to be created displacement compensation of the vertices of the skin mesh relative to the template model;
  • the second determination submodule is configured to determine the bones of the character model to be created according to the bone elongation ratio, the bone rotation angle and the bones of the template model.
  • the first determination submodule includes:
  • the first constraint sub-module is used to make the joint point coordinates of the template model after the bone stretching and rotation obtained according to the bone elongation ratio and the bone rotation angle, and the joint point coordinates of the bone rotation
  • the angle and the joint point coordinates obtained by weighting the skin mesh vertex coordinates around the joint points of the template model after the bone stretching and rotation obtained by the displacement compensation are the same;
  • the second constraint submodule is used to make the skin mesh vertex coordinates of the template model after the bones are stretched and rotated to be the same as the skin mesh vertex coordinates of the character model to be created;
  • the coordinates of the skin mesh vertices of the template model are obtained according to the stretch ratio of the bones, the rotation angle of the bones and the displacement compensation.
  • the second determination submodule includes:
  • a template model skeleton determination module configured to determine the skeleton of the deformed template model according to the skeleton elongation ratio, the skeleton rotation angle and the skeleton of the template model;
  • a second skin mesh modification module configured to modify the skin mesh of the template model according to the displacement compensation and the skin weight of the template model
  • the character model skeleton determination module is used for determining the deformed template model when the shape of the skin mesh of the modified template model and the shape of the skin mesh of the to-be-created character model are more than a predetermined threshold.
  • the bones of the to-be-created character model are nested, so as to determine the bones of the to-be-created character model.
  • the third role model determination module includes:
  • the third determination submodule is used to determine the first edge vector matrix corresponding to each grid unit in the skin mesh of the character model to be created in the initial state, and the character model to be created after the joints are rotated.
  • the second side vector matrix corresponding to each grid unit in the skin grid, the first side vector matrix and the second side vector matrix are determined according to the side vector and the surface normal of the corresponding grid unit.
  • the third determination submodule includes:
  • the third constraint submodule is used to make the flip transformation matrix of each grid unit in the skin grid of the character model to be created the same as the flip transformation matrix of each grid unit in the skin grid of the template model;
  • the flip transformation matrix of each grid unit in the skin grid of the character model to be created is based on the first side vector matrix and the first edge vector matrix of each grid unit in the skin grid of the character model to be created.
  • the second side vector matrix is obtained, and the flip transformation matrix of each grid unit in the skin grid of the template model is based on the first side vector matrix and the second side vector of each grid unit in the skin grid of the template model. matrix is obtained.
  • the third determination submodule includes:
  • the fourth constraint submodule is used to make the flip transformation matrix of each grid unit in the skin grid of the character model to be created identical with the flip transformation matrix of the grid unit adjacent to the grid unit;
  • the flip transformation matrix of the character model to be created is obtained according to the first edge vector matrix and the second edge vector matrix of each grid unit in the skin mesh of the character model to be created.
  • the apparatus further includes:
  • the skin weight determination module is configured to determine the skin weight of the character model to be created according to the skin weight of the template model.
  • an electronic device for creating a virtual character model including:
  • memory for storing processor-executable instructions
  • the processor is configured to implement the above method when executing the instructions.
  • a non-volatile computer-readable storage medium having computer program instructions stored thereon, wherein the computer program instructions implement the above method when executed by a processor.
  • the bones, skin weights and trimming of the character model can be automatically created, which has better interactivity, and at the same time saves the labor cost and time cost of the technicians in making the character model, and improves the production of the character model. s efficiency.
  • FIG. 1 shows a flowchart of a method for creating a virtual character model according to an embodiment of the present disclosure
  • FIG. 2 shows a schematic diagram of an application scenario of a method for creating a virtual character model according to an embodiment of the present disclosure
  • FIG. 3 shows a block diagram of an apparatus for creating a virtual character model according to an embodiment of the present disclosure.
  • FIG. 4 shows a block diagram of a virtual character model electronic device 800 according to an exemplary embodiment.
  • FIG. 5 shows a block diagram of an apparatus 1900 for creating a virtual character model according to an exemplary embodiment.
  • 3D animation technology has a wide range of application scenarios because it can simulate the shape and action of real objects.
  • the character model In order to make the character model simulate the movements of real-world creatures, it needs to be bound and reshaped.
  • each character model needs to be bound and reshaped one by one, and the efficiency of producing 3D animation is low.
  • an embodiment of the present disclosure provides a method for creating a virtual character model, which corresponds to the skin mesh of the character model, the bones matched with the skin mesh, and the skin mesh corresponding to the relevant information of the template model.
  • the skin weight and the modification corresponding to each joint point are automatically matched and generated, which has high production efficiency and application value.
  • the methods of the embodiments of the present disclosure can be invoked through an embedded plug-in in the animation production software, and a standard template (ie, a template model) for the animation production software to be invoked can be preset, and after the user selects the template, the implementation of the present disclosure can be started.
  • a standard template ie, a template model
  • the virtual character creation method may be executed by an electronic device such as a terminal device or a server, and the terminal device may be a user equipment (User Equipment, UE), a mobile device, a user terminal, a terminal, a cellular phone, Cordless phones, personal digital assistants (Personal Digital Assistant, PDA), handheld devices, computing devices, vehicle-mounted devices, wearable devices, etc.
  • the method can be implemented by the processor calling the computer-readable instructions stored in the memory.
  • the method may be performed by a server.
  • FIG. 1 shows a flowchart of a method for creating a virtual character model according to an embodiment of the present disclosure.
  • the method includes:
  • Step S101 determining a character model to be created, where the character model to be created at least includes a skin mesh;
  • Step S102 Determine a template model according to the character model to be created, where the template model includes a skin mesh, a bone matching the skin mesh, skin weights corresponding to the skin mesh, and various joints Click the corresponding modification;
  • Step S103 determining the bones and skin weights of the character model to be created according to the skin meshes, bones, and skin weights of the template model;
  • Step S104 determining the modification of the character model to be created according to the modification of the template model
  • Step S105 Create a character model according to the skin mesh, skeleton, skin weight and modification of the character model to be created.
  • the bones, skin weights and modifications of the character model can be automatically created, which has better interactivity and saves the labor cost and time cost of the technician for making the character model. , which improves the efficiency of making character models.
  • a plurality of template models with different heights, shorts, fats and thins and different genders can be preset, and the user can select a model similar to the character as the template model of the character model through the animation production software.
  • the user can make fine adjustments to them respectively to obtain a higher-quality character model.
  • skin weights represent the coefficients by which skin mesh vertices are affected by bone motion.
  • the topology of the template model and the character model to be created In the process of creating the virtual character model, it is necessary to keep the topology of the template model and the character model to be created consistent for subsequent operations.
  • determine the topology of the skin mesh of the template model is the topology of the skin mesh of the character model to be created; the shape of the skin mesh of the template model is modified according to the shape of the skin mesh of the character model to be created.
  • the shape of the skin mesh of the character model can be used as a reference for the deformation of the template model.
  • the bones of the template model are adapted to the differences in body shape, height, limb length, etc. of the character model. It is necessary to rotate and stretch the bones of the template model to obtain the bones of the character model. Therefore, it is necessary to determine first.
  • the three parameters are the bone elongation ratio of the bones of the character model relative to the bones of the template model, the rotation angle of the bones, and the displacement compensation of the vertices of the skin mesh of the character model relative to the vertices of the skin mesh of the template model.
  • step S103 determining the bones and skin weights of the character model to be created according to the skin meshes, bones, and skin weights of the template model, including: determining the to-be-created character model The bone elongation ratio and the bone rotation angle of the bones of the created character model relative to the bones of the template model, and the vertices of the skin mesh of the character model to be created relative to the vertices of the skin mesh of the template model displacement compensation; determine the bones of the character model to be created according to the bone elongation ratio and the bone rotation angle and the bones of the template model.
  • the displacement compensation is to make the skin mesh of the template model after the deformation of the bones of the template model can fully have a closer shape to the skin mesh of the character model.
  • the arm muscles of the template model are not as strong as the arm muscles of the character model. Compensation makes the arm skin of the two more similar, similar to "watering" the skin of the template model's arm to make it fatter.
  • the joint point coordinates of the template model after bone stretching and rotation obtained according to the bone elongation ratio and the bone rotation angle are The rotation angle and the joint point coordinates obtained by weighting the skin mesh vertex coordinates around the joint points of the template model after the bone stretching and rotation obtained by the displacement compensation are the same; and the skin of the template model after the bone stretching and rotation is made.
  • the mesh vertex coordinates are the same as the skin mesh vertex coordinates of the character model to be created.
  • the skin mesh vertex coordinates of the character are obtained according to the stretch ratio of the bones, the rotation angle of the bones and the displacement compensation.
  • the relative position between the coordinates of the joint points of the template model and the coordinates of the surrounding skin mesh vertices can be referred to as the relative position weight, and the relative position weight maintains the relationship between the joint points of the template model after bone deformation and the surrounding skin mesh.
  • the relative position is consistent with the relative position between the bone points of the template model and the surrounding skin mesh before the bone deformation, wherein the relative position weight remains unchanged.
  • the joint point coordinates of the template model after bone stretching and rotation obtained according to the bone elongation ratio and the bone rotation angle are compared with those obtained according to the bone elongation ratio, the bone rotation angle, and
  • the joint point coordinates obtained by weighting the skin mesh vertex coordinates around the joint points of the template model after the bone stretching and rotation obtained by the displacement compensation are the same; and the skin mesh vertex coordinates of the template model after the bone stretching and rotation are the same as
  • the two constraints that the coordinates of the skin mesh vertexes of the character model to be created are the same to determine the bone elongation ratio and the bone rotation angle of the bones of the character model relative to the bones of the template model, and the skin mesh of the character model.
  • the displacement of the vertices of the template model relative to the vertices of the skin mesh of the template model compensates these three parameters, so as to realize the automatic migration of template bones to character bones, save the labor cost and time cost of manual migration by technicians, and improve the production of character models. efficiency.
  • Two constraints ensure that the bones can be correctly embedded in the skin mesh of the character model.
  • the former ensures that the bones of the character model migrated from the template model are adapted to the skin mesh of the character model itself, and the latter ensures that the template
  • the adaptation between the model and the character model makes the parameters of the obtained character model more accurate and the visual effect is better.
  • the character model can be bound to the bone position more accurately.
  • the determination process is detailed with the following example:
  • the relative position weight of the skin grid points of the template model can be determined by the optimization solution method.
  • the coordinates J of the joint points of the template model after bone stretching and rotation deformation can also be obtained by affine transformation using the following rotation, translation and scaling matrices:
  • the affine transformation transformation matrix includes: M father , T, RO, ve , s, q, R(q).
  • M father represents the affine transformation matrix of the parent node of the joint point
  • T represents the translation transformation matrix from the parent node of the joint point to the joint point
  • RO represents the rotation transformation matrix of the bone orientation
  • ve is the unit vector
  • the above parameters can be obtained from the template Obtained from the model
  • s and q are unknown parameters
  • s represents the bone elongation ratio of the bones of the character model relative to the bones of the template model
  • q represents the bone rotation angle of the bones of the character model relative to the bones of the template model
  • R(q) Represents the joint point rotation transformation matrix.
  • the linear skinning algorithm can be used to determine the mesh vertex coordinates v′ i of the template model after the bones are stretched and rotated.
  • the linear skinning algorithm can use the formula (1 )express:
  • RT(s,q) represents the rotation and translation transformation matrix of the joint point
  • vo i represents the displacement compensation of the skin mesh vertex of the character model relative to the skin mesh vertex of the template model
  • w ij represents the linear skin weight, that is, the i-th skin mesh vertex is affected by the j-th skin mesh vertex.
  • the coefficient of the influence of joint point motion, n represents the total number of joint points.
  • a ij represents the relative position weight between the j-th joint point of the template model and the i-th skin mesh vertex around it, that is, the relative position weight a i of the j-th joint point.
  • J j represents the coordinate of the j-th joint point of the template model after bone deformation.
  • J j can be obtained by affine transformation.
  • v′ i is the vertex coordinates of the skin mesh of the template model deformed by the bones, which can be obtained by formula (1).
  • the second constraint condition is that the skin mesh vertex coordinates of the template model are the same as the skin mesh vertex coordinates of the character model to be created after the bones are stretched and rotated, which can be expressed by the following constraint equation:
  • the coordinates representing the ith skin mesh vertex of the skin mesh of the character model can be derived from the original data of the character model, and v′ i can be obtained by formula (1).
  • the position of the joint point can be obtained by the nonlinear optimization method, using the relative position weight to constrain the relative position of the joint point and the surrounding mesh vertices, affine transformation, and
  • the linear skinning algorithm is used to solve the problem, which can determine the bone elongation ratio s of the bones of the character model relative to the bones of the template model, the rotation angle q of the bones, and the vertices of the skin mesh of the character model relative to the vertices of the skin mesh of the template model.
  • the displacement compensation vo i these three parameters, and determine the bones of the character model through these three parameters.
  • the nonlinear optimization method may include gradient descent method, Newton method, quasi-Newton method, LM algorithm, and the like.
  • determining the bones of the character model to be created according to the bone elongation ratio and the bone rotation angle and the bones of the template model including: according to the bone elongation ratio, the The skeleton rotation angle and the skeleton of the template model determine the skeleton of the deformed template model; the skin mesh of the template model is modified according to the displacement compensation and the skin weight of the template model; after the modification
  • the degree of coincidence between the shape of the skin mesh of the template model and the shape of the skin mesh of the character model to be created is greater than a predetermined threshold, the skeleton of the deformed template model is nested into the character to be created model, so as to determine the skeleton of the character model to be created.
  • the skeleton of the template model can be deformed by stretching and rotating to determine the skeleton of the deformed template model; and the skin mesh of the template model can be stretched by referring to the skeleton of the deformed template model. , so as to form the skin mesh of the deformed template model.
  • the shape and posture of the skin mesh of the deformed template model approach the skin mesh of the character model.
  • the skin weight of the character model to be created is determined according to the skin weight of the template model.
  • the skin weight of the character model can be obtained by the skin weight of the template model.
  • the skin weight of the template model can be directly used as the skin weight of the character model, or the skin weight of the template model can be adjusted as needed to be used as the skin weight of the character model.
  • the skin mesh of the template model can be stretched and deformed according to the skin weight and displacement compensation to form the skin mesh of the deformed template model.
  • the shape of the skin mesh of the template model is matched with the shape of the skin mesh of the character model to be created.
  • the degrees of coincidence of the matching is greater than the set predetermined threshold, the bones of the deformed template model are nested into the to-be-created model. character model, so as to determine the skeleton of the character model to be created.
  • the template model has preset a set of modifications corresponding to each joint carved by the technicians. The modifications in the template model need to be transmitted to the character synchronously. on the model.
  • determining the modification of the character model to be created according to the modification of the template model includes: determining each of the skin meshes of the character model to be created.
  • the matrix and the second edge vector matrix are determined from the edge vectors and face normals of the corresponding grid cells.
  • the flip transformation matrix of each grid unit in the skin grid of the character model to be created is made to be the same as that of each grid unit in the skin grid of the template model.
  • the flip transformation matrix is the same.
  • the flip transformation matrix of each grid unit in the skin grid of the character model to be created is based on the first side vector matrix and the first edge vector matrix of each grid unit in the skin grid of the character model to be created.
  • the second side vector matrix is obtained, and the flip transformation matrix of each grid unit in the skin grid of the template model is based on the first side vector matrix and the second side vector of each grid unit in the skin grid of the template model. matrix is obtained.
  • the character is determined based on the same constraints as the flip transformation matrix of each grid unit in the skin mesh of the character model to be created and the flip transformation matrix of each grid cell in the skin mesh of the template model
  • the edge vector matrix of the mesh unit of the model so as to realize the automatic transfer of template model modification to role model modification, save the labor cost and time cost of manual migration of technicians, and improve the efficiency of making role models.
  • various defects of the character model when it is transformed between different states are solved, so that the character model can more accurately simulate the biological movement form of the real world.
  • constraining the flip transformation matrix of each grid unit of the character model and the template model to be the same, it is ensured that the modifications pre-sculpted by the technicians on the template model can be transferred to the character model more completely and accurately.
  • the inversion transformation matrix of each grid unit in the skin mesh of the character model to be created is made the same as the inversion transformation matrix of the grid unit adjacent to the grid unit.
  • the surface of the character model is made smoother and smoother, with better performance. visual effects.
  • the character model can more accurately repair various defects of the skin mesh of the skeletal skinning animation, making the structure and shape of the character model more artistic.
  • the flip transformation matrix of the character model to be created is obtained according to the first edge vector matrix and the second edge vector matrix of each grid unit in the skin mesh of the character model to be created.
  • the modified skin mesh will change accordingly, which can be represented by flipping the transformation matrix Q.
  • M is the edge vector matrix of the triangular surface, which is a 3 ⁇ 3 matrix
  • M i represents the i-th triangular surface
  • n i is the face normal on the i-th triangular face
  • two edge vectors And the face normal ni represents the edge vector matrix corresponding to the triangular face.
  • the flip transformation matrix Q i is a 3 ⁇ 3 matrix, which represents the flip transformation of the triangular face on the skin mesh, Indicates that the template model adds the edge vector matrix corresponding to the i-th triangular face of the modified skin mesh after the bones are rotated (that is, the second edge vector matrix of the template model), Indicates the edge vector matrix corresponding to the ith triangular face of the skin mesh in the initial state of the template model (ie, the first edge vector matrix of the template model).
  • the flip transformation matrix Q can be obtained by multiplying the first side vector matrix and the second side vector matrix inverse matrix.
  • the flip transformation of the i-th modified triangle surface of the template model can be obtained by the above method, according to the first side vector matrix of the upper triangular surface of the skin grid of the template model and the second side vector matrix of the upper triangle surface of the skin grid of the template model.
  • the first side vector matrix of the upper triangle surface of the skin mesh of the template model and the upper triangle surface of the skin mesh of the character model can be obtained according to the skin mesh data of the template model and the character model in the initial state; the skin mesh of the template model
  • the second side vector matrix of the upper triangle surface of the grid can be obtained according to the skin mesh data of the template model after bone rotation and modification. At this time, the second side vector matrix of the upper triangle surface of the skin mesh of the character model is required. Unknown variable.
  • the flip transformation matrix of each grid unit in the skin mesh of the character model and the flip transformation of the grid unit adjacent to the grid unit is the same.
  • you can constrain The two triangular face flip matrices are the same. in, Represents the flip transformation matrix of the adjoining triangular faces of the i-th trimmed triangular face of the character model.
  • a large-scale equation system can be established to solve, and the edge vector matrix M of the modified triangle surface of the character model can be determined.
  • the modification of the character model can be determined by solving a large-scale sparse matrix, that is, the The second edge vector matrix in the text.
  • the methods of solving large sparse matrices can include LU decomposition, QR decomposition, iterative solution, etc.
  • FIG. 2 shows a schematic diagram of an application scenario of a method for creating a virtual character model according to an embodiment of the present disclosure.
  • a plug-in may be embedded in the animation production software to implement the above-mentioned method of the embodiment of the present disclosure.
  • Template models A, B, and C can be set in advance.
  • users use animation production software to create a character model, they can import or select a template model A that is similar in shape to the character model.
  • the template model A can be adjusted appropriately through the software.
  • the shape is deformed to the shape of the character model to match the topology and shape of the two.
  • the user can activate the plug-in through the software, execute the method described above, and transfer the bones, skin weights, and modifications of the template model to the character model, and then fine-tune the character model obtained after the migration by the user. Get the final character model.
  • the software tool implemented based on the method of the embodiment of the present disclosure has good interactivity, and the operation is simple and efficient. Users only need to perform simple weight adjustment and template selection to generate initial binding bones with one click, and then perform fine mesh weight adjustment on the generated model to obtain a rough bone binding model. For this model , the software tool can automatically calculate the corresponding modification data, and the user can obtain a complete 3D human skeleton binding model by refining the generated modification results.
  • FIG. 3 shows a block diagram of an apparatus for creating a virtual character model according to an embodiment of the present disclosure.
  • the virtual character model creation apparatus 10 may include:
  • a first character model determination module 11 configured to determine a character model to be created, the character model to be created at least includes a skin mesh
  • the template model determination module 12 is configured to determine a template model according to the character model to be created, where the template model includes a skin mesh, a bone matched with the skin mesh, and a mask corresponding to the skin mesh. Skin weight and modification corresponding to each joint point;
  • the second character model determination module 13 is configured to determine the bones and skin weights of the character model to be created according to the skin meshes, bones, and skin weights of the template model;
  • a third character model determining module 14 configured to determine the modification of the character model to be created according to the modification of the template model
  • the character model creation module 15 is used for creating a character model according to the skin mesh, skeleton, skin weight and modification of the character model to be created.
  • the bones, skin weights and modifications of the character model can be automatically created, which has better interactivity and saves the labor cost and time cost of the technician for making the character model. , which improves the efficiency of making character models.
  • the apparatus 10 further includes:
  • a topology determination module configured to determine that the topology of the skin mesh of the template model is the The topology of the skin mesh of the character model to be created;
  • a first skin mesh modification module configured to modify the shape of the skin mesh of the template model according to the shape of the skin mesh of the character model to be created.
  • the second role model determining module 13 includes:
  • the first determination submodule is used to determine the bone elongation ratio and the bone rotation angle of the bones of the character model to be created relative to the bones of the template model, and the vertices of the skin mesh of the character model to be created displacement compensation of the vertices of the skin mesh relative to the template model;
  • the second determination submodule is configured to determine the bones of the character model to be created according to the bone elongation ratio, the bone rotation angle and the bones of the template model.
  • the first determination submodule includes:
  • the first constraint sub-module is used to make the joint point coordinates of the template model after the bone stretching and rotation obtained according to the bone elongation ratio and the bone rotation angle, and the joint point coordinates of the bone rotation
  • the angle and the joint point coordinates obtained by weighting the skin mesh vertex coordinates around the joint points of the template model after the bone stretching and rotation obtained by the displacement compensation are the same;
  • the second constraint submodule is used to make the skin mesh vertex coordinates of the template model after the bones are stretched and rotated to be the same as the skin mesh vertex coordinates of the character model to be created;
  • the coordinates of the skin mesh vertices of the template model are obtained according to the stretch ratio of the bones, the rotation angle of the bones and the displacement compensation.
  • the second determination submodule includes:
  • a template model skeleton determination module configured to determine the skeleton of the deformed template model according to the skeleton elongation ratio, the skeleton rotation angle and the skeleton of the template model;
  • a second skin mesh modification module configured to modify the skin mesh of the template model according to the displacement compensation and the skin weight of the template model
  • the character model skeleton determination module is used for determining the deformed template model when the shape of the skin mesh of the modified template model and the shape of the skin mesh of the to-be-created character model are more than a predetermined threshold.
  • the bones of the to-be-created character model are nested, so as to determine the bones of the to-be-created character model.
  • the third role model determining module 14 includes:
  • the third determination submodule is used to determine the first edge vector matrix corresponding to each grid unit in the skin mesh of the character model to be created in the initial state, and the character model to be created after the joints are rotated.
  • the second side vector matrix corresponding to each grid unit in the skin grid, the first side vector matrix and the second side vector matrix are determined according to the side vector and the surface normal of the corresponding grid unit.
  • the third determination submodule includes:
  • the third constraint submodule is used to make the flip transformation matrix of each grid unit in the skin grid of the character model to be created the same as the flip transformation matrix of each grid unit in the skin grid of the template model;
  • the flip transformation matrix of each grid unit in the skin grid of the character model to be created is based on the first side vector matrix and the first edge vector matrix of each grid unit in the skin grid of the character model to be created.
  • the second side vector matrix is obtained, and the flip transformation matrix of each grid unit in the skin grid of the template model is based on the first side vector matrix and the second side vector of each grid unit in the skin grid of the template model. matrix is obtained.
  • the third determination submodule includes:
  • the fourth constraint submodule is used to make the flip transformation matrix of each grid unit in the skin grid of the character model to be created identical with the flip transformation matrix of the grid unit adjacent to the grid unit;
  • the flip transformation matrix of the character model to be created is obtained according to the first edge vector matrix and the second edge vector matrix of each grid unit in the skin mesh of the character model to be created.
  • the apparatus 10 further includes:
  • the skin weight determination module is configured to determine the skin weight of the character model to be created according to the skin weight of the template model.
  • An embodiment of the present disclosure provides an apparatus for creating a virtual character model, including: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to implement the above method when executing the instructions.
  • the embodiments of the present disclosure provide a non-volatile computer-readable storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the foregoing method is implemented.
  • FIG. 4 is a block diagram of an electronic device 800 for creating a virtual character model according to an exemplary embodiment.
  • electronic device 800 may be a mobile phone, computer, digital broadcast terminal, messaging device, game console, tablet device, medical device, fitness device, personal digital assistant, and the like.
  • the electronic device 800 may include one or more of the following components: a processing component 802, a memory 804, a power supply component 806, a multimedia component 808, an audio component 810, an input/output (I/O) interface 812, a sensor component 814 , and the communication component 816 .
  • the processing component 802 generally controls the overall operation of the electronic device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations.
  • the processing component 802 can include one or more processors 820 to execute instructions to perform all or some of the steps of the methods described above.
  • processing component 802 may include one or more modules that facilitate interaction between processing component 802 and other components.
  • processing component 802 may include a multimedia module to facilitate interaction between multimedia component 808 and processing component 802.
  • Memory 804 is configured to store various types of data to support operation at electronic device 800 . Examples of such data include instructions for any application or method operating on electronic device 800, contact data, phonebook data, messages, pictures, videos, and the like. Memory 804 may be implemented by any type of volatile or nonvolatile storage device or combination thereof, such as static random access memory (SRAM), electrically erasable programmable read only memory (EEPROM), erasable Programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), Magnetic Memory, Flash Memory, Magnetic or Optical Disk.
  • SRAM static random access memory
  • EEPROM electrically erasable programmable read only memory
  • EPROM erasable Programmable Read Only Memory
  • PROM Programmable Read Only Memory
  • ROM Read Only Memory
  • Magnetic Memory Flash Memory
  • Magnetic or Optical Disk Magnetic Disk
  • Power supply assembly 806 provides power to various components of electronic device 800 .
  • Power supply components 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 800 .
  • Multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user.
  • the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user.
  • the touch panel includes one or more touch sensors to sense touch, swipe, and gestures on the touch panel. The touch sensor may not only sense the boundaries of a touch or swipe action, but also detect the duration and pressure associated with the touch or swipe action.
  • the multimedia component 808 includes a front-facing camera and/or a rear-facing camera. When the electronic device 800 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera may receive external multimedia data. Each of the front and rear cameras can be a fixed optical lens system or have focal length and optical zoom capability.
  • Audio component 810 is configured to output and/or input audio signals.
  • audio component 810 includes a microphone (MIC) that is configured to receive external audio signals when electronic device 800 is in operating modes, such as calling mode, recording mode, and voice recognition mode.
  • the received audio signal may be further stored in memory 804 or transmitted via communication component 816 .
  • audio component 810 also includes a speaker for outputting audio signals.
  • the I/O interface 812 provides an interface between the processing component 802 and a peripheral interface module, such as a keyboard, a click wheel, a button, and the like. These buttons may include, but are not limited to: home button, volume buttons, start button, and lock button.
  • Sensor assembly 814 includes one or more sensors for providing status assessment of various aspects of electronic device 800 .
  • the sensor assembly 814 can detect the on/off state of the electronic device 800, the relative positioning of the components, such as the display and the keypad of the electronic device 800, the sensor assembly 814 can also detect the electronic device 800 or one of the electronic device 800 Changes in the position of components, presence or absence of user contact with the electronic device 800 , orientation or acceleration/deceleration of the electronic device 800 and changes in the temperature of the electronic device 800 .
  • Sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects in the absence of any physical contact.
  • Sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications.
  • the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
  • Communication component 816 is configured to facilitate wired or wireless communication between electronic device 800 and other devices.
  • Electronic device 800 may access wireless networks based on communication standards, such as WiFi, 2G or 3G, or a combination thereof.
  • the communication component 816 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel.
  • the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication.
  • NFC near field communication
  • the NFC module may be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
  • RFID radio frequency identification
  • IrDA infrared data association
  • UWB ultra-wideband
  • Bluetooth Bluetooth
  • electronic device 800 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable A programmed gate array (FPGA), controller, microcontroller, microprocessor or other electronic component implementation is used to perform the above method.
  • ASICs application specific integrated circuits
  • DSPs digital signal processors
  • DSPDs digital signal processing devices
  • PLDs programmable logic devices
  • FPGA field programmable A programmed gate array
  • controller microcontroller, microprocessor or other electronic component implementation is used to perform the above method.
  • a non-volatile computer-readable storage medium such as a memory 804 comprising computer program instructions executable by the processor 820 of the electronic device 800 to perform the above method is also provided.
  • Fig. 5 is a block diagram of an apparatus 1900 for creating a virtual character model according to an exemplary embodiment.
  • the apparatus 1900 may be provided as a server. 5
  • apparatus 1900 includes processing component 1922, which further includes one or more processors, and a memory resource represented by memory 1932 for storing instructions executable by processing component 1922, such as applications.
  • An application program stored in memory 1932 may include one or more modules, each corresponding to a set of instructions.
  • the processing component 1922 is configured to execute instructions to perform the above-described methods.
  • the device 1900 may also include a power supply assembly 1926 configured to perform power management of the device 1900, a wired or wireless network interface 1950 configured to connect the device 1900 to a network, and an input output (I/O) interface 1958.
  • Device 1900 may operate based on an operating system stored in memory 1932, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM or the like.
  • a non-volatile computer-readable storage medium such as memory 1932 comprising computer program instructions executable by processing component 1922 of apparatus 1900 to perform the above-described method.
  • the present disclosure may be a system, method and/or computer program product.
  • the computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for causing a processor to implement various aspects of the present disclosure.
  • a computer-readable storage medium may be a tangible device that can hold and store instructions for use by the instruction execution device.
  • the computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing.
  • Non-exhaustive list of computer readable storage media include: portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM) or flash memory), static random access memory (SRAM), portable compact disk read only memory (CD-ROM), digital versatile disk (DVD), memory sticks, floppy disks, mechanically coded devices, such as printers with instructions stored thereon Hole cards or raised structures in grooves, and any suitable combination of the above.
  • RAM random access memory
  • ROM read only memory
  • EPROM erasable programmable read only memory
  • flash memory static random access memory
  • SRAM static random access memory
  • CD-ROM compact disk read only memory
  • DVD digital versatile disk
  • memory sticks floppy disks
  • mechanically coded devices such as printers with instructions stored thereon Hole cards or raised structures in grooves, and any suitable combination of the above.
  • Computer-readable storage media are not to be construed as transient signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (eg, light pulses through fiber optic cables), or through electrical wires transmitted electrical signals.
  • the computer readable program instructions described herein may be downloaded to various computing/processing devices from a computer readable storage medium, or to an external computer or external storage device over a network such as the Internet, a local area network, a wide area network, and/or a wireless network.
  • the network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and/or edge servers.
  • a network adapter card or network interface in each computing/processing device receives computer-readable program instructions from a network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in each computing/processing device .
  • Computer program instructions for carrying out operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or instructions in one or more programming languages.
  • Source or object code written in any combination, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as the "C" language or similar programming languages.
  • the computer readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server implement.
  • the remote computer may be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (eg, using an Internet service provider through the Internet connect).
  • LAN local area network
  • WAN wide area network
  • custom electronic circuits such as programmable logic circuits, field programmable gate arrays (FPGAs), or programmable logic arrays (PLAs) can be personalized by utilizing state information of computer readable program instructions.
  • Computer readable program instructions are executed to implement various aspects of the present disclosure.
  • These computer readable program instructions may be provided to a processor of a general purpose computer, special purpose computer or other programmable data processing apparatus to produce a machine that causes the instructions when executed by the processor of the computer or other programmable data processing apparatus , resulting in means for implementing the functions/acts specified in one or more blocks of the flowchart and/or block diagrams.
  • These computer readable program instructions can also be stored in a computer readable storage medium, these instructions cause a computer, programmable data processing apparatus and/or other equipment to operate in a specific manner, so that the computer readable medium storing the instructions includes An article of manufacture comprising instructions for implementing various aspects of the functions/acts specified in one or more blocks of the flowchart and/or block diagrams.
  • Computer readable program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other equipment to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other equipment to produce a computer-implemented process , thereby causing instructions executing on a computer, other programmable data processing apparatus, or other device to implement the functions/acts specified in one or more blocks of the flowcharts and/or block diagrams.
  • each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more functions for implementing the specified logical function(s) executable instructions.
  • the functions noted in the blocks may occur out of the order noted in the figures. For example, two blocks in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved.
  • each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations can be implemented in dedicated hardware-based systems that perform the specified functions or actions , or can be implemented in a combination of dedicated hardware and computer instructions.

Abstract

The present disclosure relates to a virtual character model creation method and apparatus, an electronic device, and a storage medium. The method comprises: determining a character model to be created, said character model at least comprising a skin mesh; determining a template model according to said character model; determining a skeleton and a skinning weight of said character model according to a skin mesh, a skeleton, and a skinning weight of the template model; determining a modification of said character model according to a modification of the template model; and creating a character model according to the skin mesh, the skeleton, the skinning weight, and the modification of said character model. According to embodiments of the present disclosure, by selecting a preset template model, the skin mesh, the skeleton, the skinning weight, and the modification of the character model can be automatically created, thus having better interactivity, saving the labor cost and time cost that a technician creates a character model, and improving the efficiency of character model creation.

Description

虚拟角色模型创建方法、装置、电子设备和存储介质Virtual character model creation method, apparatus, electronic device and storage medium
本申请要求于2020年12月31日提交中国专利局、申请号为202011626033.9、发明名称为“虚拟角色模型创建方法、装置、电子设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application filed on December 31, 2020, with the application number of 202011626033.9 and the invention titled "Method, Apparatus, Electronic Device and Storage Medium for Creating Virtual Character Models", the entire contents of which are approved by Reference is incorporated in this application.
技术领域technical field
本公开涉及三维动画领域,尤其涉及一种虚拟角色模型创建方法、装置、电子设备和存储介质。The present disclosure relates to the field of three-dimensional animation, and in particular, to a method, device, electronic device and storage medium for creating a virtual character model.
背景技术Background technique
随着计算机图形学的发展,三维动画近年来由于其广泛的应用场景得到了越来越多的关注,其中的角色动画在三维动画中尤其重要。With the development of computer graphics, 3D animation has received more and more attention in recent years due to its wide range of application scenarios, among which character animation is especially important in 3D animation.
角色骨骼绑定是一种在三维动画中使用的技术,是指创建角色模型的骨骼结构的过程。通过骨骼驱动带动模型,并不能表达真实世界生物骨骼带动肌肉皮肤的效果,所以在骨骼动画中,需要修形来修正其效果。通过数字骨骼运动配合蒙皮表面的修形,可以使角色模型模拟真实世界生物骨骼带动肌肉皮肤的效果。Character rigging is a technique used in 3D animation and refers to the process of creating the bone structure of a character model. Driving the model through bone driving cannot express the effect of real-world biological bones driving muscle and skin, so in skeletal animation, it is necessary to modify the effect. Through digital skeleton movement and the modification of the skin surface, the character model can simulate the effect of the real world biological skeleton driving the muscle skin.
在现有技术中,需要由技术人员逐一对角色模型手动绑定并对其进行修行,耗时耗力,影响了创建角色模型的效率,且间接造成了三维动画领域生产能力低下。In the prior art, technicians need to manually bind and practice character models one by one, which is time-consuming and labor-intensive, affects the efficiency of creating character models, and indirectly causes low production capacity in the field of 3D animation.
发明内容SUMMARY OF THE INVENTION
有鉴于此,本公开提出了一种虚拟角色模型创建方法、装置、电子设备和存储介质。In view of this, the present disclosure proposes a method, apparatus, electronic device and storage medium for creating a virtual character model.
根据本公开的一方面,提供了一种虚拟角色模型创建方法,所述方法包括:According to an aspect of the present disclosure, there is provided a method for creating a virtual character model, the method comprising:
确定待创建的角色模型,所述待创建的角色模型至少包括皮肤网格;determining a character model to be created, the character model to be created at least includes a skin mesh;
根据所述待创建的角色模型,确定模板模型,所述模板模型包括皮肤网格、与所述皮肤网格相匹配的骨骼、与所述皮肤网格对应的蒙皮权重和各个关节点对应的修形;According to the character model to be created, a template model is determined, and the template model includes a skin mesh, a bone matched with the skin mesh, a skin weight corresponding to the skin mesh, and each joint point. modification;
根据所述模板模型的皮肤网格、骨骼、蒙皮权重,确定所述待创建的角色模型的骨骼和蒙皮权重;Determine the bones and skin weights of the character model to be created according to the skin meshes, bones, and skin weights of the template model;
根据所述模板模型的修形,确定所述待创建的角色模型的修形;According to the modification of the template model, determine the modification of the character model to be created;
根据所述待创建的角色模型的皮肤网格、骨骼、蒙皮权重和修形,创建角色模型。A character model is created according to the skin mesh, bones, skin weights and modifications of the character model to be created.
在一种可能的实现方式中,所述方法还包括:In a possible implementation, the method further includes:
在所述待创建的角色模型的皮肤网格的拓扑与所述模板模型的皮肤网格的拓扑不一致的情况下,确定所述模板模型的皮肤网格的拓扑为所述待创建的角色模型的皮肤网格的拓扑;In the case that the topology of the skin mesh of the character model to be created is inconsistent with the topology of the skin mesh of the template model, determine that the topology of the skin mesh of the template model is that of the character model to be created. the topology of the skin mesh;
根据所述待创建的角色模型的皮肤网格的形状对所述模板模型的皮肤网格的形状进行修改。The shape of the skin mesh of the template model is modified according to the shape of the skin mesh of the character model to be created.
在一种可能的实现方式中,根据所述模板模型的皮肤网格、骨骼、蒙皮权重,确定所述待创建的角色模型的骨骼和蒙皮权重,包括:In a possible implementation manner, determining the bones and skin weights of the character model to be created according to the skin meshes, bones, and skin weights of the template model, including:
确定所述待创建的角色模型的骨骼相对于所述模板模型的骨骼的骨骼伸长倍率、骨骼旋转角度,以及所述待创建的角色模型的皮肤网格的顶点相对于所述模板模型的皮肤网格的顶点的位移补偿;Determine the bone elongation ratio and the bone rotation angle of the bones of the character model to be created relative to the bones of the template model, and the vertices of the skin mesh of the character model to be created relative to the skin of the template model. Displacement compensation of the vertices of the mesh;
根据所述骨骼伸长倍率和骨骼旋转角度以及所述模板模型的骨骼,确定所述待创建的角色模型的骨骼。The bones of the character model to be created are determined according to the bone elongation ratio and the bone rotation angle and the bones of the template model.
在一种可能的实现方式中,确定所述待创建的角色模型的骨骼相对于所述模板模型的骨骼的骨骼伸长倍率、骨骼旋转角度,以及所述待创建的角色模型的皮肤网格的顶点相对于所述模板模型的皮肤网格的顶点的位移补偿,包括:In a possible implementation manner, determine the bone elongation ratio and the bone rotation angle of the bones of the character model to be created relative to the bones of the template model, and the skin mesh of the character model to be created. The displacement compensation of the vertices relative to the vertices of the skin mesh of the template model, including:
使得根据所述骨骼伸长倍率和所述骨骼旋转角度得到的骨骼拉伸旋转后模板模型的关节点坐标,与对根据所述骨骼伸长倍率、所述骨骼旋转角度、 以及所述位移补偿得到的骨骼拉伸旋转后模板模型的关节点周围的皮肤网格顶点坐标进行加权后得到的关节点坐标相同;The joint point coordinates of the template model after bone stretching and rotation obtained according to the bone elongation ratio and the bone rotation angle are obtained according to the bone elongation ratio, the bone rotation angle, and the displacement compensation. The joint point coordinates obtained by weighting the skin mesh vertex coordinates around the joint points of the template model after the bone stretching and rotation are the same;
使得骨骼拉伸旋转后所述模板模型的皮肤网格顶点坐标与所述待创建的角色模型的皮肤网格顶点坐标相同;After the bones are stretched and rotated, the skin mesh vertex coordinates of the template model are the same as the skin mesh vertex coordinates of the character model to be created;
其中,在骨骼拉伸旋转后所述模板模型的皮肤网格顶点坐标根据所述骨骼伸长倍率、所述骨骼旋转角度和所述位移补偿得到。Wherein, after the bones are stretched and rotated, the coordinates of the skin mesh vertices of the template model are obtained according to the stretch ratio of the bones, the rotation angle of the bones and the displacement compensation.
在一种可能的实现方式中,其特征在于,根据所述骨骼伸长倍率和骨骼旋转角度以及所述模板模型的骨骼,确定所述待创建的角色模型的骨骼,包括:In a possible implementation, it is characterized in that determining the bones of the character model to be created according to the bone elongation ratio and the bone rotation angle and the bones of the template model, including:
根据所述骨骼伸长倍率、所述骨骼旋转角度以及所述模板模型的骨骼确定变形后的模板模型的骨骼;Determine the skeleton of the deformed template model according to the skeleton elongation ratio, the skeleton rotation angle and the skeleton of the template model;
根据所述位移补偿、所述模板模型的蒙皮权重,对所述模板模型的皮肤网格进行修改;modifying the skin mesh of the template model according to the displacement compensation and the skin weight of the template model;
在修改后的模板模型的皮肤网格的形状与所述待创建的角色模型的皮肤网格的形状的重合度大于预定阈值时,将所述变形后的模板模型的骨骼嵌套至所述待创建的角色模型中,从而确定待创建的角色模型的骨骼。When the degree of coincidence between the shape of the skin mesh of the modified template model and the shape of the skin mesh of the character model to be created is greater than a predetermined threshold, nest the bones of the deformed template model into the to-be-created character model. In the created character model, the bones of the character model to be created are determined.
在一种可能的实现方式中,根据所述模板模型的修形,确定所述待创建的角色模型的修形,包括:In a possible implementation manner, determining the modification of the character model to be created according to the modification of the template model, including:
确定所述待创建的角色模型的皮肤网格中各个网格单元在初始状态下对应的第一边向量矩阵,和在关节转动后所述待创建的角色模型的皮肤网格中各个网格单元对应的第二边向量矩阵,所述第一边向量矩阵和所述第二边向量矩阵根据相应网格单元的边向量和面法线确定。Determine the first side vector matrix corresponding to each grid unit in the skin grid of the character model to be created in the initial state, and each grid unit in the skin grid of the character model to be created after the joints are rotated The corresponding second edge vector matrix, the first edge vector matrix and the second edge vector matrix are determined according to the edge vector and the surface normal of the corresponding grid unit.
在一种可能的实现方式中,确定所述待创建的角色模型的皮肤网格中各个网格单元在初始状态下对应的第一边向量矩阵,和在关节转动后所述待创建的角色模型的皮肤网格中各个网格单元对应的第二边向量矩阵,包括:In a possible implementation manner, determine the first edge vector matrix corresponding to each grid unit in the skin mesh of the character model to be created in the initial state, and determine the character model to be created after the joints are rotated The second edge vector matrix corresponding to each grid cell in the skin grid of , including:
使得所述待创建的角色模型的皮肤网格中各个网格单元的翻转变换矩阵与所述模板模型的皮肤网格中各个网格单元的翻转变换矩阵相同;Make the flip transformation matrix of each grid unit in the skin grid of the character model to be created the same as the flip transformation matrix of each grid unit in the skin grid of the template model;
其中,所述待创建的角色模型的皮肤网格中各个网格单元的翻转变换矩阵根据所述待创建的角色模型的皮肤网格中的各个网格单元的所述第一边向量矩阵和所述第二边向量矩阵得到,所述模板模型的皮肤网格中各个网格单元的翻转变换矩阵根据所述模板模型的皮肤网格中各个网格单元的第一边向量矩阵和第二边向量矩阵得到。Wherein, the flip transformation matrix of each grid unit in the skin grid of the character model to be created is based on the first side vector matrix and the first edge vector matrix of each grid unit in the skin grid of the character model to be created. The second side vector matrix is obtained, and the flip transformation matrix of each grid unit in the skin grid of the template model is based on the first side vector matrix and the second side vector of each grid unit in the skin grid of the template model. matrix is obtained.
在一种可能的实现方式中,确定所述待创建的角色模型的皮肤网格中各个网格单元在初始状态下对应的第一边向量矩阵,和在关节转动后所述待创建的角色模型的皮肤网格中各个网格单元对应的第二边向量矩阵,包括:In a possible implementation manner, determine the first edge vector matrix corresponding to each grid unit in the skin mesh of the character model to be created in the initial state, and determine the character model to be created after the joints are rotated The second edge vector matrix corresponding to each grid cell in the skin grid of , including:
使得所述待创建的角色模型的皮肤网格中每个网格单元的翻转变换矩阵与该网格单元临接的网格单元的翻转变换矩阵相同;Make the flip transformation matrix of each grid unit in the skin grid of the character model to be created the same as the flip transformation matrix of the grid unit adjacent to the grid unit;
其中,所述待创建的角色模型的翻转变换矩阵根据所述待创建的角色模型的皮肤网格中各个网格单元所述第一边向量矩阵和所述第二边向量矩阵得到。Wherein, the flip transformation matrix of the character model to be created is obtained according to the first edge vector matrix and the second edge vector matrix of each grid unit in the skin mesh of the character model to be created.
在一种可能的实现方式中,根据所述模板模型的蒙皮权重,确定所述待创建的角色模型的蒙皮权重。In a possible implementation manner, the skin weight of the character model to be created is determined according to the skin weight of the template model.
根据本公开的另一方面,提供了一种虚拟角色模型创建装置,包括:According to another aspect of the present disclosure, an apparatus for creating a virtual character model is provided, comprising:
第一角色模型确定模块,用于确定待创建的角色模型,所述待创建的角色模型至少包括皮肤网格;a first character model determination module, configured to determine a character model to be created, where the character model to be created at least includes a skin mesh;
模板模型确定模块,用于根据所述待创建的角色模型,确定模板模型,所述模板模型包括皮肤网格、与所述皮肤网格相匹配的骨骼、与所述皮肤网格对应的蒙皮权重和各个关节点对应的修形;A template model determination module, configured to determine a template model according to the character model to be created, where the template model includes a skin mesh, a skeleton matching the skin mesh, and a skin corresponding to the skin mesh Weights and modifications corresponding to each joint point;
第二角色模型确定模块,用于根据所述模板模型的皮肤网格、骨骼、蒙皮权重,确定所述待创建的角色模型的骨骼和蒙皮权重;A second character model determination module, configured to determine the bones and skin weights of the character model to be created according to the skin meshes, bones, and skin weights of the template model;
第三角色模型确定模块,用于根据所述模板模型的修形,确定所述待创建的角色模型的修形;a third role model determination module, configured to determine the modification of the to-be-created role model according to the modification of the template model;
角色模型创建模块,用于根据所述待创建的角色模型的皮肤网格、骨骼、蒙皮权重和修形,创建角色模型。The character model creation module is used for creating a character model according to the skin mesh, skeleton, skin weight and modification of the character model to be created.
在一种可能的实现方式中,所述装置还包括:In a possible implementation, the apparatus further includes:
拓扑确定模块,用于在所述待创建的角色模型的皮肤网格的拓扑与所述模板模型的皮肤网格的拓扑不一致的情况下,确定所述模板模型的皮肤网格的拓扑为所述待创建的角色模型的皮肤网格的拓扑;A topology determination module, configured to determine that the topology of the skin mesh of the template model is the The topology of the skin mesh of the character model to be created;
第一皮肤网格修改模块,用于根据所述待创建的角色模型的皮肤网格的形状对所述模板模型的皮肤网格的形状进行修改。A first skin mesh modification module, configured to modify the shape of the skin mesh of the template model according to the shape of the skin mesh of the character model to be created.
在一种可能的实现方式中,第二角色模型确定模块包括:In a possible implementation manner, the second role model determination module includes:
第一确定子模块,用于确定所述待创建的角色模型的骨骼相对于所述模板模型的骨骼的骨骼伸长倍率、骨骼旋转角度,以及所述待创建的角色模型的皮肤网格的顶点相对于所述模板模型的皮肤网格的顶点的位移补偿;The first determination submodule is used to determine the bone elongation ratio and the bone rotation angle of the bones of the character model to be created relative to the bones of the template model, and the vertices of the skin mesh of the character model to be created displacement compensation of the vertices of the skin mesh relative to the template model;
第二确定子模块,用于根据所述骨骼伸长倍率和骨骼旋转角度以及所述模板模型的骨骼,确定所述待创建的角色模型的骨骼。The second determination submodule is configured to determine the bones of the character model to be created according to the bone elongation ratio, the bone rotation angle and the bones of the template model.
在一种可能的实现方式中,第一确定子模块包括:In a possible implementation manner, the first determination submodule includes:
第一约束子模块,用于使得根据所述骨骼伸长倍率和所述骨骼旋转角度得到的骨骼拉伸旋转后模板模型的关节点坐标,与对根据所述骨骼伸长倍率、所述骨骼旋转角度、以及所述位移补偿得到的骨骼拉伸旋转后模板模型的关节点周围的皮肤网格顶点坐标进行加权后得到的关节点坐标相同;The first constraint sub-module is used to make the joint point coordinates of the template model after the bone stretching and rotation obtained according to the bone elongation ratio and the bone rotation angle, and the joint point coordinates of the bone rotation The angle and the joint point coordinates obtained by weighting the skin mesh vertex coordinates around the joint points of the template model after the bone stretching and rotation obtained by the displacement compensation are the same;
第二约束子模块,用于使得骨骼拉伸旋转后所述模板模型的皮肤网格顶点坐标与所述待创建的角色模型的皮肤网格顶点坐标相同;The second constraint submodule is used to make the skin mesh vertex coordinates of the template model after the bones are stretched and rotated to be the same as the skin mesh vertex coordinates of the character model to be created;
其中,在骨骼拉伸旋转后所述模板模型的皮肤网格顶点坐标根据所述骨骼伸长倍率、所述骨骼旋转角度和所述位移补偿得到。Wherein, after the bones are stretched and rotated, the coordinates of the skin mesh vertices of the template model are obtained according to the stretch ratio of the bones, the rotation angle of the bones and the displacement compensation.
在一种可能的实现方式中,第二确定子模块包括:In a possible implementation manner, the second determination submodule includes:
模板模型骨骼确定模块,用于根据所述骨骼伸长倍率、所述骨骼旋转角度以及所述模板模型的骨骼确定变形后的模板模型的骨骼;a template model skeleton determination module, configured to determine the skeleton of the deformed template model according to the skeleton elongation ratio, the skeleton rotation angle and the skeleton of the template model;
第二皮肤网格修改模块,用于根据所述位移补偿、所述模板模型的蒙皮权重,对所述模板模型的皮肤网格进行修改;A second skin mesh modification module, configured to modify the skin mesh of the template model according to the displacement compensation and the skin weight of the template model;
角色模型骨骼确定模块,用于在修改后的模板模型的皮肤网格的形状与 所述待创建的角色模型的皮肤网格的形状的重合度大于预定阈值时,将所述变形后的模板模型的骨骼嵌套至所述待创建的角色模型中,从而确定待创建的角色模型的骨骼。The character model skeleton determination module is used for determining the deformed template model when the shape of the skin mesh of the modified template model and the shape of the skin mesh of the to-be-created character model are more than a predetermined threshold. The bones of the to-be-created character model are nested, so as to determine the bones of the to-be-created character model.
在一种可能的实现方式中,第三角色模型确定模块包括:In a possible implementation manner, the third role model determination module includes:
第三确定子模块,用于确定所述待创建的角色模型的皮肤网格中各个网格单元在初始状态下对应的第一边向量矩阵,和在关节转动后所述待创建的角色模型的皮肤网格中各个网格单元对应的第二边向量矩阵,所述第一边向量矩阵和所述第二边向量矩阵根据相应网格单元的边向量和面法线确定。The third determination submodule is used to determine the first edge vector matrix corresponding to each grid unit in the skin mesh of the character model to be created in the initial state, and the character model to be created after the joints are rotated. The second side vector matrix corresponding to each grid unit in the skin grid, the first side vector matrix and the second side vector matrix are determined according to the side vector and the surface normal of the corresponding grid unit.
在一种可能的实现方式中,第三确定子模块包括:In a possible implementation manner, the third determination submodule includes:
第三约束子模块,用于使得所述待创建的角色模型的皮肤网格中各个网格单元的翻转变换矩阵与所述模板模型的皮肤网格中各个网格单元的翻转变换矩阵相同;The third constraint submodule is used to make the flip transformation matrix of each grid unit in the skin grid of the character model to be created the same as the flip transformation matrix of each grid unit in the skin grid of the template model;
其中,所述待创建的角色模型的皮肤网格中各个网格单元的翻转变换矩阵根据所述待创建的角色模型的皮肤网格中的各个网格单元的所述第一边向量矩阵和所述第二边向量矩阵得到,所述模板模型的皮肤网格中各个网格单元的翻转变换矩阵根据所述模板模型的皮肤网格中各个网格单元的第一边向量矩阵和第二边向量矩阵得到。Wherein, the flip transformation matrix of each grid unit in the skin grid of the character model to be created is based on the first side vector matrix and the first edge vector matrix of each grid unit in the skin grid of the character model to be created. The second side vector matrix is obtained, and the flip transformation matrix of each grid unit in the skin grid of the template model is based on the first side vector matrix and the second side vector of each grid unit in the skin grid of the template model. matrix is obtained.
在一种可能的实现方式中,第三确定子模块包括:In a possible implementation manner, the third determination submodule includes:
第四约束子模块,用于使得所述待创建的角色模型的皮肤网格中每个网格单元的翻转变换矩阵与该网格单元临接的网格单元的翻转变换矩阵相同;The fourth constraint submodule is used to make the flip transformation matrix of each grid unit in the skin grid of the character model to be created identical with the flip transformation matrix of the grid unit adjacent to the grid unit;
其中,所述待创建的角色模型的翻转变换矩阵根据所述待创建的角色模型的皮肤网格中各个网格单元所述第一边向量矩阵和所述第二边向量矩阵得到。Wherein, the flip transformation matrix of the character model to be created is obtained according to the first edge vector matrix and the second edge vector matrix of each grid unit in the skin mesh of the character model to be created.
在一种可能的实现方式中,所述装置还包括:In a possible implementation, the apparatus further includes:
蒙皮权重确定模块,用于根据所述模板模型的蒙皮权重,确定所述待创建的角色模型的蒙皮权重。The skin weight determination module is configured to determine the skin weight of the character model to be created according to the skin weight of the template model.
根据本公开的另一方面,提供了一种虚拟角色模型创建电子设备,包括:According to another aspect of the present disclosure, there is provided an electronic device for creating a virtual character model, including:
处理器;processor;
用于存储处理器可执行指令的存储器;memory for storing processor-executable instructions;
其中,所述处理器被配置为在执行所述指令时,实现上述方法。Wherein, the processor is configured to implement the above method when executing the instructions.
根据本公开的另一方面,提供了一种非易失性计算机可读存储介质,其上存储有计算机程序指令,其特征在于,所述计算机程序指令被处理器执行时实现上述方法。According to another aspect of the present disclosure, there is provided a non-volatile computer-readable storage medium having computer program instructions stored thereon, wherein the computer program instructions implement the above method when executed by a processor.
通过选择预设的模板模型,可以自动创建角色模型的骨骼、蒙皮权重以及修形,具有更好的交互性,同时节省了技术人员制作角色模型的人力成本以及时间成本,提高了制作角色模型的效率。By selecting the preset template model, the bones, skin weights and trimming of the character model can be automatically created, which has better interactivity, and at the same time saves the labor cost and time cost of the technicians in making the character model, and improves the production of the character model. s efficiency.
根据下面参考附图对示例性实施例的详细说明,本公开的其它特征及方面将变得清楚。Other features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments with reference to the accompanying drawings.
附图说明Description of drawings
包含在说明书中并且构成说明书的一部分的附图与说明书一起示出了本公开的示例性实施例、特征和方面,并且用于解释本公开的原理。The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate exemplary embodiments, features, and aspects of the disclosure, and together with the description, serve to explain the principles of the disclosure.
图1示出根据本公开实施例的虚拟角色模型创建方法的流程图;1 shows a flowchart of a method for creating a virtual character model according to an embodiment of the present disclosure;
图2示出根据本公开实施例的虚拟角色模型创建方法的应用场景示意图;2 shows a schematic diagram of an application scenario of a method for creating a virtual character model according to an embodiment of the present disclosure;
图3示出根据本公开实施例的虚拟角色模型创建装置的框图。FIG. 3 shows a block diagram of an apparatus for creating a virtual character model according to an embodiment of the present disclosure.
图4示出根据一示例性实施例示出的一种虚拟角色模型电子设备800的框图。FIG. 4 shows a block diagram of a virtual character model electronic device 800 according to an exemplary embodiment.
图5示出根据一示例性实施例示出的一种虚拟角色模型创建装置1900的框图。FIG. 5 shows a block diagram of an apparatus 1900 for creating a virtual character model according to an exemplary embodiment.
具体实施方式Detailed ways
以下将参考附图详细说明本公开的各种示例性实施例、特征和方面。附图中相同的附图标记表示功能相同或相似的元件。尽管在附图中示出了实施例的各种方面,但是除非特别指出,不必按比例绘制附图。Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numbers in the figures denote elements that have the same or similar functions. While various aspects of the embodiments are shown in the drawings, the drawings are not necessarily drawn to scale unless otherwise indicated.
在这里专用的词“示例性”意为“用作例子、实施例或说明性”。这里作为“示例性”所说明的任何实施例不必解释为优于或好于其它实施例。The word "exemplary" is used exclusively herein to mean "serving as an example, embodiment, or illustration." Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments.
另外,为了更好的说明本公开,在下文的具体实施方式中给出了众多的具体细节。本领域技术人员应当理解,没有某些具体细节,本公开同样可以实施。在一些实例中,对于本领域技术人员熟知的方法、手段、元件和电路未作详细描述,以便于凸显本公开的主旨。In addition, in order to better illustrate the present disclosure, numerous specific details are given in the following detailed description. It will be understood by those skilled in the art that the present disclosure may be practiced without certain specific details. In some instances, methods, means, components and circuits well known to those skilled in the art have not been described in detail so as not to obscure the subject matter of the present disclosure.
随着计算机图形学的不断发展,三维动画技术由于能够模拟真实物体的形态和动作,应用场景广阔。为了使角色模型模拟真实世界生物的动作,需要对其进行骨骼绑定以及修形,然而,相关技术中需要对每一个角色模型进行一一绑定并修形,制作三维动画的效率较低。With the continuous development of computer graphics, 3D animation technology has a wide range of application scenarios because it can simulate the shape and action of real objects. In order to make the character model simulate the movements of real-world creatures, it needs to be bound and reshaped. However, in the related art, each character model needs to be bound and reshaped one by one, and the efficiency of producing 3D animation is low.
为了提高三维动画的制作效率,本公开实施例提供了一种虚拟角色模型的创建方法,通过模板模型的相关信息对角色模型的皮肤网格、与皮肤网格相匹配的骨骼、皮肤网格对应的蒙皮权重以及各个关节点对应的修形进行自动匹配生成,具有较高的生产效率和应用价值。In order to improve the production efficiency of 3D animation, an embodiment of the present disclosure provides a method for creating a virtual character model, which corresponds to the skin mesh of the character model, the bones matched with the skin mesh, and the skin mesh corresponding to the relevant information of the template model. The skin weight and the modification corresponding to each joint point are automatically matched and generated, which has high production efficiency and application value.
本公开实施例的方法可以通过在动画制作软件中的内嵌插件来进行调用,可以预设供动画制作软件调用的标准模板(即模板模型),在用户选择模板后,即可开始执行本公开实施例的方法。The methods of the embodiments of the present disclosure can be invoked through an embedded plug-in in the animation production software, and a standard template (ie, a template model) for the animation production software to be invoked can be preset, and after the user selects the template, the implementation of the present disclosure can be started. Methods of Examples.
在一种可能的实现方式中,所述虚拟角色创建方法可以由终端设备或服务器等电子设备执行,终端设备可以为用户设备(User Equipment,UE)、移动设备、用户终端、终端、蜂窝电话、无绳电话、个人数字处理(Personal Digital Assistant,PDA)、手持设备、计算设备、车载设备、可穿戴设备等,所述方法可以通过处理器调用存储器中存储的计算机可读指令的方式来实现。或者,可通过服务器执行所述方法。In a possible implementation manner, the virtual character creation method may be executed by an electronic device such as a terminal device or a server, and the terminal device may be a user equipment (User Equipment, UE), a mobile device, a user terminal, a terminal, a cellular phone, Cordless phones, personal digital assistants (Personal Digital Assistant, PDA), handheld devices, computing devices, vehicle-mounted devices, wearable devices, etc., the method can be implemented by the processor calling the computer-readable instructions stored in the memory. Alternatively, the method may be performed by a server.
图1示出了根据本公开一实施例的虚拟角色模型创建方法的流程图。所述方法包括:FIG. 1 shows a flowchart of a method for creating a virtual character model according to an embodiment of the present disclosure. The method includes:
步骤S101,确定待创建的角色模型,所述待创建的角色模型至少包括皮肤网格;Step S101, determining a character model to be created, where the character model to be created at least includes a skin mesh;
步骤S102,根据所述待创建的角色模型,确定模板模型,所述模板模型包括皮肤网格、与所述皮肤网格相匹配的骨骼、与所述皮肤网格对应的蒙皮权重和各个关节点对应的修形;Step S102: Determine a template model according to the character model to be created, where the template model includes a skin mesh, a bone matching the skin mesh, skin weights corresponding to the skin mesh, and various joints Click the corresponding modification;
步骤S103,根据所述模板模型的皮肤网格、骨骼、蒙皮权重,确定所述待创建的角色模型的骨骼和蒙皮权重;Step S103, determining the bones and skin weights of the character model to be created according to the skin meshes, bones, and skin weights of the template model;
步骤S104,根根据所述模板模型的修形,确定所述待创建的角色模型的修形;Step S104, determining the modification of the character model to be created according to the modification of the template model;
步骤S105,根据所述待创建的角色模型的皮肤网格、骨骼、蒙皮权重和修形,创建角色模型。Step S105: Create a character model according to the skin mesh, skeleton, skin weight and modification of the character model to be created.
根据本公开实施例,通过选择预设的模板模型,可以自动创建角色模型的骨骼、蒙皮权重以及修形,具有更好的交互性,同时节省了技术人员制作角色模型的人力成本以及时间成本,提高了制作角色模型的效率。According to the embodiment of the present disclosure, by selecting a preset template model, the bones, skin weights and modifications of the character model can be automatically created, which has better interactivity and saves the labor cost and time cost of the technician for making the character model. , which improves the efficiency of making character models.
其中,可以预设多个高矮胖瘦不同以及性别不同的模板模型,用户可以通过动画制作软件,选择一个和角色相似的模型作为该角色模型的模板模型。Among them, a plurality of template models with different heights, shorts, fats and thins and different genders can be preset, and the user can select a model similar to the character as the template model of the character model through the animation production software.
其中,在确定待创建的角色模型的骨骼、蒙皮权重和修形之后,用户可以对其分别进行细微的调整,以获得更高质量的角色模型。Among them, after determining the bones, skin weights, and shaping of the character model to be created, the user can make fine adjustments to them respectively to obtain a higher-quality character model.
其中,蒙皮权重表示皮肤网格顶点受骨骼运动影响的系数。where skin weights represent the coefficients by which skin mesh vertices are affected by bone motion.
由于在进行虚拟角色模型的创建的过程中,需要保持模板模型和待创建的角色模型的拓扑一致,以进行后续运算。在一种可能的实现方式中,在所述待创建的角色模型的皮肤网格的拓扑与所述模板模型的皮肤网格的拓扑不一致的情况下,确定所述模板模型的皮肤网格的拓扑为所述待创建的角色模型的皮肤网格的拓扑;根据所述待创建的角色模型的皮肤网格的形状对所述模板模型的皮肤网格的形状进行修改。In the process of creating the virtual character model, it is necessary to keep the topology of the template model and the character model to be created consistent for subsequent operations. In a possible implementation manner, when the topology of the skin mesh of the character model to be created is inconsistent with the topology of the skin mesh of the template model, determine the topology of the skin mesh of the template model is the topology of the skin mesh of the character model to be created; the shape of the skin mesh of the template model is modified according to the shape of the skin mesh of the character model to be created.
例如,可以通过导入模板模型进行拓扑调整,将模板模型皮肤网格进行变形,获得皮肤网格的外形与角色模型的皮肤网格的外形一致,皮肤网格的拓扑与模板模型的皮肤网格的拓扑一致的新的皮肤网格,将该新的皮肤网格 作为角色模型的皮肤网格。For example, you can adjust the topology by importing the template model, deform the skin mesh of the template model, and obtain that the shape of the skin mesh is consistent with that of the skin mesh of the character model, and the topology of the skin mesh is the same as that of the skin mesh of the template model. A new skin mesh with consistent topology, which is used as the skin mesh for the character model.
其中,角色模型的皮肤网格的外形可以作为模板模型变形的参考。The shape of the skin mesh of the character model can be used as a reference for the deformation of the template model.
由于角色模型与模板模型之间存在差异,使模版模型的骨骼适应角色模型的体型、身高、肢体长短等差异,需要对模板模型的骨骼旋转和拉伸来得出角色模型的骨骼,因此首先需要确定角色模型的骨骼相对于模板模型的骨骼的骨骼伸长倍率、骨骼旋转角度,以及角色模型的皮肤网格的顶点相对于模板模型的皮肤网格的顶点的位移补偿这三个参数。Due to the differences between the character model and the template model, the bones of the template model are adapted to the differences in body shape, height, limb length, etc. of the character model. It is necessary to rotate and stretch the bones of the template model to obtain the bones of the character model. Therefore, it is necessary to determine first. The three parameters are the bone elongation ratio of the bones of the character model relative to the bones of the template model, the rotation angle of the bones, and the displacement compensation of the vertices of the skin mesh of the character model relative to the vertices of the skin mesh of the template model.
在一种可能的实现方式中,步骤S103中,根据所述模板模型的皮肤网格、骨骼、蒙皮权重,确定所述待创建的角色模型的骨骼和蒙皮权重,包括:确定所述待创建的角色模型的骨骼相对于所述模板模型的骨骼的骨骼伸长倍率、骨骼旋转角度,以及所述待创建的角色模型的皮肤网格的顶点相对于所述模板模型的皮肤网格的顶点的位移补偿;根据所述骨骼伸长倍率和骨骼旋转角度以及所述模板模型的骨骼,确定所述待创建的角色模型的骨骼。In a possible implementation manner, in step S103, determining the bones and skin weights of the character model to be created according to the skin meshes, bones, and skin weights of the template model, including: determining the to-be-created character model The bone elongation ratio and the bone rotation angle of the bones of the created character model relative to the bones of the template model, and the vertices of the skin mesh of the character model to be created relative to the vertices of the skin mesh of the template model displacement compensation; determine the bones of the character model to be created according to the bone elongation ratio and the bone rotation angle and the bones of the template model.
其中,位移补偿是能使得模板模型骨骼变形之后的皮肤网格能够充分地与角色模型的皮肤网格具有更贴近的形状,例如,模板模型的手臂肌肉没有角色模型的手臂肌肉强壮,可以通过位移补偿使得两者的手臂皮肤更为相似,类似于将模板模型的手臂的皮肤进行“注水”,变得更胖。Among them, the displacement compensation is to make the skin mesh of the template model after the deformation of the bones of the template model can fully have a closer shape to the skin mesh of the character model. For example, the arm muscles of the template model are not as strong as the arm muscles of the character model. Compensation makes the arm skin of the two more similar, similar to "watering" the skin of the template model's arm to make it fatter.
在一种可能的实现方式中,使得根据所述骨骼伸长倍率和所述骨骼旋转角度得到的骨骼拉伸旋转后模板模型的关节点坐标,与对根据所述骨骼伸长倍率、所述骨骼旋转角度、以及所述位移补偿得到的骨骼拉伸旋转后模板模型的关节点周围的皮肤网格顶点坐标进行加权后得到的关节点坐标相同;并且使得骨骼拉伸旋转后所述模板模型的皮肤网格顶点坐标与所述待创建的角色模型的皮肤网格顶点坐标相同。In a possible implementation manner, the joint point coordinates of the template model after bone stretching and rotation obtained according to the bone elongation ratio and the bone rotation angle are The rotation angle and the joint point coordinates obtained by weighting the skin mesh vertex coordinates around the joint points of the template model after the bone stretching and rotation obtained by the displacement compensation are the same; and the skin of the template model after the bone stretching and rotation is made. The mesh vertex coordinates are the same as the skin mesh vertex coordinates of the character model to be created.
其中,在骨骼拉伸旋转后所述角色的皮肤网格顶点坐标根据所述骨骼伸长倍率、所述骨骼旋转角度和所述位移补偿得到。Wherein, after the bones are stretched and rotated, the skin mesh vertex coordinates of the character are obtained according to the stretch ratio of the bones, the rotation angle of the bones and the displacement compensation.
其中,模板模型的关节点的坐标与其周围皮肤网格顶点坐标之间的相对位置可以称为相对位置权重,通过相对位置权重保持骨骼变形后的模板模型 的关节点与周围皮肤网格的之间相对位置,和骨骼变形之前模板模型的骨骼点与周围皮肤网格的之间相对位置的相一致,其中,相对位置权重是保持不变的。Among them, the relative position between the coordinates of the joint points of the template model and the coordinates of the surrounding skin mesh vertices can be referred to as the relative position weight, and the relative position weight maintains the relationship between the joint points of the template model after bone deformation and the surrounding skin mesh. The relative position is consistent with the relative position between the bone points of the template model and the surrounding skin mesh before the bone deformation, wherein the relative position weight remains unchanged.
根据本实施例,通过根据所述骨骼伸长倍率和所述骨骼旋转角度得到的骨骼拉伸旋转后模板模型的关节点坐标,与对根据所述骨骼伸长倍率、所述骨骼旋转角度、以及所述位移补偿得到的骨骼拉伸旋转后模板模型的关节点周围的皮肤网格顶点坐标进行加权后得到的关节点坐标相同;并且骨骼拉伸旋转后所述模板模型的皮肤网格顶点坐标与所述待创建的角色模型的皮肤网格顶点坐标相同的这两个约束条件,来确定角色模型的骨骼相对于模板模型的骨骼的骨骼伸长倍率、骨骼旋转角度,以及角色模型的皮肤网格的顶点相对于模板模型的皮肤网格的顶点的位移补偿这三个参数,从而实现模板骨骼到角色骨骼的自动迁移,省去技术人员手动迁移的人力成本和时间成本,提高了制作角色模型的效率。两个约束条件保证了骨骼能正确的嵌入到角色模型的皮肤网格中,其中前者保证了从模板模型迁移得到的角色模型的骨骼与角色模型本身的皮肤网格相适应,后者保证了模板模型和角色模型之间相适应,使得得到的角色模型的参数更加准确,视觉效果更好。同时,可以通过自动迁移加上技术人员的细微修缮,可以使得角色模型更加精准地绑定骨骼位置。According to this embodiment, the joint point coordinates of the template model after bone stretching and rotation obtained according to the bone elongation ratio and the bone rotation angle are compared with those obtained according to the bone elongation ratio, the bone rotation angle, and The joint point coordinates obtained by weighting the skin mesh vertex coordinates around the joint points of the template model after the bone stretching and rotation obtained by the displacement compensation are the same; and the skin mesh vertex coordinates of the template model after the bone stretching and rotation are the same as The two constraints that the coordinates of the skin mesh vertexes of the character model to be created are the same to determine the bone elongation ratio and the bone rotation angle of the bones of the character model relative to the bones of the template model, and the skin mesh of the character model. The displacement of the vertices of the template model relative to the vertices of the skin mesh of the template model compensates these three parameters, so as to realize the automatic migration of template bones to character bones, save the labor cost and time cost of manual migration by technicians, and improve the production of character models. efficiency. Two constraints ensure that the bones can be correctly embedded in the skin mesh of the character model. The former ensures that the bones of the character model migrated from the template model are adapted to the skin mesh of the character model itself, and the latter ensures that the template The adaptation between the model and the character model makes the parameters of the obtained character model more accurate and the visual effect is better. At the same time, through automatic migration and minor repairs by technicians, the character model can be bound to the bone position more accurately.
在一个示例中,通过以下示例对确定过程进行详细说明:In one example, the determination process is detailed with the following example:
模板模型关节点的坐标与周围皮肤网格顶点坐标之间的相对位置的关系可以表示为:模板模型中关节点k的坐标J可以通过该关节点k的相对位置权重a i和该关节点k周围的n个皮肤网格顶点中皮肤网格顶点的坐标v i确定。其中,a i的值小于1,且a 0+a 1+……+a n=1。 The relative position relationship between the coordinates of the joint points of the template model and the coordinates of the surrounding skin mesh vertices can be expressed as: the coordinate J of the joint point k in the template model can pass the relative position weight a i of the joint point k and the joint point k The coordinates v i of the skin mesh vertices among the surrounding n skin mesh vertices are determined. Wherein, the value of a i is less than 1, and a 0 +a 1 +... + an =1.
其中,通过模板模型已知的J和v i,可以通过优化求解方法确定模板模型皮肤网格点的相对位置权重。 Among them, through the known J and v i of the template model, the relative position weight of the skin grid points of the template model can be determined by the optimization solution method.
在骨骼拉伸旋转变形后的模板模型的关节点的坐标J还可以利用如下旋转、平移、缩放矩阵通过仿射变换得到:The coordinates J of the joint points of the template model after bone stretching and rotation deformation can also be obtained by affine transformation using the following rotation, translation and scaling matrices:
进一步,仿射变换变换矩阵包括:M father、、T、RO、v e、s、q、R(q)。其中、M father表示关节点父节点的仿射变换矩阵,T表示关节点父节点到关节点的平移变换矩阵,RO表示骨骼朝向的旋转变换矩阵,v e为单位向量,上述参数均可从模板模型中获得;s和q为未知参数,s表示角色模型的骨骼相对于模板模型的骨骼的骨骼伸长倍率,q表示角色模型的骨骼相对于模板模型的骨骼的骨骼旋转角度,R(q)表示关节点旋转变换矩阵。 Further, the affine transformation transformation matrix includes: M father , T, RO, ve , s, q, R(q). Among them, M father represents the affine transformation matrix of the parent node of the joint point, T represents the translation transformation matrix from the parent node of the joint point to the joint point, RO represents the rotation transformation matrix of the bone orientation, ve is the unit vector, and the above parameters can be obtained from the template Obtained from the model; s and q are unknown parameters, s represents the bone elongation ratio of the bones of the character model relative to the bones of the template model, q represents the bone rotation angle of the bones of the character model relative to the bones of the template model, R(q) Represents the joint point rotation transformation matrix.
为了使骨骼驱动皮肤网格,使得皮肤网格随骨骼一起运动,可以通过线性蒙皮算法确定模板模型在骨骼拉伸旋转后的网格顶点坐标v′ i,线性蒙皮算法可以通过公式(1)表示: In order to make the bones drive the skin mesh and make the skin mesh move with the bones, the linear skinning algorithm can be used to determine the mesh vertex coordinates v′ i of the template model after the bones are stretched and rotated. The linear skinning algorithm can use the formula (1 )express:
Figure PCTCN2021138417-appb-000001
Figure PCTCN2021138417-appb-000001
其中,RT(s,q)表示关节点旋转平移变换矩阵,
Figure PCTCN2021138417-appb-000002
表示网格顶点局部坐标,vo i表示角色模型的皮肤网格顶点相对于模板模型的皮肤网格顶点的位移补偿,w ij表示线性蒙皮权重,即第i个皮肤网格顶点受在第j个关节点运动影响的系数,n表示关节点的总数。除参数s、q以及vo i之外,其余参数均可由模板模型确定。
Among them, RT(s,q) represents the rotation and translation transformation matrix of the joint point,
Figure PCTCN2021138417-appb-000002
Represents the local coordinates of the mesh vertex, vo i represents the displacement compensation of the skin mesh vertex of the character model relative to the skin mesh vertex of the template model, w ij represents the linear skin weight, that is, the i-th skin mesh vertex is affected by the j-th skin mesh vertex. The coefficient of the influence of joint point motion, n represents the total number of joint points. Except for the parameters s, q and vo i , other parameters can be determined by the template model.
角色模型与模板模型之间存在两个约束条件,其一是根据所述骨骼伸长倍率和所述骨骼旋转角度得到的骨骼拉伸旋转后模板模型的关节点坐标,与对根据所述骨骼伸长倍率、所述骨骼旋转角度、以及所述位移补偿得到的骨骼拉伸旋转后模板模型的关节点周围的皮肤网格顶点坐标进行加权后得到的关节点坐标相同,可以通过下述约束方程表示:There are two constraints between the character model and the template model, one is the joint point coordinates of the template model after the bone stretching and rotation obtained according to the bone elongation ratio and the bone rotation angle, and the other is the The joint point coordinates obtained by weighting the skin mesh vertex coordinates around the joint points of the template model after the bone stretching and rotation obtained by the length magnification, the bone rotation angle, and the displacement compensation are the same, which can be expressed by the following constraint equations :
Figure PCTCN2021138417-appb-000003
Figure PCTCN2021138417-appb-000003
其中,a ij表示模板模型第j个关节点和其周围第i个皮肤网格顶点之间的相对位置权重,即是第j个关节点的相对位置权重a i。J j表示骨骼变形后的模板模型的第j个关节点的坐标。其中,J j可以仿射变换得到。v′ i是通过骨 骼变形后的模板模型的皮肤网格顶点坐标,可以通过公式(1)求得。 Among them, a ij represents the relative position weight between the j-th joint point of the template model and the i-th skin mesh vertex around it, that is, the relative position weight a i of the j-th joint point. J j represents the coordinate of the j-th joint point of the template model after bone deformation. Among them, J j can be obtained by affine transformation. v′ i is the vertex coordinates of the skin mesh of the template model deformed by the bones, which can be obtained by formula (1).
约束条件其二是骨骼拉伸旋转后所述模板模型的皮肤网格顶点坐标与所述待创建的角色模型的皮肤网格顶点坐标相同,可以通过下述约束方程表示:The second constraint condition is that the skin mesh vertex coordinates of the template model are the same as the skin mesh vertex coordinates of the character model to be created after the bones are stretched and rotated, which can be expressed by the following constraint equation:
Figure PCTCN2021138417-appb-000004
Figure PCTCN2021138417-appb-000004
其中,
Figure PCTCN2021138417-appb-000005
表示角色模型皮肤网格的第i个皮肤网格顶点的坐标,可来自角色模型的原有数据,v′ i可以通过公式(1)求得。
in,
Figure PCTCN2021138417-appb-000005
The coordinates representing the ith skin mesh vertex of the skin mesh of the character model can be derived from the original data of the character model, and v′ i can be obtained by formula (1).
根据上述两个约束条件(公式(2)和(3)),可以通过非线性优化方法,并利用相对位置权重约束关节点和周围网格顶点相对位置、仿射变换求取关节点位置,以及线性蒙皮算法进行求解,可以确定角色模型的骨骼相对于模板模型的骨骼的骨骼伸长倍率s、骨骼旋转角度q,以及角色模型的皮肤网格的顶点相对于模板模型的皮肤网格的顶点的位移补偿vo i这三个参数,并通过这三个参数确定角色模型的骨骼。 According to the above two constraints (formulas (2) and (3)), the position of the joint point can be obtained by the nonlinear optimization method, using the relative position weight to constrain the relative position of the joint point and the surrounding mesh vertices, affine transformation, and The linear skinning algorithm is used to solve the problem, which can determine the bone elongation ratio s of the bones of the character model relative to the bones of the template model, the rotation angle q of the bones, and the vertices of the skin mesh of the character model relative to the vertices of the skin mesh of the template model. The displacement compensation vo i these three parameters, and determine the bones of the character model through these three parameters.
其中,非线性优化方法可包括梯度下降法、牛顿法、拟牛顿法、LM算法等。The nonlinear optimization method may include gradient descent method, Newton method, quasi-Newton method, LM algorithm, and the like.
在一种可能的实现方式中,根据所述骨骼伸长倍率和骨骼旋转角度以及所述模板模型的骨骼,确定所述待创建的角色模型的骨骼,包括:根据所述骨骼伸长倍率、所述骨骼旋转角度以及所述模板模型的骨骼确定变形后的模板模型的骨骼;根据所述位移补偿、所述模板模型的蒙皮权重,对所述模板模型的皮肤网格进行修改;在修改后的模板模型的皮肤网格的形状与所述待创建的角色模型的皮肤网格的形状的重合度大于预定阈值时,将所述变形后的模板模型的骨骼嵌套至所述待创建的角色模型中,从而确定待创建的角色模型的骨骼。In a possible implementation manner, determining the bones of the character model to be created according to the bone elongation ratio and the bone rotation angle and the bones of the template model, including: according to the bone elongation ratio, the The skeleton rotation angle and the skeleton of the template model determine the skeleton of the deformed template model; the skin mesh of the template model is modified according to the displacement compensation and the skin weight of the template model; after the modification When the degree of coincidence between the shape of the skin mesh of the template model and the shape of the skin mesh of the character model to be created is greater than a predetermined threshold, the skeleton of the deformed template model is nested into the character to be created model, so as to determine the skeleton of the character model to be created.
其中,可以通过拉伸旋转的方式对所述模板模型的骨骼进行变形,确定变形后的模板模型的骨骼;可以参照变形后的模板模型的骨骼,通过对所述模板模型的皮肤网格进行伸展,从而形成变形后的所述模板模型的皮肤网 格,此时变形后的所述模板模型的皮肤网格的形状与姿态趋近与角色模型的皮肤网格。The skeleton of the template model can be deformed by stretching and rotating to determine the skeleton of the deformed template model; and the skin mesh of the template model can be stretched by referring to the skeleton of the deformed template model. , so as to form the skin mesh of the deformed template model. At this time, the shape and posture of the skin mesh of the deformed template model approach the skin mesh of the character model.
在一种可能的实现方式中,根据本发明的任一实施例,根据所述模板模型的蒙皮权重,确定所述待创建的角色模型的蒙皮权重。In a possible implementation manner, according to any embodiment of the present invention, the skin weight of the character model to be created is determined according to the skin weight of the template model.
其中,角色模型的蒙皮权重可以通过模板模型的蒙皮权重来获得。Among them, the skin weight of the character model can be obtained by the skin weight of the template model.
例如,可直接使用模板模型的蒙皮权重作为角色模型的蒙皮权重,也可以根据需要对模板模型的蒙皮权重进行调整后,作为角色模型的蒙皮权重。For example, the skin weight of the template model can be directly used as the skin weight of the character model, or the skin weight of the template model can be adjusted as needed to be used as the skin weight of the character model.
在一种可能的实现方式中,可以参照变形后的模板模型的骨骼,根据蒙皮权重和位移补偿对模板模型的皮肤网格进行伸展变形,形成变形后的模板模型的皮肤网格,将变形后的模板模型的皮肤网格与待创建的角色模型的皮肤网格的形状进行匹配,当匹配的重合度大于设定的预定阈值时,将变形后的模板模型的骨骼嵌套至待创建的角色模型中,从而确定待创建的角色模型的骨骼。In a possible implementation, referring to the bones of the deformed template model, the skin mesh of the template model can be stretched and deformed according to the skin weight and displacement compensation to form the skin mesh of the deformed template model. The shape of the skin mesh of the template model is matched with the shape of the skin mesh of the character model to be created. When the degree of coincidence of the matching is greater than the set predetermined threshold, the bones of the deformed template model are nested into the to-be-created model. character model, so as to determine the skeleton of the character model to be created.
由于单纯运用骨骼驱动皮肤网格进行角色模型的形变,在实际运用中存在缺陷,比如在骨骼驱动肩关节运动时,肩部的皮肤网格会产生塌陷的视觉效果,在骨骼驱动肘部关节运动时,肘部的体积会缺失等等。通过修形可以修复骨骼蒙皮动画的皮肤网格的各种缺陷,模板模型已经预设由技术人员雕刻出的一套对应各个关节的修形,需要将模板模型中的修形同步传递到角色模型上。Due to the simple use of bone-driven skin mesh to deform the character model, there are defects in practical application. For example, when the bone drives the shoulder joint movement, the skin mesh of the shoulder will produce a collapsed visual effect, and the bone drives the elbow joint movement. , the volume of the elbow will be missing and so on. Various defects of the skin mesh of the skeletal skinning animation can be repaired by trimming. The template model has preset a set of modifications corresponding to each joint carved by the technicians. The modifications in the template model need to be transmitted to the character synchronously. on the model.
在一种可能的实现方式中,步骤S104中,根据所述模板模型的修形,确定所述待创建的角色模型的修形,包括:确定所述待创建的角色模型的皮肤网格中各个网格单元在初始状态下对应的第一边向量矩阵,和在关节转动后所述待创建的角色模型的皮肤网格中各个网格单元对应的第二边向量矩阵,所述第一边向量矩阵和所述第二边向量矩阵根据相应网格单元的边向量和面法线确定。In a possible implementation manner, in step S104, determining the modification of the character model to be created according to the modification of the template model includes: determining each of the skin meshes of the character model to be created. The first side vector matrix corresponding to the grid unit in the initial state, and the second side vector matrix corresponding to each grid unit in the skin mesh of the character model to be created after the joints are rotated, the first side vector The matrix and the second edge vector matrix are determined from the edge vectors and face normals of the corresponding grid cells.
在一种可能的实现方式中,修形迁移过程中,使得所述待创建的角色模型的皮肤网格中各个网格单元的翻转变换矩阵与所述模板模型的皮肤网格 中各个网格单元的翻转变换矩阵相同。In a possible implementation manner, during the modification and migration process, the flip transformation matrix of each grid unit in the skin grid of the character model to be created is made to be the same as that of each grid unit in the skin grid of the template model. The flip transformation matrix is the same.
其中,所述待创建的角色模型的皮肤网格中各个网格单元的翻转变换矩阵根据所述待创建的角色模型的皮肤网格中的各个网格单元的所述第一边向量矩阵和所述第二边向量矩阵得到,所述模板模型的皮肤网格中各个网格单元的翻转变换矩阵根据所述模板模型的皮肤网格中各个网格单元的第一边向量矩阵和第二边向量矩阵得到。Wherein, the flip transformation matrix of each grid unit in the skin grid of the character model to be created is based on the first side vector matrix and the first edge vector matrix of each grid unit in the skin grid of the character model to be created. The second side vector matrix is obtained, and the flip transformation matrix of each grid unit in the skin grid of the template model is based on the first side vector matrix and the second side vector of each grid unit in the skin grid of the template model. matrix is obtained.
根据本实施例,基于所述待创建的角色模型的皮肤网格中各个网格单元的翻转变换矩阵与所述模板模型的皮肤网格中各个网格单元的翻转变换矩阵相同的约束条件确定角色模型的网格单元的边向量矩阵,从而实现模板模型修形到角色模型修形的自动迁移,省去了技术人员手动迁移的人力成本和时间成本,提高了制作角色模型的效率。通过对角色模型的修形,解决了角色模型在不同状态间转化时的各种缺陷,使得角色模型能更精准地模拟现实世界的生物运动形态。通过约束角色模型和模板模型各个网格单元的翻转变换矩阵相同,保证了模板模型上技术人员预先雕刻好的修形可以更完整精准地传递到角色模型上。According to this embodiment, the character is determined based on the same constraints as the flip transformation matrix of each grid unit in the skin mesh of the character model to be created and the flip transformation matrix of each grid cell in the skin mesh of the template model The edge vector matrix of the mesh unit of the model, so as to realize the automatic transfer of template model modification to role model modification, save the labor cost and time cost of manual migration of technicians, and improve the efficiency of making role models. Through the modification of the character model, various defects of the character model when it is transformed between different states are solved, so that the character model can more accurately simulate the biological movement form of the real world. By constraining the flip transformation matrix of each grid unit of the character model and the template model to be the same, it is ensured that the modifications pre-sculpted by the technicians on the template model can be transferred to the character model more completely and accurately.
在一种可能的实现方式中,使得所述待创建的角色模型的皮肤网格中每个网格单元的翻转变换矩阵与该网格单元临接的网格单元的翻转变换矩阵相同。In a possible implementation manner, the inversion transformation matrix of each grid unit in the skin mesh of the character model to be created is made the same as the inversion transformation matrix of the grid unit adjacent to the grid unit.
根据本实施例,通过进一步地约束角色模型的每个网格单元的翻转变换矩阵与该网格单元临接的网格单元的翻转变换矩阵相同,使得角色模型的表面更加光滑平整,具有更好的视觉效果。同时,可以通过自动迁移加上技术人员的细微修缮,可以使得角色模型更加精准地修复骨骼蒙皮动画的皮肤网格的各种缺陷,使角色模型的结构与形状更具有艺术感。According to this embodiment, by further constraining the flip transformation matrix of each grid unit of the character model to be the same as the flip transformation matrix of the grid unit adjacent to the grid unit, the surface of the character model is made smoother and smoother, with better performance. visual effects. At the same time, through automatic migration and minor repairs by technicians, the character model can more accurately repair various defects of the skin mesh of the skeletal skinning animation, making the structure and shape of the character model more artistic.
其中,所述待创建的角色模型的翻转变换矩阵根据所述待创建的角色模型的皮肤网格中各个网格单元所述第一边向量矩阵和所述第二边向量矩阵得到。Wherein, the flip transformation matrix of the character model to be created is obtained according to the first edge vector matrix and the second edge vector matrix of each grid unit in the skin mesh of the character model to be created.
模板模型由于从初始的静止状态转换到骨骼关节转动的运动状态,修形 后的皮肤网格会产生相应变化,该变化可以通过翻转变换矩阵Q来表示。以网格单元为三角面为例,其中,M为三角面的边向量矩阵,为3×3的矩阵,M i表示第i个三角面,
Figure PCTCN2021138417-appb-000006
为皮肤网格上第i个三角面上的三个顶点坐标,n i为第i个三角面上的面法线,其中两个边向量
Figure PCTCN2021138417-appb-000007
以及面法线n i表示该三角面对应的边向量矩阵。翻转变换矩阵Q i为3×3的矩阵,表示皮肤网格上三角面的翻转变换,
Figure PCTCN2021138417-appb-000008
表示模板模型在骨骼转动后,添加修形后的皮肤网格第i个三角面对应的边向量矩阵(即模板模型的第二边向量矩阵),
Figure PCTCN2021138417-appb-000009
表示模板模型在初始状态下皮肤网格第i个三角面对应的边向量矩阵(即模板模型的第一边向量矩阵)。翻转变换矩阵Q可通过第一边向量矩阵与第二边向量矩阵逆矩阵的乘积得到。
Since the template model is transformed from the initial static state to the motion state of bone joint rotation, the modified skin mesh will change accordingly, which can be represented by flipping the transformation matrix Q. Take the grid unit as a triangular surface as an example, where M is the edge vector matrix of the triangular surface, which is a 3×3 matrix, M i represents the i-th triangular surface,
Figure PCTCN2021138417-appb-000006
are the coordinates of the three vertices on the i-th triangular face on the skin mesh, n i is the face normal on the i-th triangular face, and two edge vectors
Figure PCTCN2021138417-appb-000007
And the face normal ni represents the edge vector matrix corresponding to the triangular face. The flip transformation matrix Q i is a 3×3 matrix, which represents the flip transformation of the triangular face on the skin mesh,
Figure PCTCN2021138417-appb-000008
Indicates that the template model adds the edge vector matrix corresponding to the i-th triangular face of the modified skin mesh after the bones are rotated (that is, the second edge vector matrix of the template model),
Figure PCTCN2021138417-appb-000009
Indicates the edge vector matrix corresponding to the ith triangular face of the skin mesh in the initial state of the template model (ie, the first edge vector matrix of the template model). The flip transformation matrix Q can be obtained by multiplying the first side vector matrix and the second side vector matrix inverse matrix.
可以通过以上方式,根据模板模型的皮肤网格上三角面的第一边向量矩阵和模板模型的皮肤网格上三角面的第二边向量矩阵得到模板模型第i个修形三角面的翻转变换矩阵
Figure PCTCN2021138417-appb-000010
类似地,根据角色模型的皮肤网格上三角面的第一边向量矩阵和角色模型的皮肤网格上三角面的第二边向量矩阵得到角色模型第i个修形三角面的翻转变换矩阵
Figure PCTCN2021138417-appb-000011
其中,模板模型的皮肤网格上三角面和角色模型的皮肤网格上三角面的第一边向量矩阵可以根据初始状态下模板模型和角色模型的皮肤网格数据获得;模板模型的的皮肤网格上三角面的第二边向量矩阵可以根据骨骼转动和修形后的模板模型的皮肤网格数据获得,此时角色模型的皮肤网格上三角面的第二边向量矩阵是要所求的未知变量。
The flip transformation of the i-th modified triangle surface of the template model can be obtained by the above method, according to the first side vector matrix of the upper triangular surface of the skin grid of the template model and the second side vector matrix of the upper triangle surface of the skin grid of the template model. matrix
Figure PCTCN2021138417-appb-000010
Similarly, according to the first side vector matrix of the upper triangular face of the skin mesh of the character model and the second side vector matrix of the upper triangular face of the skin mesh of the character model, the flip transformation matrix of the i-th modified triangular face of the character model is obtained.
Figure PCTCN2021138417-appb-000011
Wherein, the first side vector matrix of the upper triangle surface of the skin mesh of the template model and the upper triangle surface of the skin mesh of the character model can be obtained according to the skin mesh data of the template model and the character model in the initial state; the skin mesh of the template model The second side vector matrix of the upper triangle surface of the grid can be obtained according to the skin mesh data of the template model after bone rotation and modification. At this time, the second side vector matrix of the upper triangle surface of the skin mesh of the character model is required. Unknown variable.
由于存在角色模型和模板模型各个网格单元的翻转变换矩阵相同的约束条件。约束
Figure PCTCN2021138417-appb-000012
两个三角面翻转矩阵相同,其中,
Figure PCTCN2021138417-appb-000013
表示角色模型第i个修形三角面的翻转变换矩阵,
Figure PCTCN2021138417-appb-000014
表示模板模型第i个修形三角面的翻转变换矩阵。
Due to the existence of the same constraints of the flip transformation matrix of each grid unit of the role model and the template model. constraint
Figure PCTCN2021138417-appb-000012
The two triangular face flip matrices are the same, where,
Figure PCTCN2021138417-appb-000013
Represents the flip transformation matrix of the i-th modified triangular face of the character model,
Figure PCTCN2021138417-appb-000014
Represents the flip transformation matrix of the ith modified triangular face of the template model.
由于模板模型和角色模型的外形有所差异,通过上述约束条件计算的修形在传递到角色模型上时,会造成角色模型的修形表面参差不齐。Because the shapes of the template model and the character model are different, when the modification calculated by the above constraints is transmitted to the character model, the modification surface of the character model will be uneven.
为了使得角色模型的修形表面更加光滑平整,在一种可能的实现方式, 角色模型的皮肤网格中每个网格单元的翻转变换矩阵与该网格单元临接的网格单元的翻转变换矩阵相同。其中,为了使修形迁移后角色模型的修形表面光滑完整,可以约束
Figure PCTCN2021138417-appb-000015
两个三角面翻转矩阵相同。其中,
Figure PCTCN2021138417-appb-000016
表示角色模型第i个修形三角面的邻接三角面的翻转变换矩阵。
In order to make the modified surface of the character model smoother and smoother, in a possible implementation manner, the flip transformation matrix of each grid unit in the skin mesh of the character model and the flip transformation of the grid unit adjacent to the grid unit The matrix is the same. Among them, in order to make the modified surface of the character model after modification migration smooth and complete, you can constrain
Figure PCTCN2021138417-appb-000015
The two triangular face flip matrices are the same. in,
Figure PCTCN2021138417-appb-000016
Represents the flip transformation matrix of the adjoining triangular faces of the i-th trimmed triangular face of the character model.
根据上述两个约束条件,可以建立大型方程组进行求解,确定角色模型的修形三角面的边向量矩阵M,例如,可以通过求解大型稀疏矩阵的方式,确定角色模型的修形,即确定上文中的第二边向量矩阵。求解大型稀疏矩阵的方式可包括LU分解、QR分解、迭代求解等。According to the above two constraints, a large-scale equation system can be established to solve, and the edge vector matrix M of the modified triangle surface of the character model can be determined. For example, the modification of the character model can be determined by solving a large-scale sparse matrix, that is, the The second edge vector matrix in the text. The methods of solving large sparse matrices can include LU decomposition, QR decomposition, iterative solution, etc.
图2示出了根据本公开实施例的虚拟角色模型创建方法的应用场景示意图。如图2所示,可在动画制作软件中内嵌插件来实现本公开实施例的上述方法。可以预先设置模板模型A、B、C,用户在使用动画制作软件创建角色模型时,可以导入或选取与角色模型外形相近的模板模型A,可通过软件对模板模型A进行适当调整,将模板模型外形变形为角色模型的外形,以使二者拓扑结构和外形相适应。接下来,用户可通过软件启用插件,执行上文所述的方法,将模板模型的骨骼、蒙皮权重、修形迁移至角色模型,再经由用户对迁移后得到的角色模型进行微调,即可得到最终的角色模型。FIG. 2 shows a schematic diagram of an application scenario of a method for creating a virtual character model according to an embodiment of the present disclosure. As shown in FIG. 2 , a plug-in may be embedded in the animation production software to implement the above-mentioned method of the embodiment of the present disclosure. Template models A, B, and C can be set in advance. When users use animation production software to create a character model, they can import or select a template model A that is similar in shape to the character model. The template model A can be adjusted appropriately through the software. The shape is deformed to the shape of the character model to match the topology and shape of the two. Next, the user can activate the plug-in through the software, execute the method described above, and transfer the bones, skin weights, and modifications of the template model to the character model, and then fine-tune the character model obtained after the migration by the user. Get the final character model.
基于本公开实施例的方法实现的软件工具,具有良好的交互性,操作简便高效。用户只需要进行简单的诸如权重调整和模板选择,就能够一键生成初始绑定骨骼,再对生成的模型进行精细的网格权重调整,就能获得一个粗糙的骨骼绑定模型,对于该模型,软件工具可以自动计算出对应修形数据,用户精修生成的修形结果,便可以获得一个完整的三维人体骨骼绑定模型。The software tool implemented based on the method of the embodiment of the present disclosure has good interactivity, and the operation is simple and efficient. Users only need to perform simple weight adjustment and template selection to generate initial binding bones with one click, and then perform fine mesh weight adjustment on the generated model to obtain a rough bone binding model. For this model , the software tool can automatically calculate the corresponding modification data, and the user can obtain a complete 3D human skeleton binding model by refining the generated modification results.
图3示出了根据本公开实施例的虚拟角色模型创建装置的框图。如图3所述,所述虚拟角色模型创建装置10可以包括:FIG. 3 shows a block diagram of an apparatus for creating a virtual character model according to an embodiment of the present disclosure. As shown in FIG. 3, the virtual character model creation apparatus 10 may include:
第一角色模型确定模块11,用于确定待创建的角色模型,所述待创建的角色模型至少包括皮肤网格;a first character model determination module 11, configured to determine a character model to be created, the character model to be created at least includes a skin mesh;
模板模型确定模块12,用于根据所述待创建的角色模型,确定模板模型, 所述模板模型包括皮肤网格、与所述皮肤网格相匹配的骨骼、与所述皮肤网格对应的蒙皮权重和各个关节点对应的修形;The template model determination module 12 is configured to determine a template model according to the character model to be created, where the template model includes a skin mesh, a bone matched with the skin mesh, and a mask corresponding to the skin mesh. Skin weight and modification corresponding to each joint point;
第二角色模型确定模块13,用于根据所述模板模型的皮肤网格、骨骼、蒙皮权重,确定所述待创建的角色模型的骨骼和蒙皮权重;The second character model determination module 13 is configured to determine the bones and skin weights of the character model to be created according to the skin meshes, bones, and skin weights of the template model;
第三角色模型确定模块14,用于根据所述模板模型的修形,确定所述待创建的角色模型的修形;A third character model determining module 14, configured to determine the modification of the character model to be created according to the modification of the template model;
角色模型创建模块15,用于根据所述待创建的角色模型的皮肤网格、骨骼、蒙皮权重和修形,创建角色模型。The character model creation module 15 is used for creating a character model according to the skin mesh, skeleton, skin weight and modification of the character model to be created.
根据本公开实施例,通过选择预设的模板模型,可以自动创建角色模型的骨骼、蒙皮权重以及修形,具有更好的交互性,同时节省了技术人员制作角色模型的人力成本以及时间成本,提高了制作角色模型的效率。According to the embodiment of the present disclosure, by selecting a preset template model, the bones, skin weights and modifications of the character model can be automatically created, which has better interactivity and saves the labor cost and time cost of the technician for making the character model. , which improves the efficiency of making character models.
在一种可能的实现方式中,所述装置10还包括:In a possible implementation manner, the apparatus 10 further includes:
拓扑确定模块,用于在所述待创建的角色模型的皮肤网格的拓扑与所述模板模型的皮肤网格的拓扑不一致的情况下,确定所述模板模型的皮肤网格的拓扑为所述待创建的角色模型的皮肤网格的拓扑;A topology determination module, configured to determine that the topology of the skin mesh of the template model is the The topology of the skin mesh of the character model to be created;
第一皮肤网格修改模块,用于根据所述待创建的角色模型的皮肤网格的形状对所述模板模型的皮肤网格的形状进行修改。A first skin mesh modification module, configured to modify the shape of the skin mesh of the template model according to the shape of the skin mesh of the character model to be created.
在一种可能的实现方式中,第二角色模型确定模块13包括:In a possible implementation manner, the second role model determining module 13 includes:
第一确定子模块,用于确定所述待创建的角色模型的骨骼相对于所述模板模型的骨骼的骨骼伸长倍率、骨骼旋转角度,以及所述待创建的角色模型的皮肤网格的顶点相对于所述模板模型的皮肤网格的顶点的位移补偿;The first determination submodule is used to determine the bone elongation ratio and the bone rotation angle of the bones of the character model to be created relative to the bones of the template model, and the vertices of the skin mesh of the character model to be created displacement compensation of the vertices of the skin mesh relative to the template model;
第二确定子模块,用于根据所述骨骼伸长倍率和骨骼旋转角度以及所述模板模型的骨骼,确定所述待创建的角色模型的骨骼。The second determination submodule is configured to determine the bones of the character model to be created according to the bone elongation ratio, the bone rotation angle and the bones of the template model.
在一种可能的实现方式中,第一确定子模块包括:In a possible implementation manner, the first determination submodule includes:
第一约束子模块,用于使得根据所述骨骼伸长倍率和所述骨骼旋转角度得到的骨骼拉伸旋转后模板模型的关节点坐标,与对根据所述骨骼伸长倍率、所述骨骼旋转角度、以及所述位移补偿得到的骨骼拉伸旋转后模板模型 的关节点周围的皮肤网格顶点坐标进行加权后得到的关节点坐标相同;The first constraint sub-module is used to make the joint point coordinates of the template model after the bone stretching and rotation obtained according to the bone elongation ratio and the bone rotation angle, and the joint point coordinates of the bone rotation The angle and the joint point coordinates obtained by weighting the skin mesh vertex coordinates around the joint points of the template model after the bone stretching and rotation obtained by the displacement compensation are the same;
第二约束子模块,用于使得骨骼拉伸旋转后所述模板模型的皮肤网格顶点坐标与所述待创建的角色模型的皮肤网格顶点坐标相同;The second constraint submodule is used to make the skin mesh vertex coordinates of the template model after the bones are stretched and rotated to be the same as the skin mesh vertex coordinates of the character model to be created;
其中,在骨骼拉伸旋转后所述模板模型的皮肤网格顶点坐标根据所述骨骼伸长倍率、所述骨骼旋转角度和所述位移补偿得到。Wherein, after the bones are stretched and rotated, the coordinates of the skin mesh vertices of the template model are obtained according to the stretch ratio of the bones, the rotation angle of the bones and the displacement compensation.
在一种可能的实现方式中,第二确定子模块包括:In a possible implementation manner, the second determination submodule includes:
模板模型骨骼确定模块,用于根据所述骨骼伸长倍率、所述骨骼旋转角度以及所述模板模型的骨骼确定变形后的模板模型的骨骼;a template model skeleton determination module, configured to determine the skeleton of the deformed template model according to the skeleton elongation ratio, the skeleton rotation angle and the skeleton of the template model;
第二皮肤网格修改模块,用于根据所述位移补偿、所述模板模型的蒙皮权重,对所述模板模型的皮肤网格进行修改;A second skin mesh modification module, configured to modify the skin mesh of the template model according to the displacement compensation and the skin weight of the template model;
角色模型骨骼确定模块,用于在修改后的模板模型的皮肤网格的形状与所述待创建的角色模型的皮肤网格的形状的重合度大于预定阈值时,将所述变形后的模板模型的骨骼嵌套至所述待创建的角色模型中,从而确定待创建的角色模型的骨骼。The character model skeleton determination module is used for determining the deformed template model when the shape of the skin mesh of the modified template model and the shape of the skin mesh of the to-be-created character model are more than a predetermined threshold. The bones of the to-be-created character model are nested, so as to determine the bones of the to-be-created character model.
在一种可能的实现方式中,第三角色模型确定模块14包括:In a possible implementation manner, the third role model determining module 14 includes:
第三确定子模块,用于确定所述待创建的角色模型的皮肤网格中各个网格单元在初始状态下对应的第一边向量矩阵,和在关节转动后所述待创建的角色模型的皮肤网格中各个网格单元对应的第二边向量矩阵,所述第一边向量矩阵和所述第二边向量矩阵根据相应网格单元的边向量和面法线确定。The third determination submodule is used to determine the first edge vector matrix corresponding to each grid unit in the skin mesh of the character model to be created in the initial state, and the character model to be created after the joints are rotated. The second side vector matrix corresponding to each grid unit in the skin grid, the first side vector matrix and the second side vector matrix are determined according to the side vector and the surface normal of the corresponding grid unit.
在一种可能的实现方式中,第三确定子模块包括:In a possible implementation manner, the third determination submodule includes:
第三约束子模块,用于使得所述待创建的角色模型的皮肤网格中各个网格单元的翻转变换矩阵与所述模板模型的皮肤网格中各个网格单元的翻转变换矩阵相同;The third constraint submodule is used to make the flip transformation matrix of each grid unit in the skin grid of the character model to be created the same as the flip transformation matrix of each grid unit in the skin grid of the template model;
其中,所述待创建的角色模型的皮肤网格中各个网格单元的翻转变换矩阵根据所述待创建的角色模型的皮肤网格中的各个网格单元的所述第一边向量矩阵和所述第二边向量矩阵得到,所述模板模型的皮肤网格中各个网格单元的翻转变换矩阵根据所述模板模型的皮肤网格中各个网格单元的第一 边向量矩阵和第二边向量矩阵得到。Wherein, the flip transformation matrix of each grid unit in the skin grid of the character model to be created is based on the first side vector matrix and the first edge vector matrix of each grid unit in the skin grid of the character model to be created. The second side vector matrix is obtained, and the flip transformation matrix of each grid unit in the skin grid of the template model is based on the first side vector matrix and the second side vector of each grid unit in the skin grid of the template model. matrix is obtained.
在一种可能的实现方式中,第三确定子模块包括:In a possible implementation manner, the third determination submodule includes:
第四约束子模块,用于使得所述待创建的角色模型的皮肤网格中每个网格单元的翻转变换矩阵与该网格单元临接的网格单元的翻转变换矩阵相同;The fourth constraint submodule is used to make the flip transformation matrix of each grid unit in the skin grid of the character model to be created identical with the flip transformation matrix of the grid unit adjacent to the grid unit;
其中,所述待创建的角色模型的翻转变换矩阵根据所述待创建的角色模型的皮肤网格中各个网格单元所述第一边向量矩阵和所述第二边向量矩阵得到。Wherein, the flip transformation matrix of the character model to be created is obtained according to the first edge vector matrix and the second edge vector matrix of each grid unit in the skin mesh of the character model to be created.
在一种可能的实现方式中,所述装置10还包括:In a possible implementation manner, the apparatus 10 further includes:
蒙皮权重确定模块,用于根据所述模板模型的蒙皮权重,确定所述待创建的角色模型的蒙皮权重。The skin weight determination module is configured to determine the skin weight of the character model to be created according to the skin weight of the template model.
本公开实施例提出一种虚拟角色模型创建装置,包括:处理器;用于存储处理器可执行指令的存储器;其中,所述处理器被配置为在执行所述指令时,实现上述方法。An embodiment of the present disclosure provides an apparatus for creating a virtual character model, including: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to implement the above method when executing the instructions.
本公开实施例提出一种非易失性计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现上述方法。The embodiments of the present disclosure provide a non-volatile computer-readable storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the foregoing method is implemented.
图4是根据一示例性实施例示出的一种虚拟角色模型创建电子设备800的框图。例如,电子设备800可以是移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等。FIG. 4 is a block diagram of an electronic device 800 for creating a virtual character model according to an exemplary embodiment. For example, electronic device 800 may be a mobile phone, computer, digital broadcast terminal, messaging device, game console, tablet device, medical device, fitness device, personal digital assistant, and the like.
参照图4,电子设备800可以包括以下一个或多个组件:处理组件802,存储器804,电源组件806,多媒体组件808,音频组件810,输入/输出(I/O)的接口812,传感器组件814,以及通信组件816。4, the electronic device 800 may include one or more of the following components: a processing component 802, a memory 804, a power supply component 806, a multimedia component 808, an audio component 810, an input/output (I/O) interface 812, a sensor component 814 , and the communication component 816 .
处理组件802通常控制电子设备800的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理组件802可以包括一个或多个处理器820来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件802可以包括一个或多个模块,便于处理组件802和其他组件之间的交互。例如,处理组件802可以包括多媒体模块,以方便多媒体组件808和处 理组件802之间的交互。The processing component 802 generally controls the overall operation of the electronic device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 can include one or more processors 820 to execute instructions to perform all or some of the steps of the methods described above. Additionally, processing component 802 may include one or more modules that facilitate interaction between processing component 802 and other components. For example, processing component 802 may include a multimedia module to facilitate interaction between multimedia component 808 and processing component 802.
存储器804被配置为存储各种类型的数据以支持在电子设备800的操作。这些数据的示例包括用于在电子设备800上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器804可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。 Memory 804 is configured to store various types of data to support operation at electronic device 800 . Examples of such data include instructions for any application or method operating on electronic device 800, contact data, phonebook data, messages, pictures, videos, and the like. Memory 804 may be implemented by any type of volatile or nonvolatile storage device or combination thereof, such as static random access memory (SRAM), electrically erasable programmable read only memory (EEPROM), erasable Programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), Magnetic Memory, Flash Memory, Magnetic or Optical Disk.
电源组件806为电子设备800的各种组件提供电力。电源组件806可以包括电源管理系统,一个或多个电源,及其他与为电子设备800生成、管理和分配电力相关联的组件。 Power supply assembly 806 provides power to various components of electronic device 800 . Power supply components 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 800 .
多媒体组件808包括在所述电子设备800和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD)和触摸面板(TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件808包括一个前置摄像头和/或后置摄像头。当电子设备800处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜系统或具有焦距和光学变焦能力。 Multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touch, swipe, and gestures on the touch panel. The touch sensor may not only sense the boundaries of a touch or swipe action, but also detect the duration and pressure associated with the touch or swipe action. In some embodiments, the multimedia component 808 includes a front-facing camera and/or a rear-facing camera. When the electronic device 800 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera may receive external multimedia data. Each of the front and rear cameras can be a fixed optical lens system or have focal length and optical zoom capability.
音频组件810被配置为输出和/或输入音频信号。例如,音频组件810包括一个麦克风(MIC),当电子设备800处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器804或经由通信组件816发送。在一些实施例中,音频组件810还包括一个扬声器,用于输出音频信号。 Audio component 810 is configured to output and/or input audio signals. For example, audio component 810 includes a microphone (MIC) that is configured to receive external audio signals when electronic device 800 is in operating modes, such as calling mode, recording mode, and voice recognition mode. The received audio signal may be further stored in memory 804 or transmitted via communication component 816 . In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
I/O接口812为处理组件802和外围接口模块之间提供接口,上述外围接 口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。The I/O interface 812 provides an interface between the processing component 802 and a peripheral interface module, such as a keyboard, a click wheel, a button, and the like. These buttons may include, but are not limited to: home button, volume buttons, start button, and lock button.
传感器组件814包括一个或多个传感器,用于为电子设备800提供各个方面的状态评估。例如,传感器组件814可以检测到电子设备800的打开/关闭状态,组件的相对定位,例如所述组件为电子设备800的显示器和小键盘,传感器组件814还可以检测电子设备800或电子设备800一个组件的位置改变,用户与电子设备800接触的存在或不存在,电子设备800方位或加速/减速和电子设备800的温度变化。传感器组件814可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件814还可以包括光传感器,如CMOS或CCD图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件814还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。 Sensor assembly 814 includes one or more sensors for providing status assessment of various aspects of electronic device 800 . For example, the sensor assembly 814 can detect the on/off state of the electronic device 800, the relative positioning of the components, such as the display and the keypad of the electronic device 800, the sensor assembly 814 can also detect the electronic device 800 or one of the electronic device 800 Changes in the position of components, presence or absence of user contact with the electronic device 800 , orientation or acceleration/deceleration of the electronic device 800 and changes in the temperature of the electronic device 800 . Sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects in the absence of any physical contact. Sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
通信组件816被配置为便于电子设备800和其他设备之间有线或无线方式的通信。电子设备800可以接入基于通信标准的无线网络,如WiFi,2G或3G,或它们的组合。在一个示例性实施例中,通信组件816经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。在一个示例性实施例中,所述通信组件816还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。 Communication component 816 is configured to facilitate wired or wireless communication between electronic device 800 and other devices. Electronic device 800 may access wireless networks based on communication standards, such as WiFi, 2G or 3G, or a combination thereof. In one exemplary embodiment, the communication component 816 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
在示例性实施例中,电子设备800可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述方法。In an exemplary embodiment, electronic device 800 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable A programmed gate array (FPGA), controller, microcontroller, microprocessor or other electronic component implementation is used to perform the above method.
在示例性实施例中,还提供了一种非易失性计算机可读存储介质,例如包括计算机程序指令的存储器804,上述计算机程序指令可由电子设备800的处理器820执行以完成上述方法。In an exemplary embodiment, a non-volatile computer-readable storage medium, such as a memory 804 comprising computer program instructions executable by the processor 820 of the electronic device 800 to perform the above method is also provided.
图5是根据一示例性实施例示出的一种虚拟角色模型创建装置1900的框 图。例如,装置1900可以被提供为一服务器。参照图5,装置1900包括处理组件1922,其进一步包括一个或多个处理器,以及由存储器1932所代表的存储器资源,用于存储可由处理组件1922的执行的指令,例如应用程序。存储器1932中存储的应用程序可以包括一个或一个以上的每一个对应于一组指令的模块。此外,处理组件1922被配置为执行指令,以执行上述方法。Fig. 5 is a block diagram of an apparatus 1900 for creating a virtual character model according to an exemplary embodiment. For example, the apparatus 1900 may be provided as a server. 5, apparatus 1900 includes processing component 1922, which further includes one or more processors, and a memory resource represented by memory 1932 for storing instructions executable by processing component 1922, such as applications. An application program stored in memory 1932 may include one or more modules, each corresponding to a set of instructions. Additionally, the processing component 1922 is configured to execute instructions to perform the above-described methods.
装置1900还可以包括一个电源组件1926被配置为执行装置1900的电源管理,一个有线或无线网络接口1950被配置为将装置1900连接到网络,和一个输入输出(I/O)接口1958。装置1900可以操作基于存储在存储器1932的操作系统,例如Windows ServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTM或类似。The device 1900 may also include a power supply assembly 1926 configured to perform power management of the device 1900, a wired or wireless network interface 1950 configured to connect the device 1900 to a network, and an input output (I/O) interface 1958. Device 1900 may operate based on an operating system stored in memory 1932, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™ or the like.
在示例性实施例中,还提供了一种非易失性计算机可读存储介质,例如包括计算机程序指令的存储器1932,上述计算机程序指令可由装置1900的处理组件1922执行以完成上述方法。In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as memory 1932 comprising computer program instructions executable by processing component 1922 of apparatus 1900 to perform the above-described method.
本公开可以是系统、方法和/或计算机程序产品。计算机程序产品可以包括计算机可读存储介质,其上载有用于使处理器实现本公开的各个方面的计算机可读程序指令。The present disclosure may be a system, method and/or computer program product. The computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for causing a processor to implement various aspects of the present disclosure.
计算机可读存储介质可以是可以保持和存储由指令执行设备使用的指令的有形设备。计算机可读存储介质例如可以是――但不限于――电存储设备、磁存储设备、光存储设备、电磁存储设备、半导体存储设备或者上述的任意合适的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、静态随机存取存储器(SRAM)、便携式压缩盘只读存储器(CD-ROM)、数字多功能盘(DVD)、记忆棒、软盘、机械编码设备、例如其上存储有指令的打孔卡或凹槽内凸起结构、以及上述的任意合适的组合。这里所使用的计算机可读存储介质不被解释为瞬时信号本身,诸如无线电波或者其他自由传播的电磁波、通过波导或其他传输媒介传播的电磁波(例如,通过光纤电缆的光脉冲)、或者通过电线传输 的电信号。A computer-readable storage medium may be a tangible device that can hold and store instructions for use by the instruction execution device. The computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples (non-exhaustive list) of computer readable storage media include: portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM) or flash memory), static random access memory (SRAM), portable compact disk read only memory (CD-ROM), digital versatile disk (DVD), memory sticks, floppy disks, mechanically coded devices, such as printers with instructions stored thereon Hole cards or raised structures in grooves, and any suitable combination of the above. Computer-readable storage media, as used herein, are not to be construed as transient signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (eg, light pulses through fiber optic cables), or through electrical wires transmitted electrical signals.
这里所描述的计算机可读程序指令可以从计算机可读存储介质下载到各个计算/处理设备,或者通过网络、例如因特网、局域网、广域网和/或无线网下载到外部计算机或外部存储设备。网络可以包括铜传输电缆、光纤传输、无线传输、路由器、防火墙、交换机、网关计算机和/或边缘服务器。每个计算/处理设备中的网络适配卡或者网络接口从网络接收计算机可读程序指令,并转发该计算机可读程序指令,以供存储在各个计算/处理设备中的计算机可读存储介质中。The computer readable program instructions described herein may be downloaded to various computing/processing devices from a computer readable storage medium, or to an external computer or external storage device over a network such as the Internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and/or edge servers. A network adapter card or network interface in each computing/processing device receives computer-readable program instructions from a network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in each computing/processing device .
用于执行本公开操作的计算机程序指令可以是汇编指令、指令集架构(ISA)指令、机器指令、机器相关指令、微代码、固件指令、状态设置数据、或者以一种或多种编程语言的任意组合编写的源代码或目标代码,所述编程语言包括面向对象的编程语言—诸如Smalltalk、C++等,以及常规的过程式编程语言—诸如“C”语言或类似的编程语言。计算机可读程序指令可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络—包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。在一些实施例中,通过利用计算机可读程序指令的状态信息来个性化定制电子电路,例如可编程逻辑电路、现场可编程门阵列(FPGA)或可编程逻辑阵列(PLA),该电子电路可以执行计算机可读程序指令,从而实现本公开的各个方面。Computer program instructions for carrying out operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or instructions in one or more programming languages. Source or object code, written in any combination, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as the "C" language or similar programming languages. The computer readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server implement. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (eg, using an Internet service provider through the Internet connect). In some embodiments, custom electronic circuits, such as programmable logic circuits, field programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), can be personalized by utilizing state information of computer readable program instructions. Computer readable program instructions are executed to implement various aspects of the present disclosure.
这里参照根据本公开实施例的方法、装置(系统)和计算机程序产品的流程图和/或框图描述了本公开的各个方面。应当理解,流程图和/或框图的每个方框以及流程图和/或框图中各方框的组合,都可以由计算机可读程序指令实现。Aspects of the present disclosure are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer readable program instructions.
这些计算机可读程序指令可以提供给通用计算机、专用计算机或其它可 编程数据处理装置的处理器,从而生产出一种机器,使得这些指令在通过计算机或其它可编程数据处理装置的处理器执行时,产生了实现流程图和/或框图中的一个或多个方框中规定的功能/动作的装置。也可以把这些计算机可读程序指令存储在计算机可读存储介质中,这些指令使得计算机、可编程数据处理装置和/或其他设备以特定方式工作,从而,存储有指令的计算机可读介质则包括一个制造品,其包括实现流程图和/或框图中的一个或多个方框中规定的功能/动作的各个方面的指令。These computer readable program instructions may be provided to a processor of a general purpose computer, special purpose computer or other programmable data processing apparatus to produce a machine that causes the instructions when executed by the processor of the computer or other programmable data processing apparatus , resulting in means for implementing the functions/acts specified in one or more blocks of the flowchart and/or block diagrams. These computer readable program instructions can also be stored in a computer readable storage medium, these instructions cause a computer, programmable data processing apparatus and/or other equipment to operate in a specific manner, so that the computer readable medium storing the instructions includes An article of manufacture comprising instructions for implementing various aspects of the functions/acts specified in one or more blocks of the flowchart and/or block diagrams.
也可以把计算机可读程序指令加载到计算机、其它可编程数据处理装置、或其它设备上,使得在计算机、其它可编程数据处理装置或其它设备上执行一系列操作步骤,以产生计算机实现的过程,从而使得在计算机、其它可编程数据处理装置、或其它设备上执行的指令实现流程图和/或框图中的一个或多个方框中规定的功能/动作。Computer readable program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other equipment to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other equipment to produce a computer-implemented process , thereby causing instructions executing on a computer, other programmable data processing apparatus, or other device to implement the functions/acts specified in one or more blocks of the flowcharts and/or block diagrams.
附图中的流程图和框图显示了根据本公开的多个实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或指令的一部分,所述模块、程序段或指令的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more functions for implementing the specified logical function(s) executable instructions. In some alternative implementations, the functions noted in the blocks may occur out of the order noted in the figures. For example, two blocks in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It is also noted that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented in dedicated hardware-based systems that perform the specified functions or actions , or can be implemented in a combination of dedicated hardware and computer instructions.
以上已经描述了本公开的各实施例,上述说明是示例性的,并非穷尽性的,并且也不限于所披露的各实施例。在不偏离所说明的各实施例的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。本文中所用术语的选择,旨在最好地解释各实施例的原理、实际 应用或对市场中的技术的技术改进,或者使本技术领域的其它普通技术人员能理解本文披露的各实施例。Various embodiments of the present disclosure have been described above, and the foregoing descriptions are exemplary, not exhaustive, and not limiting of the disclosed embodiments. Numerous modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein was chosen to best explain the principles of the various embodiments, the practical application or technical improvement over the technology in the marketplace, or to enable others of ordinary skill in the art to understand the various embodiments disclosed herein.

Claims (12)

  1. 一种虚拟角色模型创建方法,其特征在于,所述方法包括:A method for creating a virtual character model, characterized in that the method comprises:
    确定待创建的角色模型,所述待创建的角色模型至少包括皮肤网格;determining a character model to be created, the character model to be created at least includes a skin mesh;
    根据所述待创建的角色模型,确定模板模型,所述模板模型包括皮肤网格、与所述皮肤网格相匹配的骨骼、与所述皮肤网格对应的蒙皮权重和各个关节点对应的修形;According to the character model to be created, a template model is determined, and the template model includes a skin mesh, a bone matched with the skin mesh, a skin weight corresponding to the skin mesh, and each joint point. modification;
    根据所述模板模型的皮肤网格、骨骼、蒙皮权重,确定所述待创建的角色模型的骨骼和蒙皮权重;Determine the bones and skin weights of the character model to be created according to the skin meshes, bones, and skin weights of the template model;
    根据所述模板模型的修形,确定所述待创建的角色模型的修形;According to the modification of the template model, determine the modification of the character model to be created;
    根据所述待创建的角色模型的皮肤网格、骨骼、蒙皮权重和修形,创建角色模型。A character model is created according to the skin mesh, bones, skin weights and modifications of the character model to be created.
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method according to claim 1, wherein the method further comprises:
    在所述待创建的角色模型的皮肤网格的拓扑与所述模板模型的皮肤网格的拓扑不一致的情况下,确定所述模板模型的皮肤网格的拓扑为所述待创建的角色模型的皮肤网格的拓扑;In the case that the topology of the skin mesh of the character model to be created is inconsistent with the topology of the skin mesh of the template model, determine that the topology of the skin mesh of the template model is that of the character model to be created. the topology of the skin mesh;
    根据所述待创建的角色模型的皮肤网格的形状对所述模板模型的皮肤网格的形状进行修改。The shape of the skin mesh of the template model is modified according to the shape of the skin mesh of the character model to be created.
  3. 根据权利要求1所述的方法,其特征在于,根据所述模板模型的皮肤网格、骨骼、蒙皮权重,确定所述待创建的角色模型的骨骼和蒙皮权重,包括:The method according to claim 1, wherein determining the bones and skin weights of the character model to be created according to skin meshes, bones, and skin weights of the template model, comprising:
    确定所述待创建的角色模型的骨骼相对于所述模板模型的骨骼的骨骼伸长倍率、骨骼旋转角度,以及所述待创建的角色模型的皮肤网格的顶点相对于所述模板模型的皮肤网格的顶点的位移补偿;Determine the bone elongation ratio and the bone rotation angle of the bones of the character model to be created relative to the bones of the template model, and the vertices of the skin mesh of the character model to be created relative to the skin of the template model. Displacement compensation of the vertices of the mesh;
    根据所述骨骼伸长倍率和骨骼旋转角度以及所述模板模型的骨骼,确定所述待创建的角色模型的骨骼。The bones of the character model to be created are determined according to the bone elongation ratio and the bone rotation angle and the bones of the template model.
  4. 根据权利要求3所述的方法,其特征在于,确定所述待创建的角色模型的骨骼相对于所述模板模型的骨骼的骨骼伸长倍率、骨骼旋转角度,以及所述待创建的角色模型的皮肤网格的顶点相对于所述模板模型的皮肤网格的顶点的位移补偿,包括:The method according to claim 3, wherein the bone elongation ratio, the bone rotation angle of the bones of the character model to be created relative to the bones of the template model, and the bone rotation angle of the character model to be created are determined. The displacement compensation of the vertices of the skin mesh relative to the vertices of the skin mesh of the template model, including:
    使得根据所述骨骼伸长倍率和所述骨骼旋转角度得到的骨骼拉伸旋转后模板模型的关节点坐标,与对根据所述骨骼伸长倍率、所述骨骼旋转角度、以及所述位移补偿得到的骨骼拉伸旋转后模板模型的关节点周围的皮肤网格顶点坐标进行加权后得到的关节点坐标相同;The joint point coordinates of the template model after bone stretching and rotation obtained according to the bone elongation ratio and the bone rotation angle are compared with those obtained according to the bone elongation ratio, the bone rotation angle, and the displacement compensation. The joint point coordinates obtained by weighting the skin mesh vertex coordinates around the joint points of the template model after the bone stretching and rotation are the same;
    使得骨骼拉伸旋转后所述模板模型的皮肤网格顶点坐标与所述待创建的角色模型的皮肤网格顶点坐标相同;After the bones are stretched and rotated, the skin mesh vertex coordinates of the template model are the same as the skin mesh vertex coordinates of the character model to be created;
    其中,在骨骼拉伸旋转后所述模板模型的皮肤网格顶点坐标根据所述骨骼伸长倍率、所述骨骼旋转角度和所述位移补偿得到。Wherein, after the bones are stretched and rotated, the coordinates of the skin mesh vertices of the template model are obtained according to the stretch ratio of the bones, the rotation angle of the bones and the displacement compensation.
  5. 根据权利要求3所述的方法,其特征在于,根据所述骨骼伸长倍率和骨骼旋转角度以及所述模板模型的骨骼,确定所述待创建的角色模型的骨骼,包括:The method according to claim 3, wherein determining the bones of the character model to be created according to the bone elongation ratio and the bone rotation angle and the bones of the template model, comprising:
    根据所述骨骼伸长倍率、所述骨骼旋转角度以及所述模板模型的骨骼确定变形后的模板模型的骨骼;Determine the skeleton of the deformed template model according to the skeleton elongation ratio, the skeleton rotation angle and the skeleton of the template model;
    根据所述位移补偿、所述模板模型的蒙皮权重,对所述模板模型的皮肤网格进行修改;modifying the skin mesh of the template model according to the displacement compensation and the skin weight of the template model;
    在修改后的模板模型的皮肤网格的形状与所述待创建的角色模型的皮肤网格的形状的重合度大于预定阈值时,将所述变形后的模板模型的骨骼嵌套至所述待创建的角色模型中,从而确定待创建的角色模型的骨骼。When the degree of coincidence between the shape of the skin mesh of the modified template model and the shape of the skin mesh of the character model to be created is greater than a predetermined threshold, nest the bones of the deformed template model into the to-be-created character model. In the created character model, the bones of the character model to be created are determined.
  6. 根据权利要求1所述的方法,其特征在于,根据所述模板模型的修形,确定所述待创建的角色模型的修形,包括:The method according to claim 1, wherein determining the modification of the character model to be created according to the modification of the template model, comprising:
    确定所述待创建的角色模型的皮肤网格中各个网格单元在初始状态下 对应的第一边向量矩阵,和在关节转动后所述待创建的角色模型的皮肤网格中各个网格单元对应的第二边向量矩阵,所述第一边向量矩阵和所述第二边向量矩阵根据相应网格单元的边向量和面法线确定。Determine the first side vector matrix corresponding to each grid unit in the skin grid of the character model to be created in the initial state, and each grid unit in the skin grid of the character model to be created after the joints are rotated The corresponding second edge vector matrix, the first edge vector matrix and the second edge vector matrix are determined according to the edge vector and the surface normal of the corresponding grid unit.
  7. 根据权利要求6所述的方法,其特征在于,确定所述待创建的角色模型的皮肤网格中各个网格单元在初始状态下对应的第一边向量矩阵,和在关节转动后所述待创建的角色模型的皮肤网格中各个网格单元对应的第二边向量矩阵,包括:The method according to claim 6, wherein the first edge vector matrix corresponding to each grid unit in the skin grid of the character model to be created in an initial state is determined, and the The second edge vector matrix corresponding to each mesh element in the skin mesh of the created character model, including:
    使得所述待创建的角色模型的皮肤网格中各个网格单元的翻转变换矩阵与所述模板模型的皮肤网格中各个网格单元的翻转变换矩阵相同;Make the flip transformation matrix of each grid unit in the skin grid of the character model to be created the same as the flip transformation matrix of each grid unit in the skin grid of the template model;
    其中,所述待创建的角色模型的皮肤网格中各个网格单元的翻转变换矩阵根据所述待创建的角色模型的皮肤网格中的各个网格单元的所述第一边向量矩阵和所述第二边向量矩阵得到,所述模板模型的皮肤网格中各个网格单元的翻转变换矩阵根据所述模板模型的皮肤网格中各个网格单元的第一边向量矩阵和第二边向量矩阵得到。Wherein, the flip transformation matrix of each grid unit in the skin grid of the character model to be created is based on the first side vector matrix and the first edge vector matrix of each grid unit in the skin grid of the character model to be created. The second side vector matrix is obtained, and the flip transformation matrix of each grid unit in the skin grid of the template model is based on the first side vector matrix and the second side vector of each grid unit in the skin grid of the template model. matrix is obtained.
  8. 根据权利要求6所述的方法,其特征在于,确定所述待创建的角色模型的皮肤网格中各个网格单元在初始状态下对应的第一边向量矩阵,和在关节转动后所述待创建的角色模型的皮肤网格中各个网格单元对应的第二边向量矩阵,包括:The method according to claim 6, wherein the first edge vector matrix corresponding to each grid unit in the skin grid of the character model to be created in an initial state is determined, and the The second edge vector matrix corresponding to each grid unit in the skin grid of the created character model, including:
    使得所述待创建的角色模型的皮肤网格中每个网格单元的翻转变换矩阵与该网格单元临接的网格单元的翻转变换矩阵相同;Make the flip transformation matrix of each grid unit in the skin grid of the character model to be created the same as the flip transformation matrix of the grid unit adjacent to the grid unit;
    其中,所述待创建的角色模型的翻转变换矩阵根据所述待创建的角色模型的皮肤网格中各个网格单元所述第一边向量矩阵和所述第二边向量矩阵得到。Wherein, the flip transformation matrix of the character model to be created is obtained according to the first side vector matrix and the second side vector matrix of each grid unit in the skin mesh of the character model to be created.
  9. 根据权利要求1至4中任一项所述的方法,其特征在于,根据所述模 板模型的蒙皮权重,确定所述待创建的角色模型的蒙皮权重。The method according to any one of claims 1 to 4, wherein the skin weight of the character model to be created is determined according to the skin weight of the template model.
  10. 一种虚拟角色模型创建装置,其特征在于,所述装置包括:An apparatus for creating a virtual character model, wherein the apparatus comprises:
    第一角色模型确定模块,用于确定待创建的角色模型,所述待创建的角色模型至少包括皮肤网格;a first character model determination module, configured to determine a character model to be created, where the character model to be created at least includes a skin mesh;
    模板模型确定模块,用于根据所述待创建的角色模型,确定模板模型,所述模板模型包括皮肤网格、与所述皮肤网格相匹配的骨骼、与所述皮肤网格对应的蒙皮权重和各个关节点对应的修形;A template model determination module, configured to determine a template model according to the character model to be created, where the template model includes a skin mesh, a skeleton matching the skin mesh, and a skin corresponding to the skin mesh Weights and modifications corresponding to each joint point;
    第二角色模型确定模块,用于根据所述模板模型的皮肤网格、骨骼、蒙皮权重,确定所述待创建的角色模型的骨骼和蒙皮权重;A second character model determination module, configured to determine the bones and skin weights of the character model to be created according to the skin meshes, bones, and skin weights of the template model;
    第三角色模型确定模块,用于根据所述模板模型的修形,确定所述待创建的角色模型的修形;a third role model determining module, configured to determine the modification of the to-be-created role model according to the modification of the template model;
    角色模型创建模块,用于根据所述待创建的角色模型的皮肤网格、骨骼、蒙皮权重和修形,创建角色模型。The character model creation module is used for creating a character model according to the skin mesh, skeleton, skin weight and modification of the character model to be created.
  11. 一种虚拟角色模型创建电子设备,其特征在于,包括:An electronic device for creating a virtual character model, comprising:
    处理器;processor;
    用于存储处理器可执行指令的存储器;memory for storing processor-executable instructions;
    其中,所述处理器被配置为在执行所述指令时,实现根据权利要求1至8中任一项所述的方法。wherein the processor is configured to, when executing the instructions, implement the method of any one of claims 1 to 8.
  12. 一种非易失性计算机可读存储介质,其上存储有计算机程序指令,其特征在于,所述计算机程序指令被处理器执行时实现权利要求1至8中任意一项所述的方法。A non-volatile computer-readable storage medium on which computer program instructions are stored, characterized in that, when the computer program instructions are executed by a processor, the method described in any one of claims 1 to 8 is implemented.
PCT/CN2021/138417 2020-12-31 2021-12-15 Virtual character model creation method and apparatus, electronic device, and storage medium WO2022143179A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011626033.9 2020-12-31
CN202011626033.9A CN112712578B (en) 2020-12-31 2020-12-31 Virtual character model creating method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
WO2022143179A1 true WO2022143179A1 (en) 2022-07-07

Family

ID=75547684

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/138417 WO2022143179A1 (en) 2020-12-31 2021-12-15 Virtual character model creation method and apparatus, electronic device, and storage medium

Country Status (2)

Country Link
CN (1) CN112712578B (en)
WO (1) WO2022143179A1 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112712578B (en) * 2020-12-31 2022-09-27 魔珐(上海)信息科技有限公司 Virtual character model creating method and device, electronic equipment and storage medium
CN112884868B (en) * 2021-04-30 2021-07-13 腾讯科技(深圳)有限公司 Three-dimensional mesh vertex feature determination method, skeleton covering method and related device
CN113345059B (en) * 2021-05-31 2023-08-08 网易(杭州)网络有限公司 Animation generation method and device, storage medium and electronic equipment
CN115049769B (en) * 2022-08-17 2022-11-04 深圳泽森软件技术有限责任公司 Character animation generation method and device, computer equipment and storage medium
CN115423907B (en) * 2022-09-29 2023-05-26 魔珐(上海)信息科技有限公司 Character model body binding method, apparatus, device and storage medium
CN116012499B (en) * 2022-10-20 2023-11-03 武汉两点十分文化传播有限公司 Method and system for rapidly generating maya three-dimensional character animation

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100134490A1 (en) * 2008-11-24 2010-06-03 Mixamo, Inc. Real time generation of animation-ready 3d character models
CN104021584A (en) * 2014-06-25 2014-09-03 无锡梵天信息技术股份有限公司 Implementation method of skinned skeletal animation
KR20160010810A (en) * 2014-07-18 2016-01-28 (주)참빛솔루션 Realistic character creation method and creating system capable of providing real voice
CN109993819A (en) * 2019-04-09 2019-07-09 网易(杭州)网络有限公司 Skinning method and device, the electronic equipment of virtual role
CN111643898A (en) * 2020-05-22 2020-09-11 腾讯科技(深圳)有限公司 Virtual scene construction method, device, terminal and storage medium
CN111935528A (en) * 2020-06-22 2020-11-13 北京百度网讯科技有限公司 Video generation method and device
CN112712578A (en) * 2020-12-31 2021-04-27 魔珐(上海)信息科技有限公司 Virtual character model creating method and device, electronic equipment and storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101197049B (en) * 2007-12-21 2010-12-01 西北工业大学 Full-automatic driving method of three-dimensional motion model based on three-dimensional motion parameter
CN105303602A (en) * 2015-10-09 2016-02-03 摩多文化(深圳)有限公司 Automatic 3D human body model bone binding process and method
US20180225858A1 (en) * 2017-02-03 2018-08-09 Sony Corporation Apparatus and method to generate realistic rigged three dimensional (3d) model animation for view-point transform
CN108597015A (en) * 2018-01-08 2018-09-28 江苏辰锐网络科技有限公司 The automatic binding system of three dimensional biological model bone, method, equipment and computer program product
CN111714885A (en) * 2020-06-22 2020-09-29 网易(杭州)网络有限公司 Game role model generation method, game role model generation device, game role adjustment device and game role adjustment medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100134490A1 (en) * 2008-11-24 2010-06-03 Mixamo, Inc. Real time generation of animation-ready 3d character models
CN104021584A (en) * 2014-06-25 2014-09-03 无锡梵天信息技术股份有限公司 Implementation method of skinned skeletal animation
KR20160010810A (en) * 2014-07-18 2016-01-28 (주)참빛솔루션 Realistic character creation method and creating system capable of providing real voice
CN109993819A (en) * 2019-04-09 2019-07-09 网易(杭州)网络有限公司 Skinning method and device, the electronic equipment of virtual role
CN111643898A (en) * 2020-05-22 2020-09-11 腾讯科技(深圳)有限公司 Virtual scene construction method, device, terminal and storage medium
CN111935528A (en) * 2020-06-22 2020-11-13 北京百度网讯科技有限公司 Video generation method and device
CN112712578A (en) * 2020-12-31 2021-04-27 魔珐(上海)信息科技有限公司 Virtual character model creating method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN112712578B (en) 2022-09-27
CN112712578A (en) 2021-04-27

Similar Documents

Publication Publication Date Title
WO2022143179A1 (en) Virtual character model creation method and apparatus, electronic device, and storage medium
CN109584151B (en) Face beautifying method, device, terminal and storage medium
CN110766777B (en) Method and device for generating virtual image, electronic equipment and storage medium
CN110148102B (en) Image synthesis method, advertisement material synthesis method and device
WO2019041902A1 (en) Emoticon animation generating method and device, storage medium, and electronic device
CN109816611A (en) Video repairing method and device, electronic equipment and storage medium
KR101944112B1 (en) Method and apparatus for creating user-created sticker, system for sharing user-created sticker
WO2020134558A1 (en) Image processing method and apparatus, electronic device and storage medium
US11688136B2 (en) 3D object model reconstruction from 2D images
CN109472738B (en) Image illumination correction method and device, electronic equipment and storage medium
CN109840939A (en) Three-dimensional rebuilding method, device, electronic equipment and storage medium
EP4143788A1 (en) Texture-based pose validation
TW202016691A (en) Mobile device and video editing method thereof
GB2598452A (en) 3D object model reconstruction from 2D images
CN114881893A (en) Image processing method, device, equipment and computer readable storage medium
CN110796083A (en) Image display method, device, terminal and storage medium
CN107644455B (en) Face image synthesis method and device
KR20210070377A (en) Image processing method and device
WO2019096057A1 (en) Dynamic image generation method, and processing device
CN114494658B (en) Special effect display method, device, equipment and storage medium
CN115578494A (en) Method, device and equipment for generating intermediate frame and storage medium
JP6967150B2 (en) Learning device, image generator, learning method, image generation method and program
CN112561787A (en) Image processing method, image processing device, electronic equipment and storage medium
US20150187131A1 (en) Feature-based cloud computing architecture for physics engine
CN114388056B (en) AR-based protein section generation method

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: 21913920

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: 21913920

Country of ref document: EP

Kind code of ref document: A1