A method, apparatus, electronic device, and storage medium for processing facial animation models.
By synchronously adjusting the bones of facial decorative objects, the problem of facial decorative objects not following during face pinching is solved, the phenomenon of misleading is avoided, and the accuracy and naturalness of the face pinching effect is improved.
Patent Information
- Application Number
- CN202011036167.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-27
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2040-09-27
AI Technical Summary
During the face pinching process, facial decorations and face do not follow, resulting in misleading, especially when facial bones change too much.
By obtaining the adjustment parameters of facial bones, adjust the facial decorative bones simultaneously and perform skin treatment to ensure that facial decorative objects follow the changes in facial bones.
It effectively avoids the phenomenon of misleading, improves the accuracy and nature of the face-pinching effect, and allows users to pinch their faces freely.
Smart Images

Figure CN112107865B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a facial animation model processing method, device, electronic device and storage medium. Background Art
[0002] Currently, in the common face-pinching function of games, users can freely adjust the size, position, angle, style, etc. of various parts of the face to enhance the player's immersion and interactivity of the game.
[0003] In the face-pinching process, in order to meet the user's needs for various face-pinching effects, the thresholds for adjusting various parameters are relatively large. When there are facial decorations such as masks, veils, bangs, hair accessories, etc., if the face shape after pinching is too exaggerated and exceeds the original face shape too much, it is easy for the facial decorations to not follow the face when combined with the facial decorations, resulting in a mismatch. Summary of the invention
[0004] In order to solve the above technical problems or at least partially solve the above technical problems, the embodiments of the present application provide a facial animation model processing method, device, electronic device and storage medium.
[0005] According to one aspect of an embodiment of the present application, a facial animation model processing method is provided, comprising:
[0006] Get the adjustment parameters corresponding to the facial bones;
[0007] determining a facial ornament bone associated with the facial bone;
[0008] Adjust the facial decoration skeleton according to the adjustment parameter;
[0009] The adjusted facial decoration skeleton is skinned to obtain an adjusted facial animation model.
[0010] Optionally, the facial ornament skeleton and the facial skeleton use the same routing grid.
[0011] Optionally, the step of skinning the adjusted facial decoration skeleton includes:
[0012] Obtaining a first skin weight corresponding to the facial bone;
[0013] Using the first skin weight as the second skin weight of the adjusted facial decoration bone;
[0014] Skinning is performed on the adjusted facial decoration skeleton according to the second skinning weight.
[0015] Optionally, the method further includes:
[0016] During the movement of the facial decoration, performing collision detection on the skeleton of the facial decoration;
[0017] When it is detected that the facial decoration bone collides with a collision body, the facial decoration bone is moved away from a current position.
[0018] Optionally, the method further includes:
[0019] When a first scaling operation on the facial bone is obtained, determining a collision body corresponding to the facial bone;
[0020] A second scaling operation is performed on the collision volume according to the first scaling operation.
[0021] Optionally, the determining of the facial ornament bones associated with the facial bones comprises:
[0022] Acquire an adjustment bone corresponding to the facial bone, wherein the adjustment bone is bound to the facial animation model and inherits the coordinates of the facial bone;
[0023] The facial adornment bone associated with the adjustment bone is determined.
[0024] Optionally, the method further includes:
[0025] Performing a collapse operation on the facial animation model according to a first collapse strategy to obtain a first collapsed animation model;
[0026] Rendering the first collapsed animation model;
[0027] Storing the facial animation model in a server;
[0028] When receiving an adjustment operation on the first collapsed animation model, acquiring the facial animation model from the server;
[0029] Performing the adjustment operation on the facial animation model to obtain an updated facial animation model;
[0030] Performing a collapse operation on the updated animation model according to a second collapse strategy to obtain a second collapsed animation model;
[0031] Rendering the second collapsed animation model;
[0032] The updated facial animation model is stored in the server.
[0033] According to another aspect of an embodiment of the present application, a facial animation model processing device is provided, comprising:
[0034] An acquisition module, used to obtain adjustment parameters corresponding to facial bones;
[0035] A determination module, configured to determine a facial ornament bone associated with the facial bone;
[0036] An adjustment module, used for adjusting the facial decoration skeleton according to the adjustment parameters;
[0037] The skinning processing module is used to perform skinning processing on the adjusted facial decoration skeleton to obtain the adjusted facial animation model.
[0038] According to another aspect of an embodiment of the present application, a storage medium is further provided, which includes a stored program, and the above steps are executed when the program is run.
[0039] According to another aspect of the embodiment of the present application, there is provided an electronic device, comprising: a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
[0040] The memory is used to store computer programs;
[0041] The processor is used to implement the above method steps when executing a computer program.
[0042] According to another aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the above method steps are implemented.
[0043] The above technical solution provided by the embodiment of the present application has the following advantages compared with the prior art:
[0044] The facial decoration bones and the associated facial bones share the adjustment parameters of face pinching, that is, the facial decoration bones follow the facial bones to make changes, thus avoiding the problem of facial decorations not following the facial bones due to excessive changes in the facial bones when pinching the face, preventing the occurrence of bloopers, allowing users to pinch their faces freely, and improving the accuracy and naturalness of the face pinching effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0046] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0047] Figure 1A flowchart of a facial animation model processing method provided in an embodiment of the present application;
[0048] Figure 2a A schematic diagram of a facial decoration provided in an embodiment of the present application;
[0049] Figure 2b A schematic diagram of facial decorations after face pinching provided in an embodiment of the present application;
[0050] Figure 2c A schematic diagram of facial decorations after face pinching provided by another embodiment of the present application;
[0051] Figure 3 A flowchart of a facial animation model processing method provided by another embodiment of the present application;
[0052] Figure 4 A flowchart of a facial animation model processing method provided by another embodiment of the present application;
[0053] Figure 5a A schematic diagram of a fringe provided in an embodiment of the present application;
[0054] Figure 5b A schematic diagram of a fringe provided in another embodiment of the present application;
[0055] Figure 5c A schematic diagram of a fringe provided in another embodiment of the present application;
[0056] Figure 6 A schematic diagram of the facial bone hierarchy provided for an embodiment of the present application;
[0057] Figure 7 A flowchart of a facial animation model processing method provided by another embodiment of the present application;
[0058] Figure 8 A flowchart of a facial animation model processing method provided by another embodiment of the present application;
[0059] Fig. 9 A block diagram of a facial animation model processing device provided in an embodiment of the present application;
[0060] Fig.10 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0061] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0062] In the embodiment of the present application, after the facial bones are adjusted when pinching the face, the facial decoration bones are synchronously adjusted based on the adjustment parameters of the facial bones, and the facial decoration skin is added so that the facial decoration follows the facial bones to avoid mistakes.
[0063] The following first introduces a facial animation model processing method provided by an embodiment of the present invention.
[0064] Figure 1 Flowchart of a facial animation model processing method provided in an embodiment of the present application. Figure 1 As shown, the method comprises the following steps:
[0065] Step S11, obtaining adjustment parameters corresponding to facial bones;
[0066] Step S12, determining the facial ornament bones associated with the facial bones;
[0067] Step S13, adjusting the facial decoration skeleton according to the adjustment parameters;
[0068] Step S14, performing skinning processing on the adjusted facial decoration skeleton to obtain an adjusted facial animation model.
[0069] Through the above steps S11 to S14, the facial decoration bones and the associated facial bones share the adjustment parameters of face pinching, that is, the facial decoration bones follow the facial bones to be modified and changed, thereby avoiding the problem of facial decorations not following due to excessive changes in facial bones when pinching the face, preventing the occurrence of bloopers, allowing users to pinch their faces freely, and improving the accuracy and naturalness of the face pinching effect.
[0070] Optionally, the facial ornament bones use the same routing mesh as the facial bones.
[0071] Figure 2a This is a schematic diagram of a facial decoration provided in an embodiment of the present application. Figure 2a As shown, the wiring grid of the facial decorations close to the facial area is adjusted to be consistent with the wiring grid of the face.
[0072] Figure 2b This is a schematic diagram of facial decorations after pinching the face provided in the embodiment of the present application. Figure 2bAs shown, when the eyebrow distance is adjusted, the facial decorations located at the eyebrow are adjusted accordingly.
[0073] Figure 2c This is a schematic diagram of facial decorations after pinching the face provided by another embodiment of the present application. Figure 2c As shown in the figure, when the eye and brow bones are rotated, the facial decoration bones located at the eye and brow follow the adjustment.
[0074] Figure 3 This is a flowchart of a facial animation model processing method provided by another embodiment of the present application. Figure 3 As shown, the above step S14 includes the following steps:
[0075] Step S21, obtaining a first skin weight corresponding to the facial bones;
[0076] Step S22, using the first skin weight as the adjusted second skin weight of the facial decoration skeleton;
[0077] Step S23, skinning the adjusted facial decoration skeleton according to the second skinning weight.
[0078] In this embodiment, when adding facial decoration skin, the weight of the facial decoration bone is consistent with the weight of its associated facial bone. In this way, even if the facial bones change significantly, the facial decorations can deform along with the facial decoration bones, thereby improving the smoothness of the skin and avoiding the occurrence of blemishes.
[0079] In an optional embodiment, since the facial decorations also include bangs, when pinching the face, if the cheeks are enlarged too much, the bangs may pass through the face. To solve this problem, in this embodiment, collision detection of facial bones is added to the hairstyle made with dynamic bones.
[0080] Figure 4 This is a flowchart of a facial animation model processing method provided by another embodiment of the present application. Figure 4 As shown, the method also includes:
[0081] Step S31, performing collision detection on the skeleton of the facial decoration during the movement of the facial decoration;
[0082] Step S32, when it is detected that the facial decoration skeleton collides with the collision body, the facial decoration skeleton is moved away from the current position.
[0083] In this embodiment, a bounding box may be added to the facial bones as a collision body, and when it is detected that the facial decoration bones move to the coordinate position of the bounding box, it is determined that a collision occurs.
[0084] Optionally, an additional collision bone may be created for the facial bone, and the collision bone may be used as a collision body. When it is detected that the facial decoration bone moves to the coordinate position of the collision bone, it is determined that a collision occurs.
[0085] Optionally, a collider may be directly set for the facial bones to directly detect the positional relationship between the facial ornament bones and the facial bones to determine whether a collision occurs.
[0086] Optionally, when the facial bones are scaled, the collision body is also scaled accordingly. The method further includes: when a first scaling operation on the facial bones is acquired, determining the collision body corresponding to the facial bones; and performing a second scaling operation on the collision body according to the first scaling operation.
[0087] In this way, when the facial bones are enlarged, the collision volume is enlarged accordingly, and the collision between the facial decoration bones and the facial bones can be detected more accurately.
[0088] Figure 5a This is a schematic diagram of fringe provided in an embodiment of the present application. Figure 5a As shown, when the cheek bones are normal, the bangs 51 do not collide with the collision body 52 corresponding to the cheek bones Face, and the hair hangs down naturally.
[0089] Figure 5b This is a schematic diagram of a fringe provided by another embodiment of the present application. Figure 5b As shown, when the cheek bone Face is enlarged, the corresponding collision body 52 is also enlarged accordingly, and the bangs 51 are pushed away after colliding with the collision body 52.
[0090] Figure 5c This is a schematic diagram of a fringe provided by another embodiment of the present application. Figure 5c As shown, when the cheek bone Face shrinks, its corresponding collision body 52 also shrinks accordingly. At this time, collision detection can be performed on the collision body corresponding to the bangs and the head bone Head to avoid the bangs passing through the head during movement and causing a mistake.
[0091] In the embodiment of the present application, the face-pinching bones belong to the head bone subset. Figure 6 A schematic diagram of the facial bone hierarchy provided in the embodiment of the present application. Figure 6 As shown, the subset bones of the head bone Head include the head adjustment bone Head_Adjust, and each face-pinching bone A, B, C...N serves as a child bone of the head adjustment bone Head_Adjust.
[0092] Because there is a certain correlation between the facial bones, for example, when you want to rotate the eyes, in addition to adjusting the rotation of the right eye socket bone Eye_Socket_R, you also need to adjust the displacement and rotation of the right inner and outer eye corner bones Eye_Corner_R_02 and Eye_Corner_R_01 to obtain the comprehensive effect; at the same time, the left eye socket bone Eye_Socket_L, the left inner and outer eye corner bones Eye_Corner_L_02 and Eye_Corner_L_01 are also adjusted accordingly to ensure symmetrical adjustment of the left and right eyes.
[0093] Figure 7 This is a flowchart of a facial animation model processing method provided by another embodiment of the present application. Figure 7 As shown, the method further comprises the following steps:
[0094] Step S51, determining the associated bones corresponding to the facial bones;
[0095] Step S52, obtaining a first weight corresponding to the facial bone and a second weight corresponding to the associated bone;
[0096] Step S53, determining the adjustment parameter corresponding to the associated bone according to the adjustment parameter corresponding to the facial bone, the first weight and the second weight;
[0097] Step S54, adjusting the related bones according to the adjustment parameters corresponding to the associated bones.
[0098] In this embodiment, when the user adjusts one of the facial bones, the associated bones corresponding to the facial bone also perform corresponding adjustment operations, thereby achieving synchronous adjustment of the facial bones and their associated bones, and quickly and accurately adjusting the effect of the animation model according to the user's needs. At the same time, the user does not need to manually adjust each bone one by one, and can synchronously adjust other associated bones by adjusting only one bone, thereby reducing the complexity of the bone adjustment operation.
[0099] For the interrelated bones, each bone has its corresponding weight, which represents the corresponding adjustment relationship of each bone during the adjustment process. For example, each bone is divided into 31 gears from -15 to 15 according to the original bone data. The weight of the current bone A is 0.6, and the weight of its associated bone B is 1.2. For every 0.6 gear adjustment of the current bone A, the associated bone B is adjusted by 1.2 gears. If the current bone A is adjusted by 3 gears from the initial position, the associated bone B is adjusted by 3×1.2÷0.6=6 gears.
[0100] The weight can be the adjustment relationship between the actual bone data, including the relationship between adjustment parameters such as rotation angle and displacement distance, that is, the adjustment parameters of the current bone are calculated directly according to the bone data, and the adjustment parameters corresponding to the associated bones are calculated according to the weights of each bone. I will not go into details here.
[0101] In an optional embodiment, the range of associated bones can be determined according to whether the associated adjustment control is turned on or off. The above step S51 includes the following steps: obtaining the control state of the associated adjustment control; when the control state is turned on, determining that the associated bones include the facial bones themselves and other bones associated with the facial bones; when the control state is turned off, determining that the associated bones only include the facial bones themselves.
[0102] For example, for the bones corresponding to the eyes, when the associated condition control is turned off, when the user adjusts the "right eye socket" bone, the other bones "right inner eye corner", "right outer eye corner", "left eye socket", "left inner eye corner" and "left outer eye corner" will not be adjusted in a linked manner. Only when the associated condition control is turned on, the associated bones of the "right eye socket" will be adjusted synchronously.
[0103] Optionally, when the control state is in the on state, the control state also includes an associated range level; the above step S51 also includes: determining the associated bones of the facial bones according to the associated range level.
[0104] For example, for the bones corresponding to the eyes, when the associated range level is level one, when the user adjusts the bones of the "right eye socket", only the "right inner corner of the eye" and "right outer corner of the eye" bones follow the adjustment, while the bones of the "left eye socket", "left inner corner of the eye" and "left outer corner of the eye" remain unchanged.
[0105] Optionally, multiple gears can be set on the association adjustment control, and different gears correspond to different ranges of associated bones. For example, for the eye bones, the associated bones corresponding to gear 1 are all the eye bones; the associated bones corresponding to gear 2 include all the eye bones and nose bones; the associated bones corresponding to gear 2 include all the eye bones and nose bones, as well as mouth bones.
[0106] In the above embodiment, each gear of the associated adjustment control is associated with the tree-like bone data selection range. When the associated adjustment control is turned on, all child bones of the current facial bone are read; when the associated adjustment control is turned off, only the current bone is read; when the associated adjustment control is in a certain gear, the child bones in the corresponding range of the gear are read. During the bone adjustment process, the parent bone of the current facial bone is generally not affected, but as needed, when adjusting a specific bone, its parent bone can be controlled to make corresponding follow-up adjustments.
[0107] In an optional embodiment, when adjusting multiple associated bones, each bone needs to have a unified initial state, that is, multiple bones start adjusting from the same initial state. The above step S53 includes: obtaining the intermediate gear and parameter adjustment range corresponding to the associated bones, the intermediate gear of the current bone and the associated bones are the same; according to the intermediate gear and parameter adjustment range, determining the adjustment parameters corresponding to the associated bones.
[0108] When adjusting multiple associated bones, it is necessary to synchronize the initial state of each bone, that is, the intermediate state of each bone, so that each associated bone can be adjusted uniformly later. Therefore, the method also includes the step of determining the intermediate position of each bone, which is as follows:
[0109] Step A1, obtaining the first parameter adjustment range of the current bone, the second parameter adjustment range of the associated bone, and the number of gears of the first adjustment component and the second adjustment component;
[0110] Step A2, determining the first original gear position corresponding to the original bone data of the current bone according to the first parameter adjustment range and the number of gear positions, and determining the second original gear position corresponding to the original bone data of the associated bone according to the second parameter adjustment range and the number of gear positions;
[0111] Step A3, calculating the intermediate gear according to the first original gear, the second original gear, the first weight and the second weight.
[0112] The process of determining the intermediate gear position is described in detail below through a specific example.
[0113] Each bone is divided into 30 levels from -15 to 15 according to the original bone data.
[0114] The original positions of the three associated bones A, B, and C are calculated based on their original bone data to be -10, 7, and 1 respectively.
[0115] If the weights of bones A, B, and C are the same, the middle position is
[0116] If the weights of bones A, B, and C are 0.6, 1.2, and 0.8 respectively, the middle position is
[0117] In this way, bones A, B, and C are adjusted with the same middle position as the starting point. Although the initial state is different from the original effect, the error is relatively small, which facilitates the subsequent correlation adjustment of multiple bones.
[0118] Optionally, since the animation model after face pinching has a large number of bones and modification parameters, the facial animation model can be collapsed, the vertex information corresponding to the bone data is assigned to the vertices of the original animation model, and the set face pinching / human pinching bones are deleted, including the modification parameters corresponding to the bones, so that the rendered animation model is the model after face pinching / human pinching, and the number of bones of the animation model is reduced, the amount of calculation during the rendering process is reduced, the calculation speed is improved, and the game fluency is optimized.
[0119] Figure 8 This is a flowchart of a facial animation model processing method provided by another embodiment of the present application. Figure 8 As shown, the method further comprises the following steps:
[0120] Step S61, performing a collapse operation on the facial animation model according to a first collapse strategy to obtain a first collapsed animation model;
[0121] Step S62, rendering the first collapsed animation model;
[0122] Step S63, storing the facial animation model in the server;
[0123] Step S64, when an adjustment operation on the first collapsed animation model is received, obtaining a facial animation model from the server;
[0124] Step S65, performing an adjustment operation on the facial animation model to obtain an updated facial animation model;
[0125] Step S66, performing a collapse operation on the updated animation model according to the second collapse strategy to obtain a second collapsed animation model;
[0126] Step S67, rendering the second collapsed animation model;
[0127] Step S68, storing the updated facial animation model in the server.
[0128] The first collapse strategy and the second collapse strategy may be the same or different.
[0129] Through the above steps S61 to S68, after the face / character pinching is completed, the animation model is collapsed to reduce the amount of bone data in the animation model, reduce the amount of calculation during the rendering process, improve the calculation speed, and optimize the game fluency. In addition, after the original animation model is collapsed, the original animation model is not deleted, but the collapsed animation model is rendered, and the original animation model is stored on the server, which is convenient for subsequent modification of the animation model.
[0130] In the above embodiment, whether to perform the collapse operation can be controlled based on whether the collapse control is turned on or off, and the control can be in the form of a slide bar, a knob, etc. The collapse level can also be adjusted through the collapse control. For example, the collapse control can be provided with multiple gears, gear 1 corresponds to a collapse level of 1, and 30% of the bone data is deleted; gear 2 corresponds to a collapse level of 2, and 50% of the bone data is deleted; gear 3 corresponds to a collapse level of 3, and 70% of the bone data is deleted.
[0131] In an optional embodiment, the collapse strategy is automatically adjusted according to different processors. The method also includes: obtaining performance parameters of a device that performs rendering; and determining the collapse strategy according to the performance parameters.
[0132] In an optional embodiment, it is also possible to determine whether it is necessary to turn on the collapse control, and the collapse level of the animation model after turning on the collapse control, based on the number of animation models that need to be rendered on the same screen or the number of bones that need to be rendered (or the amount of bone data). For example, when there are 1 to 3 animation models that need to be rendered on the same screen, the collapse control is not turned on, and when the number of animation models on the same screen is 4 or more, the collapse control is turned on. When the number of animation models on the same screen is 4 to 6, the collapse strategy of collapse level 1 is adopted, and 30% of the bone data of each animation model is deleted; when the number of animation models on the same screen is 7 to 9, the collapse strategy of collapse level 2 is adopted, and 50% of the bone data of each animation model is deleted; when the number of animation models on the same screen is 10 or more, the collapse strategy of collapse level 3 is adopted, and 70% of the bone data of each animation model is deleted.
[0133] In another optional embodiment, the collapse strategy can also be controlled by the user to be enabled or disabled, and the user can also select the collapse level as needed.
[0134] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application.
[0135] Fig. 9 This is a block diagram of a facial animation model processing device provided in an embodiment of the present application. The device can be implemented as part or all of an electronic device through software, hardware, or a combination of both. Fig. 9 As shown, the facial animation model processing device includes:
[0136] Acquisition module 1, used to obtain adjustment parameters corresponding to facial bones;
[0137] Determination module 2, used for determining the facial ornament bones associated with the facial bones;
[0138] An adjustment module 3, used for adjusting the facial decoration skeleton according to the adjustment parameters;
[0139] The skinning processing module 4 is used to perform skinning processing on the adjusted facial decoration skeleton to obtain an adjusted facial animation model.
[0140] Optionally, the facial ornament skeleton and the facial skeleton use the same routing grid.
[0141] Optionally, the skinning processing module 4 is used to obtain a first skinning weight corresponding to the facial bones; use the first skinning weight as a second skinning weight of the adjusted facial decoration bones; and perform skinning on the adjusted facial decoration bones according to the second skinning weight.
[0142] Optionally, the device further comprises:
[0143] A collision detection module 5, used for performing collision detection on the skeleton of the facial decoration during the movement of the facial decoration;
[0144] The displacement module 6 is used to move the facial decoration skeleton away from the current position when it is detected that the facial decoration skeleton collides with the collision body.
[0145] Optionally, the device further comprises:
[0146] A collision body determination module 7, configured to determine a collision body corresponding to the facial bone when a first scaling operation on the facial bone is obtained;
[0147] The scaling module 8 is configured to perform a second scaling operation on the collision body according to the first scaling operation.
[0148] Optionally, determination module 2 is used to obtain an adjustment bone corresponding to the facial bone, the adjustment bone is bound to the facial animation model and inherits the coordinates of the facial bone; and determine the facial decoration bone associated with the adjustment bone.
[0149] Optionally, the device further comprises:
[0150] A collapse module 9, configured to perform a collapse operation on the facial animation model according to a first collapse strategy to obtain a first collapsed animation model;
[0151] A rendering module 10, used for rendering the first collapsed animation model;
[0152] A storage module 11, used for storing the facial animation model in a server;
[0153] A model acquisition module 12, configured to acquire the facial animation model from the server when receiving an adjustment operation on the first collapsed animation model;
[0154] An adjustment module 13, configured to perform the adjustment operation on the facial animation model to obtain an updated facial animation model;
[0155] A collapse module 9, configured to perform a collapse operation on the updated animation model according to a second collapse strategy to obtain a second collapsed animation model;
[0156] A rendering module 10, configured to render the second collapsed animation model;
[0157] The storage module 11 is used to store the updated facial animation model in the server.
[0158] The present application also provides an electronic device, such as Fig.10 As shown, the electronic device may include: a processor 1501 , a communication interface 1502 , a memory 1503 and a communication bus 1504 , wherein the processor 1501 , the communication interface 1502 , and the memory 1503 communicate with each other via the communication bus 1504 .
[0159] Memory 1503, used for storing computer programs;
[0160] The processor 1501 is used to implement the steps of the above method embodiment when executing the computer program stored in the memory 1503.
[0161] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0162] The communication interface is used for communication between the above electronic device and other devices.
[0163] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0164] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0165] The present application also provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the method embodiment described below are implemented.
[0166] It should be noted that, for the above-mentioned device, electronic device and computer-readable storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0167] It should be further noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0168] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A facial animation model processing method, characterized in that: include: Get the adjustment parameters corresponding to the facial bones; determining a facial ornament bone associated with the facial bone; Adjust the facial decoration skeleton according to the adjustment parameter; Skinning the adjusted facial decoration skeleton to obtain an adjusted facial animation model; The method further comprises: Performing a collapse operation on the facial animation model according to a first collapse strategy to obtain a first collapsed animation model; wherein the collapse operation is used to delete the bone data of the facial animation model; Rendering the first collapsed animation model; Storing the facial animation model in a server; When receiving an adjustment operation on the first collapsed animation model, acquiring the facial animation model from the server; Performing the adjustment operation on the facial animation model to obtain an updated facial animation model; performing a collapse operation on the updated facial animation model according to a second collapse strategy to obtain a second collapsed animation model; Rendering the second collapsed animation model; storing the updated facial animation model in the server; The method further comprises: Whether it is necessary to turn on the collapse control is determined based on one of the number of animation models required to be rendered on the same screen, the number of bones required to be rendered, and the amount of bone data required to be rendered, as well as the collapse level of the animation model after the collapse control is turned on; wherein the switch of the collapse control is used to control whether to perform a collapse operation, and the collapse level is used to determine the collapse strategy.
2. The method according to claim 1, characterized in that The facial ornament bones use the same routing grid as the facial bones.
3. The method according to claim 1, characterized in that: The step of skinning the adjusted facial decoration skeleton comprises: Obtaining a first skin weight corresponding to the facial bone; Using the first skin weight as the second skin weight of the adjusted facial decoration bone; Skinning is performed on the adjusted facial decoration skeleton according to the second skinning weight.
4. The method according to claim 1, characterized in that: The method further comprises: During the movement of the facial decoration, performing collision detection on the skeleton of the facial decoration; When it is detected that the facial decoration bone collides with a collision body, the facial decoration bone is moved away from a current position.
5. The method according to claim 4, characterized in that The method further comprises: When a first scaling operation on the facial bone is obtained, determining a collision body corresponding to the facial bone; A second scaling operation is performed on the collision volume according to the first scaling operation.
6. The method according to claim 1, characterized in that The determining of the facial ornament bones associated with the facial bones comprises: Acquire an adjustment bone corresponding to the facial bone, wherein the adjustment bone is bound to the facial animation model and inherits the coordinates of the facial bone; The facial adornment bone associated with the adjustment bone is determined.
7. A facial animation model processing device, characterized in that: include: An acquisition module, used to obtain adjustment parameters corresponding to facial bones; A determination module, configured to determine a facial ornament bone associated with the facial bone; An adjustment module, used for adjusting the facial decoration skeleton according to the adjustment parameters; A skinning processing module, used for performing skinning processing on the adjusted facial decoration skeleton to obtain an adjusted facial animation model; The device also includes: A collapse module, configured to perform a collapse operation on the facial animation model according to a first collapse strategy to obtain a first collapsed animation model; A rendering module, used for rendering the first collapsed animation model; A storage module, used for storing the facial animation model in a server; a model acquisition module, configured to acquire the facial animation model from the server when receiving an adjustment operation on the first collapsed animation model; An adjustment module, configured to perform the adjustment operation on the facial animation model to obtain an updated facial animation model; The collapse module is used to perform a collapse operation on the updated facial animation model according to a second collapse strategy to obtain a second collapsed animation model; The rendering module is used to render the second collapsed animation model; The storage module is used to store the updated facial animation model in the server; The device also includes a module for determining whether to turn on the collapse control based on one of the number of animation models required to be rendered on the same screen, the number of bones required to be rendered, and the amount of bone data required to be rendered, and the collapse level of the animation model after the collapse control is turned on; wherein the switch of the collapse control is used to control whether to perform a collapse operation, and the collapse level is used to determine the collapse strategy.
8. An electronic device, characterized in that: include: A processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; The memory is used to store computer programs; The processor is used to implement the method steps described in any one of claims 1-6 when executing the computer program.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method steps described in any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Animation generating method and apparatus
CN105976417A
Three-dimensional virtual object swinging method and device, storage medium and computer equipment
CN108961365A
Three-dimensional local human body model generation method and device and apparatus
CN110111417A
Animation model zooming method and device, electronic equipment and storage medium
CN111062864A