Model processing method and system and computer program product
By creating a target model for the basic model and configuring the fusion weight, the problem of distortion of the deformation effect of the basic model during fusion deformation is solved, and precise control of the deformation effect and natural character expression performance are achieved.
Patent Information
- Application Number
- CN202411216516.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2025-02-25
AI Technical Summary
In three-dimensional animation technology, the deformation effect of the basic model is prone to distortion or excessive unnatural when fusion deformation is combined, especially when multiple target objects work together.
By creating a target model for the base model and configuring the fusion weights based on the skin information, the overlay result of the fusion weights of the corresponding vertices on each target model satisfies the overlay constraint relationship, thereby controlling the degree of influence of the deformation of each target model by the vertices on the base model.
Accurate control of the deformation effect of the basic model is achieved, distortion and unnatural phenomena during fusion deformation are avoided, and the natural and realistic character expressions are ensured.
Smart Images

Figure CN119516050A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer three-dimensional animation technology, and in particular to a model processing method, system and computer program product. Background Art
[0002] In the field of 3D animation technology, blend deformation (also known as mixed deformation) is an important deformation technology. It calculates the influence of one or more target objects (or target bodies) and performs interpolation calculations to obtain the blend deformation that deforms the base object, achieving a smooth transition from the shape corresponding to the base object to the blend deformation, so that the base object is deformed to varying degrees. For some more complex deformations, such as deformation of facial expressions, multiple target objects can be created to control the deformation of different parts of the base model respectively. However, when multiple target objects work together, the deformation effects of some areas on the base model that are jointly controlled by multiple target objects will be superimposed, causing the deformation effect of the area to be distorted or overly unnatural.
[0003] In view of this, some embodiments of the present specification provide a model processing method, system and computer program product, which are intended to solve the problem that the deformation effect of the basic model becomes distorted or overly unnatural during fusion deformation. Summary of the invention
[0004] One or more embodiments of the present specification provide a model processing method, the method comprising: determining one or more target models based on a base model, wherein the vertices of the target models correspond to the vertices of the base model, and the target models are used to express the target shape to be fused to the base model; creating one or more bones based on the number of the target models; performing skinning processing on the one or more bones to determine skinning information, wherein the skinning information can reflect the superposition constraint relationship between the vertices on the base model affected by each bone; configuring the fusion weights of the target models based on the skinning information, so that the superposition result of the fusion weights of the corresponding vertices on each target model satisfies the superposition constraint relationship, wherein the fusion weights are used to characterize the degree of expression of the vertices of the target model on the target shape; controlling the target model to perform fusion deformation processing on the base model based on the fusion weights and deformation weights, so that the shape of the base model is deformed from the base shape to the fusion shape; wherein the fusion shape is the target shape or an intermediate shape in the process of transitioning from the base shape to the target shape, and the deformation weight is used to characterize the degree of influence of the target model on the base model.
[0005] According to the method provided by one or more embodiments of the present specification, determining one or more target models based on a base model includes: creating one or more target models based on the topological structure of the base model, and determining the target shape corresponding to the target model by adjusting the vertex positions of the target model.
[0006] According to the method provided by one or more embodiments of the present specification, determining one or more target models based on the basic model also includes: the multiple target models are the same model.
[0007] According to the method provided by one or more embodiments of the present specification, creating one or more bones based on the number of target models includes: creating one or more bones for a base model or a target model based on the number of target models.
[0008] According to the method provided by one or more embodiments of the present specification, creating one or more bones based on the number of target models also includes: the number of created bones is the same as the number of target models.
[0009] According to the method provided by one or more embodiments of the present specification, skinning one or more bones includes: in response to a weight drawing operation in a preset area corresponding to the bone, configuring skin weights for vertices corresponding to the preset area, the preset area being the area that the target model is expected to affect.
[0010] According to the method provided by one or more embodiments of the present specification, the skinning information includes skinning weights of vertices affected by each bone, wherein the bone corresponds to the target model, and the sum of the skinning weights of the vertices affected by each bone is a preset value.
[0011] According to the method provided by one or more embodiments of the present specification, configuring the fusion weight of the target model based on the skin information includes: setting the fusion weight corresponding to the vertex of the target model to the skin weight of the corresponding vertex in the skin information affected by the bone corresponding to the target model.
[0012] According to the method provided by one or more embodiments of the present specification, after configuring the fusion weight of the target model based on the skin information, the method further includes: canceling the skinning process for one or more bones and deleting the one or more created bones.
[0013] According to the method provided by one or more embodiments of the present specification, the superposition result of the fusion weights of the vertices corresponding to each other on each target model satisfies the superposition constraint relationship, including: the superposition result of the fusion weights of the vertices corresponding to each other on each target model is a preset value.
[0014] According to the method provided by one or more embodiments of this specification, the preset value is 1.
[0015] According to the method provided by one or more embodiments of the present specification, the controlling the target model based on the fusion weight and the deformation weight to perform fusion deformation processing on the base model includes: calculating the interpolation positions corresponding to the vertices of the base model based on the fusion weights corresponding to each target model, the deformation weights corresponding to each target model, the initial positions corresponding to the vertices of the base model, and the target positions corresponding to the vertices of each target model; moving the vertices in the base model from the initial positions to the interpolation positions corresponding to the vertices, so that the shape of the base model is deformed from the base shape to the fused shape.
[0016] According to the method provided by one or more embodiments of the present specification, the interpolation position corresponding to the vertex of the base model is calculated based on the fusion weight corresponding to each target model, the deformation weight corresponding to each target model, the initial position corresponding to the vertex of the base model, and the target position corresponding to the vertex of each target model, including: performing the following processing on the vertices on the base model: calculating each interpolation vector corresponding to the vertex based on the initial position corresponding to the vertex on the base model and each target position corresponding to the vertex; multiplying each interpolation vector corresponding to the vertex with the fusion weight of the vertex corresponding to the vertex on each target model and the deformation weight of each target model to obtain each interpolation position component corresponding to the vertex; and obtaining the interpolation position corresponding to the vertex based on the each interpolation position component.
[0017] One or more embodiments of the present specification also provide a model processing system, which includes: a model acquisition module, which is used to determine one or more target models based on a base model, wherein the vertices of the target model correspond to the vertices of the base model, and the target model is used to express the target shape to be fused to the base model; a skeleton creation module, which is used to create one or more skeletons based on the number of the target models; a skinning processing module, which is used to perform skinning processing on the one or more skeletons to determine skinning information, and the skinning information can reflect the superposition constraint relationship between the vertices on the base model affected by each skeleton; an information configuration module, which is used to configure the fusion weight of the target model based on the skinning information, so that the superposition result of the fusion weights of the corresponding vertices on each target model satisfies the superposition constraint relationship, wherein the fusion weight is used to characterize the degree of expression of the vertices of the target model on the target shape; a fusion deformation module, which is used to control the target model to perform fusion deformation processing on the base model based on the fusion weight and the deformation weight, so that the shape of the base model is deformed from the base shape to the fusion shape; wherein the fusion shape is the target shape or an intermediate shape in the process of transitioning from the base shape to the target shape, and the deformation weight is used to characterize the degree of influence of the target model on the base model.
[0018] One or more embodiments of the present specification also provide a computer program product, including a computer program, which, when at least a portion of the computer program is executed by a processor, can implement the model processing method described in some embodiments of the present specification. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] This specification will be further explained by way of exemplary embodiments, which will be described in detail by way of the accompanying drawings. The same numbers in the drawings represent the same structures or steps.
[0020] Figure 1 It is a schematic diagram of a three-dimensional model shown in some embodiments of this specification.
[0021] Figure 2 It is another schematic diagram of a three-dimensional model shown in some embodiments of this specification.
[0022] Figure 3 It is another schematic diagram of a three-dimensional model shown in some embodiments of this specification.
[0023] Figure 4 It is an exemplary flow chart of a model processing method shown in some embodiments of this specification.
[0024] Figure 5 It is a schematic diagram of skinning information shown in some embodiments of this specification.
[0025] Figure 6 is an exemplary flow chart of a skinning processing method according to some embodiments of the present specification.
[0026] Figure 7 is an exemplary block diagram of a model processing system according to some embodiments of the present specification. DETAILED DESCRIPTION
[0027] In order to more clearly illustrate the technical solutions of the embodiments of this specification, the embodiments will be described in detail below with reference to the accompanying drawings. Obviously, the contents described below are some examples or embodiments of this specification. For ordinary technicians in this field, without paying creative work, the technical solutions or means disclosed in this specification can also be applied to other scenarios based on these technical contents.
[0028] It should be understood that the "system", "device", "unit" and / or "module" used in this specification is a method for distinguishing different components, elements, parts, portions or assemblies at different levels. However, if other words can achieve the same purpose, the words can be replaced by other expressions.
[0029] Unless otherwise specified, technical terms used in this specification to describe components, elements, etc. do not refer to the singular, but may also include the plural. Generally speaking, terms such as "include", "comprise", etc. only indicate that the steps, elements, or components that have been clearly identified are included, and these steps, elements, and components do not constitute an exclusive list, such as the method or device described may also include other steps or components.
[0030] Flowcharts are used in this specification to illustrate the operation steps performed by the device or system of the relevant embodiments, but unless otherwise specified, the order used to describe these steps should not be understood as a limitation on the order in which the steps are performed. A person of ordinary skill in the art can adjust the order in which these steps are performed based on the knowledge and information conveyed by the embodiments of this specification, and the adjustment includes but is not limited to swapping the order, merging multiple steps, and splitting a certain step.
[0031] Computer three-dimensional animation technology, also known as three-dimensional computer animation, refers to the technology of simulating scenes and shapes in three-dimensional space over time through computers. This technology is widely used in movie special effects, virtual reality, animation and video games. The scenes or shapes in three-dimensional animation are often represented by three-dimensional models. For example, three-dimensional models can be character models (such as characters and animals in animation), static object models (such as buildings, furniture, props, etc.), environmental models (such as trees, terrain, buildings, etc.), etc. The three-dimensional model can include multiple polygonal meshes (also called Mesh), and the polygonal mesh can be, for example, a triangular mesh or a quadrilateral mesh. The polygonal mesh can be composed of vertices, edges, and faces. Two vertices are connected by edges, and multiple edges form a face, thereby forming a mesh. The vertex of the mesh can store data such as vertex position information, identification information, normal information, texture coordinates, and color information. This information can be stored in the vertex attributes in the form of fields to define the characteristics of the vertex. Among them, the position information of the vertex can be represented by the coordinate value of the vertex in the three-dimensional coordinate system, and the three-dimensional coordinate system can be a coordinate system preset in the three-dimensional animation production software. The change of one or more vertex positions in a 3D model can cause the 3D model to produce different deformations, thereby simulating different morphological changes. For example, for character animation, various expressions can be created by adjusting the position of one or more vertices in the facial model, or the walking, running, jumping, etc. of the character can be simulated by adjusting the position of one or more vertices in different parts of the body; for another example, for virtual object animation, the state of the object when it is affected by external forces can be simulated by adjusting the position of one or more vertices in the object model, such as the state of a flag when the wind blows.
[0032] Fusion deformation (or mixed deformation) is a way to achieve deformation of three-dimensional models. Its principle is to calculate the influence of one or more target objects (or target bodies) and perform interpolation calculations to obtain the interpolation positions of each vertex in the basic object, so that each vertex in the basic object moves from the initial position to the interpolation position, thereby performing fusion deformation and achieving a smooth transition from the shape corresponding to the basic object to the shape corresponding to the fusion deformation. Specifically, when performing fusion deformation, an object can be used as a basic model, the vertex position in the basic model is the initial position, and the shape corresponding to the basic model is the basic shape. One or more objects with the same topological structure as the basic model are used as target models, the vertex position in the target model is the target position, and the shape corresponding to the target model is the target shape. During fusion deformation, the interpolation vector can be calculated based on the initial position and target position of the vertex, and further combined with the deformation weight of the target model, the fusion weight of the target model and other influencing factors to calculate the interpolation position of the vertex. In this way, when fusion deformation is performed, each vertex in the basic model moves from the initial position to the interpolation position, and the shape change of the basic model can be seen macroscopically. Among them, the consistency of the topological structure can ensure that the vertices in the base model correspond one-to-one with the vertices in the target model, so that during the deformation process, the base model can smoothly transition from the basic shape to the shape corresponding to the fusion deformation, avoiding erroneous deformation or discontinuous deformation.
[0033] The deformation weight of the target model is used to characterize the degree of influence of the target model on the base model. Specifically, the deformation weight of the target model can characterize the degree of influence of the target shape corresponding to the target model on the overall deformation of the base model. One target model can correspond to one deformation weight, and the deformation weight can be an adjustable parameter, and its variation range can be [0,1]. When the deformation weight value of the target model is set to 0, it means that the target model has no influence on the base model, and the shape of the base model is the base shape; when the deformation weight value of the target model is set to 1, it means that the target model completely affects the base model, and the shape of the base model is completely deformed into the target shape. The deformation weight of the target model can be displayed in the display interface of the three-dimensional animation production software in the form of a control. The control can be, for example, a slider. When the deformation weight of a target model is adjusted separately, the base model can generate a deformation between the base shape and the target shape corresponding to the target model, thereby changing the appearance of the base model. When the deformation weights of multiple target models are adjusted at the same time, the deformation effect generated by the base model can be the superposition effect of the deformation effect when each target model acts on the base model separately.
[0034] The deformation effect finally presented by the base model is also related to the fusion weights of each target model. Unlike the deformation weight, the fusion weight of the target model is used to characterize the degree to which the vertices of the target model express the target shape. The fusion weight of the vertices of the target model can also be understood as the degree to which the corresponding vertices on the base model are affected by the deformation of the target model. When there are multiple target models, the vertices in the base model can be affected by multiple target models, that is, a vertex can be affected by the deformation of multiple target models. The fusion weight of a vertex affected by a target model can range from [0,1], and when a vertex is affected by multiple target models, its fusion weight can be superimposed. When a target model is created, the fusion weight of the vertices of the target model can be set to 1 by default, that is, the fusion weight of each vertex in the base model affected by the target model can be set to 1 by default, so that when the target model fully acts on the base model (for example, the deformation weight value of the target model is set to 1), the shape of the base model can be completely deformed into the shape of the target model. Furthermore, the fusion weights can be reconfigured by manually drawing the fusion weights of each target model. For example, the fusion weights corresponding to the areas in the target model that do not need to control deformation are drawn as 0, the fusion weights corresponding to the areas that need to fully control deformation are drawn as 1, and the fusion weights corresponding to the areas that need to achieve control of deformation transition effects are drawn as values between 0 and 1. In this way, the target model can flexibly control the deformation of a certain area of the base model alone, and the deformation effect at the edge of the area can present a transitional state.
[0035] The facial model is a type of 3D model. When processing the facial model, the character's facial expression needs to show rich emotional changes, which requires more detailed and precise control of the facial model. For example, Figure 1 is a schematic diagram of a three-dimensional model according to some embodiments of this specification, such as Figure 1 As shown, the three-dimensional model 11 is the basic model. Assuming that the target shape is the shape corresponding to the raised eyebrow expression, a target model can be created based on the basic model, and the eyebrow region of the target model is "carved" to obtain the target model shown in the three-dimensional model 12. The eyebrow region can be, for example, Figure 1 In some embodiments, the shape of the three-dimensional model 12 may be referred to as a target shape. In practical applications, if only the brow arch area can be deformed as a whole, the character's expression will be too simple and rigid. However, if the brow arch area is divided into several areas, and a part of the brow arch area is controlled by multiple target models respectively, various rich and delicate brow arch uplift expressions can be presented.
[0036] In some embodiments, the deformation of each part in the base model can be flexibly controlled by splitting the target model corresponding to the target shape, and when each target model fully acts on the base model, the base model can be restored to the state of the target shape. Specifically, multiple target models can be created, and fusion weights can be manually drawn for each target model so that each target model can flexibly and individually control the deformation of each part in the base model. Or it can be understood that manually drawing fusion weights for each target model can make each target model relatively independent and flexible in expressing the target shape. The higher the fusion weight, the closer the base model can be to the target expression (or target shape) when the target model controls the deformation of the base model when the deformation weight of the target model is 1. The following is a specific example to illustrate how to flexibly and individually control the deformation of each part by creating multiple target models. Assume that the demand is for the following Figure 1 In order to flexibly control the eyebrow arch area corresponding to the eyebrow arch raised expression presented by the target model 12, the target model 12 can be copied to obtain multiple identical target models, each of which independently controls a part of the eyebrow arch area on the basic model. For example, six target models can be used to respectively control Figure 1 The six partial brow arch regions shown in the dotted lines in the basic model 11 are shown. , , , , , It should be understood that Figure 1 The dashed boxes and pointing lines in the figure are only identifiers to assist understanding, and are used to display the annotated objects in the interface, and should not be understood as part of the interface. The dashed lines and / or pointing lines with similar functions also exist in the schematic diagrams of the subsequent display interfaces, and their functions are similar to this, and will not be repeated in the following. Further, the inner area of the right eyebrow arch is controlled separately through the target model R3. , through the target model L3, the inner area of the left eyebrow arch is controlled separately , Figure 2 is another schematic diagram of a three-dimensional model according to some embodiments of the present specification, which can be used to image the right eyebrow arch area of the target model R3. Manually draw the fusion weights. When the deformation weight of the target model R3 is set to 1, the base model 11 is deformed as follows Figure 2 Similarly, when the deformation weight of the target model L3 is set to 1, the base model 11 is deformed as follows: Figure 2 The target model 22 in the figure shows a deformed state, thereby achieving separate control of the eyebrow arch area. Figure 3is another schematic diagram of a three-dimensional model according to some embodiments of the present specification. When the deformation weights of the target model R3 and the target model L3 are both set to 1, the ideal deformation state should be as follows: Figure 3 The deformation state shown in the three-dimensional model 31 in FIG. Figure 1 The middle area of the target model 12 in the image (i.e., the inner area of the left eyebrow arch and the inner area of the right eyebrow arch) is restored. However, since the fusion weights are drawn manually, it is impossible to accurately control the sum of the fusion weights of a single vertex affected by multiple target models. The actual sum of the fusion weights may be greater than 1 or less than 1. When the deformation weights of the target model R3 and the target model L3 are both set to 1, the final form of the base model is the superposition state of the deformation effects generated when each target model acts on the base model alone. The actual deformation state is as follows Figure 3 The deformation state of the three-dimensional model 32 makes the character's expression distorted, the expression state is not natural enough, and the expected target expression cannot be restored.
[0037] To this end, some embodiments of the present specification propose a model processing method, which creates a skeleton for the target model, skins the created skeleton and determines the skinning information, and configures the fusion weight of the target model based on the skinning information, so that the superposition result of the fusion weights of the corresponding vertices on each target model satisfies the superposition constraint relationship, thereby accurately controlling the degree to which the vertices on the base model are affected by the deformation of each target model, solving problems such as distorted character expressions and unnatural expression states during fusion deformation, and achieving restoration of the desired target shape.
[0038] Figure 4 is an exemplary flow chart of a model processing method according to some embodiments of this specification. In some embodiments, Figure 4 The process 400 shown in the figure can be executed by a computing device, for example, it can be implemented by a model processing system 700 deployed on the computing device. In some embodiments, the computing device can be a desktop computer, a laptop computer, a mobile phone, a VR device, a tablet computer, etc. In some embodiments, the computing device can be a terminal device, or a server device or a cloud device. In some embodiments, part of the process 400 can be executed by a computing device as a terminal, and another part can be executed by a computing device as a server. Figure 4 As shown, process 400 may include the following steps.
[0039] Step 410 , determining one or more target models based on the base model. In some embodiments, step 410 may be implemented by the model acquisition module 710 .
[0040] In some embodiments, a basic model may be obtained first, and the basic model may be obtained by creating a three-dimensional model or importing a preset three-dimensional model. Figure 1 The basic model is obtained by using the model shown in the three-dimensional model 11.
[0041] In some embodiments, the vertices of the target model correspond to the vertices of the base model. For example, the number of vertices of the target model can be the same as the number of vertices of the base model, the identification of the vertices of the target model can correspond one-to-one with the identification of the vertices of the base model, and the connection relationship of each vertex in the target model can correspond one-to-one with the connection relationship of each vertex in the base model. In some embodiments, one or more target models can be created based on the topological structure of the base model. The topological structure can include the connection relationship and arrangement of vertices, edges and faces in the three-dimensional model. In some embodiments, a target model with the same topological structure as the base model can be created or imported, so that each vertex in the target model corresponds one-to-one with each vertex of the base model. Further, the identification of each vertex in the target model and the identification of each vertex in the base model can also correspond one-to-one, so that when the fusion deformation is performed, based on the corresponding relationship between the vertex identification in the target model and the vertex identification in the base model, the position change information of each vertex in the base model is determined to ensure the correct deformation of the base model and avoid the deformation effect of shape distortion or error. For example, the target model with the same topological structure can be obtained by copying the base model. In some embodiments, the target model is used to express the target shape to be fused to the base model. Furthermore, the target shape corresponding to the target model can be determined by adjusting the positions of vertices on the target model. Exemplarily, after obtaining the target model, the target shape corresponding to the target model can be determined by adjusting the positions of one or more vertices in the target model. Exemplarily, taking the target shape of an upturned eyebrow as an example, the target model can be obtained by copying the base model, and the copied target model can be "carved", such as stretching multiple meshes in the target model, etc., to change the positions of one or more vertices in the target model. The carved target model can be Figure 1 The three-dimensional model is shown in Figure 12.
[0042] In some embodiments, the multiple target models may be the same model, so that when the multiple target models fully act on the base model, for example, the deformation weights of the multiple target models are all set to 1, the base model can be restored to the target shape. Exemplarily, multiple identical target models can be obtained by copying the target model multiple times. The number of target models can be determined according to the number of regions that are expected to be individually controlled on the base model. Exemplarily, for example, Figure 1The basic model 11 shown in FIG. 11 assumes that the requirement is to divide the eyebrow arch area into six separate areas for separate control, namely, the three areas on the left side of the eyebrow arch area , , , and three areas to the right of the eyebrow arch area , , , the target model 12 deformed into the target shape can be copied 5 times to obtain six identical target models. After creating one or more target models, the identifiers of the target models can be further set, for example, the six target models are named L1, L2, L3, R1, R2, and R3 respectively.
[0043] In some embodiments, after creating a target model, one or more target models can be connected to a base model by creating a blend deformation node to perform blend deformation. Exemplarily, one or more target models can be selected in the three-dimensional animation production software, and then the base model can be added, and the selected target model can be used as an input target by creating a blend deformation node to connect the base model and one or more target models for blend deformation. After creating a blend deformation node, the fusion weight of each vertex in the base model affected by each target model can be set to 1 by default, and the fusion weight of the target model can be reconfigured according to the skinning information of the bone after creating a skeleton and performing skinning. In addition, after creating a blend deformation node, the deformation weight of each target model can be displayed in the display interface of the three-dimensional animation production software in the form of a control, such as a slider, and the user can configure the deformation weight of each target model by controlling the control corresponding to the deformation weight, such as dragging a slider to change the value of the deformation weight of the target model to view or adjust the deformation effect of each target model on the base model.
[0044] Step 420 , creating one or more skeletons based on the number of target models. In some embodiments, step 420 may be implemented by a skeleton creation module 720 .
[0045] In some embodiments, in three-dimensional computer animation, a skeleton is a structure used to drive the movement of a three-dimensional model. Several skeleton models are connected together to form a skeleton or skeleton system, and the action, shape or posture of a character or object can be controlled by controlling the movement of each skeleton model.
[0046] In some embodiments, the number of bones created can correspond to the number of target models, so that the skinning information of the bones can be correspondingly transmitted to the fusion weights of each target model. Specifically, the number of bones created can be the same as the number of target models. Exemplary, when six target models are created, six bones can be correspondingly created.
[0047] In some embodiments, one or more skeletons can be created for the base model. As an example, a base model can be selected in the three-dimensional animation production software, and skeletons corresponding to the number of target models can be created for the base model. After creating the skeleton, a skeleton identifier can be further set. The skeleton identifier can be a skeleton name and corresponds to the identifier of the target model. Exemplarily, when the identifiers of the six target models are L1, L2, L3, R1, R2, and R3, the six skeletons can be named as In some other embodiments, one or more skeletons may be created for the target model. The creation method is similar to the creation method for creating skeletons for the base model, and will not be described in detail here.
[0048] In some embodiments, the location where the bones are created can be determined based on the area that each target model is expected to affect. Figure 1 The eyebrow arch area shown in the basic model 11 in the figure, when the six target models are created, the areas expected to be affected are , , , , , The corresponding area can be in the eyebrow arch area , , , , , Six bones are created in the corresponding areas respectively, so that the default skin information can be automatically generated for the vertices corresponding to the creation position based on the bone creation position. Furthermore, the bone creation position can be set symmetrically, so that after drawing skin weights for some bones in the future, the skin weights for the remaining bones can be configured through the mirror tool. For example, taking the eyebrow arch area as an example, three bones can be created on the left side of the eyebrow arch area. Then, use the preset mirror tool to create a Three symmetrical bones .
[0049] Step 430 , skinning is performed on one or more skeletons to determine skinning information. In some embodiments, step 430 may be implemented by the skinning processing module 730 .
[0050] Skinning is another deformation processing technology in 3D computer animation. It specifically refers to the process of binding a 3D model to a skeleton and configuring skin weights for the bound skeleton. Through skinning, the 3D model can move with the movement of the skeleton, thereby achieving a natural movement effect. Specifically, for the created skeleton, the created skeleton can be bound to the corresponding 3D model through the bind skin command, thereby establishing a connection between each skeleton and each vertex in the corresponding 3D model. After binding the skeleton to the corresponding model, the 3D animation production software can automatically generate default skin information for the skeleton. Furthermore, the user can modify the skin information generated by the system by default through the weight painting tool.
[0051] In some embodiments, the skinning information can reflect the superposition constraint relationship of the vertices on the base model affected by each bone. Further, the superposition constraint relationship can be a weighted superposition constraint relationship, that is, the weights of the vertices on the base model affected by multiple bones can be superimposed, and the sum of the weight superposition is a preset value or within a preset range. Exemplarily, the sum of the weights of the vertices on the base model affected by multiple bones can be 1 to ensure that when the vertices on the base model are affected by multiple bones at the same time, the maximum range of motion of the vertex does not exceed the maximum range of control desired by each bone.
[0052] Since the purpose of creating bones and performing skinning is to obtain the skinning information of the bones, and in the subsequent process, the skinning information is configured to the fusion weight of the target model, but not to control the movement behavior of the model bound to the bones, the three-dimensional model bound to the created bones can be a basic model or a target model. When the three-dimensional model bound to the created bones is a basic model, the skinning information corresponding to the bones can represent the weight correspondence between the vertices and bones on the basic model. When the three-dimensional model bound to the created bones is a target model, the skinning information corresponding to the bones can represent the weight correspondence between the vertices and bones on the target model. Since the vertices of the target model correspond to the vertices of the basic model, the vertex identifiers of the target model correspond one-to-one with the vertex identifiers of the basic model. Even if the skinning information represents the weight relationship between the vertices and bones on the target model, it can also reflect the weight relationship between the vertices and bones on the basic model. That is to say, no matter whether the created bones are bound to the basic model or the target model, the skinning information corresponding to the bones can reflect the weight correspondence between the vertices and bones on the basic model.
[0053] In some embodiments, the vertices on the base model represented in the skinning information may be all or part of the vertices on the base model, which may at least include vertices whose positions change during the process of deformation from the base model to the shape of the target model. In some embodiments, skinning weights may be configured for vertices on the base model or the target model through automatically generated skinning information, or based on the user's weight drawing operation on the corresponding area of the base model or the target model, the vertices on the base model or the target model may be configured with skinning weights. It is understandable that in some embodiments, the base model and the target model have the same topological structure, and the vertices of the two correspond one to one. Therefore, the vertices on the base model also have corresponding vertices on the target model, and the areas on the base model (such as preset areas) also have corresponding areas on the target model. Therefore, without special distinction, the vertices or areas may be on the base model or on the target model.
[0054] In some embodiments, the skinning information may include the skinning weights of the vertices affected by each bone. In other embodiments, the skinning information may further include a bone identifier and a vertex identifier. Wherein, the vertex may be a vertex on a base model or a vertex on a target model, and the skinning weight is used to indicate the degree to which each vertex is affected by each bone, and can reflect the superposition constraint relationship of the vertices on the base model affected by each bone. In the three-dimensional animation software, the sum of the skinning weights of each vertex in the model affected by each bone may be set to a preset value by default, and exemplary, the preset value is 1, thereby ensuring that each vertex moves within an expected range, avoiding uncoordinated changes during the movement of the bone. Wherein, the bone identifier may be the name of the bone, which may be named by the user when creating the bone; the vertex identifier may be the name of the vertex, which may be automatically named when creating the base model or the target model, and stored in the vertex data.
[0055] Take the creation of six bones for the base model as an example. After binding the six bones to the base model through the binding command, the corresponding skinning information can be determined. Figure 5 is a schematic diagram of skinning information according to some embodiments of this specification, such as Figure 5 As shown, skinning information can include six bone identifiers ( Figure 5 (not shown) , the identifiers of the vertices on the base model vtx
[224] ...vtx
[3201] , and the skin weights of these vertices affected by each bone, for example, the vertex vtx
[224] is affected by the bone The skin weight of the influence is 0 ( Figure 5 not shown), affected by the bone and The skin weights affected are all 0, and the skin weights affected by the bones are all 0. The skin weight of the influence is 0.080, which is affected by the bones The skin weight of the influence is 0.808, which is affected by the bones The skin weight of the influence is 0.112. Figure 5 The sum of the skin weights of the vertices on the base model affected by each bone is also shown in Figure 5 As shown in the figure, the total column records that the sum of the skin weights of each base model vertex affected by each bone is 1.
[0056] Furthermore, the skin weights of each vertex affected by each bone in the skin information can be reconfigured through a weight drawing tool. In the process of reconfiguring the skin weights, the 3D animation production software can automatically adjust the skin weights of each vertex affected by each bone to ensure that the sum of the skin weights of the same vertex affected by each bone is a constraint relationship of a preset value (such as 1). The specific description of this part can be found in the description of process 500 below, which will not be repeated here.
[0057] Step 440 , configure the fusion weights of the target models based on the skinning information so that the superposition result of the fusion weights of the corresponding vertices on each target model satisfies the superposition constraint relationship. In some embodiments, step 440 may be implemented by the information configuration module 740 .
[0058] In some embodiments, the fusion weight is used to characterize the degree of expression of the target model's vertices to the target shape. Since the vertices of the base model correspond one-to-one to the vertices of the target model, the fusion weight of the vertices on the target model can also be characterized as the fusion weight of the corresponding vertices on the base model affected by the target model. When there are multiple target models, the vertices on the base model can be affected by multiple target models at the same time. Similarly, the superposition result of the fusion weights of the vertices corresponding to each other on each target model satisfies the superposition constraint relationship, which can also be understood as the sum of the fusion weights of the vertices on the base model affected by multiple target models. Satisfy the superposition constraint relationship. In some embodiments, the superposition constraint relationship satisfied by the superposition result of the fusion weights of the vertices corresponding to each other on each target model can be determined based on the superposition constraint relationship of the vertices affected by each bone in the skinning information. When the sum of the weights of the vertices affected by each bone in the skinning information is a preset value, the superposition result of the fusion weights of the vertices corresponding to each other on each target model is a preset value. Exemplarily, the preset value is 1. In some embodiments, the vertices corresponding to each other on each target model may be vertices located on each target model corresponding to the vertices in the base model. For example, taking the six identical target models L1, L2, L3, R1, R2, and R3 created for the base model 11 in the previous example as an example, for any vertex A on the base model, there are vertices A1, A2, A3, A4, A5, and A6 corresponding to vertex A on the target models L1, L2, L3, R1, R2, and R3 respectively, then the vertices corresponding to each other on each target model may be A1, A2, A3, A4, A5, and A6.
[0059] The fusion weight information may include the identification of the target model, the identification of the vertices on the base model corresponding to the target model, and the fusion weights of the vertices on the base model corresponding to the target model that are affected by each target model. Wherein, the identification of the target model may be the name of the target model, which may be named when the user creates the target model. The fusion weight may be the weight of the vertices in the base model that are affected by one or more target models. In certain embodiments, the identification of the vertices corresponding to the skeleton corresponds to the identification of the vertices on the base model corresponding to the target model, and the skeleton identification corresponds to the identification of the target model.
[0060] In some embodiments, the fusion weight corresponding to the vertex of the target model can be set to the skin weight of the corresponding vertex in the skin information affected by the skeleton corresponding to the target model. Further, the fusion weight corresponding to the vertex of the target model can be configured based on the skeleton identifier, the vertex identifier and the skin weight of the vertex affected by each skeleton. Wherein, the skeleton identifier can correspond to the identifier of the target model, and the vertex identifier in the skin information can correspond to the vertex identifier on the base model or the target model. Exemplarily, based on the corresponding relationship between the skeleton identifier and the target model identifier, the corresponding relationship between the vertex identifier in the skin weight and the vertex identifier on the base model or the target model, the fusion weight corresponding to the vertex of the target model can be set to the skin weight of the corresponding vertex in the skin information affected by the skeleton corresponding to the target model. Specifically, the skin information can be obtained by a preset function first. Taking the binding of the skeleton to the base model as an example, the skin node identifier in the base model can be obtained based on the identifier of the base model, and the skin node is used to bind the vertices of the base model to the skeleton, so that the vertices of the base model are affected by the skeleton and deformed. Then, according to the skin node identifier, the bone identifier associated with the skin node (or the base model to which the skin node belongs) is obtained. For example, for example Figure 5 The six bones shown in the figure can be obtained by obtaining the bone ID associated with the skin node according to the skin node ID. ( Figure 5 (not shown) . In addition, the identifier of the target model can also be obtained so that the corresponding fusion weight information can be set based on the identifier of the target model later. Further, the skin weights corresponding to each bone and the vertex on the base model can be traversed based on the queried bone identifier, and according to the correspondence between the bone identifier and the target model identifier, and the correspondence between the vertex identifier in the skin weight and the vertex identifier of the base model, the fusion weights corresponding to the vertex identifier of the base model and the target model identifier are set to the skin weights corresponding to the vertex identifier and the bone identifier in the skin weight. Exemplarily, the fusion weights corresponding to the vertex identifier of the base model and the target model identifier can be set as follows Figure 5 The skin weights corresponding to the vertex identifiers and bone identifiers in the skin weights in the skin information shown are such that the superposition result of the fusion weights of the corresponding vertices on each target model satisfies the superposition constraint relationship, that is, the sum of the fusion weights of each vertex on the base model affected by each target model can be made to be a preset value (for example, the preset value is 1), thereby restoring the target shape corresponding to the target model. For example, for the six identical target models L1, L2, L3, R1, R2, and R3 created in the following example, when the deformation weights of the six target models are all set to 1, the base model is deformed as follows: Figure 1In the target model 12, the target model 12 can be any one of the six identical target models L1, L2, L3, R1, R2, and R3; or, when the deformation weights of the target model R3 and the target model L3 are both set to 1, the basic model is deformed as follows: Figure 3 The shape presented by the three-dimensional model 31 in the figure. In this way, the target shape is restored to solve the problem that the deformation effect is distorted or too unnatural during the fusion deformation.
[0061] Step 450 : Based on the fusion weight and the shape deformation weight, the target model is controlled to perform fusion deformation processing on the base model, so that the shape of the base model is deformed from the base shape to the fusion shape. In some embodiments, step 450 may be implemented by the fusion deformation module 750 .
[0062] In some embodiments, the fused shape is a target shape or an intermediate shape in the process of transitioning from a base shape to a target shape, and the deformation weight is used to characterize the degree of influence of the target model on the base model. In some embodiments, during fusion deformation, the interpolation calculation is performed by calculating the influence corresponding to one or more target models, and the interpolation position of each vertex in the base model is obtained, and the interpolation position of each vertex is used as the end position of the movement of each vertex. Each vertex in the base model moves from the initial position to the interpolation position corresponding to each vertex. From a macroscopic point of view, it can be seen that the base model gradually deforms from the base shape to the fused shape, thereby realizing fusion deformation. For the calculation of the interpolation position, the interpolation position corresponding to the vertex of the base model can be calculated based on the fusion weight corresponding to each target model, the deformation weight corresponding to each target model, the initial position corresponding to the vertex of the base model, and the target position corresponding to the vertex of each target model. Further, the vertex in the base model is moved from the initial position to the interpolation position corresponding to the vertex, so that the shape of the base model is deformed from the base shape to the fused shape. Among them, the initial position can be, for example, the position of the vertex in the base model, and the target position can be, for example, the position of the vertex in the target model. In some embodiments, when performing interpolation calculations, the following processing can be performed on each vertex on the base model: calculate each interpolation vector corresponding to the vertex based on the initial position corresponding to the vertex on the base model and each target position corresponding to the vertex; multiply each interpolation vector corresponding to the vertex with the fusion weight of the vertex corresponding to the vertex on each target model and the deformation weight of each target model to obtain each interpolation position component corresponding to the vertex; obtain the interpolation position corresponding to the vertex based on each interpolation position component. Among them, the initial position or target position of the vertex can be represented by the coordinate value of the vertex in the three-dimensional coordinate system preset by the software (such as three-dimensional animation production software). For example, for a vertex in the base model, the coordinate value of the vertex in the preset three-dimensional coordinate system in the base model is (x1, y1, z1) is used as the initial position of the vertex, and each target model The coordinate value of the vertex corresponding to the vertex in the preset three-dimensional coordinate system (xi,yi,zi) is the target position corresponding to the vertex, then the vertex corresponds to each target model The interpolation vector can be expressed as , further, with Indicates that the vertex corresponds to the target model The deformation weight, Indicates the fusion weight of the corresponding vertex on each target model (or indicates that the vertex is affected by the target model The fusion weight of the influence), Indicates that the vertex is affected by the target model The impact of represents the interpolated position of the vertex, then , = = + , where n is a natural number, indicating the number of target models.
[0063] For example, when six identical target models are created and fused with the base model, assuming that the initial position of a vertex A of the base model is , the target positions of the six target models corresponding to vertex A are , the interpolation vector between the initial position and the target position is denoted by m= - Before the fusion weights of the target models are configured based on the skinning information so that the superposition result of the fusion weights of the corresponding vertices on each target model satisfies the superposition constraint, the fusion weight of the vertex A affected by the deformation of the six target models can be any value in the interval [0,1] and the superposition result of the fusion weights of the corresponding vertices on each target model is not constrained. The fusion weights of the vertex A affected by the deformation of the six target models can be 0.5, 0.6, 0.5, 1, 1, 1 respectively. The deformation weights of the six target models are assumed to be 1, 1, 1, 0, 0, 0 respectively. Then the influence on vertex A is c=0.5×1×m+0.6×1×m+0.5×1×m+1×0×m+1×0×m+1×0×m=1.6m, and the interpolation position of vertex A is = +c= +1.6m, so the motion trajectory of vertex A is from Move to +1.6m. It can be seen that the sum of the weights of the vertex A affected by one or more target models can be superimposed, and the final position has exceeded the target position corresponding to each target model, causing distortion or incoordination of the deformation effect. This is because the sum of the fusion weights of each vertex affected by each target model does not satisfy the superposition constraint relationship. The drawing of the fusion weight is generally done manually, and manual drawing cannot guarantee that when a single vertex is affected by multiple target models, the sum of its fusion weights satisfies the superposition constraint relationship, so that when the deformation weights of multiple target models are set to 1, the final deformation state of the basic model cannot restore the target shape. In 3D animation software, the sum of the skin weights of each vertex affected by each bone is set to a preset value by default. For example, the preset value can be 1 to ensure that each vertex moves within the expected range. With this feature, the fusion weights of the target model can be configured based on the skin information by creating bones and determining the skin information, so that the superposition result of the fusion weights of the corresponding vertices on each target model satisfies the superposition constraint relationship. For example, the sum of the fusion weights of the vertices on the basic model affected by each target model is a preset value. For example, the preset value can be 1. Exemplarily, when the fusion weight of the target model is configured based on the skinning information, for example, for the six identical target models created in the above example, by creating six bones and drawing skin weights for the six bones, the skin weights of the vertex A affected by the six bones are 0, 0, 0.1, 0.3, 0.3, and 0.3 respectively. The fusion weight corresponding to the vertex A is further configured based on the skin weight corresponding to the vertex A, and the fusion weight of the vertex A affected by the deformation of the six target models is also set to 0, 0, 0.1, 0.3, 0.3, and 0.3, so that the sum of the fusion weights of the vertex A affected by the deformation of the six target models is 1. When the deformation weights of the six target models are respectively set to 1, the influence on vertex A is c=0×1×m+0×1×m+0.1×1×m+0.3×1×m+0.3×1×m+0.3×1×m=m, and the interpolation position of the vertex A is = +c= +m= +( - )= , is the target position corresponding to vertex A. It can be seen that the final position of vertex A is the target position of vertex A in the target model. That is to say, even if the deformation weights of each target model are set to 1, the maximum movement range of each vertex in the base model will not exceed the target position corresponding to the corresponding vertex in each target model, thereby avoiding distortion or incoordination of the deformation effect. When the deformation weights of multiple target models are set to 1, the base model can be deformed into the target shape, thereby restoring the target shape and solving the problem of distortion or excessive unnaturalness of the deformation effect during fusion deformation. Since the vertices of the base model correspond one-to-one to the vertices of the target model, in the above example, the fusion weight of the vertex on the base model affected by each target model can also be expressed as the fusion weight of the vertex corresponding to each target model.
[0064] In some embodiments, creating a skeleton and determining skinning information is to configure the fusion weight of the target model based on the skinning information of the skeleton. Therefore, after configuring the fusion weight information of the target model, the skinning process can be further canceled for one or more skeletons and the created one or more skeletons can be deleted.
[0065] Figure 6 is an exemplary flow chart of a skinning method according to some embodiments of this specification. In some embodiments, Figure 6 The process 600 shown may be executed by a terminal device, for example, may be implemented by a skinning processing module 730 in a model processing system 700 disposed on a computing device. Figure 6 As shown, process 600 may include the following steps.
[0066] Step 610, obtaining a weight drawing operation in a preset area corresponding to the bone.
[0067] In some embodiments, the preset area is an area in the target model or an area in the base model. Specifically, when the created skeleton is bound to the base model, the preset area is an area in the base model; when the created skeleton is bound to the target model, the preset area is an area in the target model. Further, the preset area can be an area that the target model corresponding to the skeleton is expected to affect. Exemplarily, for example, Figure 1 Six separate brow arch areas in the base model 11 , , , , , , when the target model L1 is expected to affect the area The corresponding area can be in the basic model 11 The weight drawing operation is performed in the area where the target model is located or in a similar area in the target model 12, where the target model 12 can be any one of the six identical target models L1, L2, L3, R1, R2, and R3. In some embodiments, when a user can select a bone and then use the weight drawing tool to draw skin weights in a preset area, the terminal can correspondingly obtain the weight drawing operation in the preset area corresponding to the bone. In some embodiments, the skin weights can be drawn in the preset area based on the expected degree of influence of the target model on each vertex in the corresponding preset area. Exemplarily, for example, Figure 1 Six separate brow arch areas in the base model 11 , , , , , , assuming that the area that the target model L1 is expected to affect is The corresponding area, the target model L1 corresponds to the mark The bones are selected and marked as The skeleton is in the base model 11 When painting skin weights for the corresponding areas, you can Each vertex in the region is drawn with the expected fusion weight affected by the target model L1 Each vertex in the region is labeled The skin weights that the bones influence.
[0068] Step 620, in response to the weight drawing operation in the preset area corresponding to the bone, configure skin weights for the vertices corresponding to the preset area.
[0069] In some embodiments, the value range of the skin weight can be between 0 and 1, where 0 means that the vertex is not affected by the bone, and 1 means that the vertex is completely affected by the bone. The user can select brush drawing tools of different strengths and sizes to draw in the preset area corresponding to the bone, and the terminal responds to the weight drawing operation in the preset area corresponding to the bone, and configures a skin weight between 0 and 1 for the vertex corresponding to the area.
[0070] In some embodiments, the preset areas may intersect, in other words, there may be overlapping areas in the preset areas. After the user performs weight drawing operations in the preset areas corresponding to each bone to configure skin weights for the vertices in each preset area, multiple weight drawing operations may be performed in the overlapping area, so that the vertices corresponding to the overlapping area are configured with skin weights multiple times, so that the sum of the skin weights of all or part of the vertices corresponding to the overlapping area affected by multiple bones is not 1. In some embodiments, when the sum of the skin weights of the vertex affected by multiple bones is not 1, the skin weights of the vertex affected by multiple bones can be redistributed based on the skin weight ratio of the vertex affected by multiple bones, so that the sum of the skin weights of the vertex affected by multiple bones is 1. Exemplarily, when the skin weights of a vertex affected by two bones are 0.3 and 0.9 respectively, and the ratio of the two bones affecting the vertex is 0.3:0.9, the skin weights can be redistributed based on the ratio, so that the sum of the skin weights of the vertex affected by the two bones is 1, such as the skin weights of the vertex affected by the two bones after redistribution are 0.25 and 0.75 respectively. In some embodiments, the above skin weight redistribution process can be automatically implemented by the 3D animation software. In other embodiments, when the sum of the skin weights of the vertex affected by multiple bones is not 1, the 3D animation software can also give a reminder so that the user can modify the corresponding skin weight.
[0071] This specification also provides a model processing system. Figure 7 is an exemplary block diagram of a model processing system according to some embodiments of this specification. Figure 7 As shown, in some embodiments, the model processing system 700 may include a model acquisition module 710 , a skeleton creation module 720 , a skinning processing module 730 , an information configuration module 740 , and a blending deformation module 750 .
[0072] The model acquisition module 710 is used to determine one or more target models based on the base model, wherein the vertices of the target model correspond to the vertices of the base model, and the target model is used to express the target shape to be fused to the base model.
[0073] The skeleton creation module 720 is used to create one or more skeletons based on the number of target models.
[0074] The skinning processing module 730 is used to perform skinning processing on one or more bones to determine skinning information. The skinning information can reflect the superimposed constraint relationship between the vertices on the basic model affected by each bone.
[0075] The information configuration module 740 is used to configure the fusion weight of the target model based on the skinning information so that the superposition result of the fusion weights of the corresponding vertices on each target model satisfies the superposition constraint relationship, wherein the fusion weight is used to characterize the degree of expression of the vertices of the target model to the target shape.
[0076] The fusion deformation module 750 is used to control the target model to perform fusion deformation processing on the basic model based on the fusion weight and the deformation weight, so that the shape of the basic model is deformed from the basic shape to the fusion shape; wherein the fusion shape is the target shape or an intermediate shape in the process of transitioning from the basic shape to the target shape, and the deformation weight is used to characterize the degree of influence of the target model on the basic model.
[0077] In some optional embodiments, the model acquisition module 710 is further used to create one or more target models based on the topological structure of the base model, and to determine the target shape corresponding to the target model by adjusting the vertex positions of the target model.
[0078] In some optional embodiments, the skeleton creation module 720 is further used to create one or more skeletons for the base model or the target model based on the number of target models.
[0079] In some optional embodiments, the skinning processing module 730 is also used to configure skinning weights for vertices corresponding to a preset area in response to a weight drawing operation in a preset area corresponding to the bone, wherein the preset area is an area that the target model is expected to affect.
[0080] In some optional embodiments, the information configuration module 740 is further used to set the fusion weights corresponding to the vertices of the target model to the skin weights of the corresponding vertices in the skin information affected by the bones corresponding to the target model.
[0081] In some optional embodiments, the model processing system 700 further includes a bone deletion module 760 for canceling the skinning process for one or more bones and deleting the created one or more bones.
[0082] In some optional embodiments, the fusion deformation module 750 is also used to calculate the interpolation positions corresponding to the vertices of the basic model based on the fusion weights corresponding to each target model, the deformation weights corresponding to each target model, the initial positions corresponding to the vertices of the basic model, and the target positions corresponding to the vertices of each target model; and move the vertices in the basic model from the initial positions to the interpolation positions corresponding to the vertices, so that the shape of the basic model is deformed from the basic shape to the fusion shape.
[0083] In some optional embodiments, the fusion deformation module 750 is also used to perform the following processing on the vertices on the base model: calculate each interpolation vector corresponding to the vertex based on the initial position corresponding to the vertex on the base model and each target position corresponding to the vertex; multiply each interpolation vector corresponding to the vertex with the fusion weight of the vertex corresponding to the vertex on each target model and the deformation weight of each target model to obtain each interpolation position component corresponding to the vertex; obtain the interpolation position corresponding to the vertex based on each interpolation position component.
[0084] For more information about each module, see Figures 1 to 6 The relevant description of will not be repeated here. It should be understood that Figure 7 The system and its modules shown can be implemented in various ways. For example, in some embodiments, the system and its modules can be implemented by hardware, software, or a combination of software and hardware. Among them, the hardware part can be implemented using dedicated logic; the software part can be stored in a memory and executed by an appropriate instruction execution system, such as a microprocessor or dedicated design hardware. Those skilled in the art will understand that the above methods and systems can be implemented using computer executable instructions and / or control codes contained in a processor, such as a disk, CD or DVD-ROM, etc., and such codes are provided in a carrier medium or a memory of a programmable device. The system and its modules of this specification can not only be implemented by hardware circuits such as ultra-large-scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, etc., or programmable hardware devices such as field programmable gate arrays, programmable logic devices, etc., but can also be implemented by software executed by various types of processors, and can also be implemented by a combination of the above hardware circuits and software (e.g., firmware).
[0085] It should be noted that the above description of the system and its modules is only for convenience of description and does not limit this specification to the scope of the embodiments. It is understandable that for those skilled in the art, after understanding the principle of the system, it is possible to arbitrarily combine the modules without deviating from this principle to form a subsystem connected to other modules. Or some modules may be split to obtain more modules or multiple units under the module. Such variations are all within the scope of the disclosure of this specification.
[0086] Some embodiments of the present specification also provide a computer program product, including computer instructions. When at least part of the computer instructions are executed by a processor, the present specification can be implemented. Figures 1 to 6In some embodiments, the computer program product may only involve computer instructions, which may be carried by a storage medium or a processing device. In other embodiments, the computer program product may also be a storage medium or a processing device containing the aforementioned computer instructions. The processing device may include one or more processors and a storage medium.
[0087] In some embodiments, the processor may be a combination of one or more of the following processors: a central processing unit (CPU), an application specific integrated circuit (ASIC), an application specific instruction set processor (ASIP), a graphics processing unit (GPU), a physical processing unit (PPU), a digital signal processor (DSP), a field programmable gate array (FPGA), a programmable logic device (PLD), a programmable logic controller (PLC), a reduced instruction set computer (RISC), and a microprocessor.
[0088] In some embodiments, the storage medium may include a combination of one or more of the following: a mass storage, a removable storage, a volatile read-write memory, and a read-only memory (ROM). Exemplary mass storage may include a magnetic disk, an optical disk, a solid-state hard disk, and the like. Exemplary removable storage may include a flash disk, a floppy disk, an optical disk, a memory card, a compressed hard disk, a magnetic tape, and the like. Exemplary volatile read-write memory may include a random access memory (RAM). Exemplary random access memory may include a dynamic random access memory (DRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), a static random access memory (SRAM), a thyristor random access memory (T-RAM), and a zero capacitance memory (Z-RAM), and the like. Exemplary read-only memory may include a masked read-only memory (MROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a compact disk read-only memory (CD-ROM), and a digital multifunction hard disk read-only memory, and the like.
[0089] The beneficial effects that may be brought about by the embodiments of this specification include but are not limited to: (1) by creating a skeleton for the target model, skinning the created skeleton and determining the skinning information, and configuring the fusion weight of the target model based on the skinning information, the superposition result of the fusion weights of the corresponding vertices on each target model satisfies the superposition constraint relationship, and based on the fusion weight and deformation weight, the target model is controlled to perform fusion deformation processing on the base model, so that the shape of the base model is deformed from the base shape to the fusion shape, thereby accurately controlling the superposition result of the fusion weights of the corresponding vertices on each target model, and solving the problems of distorted expression of the character and unnatural expression state during fusion deformation; (2) the superposition result of the fusion weights of the corresponding vertices on each target model is a preset value, thereby accurately controlling the sum of the fusion weights of the corresponding vertices on the target model, and realizing the restoration of the desired target shape; (3) by setting multiple target models to the same model, when the deformation weights of the target models are all 1, the base model is restored to the target shape corresponding to the target model, thereby accurately restoring the target shape. It should be noted that different embodiments may produce different beneficial effects. In different embodiments, the beneficial effects that may be produced may be any one or a combination of the above, or any other beneficial effects that may be obtained.
[0090] The basic concepts have been described above. Obviously, for those skilled in the art, the above detailed disclosure is only for example and does not constitute a limitation of this specification. Although not explicitly stated here, those skilled in the art may make various modifications, improvements and corrections to this specification. Such modifications, improvements and corrections are taught in this specification, so such modifications, improvements and corrections still belong to the spirit and scope of the exemplary embodiments of this specification.
Claims
1. A model processing method, characterized in that: The method comprises: Determine one or more target models based on the base model, wherein vertices of the target models correspond to vertices of the base model, and the target models are used to express target shapes to be fused to the base model; creating one or more skeletons based on the number of target models; Performing skinning processing on the one or more bones to determine skinning information, wherein the skinning information can reflect the superposition constraint relationship between the vertices on the base model affected by the bones; Based on the skinning information, the fusion weight of the target model is configured so that the superposition result of the fusion weights of the mutually corresponding vertices on each target model satisfies the superposition constraint relationship, wherein the fusion weight is used to characterize the degree to which the vertices of the target model express the target shape; Based on the fusion weight and the deformation weight, the target model is controlled to perform fusion deformation processing on the basic model, so that the shape of the basic model is deformed from a basic shape to a fusion shape; wherein the fusion shape is the target shape or an intermediate shape in the process of transitioning from the basic shape to the target shape, and the deformation weight is used to characterize the degree of influence of the target model on the basic model.
2. The method according to claim 1, characterized in that Determining one or more target models based on the base model includes: The one or more target models are created based on the topological structure of the base model, and the target shapes corresponding to the target models are determined by adjusting the vertex positions of the target models.
3. The method according to claim 2, characterized in that Determining one or more target models based on the base model also includes: The multiple target models are the same model.
4. The method according to claim 1, characterized in that: The creating one or more bones based on the number of the target model comprises: One or more skeletons are created for the base model or the target model based on the number of the target model.
5. The method according to claim 4, characterized in that The creating one or more bones based on the number of the target model further comprises: The number of bones created is the same as the number of the target model.
6. The method according to claim 1, characterized in that The skinning of the one or more bones comprises: In response to a weight drawing operation in a preset area corresponding to the bone, skin weights are configured for vertices corresponding to the preset area, wherein the preset area is an area that the target model is expected to affect.
7. The method according to claim 6, characterized in that The skinning information includes skinning weights of vertices affected by each bone, wherein the bone corresponds to the target model, and the sum of the skinning weights of vertices affected by each bone is a preset value.
8. The method according to claim 7, characterized in that The configuring the fusion weight of the target model based on the skin information includes: The fusion weights corresponding to the vertices of the target model are set as the skin weights of the corresponding vertices in the skin information affected by the bones corresponding to the target model.
9. The method according to claim 1, characterized in that: After configuring the fusion weight of the target model based on the skin information, the method further includes: The one or more bones are unskinned and the one or more created bones are deleted.
10. The method according to claim 1, characterized in that The superposition result of the fusion weights of the mutually corresponding vertices on the target models satisfies the superposition constraint relationship, including: The superposition result of the fusion weights of the corresponding vertices on each target model is a preset value.
11. The method according to claim 10, characterized in that The preset value is 1.
12. The method according to claim 1, characterized in that The controlling the target model to perform fusion deformation processing on the base model based on the fusion weight and the deformation weight includes: Calculating interpolation positions corresponding to vertices of the base model based on fusion weights corresponding to each target model, deformation weights corresponding to each target model, initial positions corresponding to vertices of the base model, and target positions corresponding to vertices of each target model; The vertices in the basic model are moved from initial positions to interpolation positions corresponding to the vertices, so that the shape of the basic model is deformed from the basic shape to the fused shape.
13. The method according to claim 12, characterized in that The step of calculating the interpolation positions corresponding to the vertices of the base model based on the fusion weights corresponding to the target models, the deformation weights corresponding to the target models, the initial positions corresponding to the vertices of the base model, and the target positions corresponding to the vertices of the target models includes: The following processing is performed on the vertices on the base model: Calculating each interpolation vector corresponding to the vertex based on the initial position corresponding to the vertex on the base model and each target position corresponding to the vertex; Multiplying each interpolation vector corresponding to the vertex with the fusion weight of the vertex corresponding to the vertex on each target model and the deformation weight of each target model to obtain each interpolation position component corresponding to the vertex; The interpolation position corresponding to the vertex is obtained based on the interpolation position components.
14. A model processing system, characterized in that: The system comprises: A model acquisition module, used to determine one or more target models based on a base model, wherein vertices of the target model correspond to vertices of the base model, and the target model is used to express a target shape to be fused to the base model; A skeleton creation module, used for creating one or more skeletons based on the number of the target model; A skinning processing module, used for performing skinning processing on the one or more bones to determine skinning information, wherein the skinning information can reflect the superposition constraint relationship between the vertices on the basic model affected by the various bones; An information configuration module, configured to configure the fusion weight of the target model based on the skinning information, so that the superposition result of the fusion weights of the mutually corresponding vertices on each target model satisfies the superposition constraint relationship, wherein the fusion weight is used to characterize the degree of expression of the vertices of the target model to the target shape; A fusion deformation module is used to control the target model to perform fusion deformation processing on the basic model based on the fusion weight and the deformation weight, so that the shape of the basic model is deformed from the basic shape to the fusion shape; wherein the fusion shape is the target shape or an intermediate shape in the process of transitioning from the basic shape to the target shape, and the deformation weight is used to characterize the degree of influence of the target model on the basic model.
15. A computer program product, characterized in that The invention comprises a computer program, and when at least a part of the computer program is executed by a processor, the method according to any one of claims 1 to 13 can be implemented.
Citation Information
Cited By
Digital human beautifying method, electronic equipment and storage medium
CN120526017A