Facial bone processing method, device, electronic device and storage medium
Through the synchronous adjustment of facial bone adjustment controls, the problems of complex face pinching operations and large resource occupancy in the existing technology are solved, and fast and accurate facial effect adjustment is achieved, reducing operation complexity and optimizing resource usage.
Patent Information
- Application Number
- CN202011036179.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-27
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2040-09-27
AI Technical Summary
In game scenarios, the existing face-pinching method requires fine control of a large number of facial model vertices, resulting in complex operations and occupies computing resources and network bandwidth. The way to modify the model bones is controllable, but still complex, affecting expression ability.
By obtaining and adjusting the adjustment controls of facial bones, we determine the associated facial bones and their adjustment parameters, and realize synchronous adjustment of facial bones, reducing operational complexity and improving adjustment efficiency.
It realizes the rapid and accurate adjustment of the facial effect of the animation model, reduces the complexity of face pinching operations, improves the user experience, and optimizes the use of computing resources and network bandwidth.
Smart Images

Figure CN112090082B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a facial bone processing method, device, electronic device and storage medium. Background Art
[0002] In relevant game scenes, there are two main ways to pinch the face: modifying the model vertices and modifying the model bones. Among them, the method of modifying the model vertices requires fine control of each vertex of the facial model, which makes the modification amount huge and the modification process complicated. In the method of modifying the model bones, the number of modified bones is controllable, but in order to ensure the expressiveness of the game character, the method of modifying the model bones still has many modification items. There are more than 100 facial parameter modification items for 45 facial bones. When pinching the face, many modification items need to be adjusted, the operation is complicated, the adjustment effect on the facial model is poor, and it takes up more computing resources and network bandwidth. Summary of the invention
[0003] 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 bone processing method, device, electronic device and storage medium.
[0004] According to one aspect of an embodiment of the present application, a facial bone processing method is provided, comprising:
[0005] Obtaining a first adjustment operation on a first adjustment control corresponding to the current facial bone;
[0006] Determining an adjusted facial bone corresponding to the current facial bone;
[0007] Determining, according to the first adjustment operation, a second adjustment operation on a second adjustment control corresponding to the adjusted facial bone;
[0008] Determining, according to the second adjustment operation, an adjustment parameter corresponding to the adjustment of the facial bones;
[0009] The adjusted facial bones are adjusted according to the adjustment parameters.
[0010] Optionally, determining the adjusted facial bone corresponding to the current facial bone includes:
[0011] Get the control status of the associated adjustment control;
[0012] When the control state is in the on state, determining that the adjusted facial bones include the current facial bones and facial bones associated with the current facial bones;
[0013] When the control state is a closed state, the adjusted facial bone is determined to be the current facial bone.
[0014] Optionally, when the control state is in an on state, the control state further includes an associated range level;
[0015] The step of determining the adjusted facial bones corresponding to the current facial bones further comprises:
[0016] Determine the associated facial bones of the current facial bones according to the associated range level.
[0017] Optionally, when the control state is in the on state, determining, according to the first adjustment operation, a second adjustment operation on the second adjustment control corresponding to the adjusted facial bone includes:
[0018] determining a first adjustment gear corresponding to the first adjustment operation;
[0019] Obtaining a first weight corresponding to the current facial bone and a second weight corresponding to the associated facial bone;
[0020] Calculating a second adjustment gear corresponding to the second adjustment control according to the first adjustment gear, the first weight, and the second weight;
[0021] Determine a second adjustment operation corresponding to the associated facial bone according to the second adjustment gear.
[0022] Optionally, determining the second adjustment parameter corresponding to the associated facial bone according to the second adjustment operation includes:
[0023] Obtaining the intermediate gear position and parameter adjustment range corresponding to the associated facial bone, wherein the intermediate gear position of the current facial bone and the associated facial bone is the same;
[0024] According to the intermediate gear and the parameter adjustment range, a second adjustment parameter corresponding to the second adjustment gear is determined.
[0025] Optionally, the method further includes:
[0026] Acquire a first parameter adjustment range of the current facial bone, a second parameter adjustment range of the associated facial bone, and the number of gears of the first adjustment component and the second adjustment component;
[0027] Determine the first original gear corresponding to the current facial bone original bone data according to the first parameter adjustment range and the number of gears, and determine the second original gear corresponding to the associated facial bone original bone data according to the second parameter adjustment range and the number of gears;
[0028] The intermediate gear is calculated according to the first original gear, the second original gear, the first weight and the second weight.
[0029] Optionally, the method further includes:
[0030] Obtaining a first skin weight corresponding to the head bone and a second skin weight corresponding to the facial bone, wherein the first skin weight is greater than or equal to a preset value;
[0031] The facial skeleton is bound to the facial model according to the first skin weight and the second skin weight.
[0032] According to another aspect of the embodiment of the present application, there is provided a facial bone processing device, comprising:
[0033] An acquisition module, used for acquiring a first adjustment operation of a first adjustment control corresponding to a current facial bone;
[0034] A bone determination module, used to determine the adjusted facial bone corresponding to the current facial bone;
[0035] An operation determination module, configured to determine, according to the first adjustment operation, a second adjustment operation on a second adjustment control corresponding to the adjusted facial bone;
[0036] A parameter determination module, used for determining the adjustment parameter corresponding to the adjustment of the facial bones according to the second adjustment operation;
[0037] An adjustment module is used to adjust the adjusted facial bones according to the adjustment parameters.
[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] When the user adjusts the adjustment control of one of the facial bones, the adjustment control corresponding to the facial bone is controlled to perform the corresponding adjustment operation, thereby achieving synchronous adjustment of the facial bone and its associated facial bones, and quickly and accurately adjusting the facial effect of the animation model according to user needs. At the same time, the user does not need to manually adjust each bone one by one, and can synchronously adjust other associated face-pinching bones by adjusting only one face-pinching bone, reducing the complexity of face-pinching operations. 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 1 A schematic diagram of the facial bone hierarchy provided for an embodiment of the present application;
[0048] Figure 2a A schematic diagram of an eye before rotation provided in an embodiment of the present application;
[0049] Figure 2b A schematic diagram of an eye after rotation provided in an embodiment of the present application;
[0050] Figure 3 A flowchart of a facial bone processing method provided in an embodiment of the present application;
[0051] Figure 4 A schematic diagram of the adjustment controls for facial bones provided in an embodiment of the present application;
[0052] Figure 5a A schematic diagram of an associated adjustment control provided in an embodiment of the present application when it is closed;
[0053] Figure 5b A schematic diagram of an associated adjustment control provided in an embodiment of the present application when it is turned on;
[0054] Figure 5c A schematic diagram of an associated adjustment control provided by another embodiment of the present application;
[0055] Figure 6 A flowchart of a facial bone processing method provided by another embodiment of the present application;
[0056] Figure 7A flowchart of a facial bone processing method provided by another embodiment of the present application;
[0057] Figure 8 A block diagram of an animation model skeleton processing device provided in an embodiment of the present application;
[0058] Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0059] 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.
[0060] In the embodiment of the present application, the face-pinching bones belong to the head bone subset. Figure 1 A schematic diagram of the facial bone hierarchy provided in the embodiment of the present application. Figure 1 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.
[0061] The facial bones are as follows:
[0062] (1) Eyes
[0063] Right and left eye sockets as a whole: Eye_Socket_R, Eye_Socket_L;
[0064] Right and left outer corners of the eyes: Eye_Corner_R_02, Eye_Corner_L_02;
[0065] Right and left upper eyelids: Eyelid_R_01, Eyelid_L_01;
[0066] Inner corners of right and left eyes: Eye_Corner_R_01, Eye_Corner_L_01;
[0067] Right and left lower eyelids: Eyelid_R_02, Eyelid_L_02;
[0068] Right and left eyeballs: Eye_R, Eye_L;
[0069] Right and left eyebrows: Brow_R, Brow_L;
[0070] Right and left brows: Brow_R_01, Brow_L_01;
[0071] Right and left brow peaks: Brow_R_02, Brow_L_02;
[0072] Right and left eyebrow ends: Brow_R_03, Brow_L_03.
[0073] Among them, the bones in the eye area all use bone bones, the left and right sides need to be aligned parallel, all parallel subsets are on the head, the bone coordinates inherit the root bone coordinates, and the bones do not have scaling values.
[0074] (2) Nose
[0075] Nose_root;
[0076] Nose bridge: Nose_bridge;
[0077] Nose tip: Nose_tip;
[0078] Nose wing:Nose_wing.
[0079] The bones in the nose area all use bone bones. All bones are parallel to the head. The bone coordinates inherit the root bone coordinates, and the bones do not have scaling values.
[0080] (3) Mouth
[0081] Upper lip: Mouth_Lip_01; Lower lip: Mouth_Lip_02;
[0082] Upper lip bead: Mouth_Lip_01_bump; Lower lip bead: Mouth_Lip_02_bump;
[0083] Left and right mouth corners: Mouth_Corner_L, Mouth_Corner_R;
[0084] Overall scaling of the mouth: Mouth.
[0085] The mouth area uses bone bones, the left and right mouth corner bones are aligned parallel to each other, and all bones are parallel to the head. The bone coordinates inherit the root bone coordinates, and the bones do not have scaling values.
[0086] (4) Cheek
[0087] Cheek: Face; Cheekbone: Cheekbone; Apple muscle: Cheek_RCheek_L;
[0088] Mandible: Mandible; Jaw: Jaw_Mandible; Jaw tip: Jaw;
[0089] Forehead: Forehead;
[0090] Ear:Pinna_R / Pinna_L; Earlobe:EarLobe_R / EarLobe_L.
[0091] The bones in the cheek area all use bone bones, all parallel subsets to the head, the bone coordinates inherit the root bone coordinates, and the bones do not have scaling values.
[0092] Figure 2a A schematic diagram of an eye before rotation provided in an embodiment of the present application; Figure 2b This is a schematic diagram of the eyes after rotation provided in the embodiment of the present application. There is a certain correlation between the face-pinching bones, for example, Figure 2a and Figure 2b As shown in the figure, when you want to rotate the eyes, in addition to adjusting the rotation of the right orbital 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 get the comprehensive effect; at the same time, the left orbital 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] In this embodiment, the face pinching bones of the face can be adjusted by adjusting controls, such as sliders, knobs, etc., and other face pinching bones associated with the face pinching bones can be controlled to make corresponding adjustments, so as to quickly and accurately adjust the facial effect of the animation model according to user needs. At the same time, the user does not need to manually adjust each bone one by one, and only needs to adjust one face pinching bone to synchronously adjust other associated face pinching bones, thereby reducing the complexity of the face pinching operation.
[0094] The following first introduces a facial bone processing method provided by an embodiment of the present invention.
[0095] Figure 3 A flowchart of a facial bone processing method provided in an embodiment of the present application. Figure 3 As shown, the method comprises the following steps:
[0096] Step S11, obtaining a first adjustment operation of a first adjustment control corresponding to the current facial bone;
[0097] Step S12, determining the adjusted facial bones corresponding to the current facial bones;
[0098] Step S13, determining a second adjustment operation for adjusting a second adjustment control corresponding to the facial bones according to the first adjustment operation;
[0099] Step S14, determining adjustment parameters corresponding to the facial bones according to the second adjustment operation;
[0100] Step S15, adjusting the facial bones according to the adjustment parameters.
[0101] Figure 4 Schematic diagram of the facial bone adjustment control provided in the embodiment of the present application. Figure 4 As shown, when the user wants to rotate the eyes, he manually moves the slider on the "right eye socket" slider bar. At the same time, the sliders on the "right inner corner of the eye", "right outer corner of the eye", "left eye socket", "left inner corner of the eye" and "left outer corner of the eye" slider bars slide automatically accordingly, thereby realizing the eye rotation and obtaining a normal facial effect.
[0102] In this embodiment, when the user adjusts the adjustment control of one of the facial bones, the adjustment control corresponding to the facial bone corresponding to the facial bone is controlled to perform a corresponding adjustment operation, thereby achieving synchronous adjustment of the facial bone and its associated facial bones, and quickly and accurately adjusting the facial 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 face-pinching bones by adjusting only one face-pinching bone, thereby reducing the complexity of the face-pinching operation.
[0103] In step S12 of the above embodiment, the range of the adjusted facial bones corresponding to the current facial bones can be determined according to whether the associated adjustment control is turned on or off. The above step S12 includes: obtaining the control state of the associated adjustment control; when the control state is turned on, determining that the adjusted facial bones include the current facial bones and the facial bones associated with the current facial bones; when the control state is turned off, determining that the adjusted facial bones are the current facial bones.
[0104] Figure 5a and Figure 5b The following are schematic diagrams of the associated adjustment control provided in the embodiment of the present application when it is closed and opened. The associated adjustment control may be a knob switch. Figure 5a As shown, when the knob 51 is vertical, the associated adjustment control is in a closed state, and the facial bones to be adjusted are only the current facial bones themselves. Figure 5b As shown, when the knob 51 is horizontal, the associated adjustment control is in the on state. At this time, the facial bone adjustment processing includes not only the current facial bones themselves, but also their associated facial bones.
[0105] For example, for the bones corresponding to the eyes, when the associated condition control is turned off, such as Figure 4As shown in the figure, when the user moves the slider of "Right Eye Socket", the sliders of other bones "Right Inner Eye Corner", "Right Outer Eye Corner", "Left Eye Socket", "Left Inner Eye Corner" and "Left Outer Eye Corner" will not slide in association. Only when the association condition control is turned on, the associated bones of "Right Eye Socket" will be adjusted synchronously.
[0106] Optionally, when the control state is in the on state, the control state also includes an associated range level; the above step S12 also includes: determining the associated facial bones of the current facial bones according to the associated range level.
[0107] Figure 5c This is a schematic diagram of an associated adjustment control provided by another embodiment of the present application. Figure 5c As shown, in addition to opening and closing, the associated adjustment control is also provided with a gear position 52, which is used to control the selection of associated facial bones. For example, for the bones corresponding to the eyes, when the knob 51 is rotated to the gear position 52, the user moves the slider of the "right eye socket", and only the sliders of the "right inner eye corner" and the "right outer eye corner" follow the sliding, while the sliders of the "left eye socket", "left inner eye corner" and "left outer eye corner" will not slide in association.
[0108] Optionally, multiple gears can be set on the association adjustment control, and different gears correspond to different ranges of associated facial bones. For example, for eye bones, gear 1 corresponds to all eye bones; gear 2 corresponds to all eye bones and nose bones; gear 2 corresponds to all eye bones and nose bones, as well as mouth bones.
[0109] In the above embodiment, each gear position of the associated adjustment control is associated with a tree-like facial 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 facial bone is read; when the associated adjustment control is in a certain gear position, the child bones in the corresponding range of the gear position are read. During the facial bone adjustment process, the parent bone of the current facial bone is generally not affected, but as needed, when adjusting a specific facial bone, its parent bone can be controlled to make corresponding follow-up adjustments.
[0110] Since there are multiple associated bones involved in the adjustment, the position of the adjustment controls of each bone is difficult to determine during the associated adjustment. Figure 6 A flowchart of a facial bone processing method provided by another embodiment of the present application. Figure 6 As shown, in an optional embodiment, when the control state is the on state, the above step S13 includes the following steps:
[0111] Step S21, determining a first adjustment gear corresponding to a first adjustment operation;
[0112] Step S22, obtaining a first weight corresponding to the current facial bone, and associating a second weight corresponding to the facial bone;
[0113] Step S23, calculating a second adjustment gear corresponding to the second adjustment control according to the first adjustment gear, the first weight, and the second weight;
[0114] Step S24, determining a second adjustment operation corresponding to the associated facial bone according to the second adjustment gear.
[0115] 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 facial bone A is 0.6, and the weight of its associated facial bone B is 1.2. For every 0.6 gear adjustment of the current facial bone A, the associated facial bone B is adjusted by 1.2 gears. If the current facial bone A is adjusted by 3 gears from the initial position, the associated facial bone B is adjusted by 3×1.2÷0.6=6 gears.
[0116] Optionally, the weight can also be the adjustment relationship between actual bone data, including the relationship between adjustment parameters such as rotation angle and displacement distance, that is, directly calculating the adjustment parameters based on the bone data of the current facial bones, and calculating the adjustment parameters corresponding to the associated facial bones based on the weights of each bone.
[0117] 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 S24 includes: obtaining the intermediate gear and parameter adjustment range corresponding to the associated facial bones, the intermediate gear of the current facial bones and the associated facial bones are the same; according to the intermediate gear and the parameter adjustment range, determining the second adjustment parameter corresponding to the second adjustment gear.
[0118] 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. Figure 7 A flowchart of a facial bone processing method provided by another embodiment of the present application. Figure 7 As shown, the method further includes the step of determining the intermediate gear position, which is specifically as follows:
[0119] Step S31, obtaining a first parameter adjustment range of the current facial bones, a second parameter adjustment range of the associated facial bones, and the number of gears of the first adjustment component and the second adjustment component;
[0120] Step S32, determining the first original gear position corresponding to the original bone data of the current facial skeleton 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 facial skeleton according to the second parameter adjustment range and the number of gear positions;
[0121] Step S33, calculating the intermediate gear according to the first original gear, the second original gear, the first weight and the second weight.
[0122] The process of determining the intermediate gear position is described in detail below through a specific example.
[0123] Each facial bone is divided into 30 levels from -15 to 15 according to the original bone data.
[0124] The original positions of the three associated face-pinching bones A, B, and C are calculated based on their original bone data to be -10, 7, and 1 respectively.
[0125] If the weights of face-pinching bones A, B, and C are the same, the middle position is
[0126] If the weights of face-pinching bones A, B, and C are 0.6, 1.2, and 0.8 respectively, the middle position is
[0127] In this way, the face-pinching 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 facial effect, the error is relatively small, which facilitates the subsequent correlation adjustment of multiple bones.
[0128] In this embodiment, the difference between the maximum and minimum values of the bone data of each bone and the original bone data can be set according to demand. If an exaggerated effect is required, the difference between the maximum and minimum values and the original bone data can be increased. If a more natural effect is desired, the difference between the maximum and minimum values and the original bone data can be reduced. In order to obtain a more exaggerated effect, the adjustment threshold can also be enlarged as a whole, and slight goofs can be accepted.
[0129] In another optional embodiment, during skinning, considering that the facial bones need to be affected by the head bones, the method also includes: obtaining a first skinning weight corresponding to the head bones and a second skinning weight corresponding to the facial bones, the first skinning weight being greater than or equal to a preset value; binding the facial bones to the facial model according to the first skinning weight and the second skinning weight.
[0130] The preset value may be 30%, that is, the skinning weight of the head bone Head is greater than or equal to 30% during skinning.
[0131] In this embodiment, in order to more freely adjust the bones so that the user can pinch out an exaggerated, abnormal face shape, which is convenient for the user to express freely, when the facial bones are scaled during the face pinching process, the facial bones are allowed to be adjusted in at least a single axis.
[0132] The following are device embodiments of the present application, which can be used to execute method embodiments of the present application.
[0133] Figure 8 This is a block diagram of an animation model skeleton 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. Figure 8 As shown, the animation model skeleton processing device includes:
[0134] An acquisition module 1 is used to acquire a first adjustment operation of a first adjustment control corresponding to a current facial bone;
[0135] Skeleton determination module 2, used to determine the adjusted facial bones corresponding to the current facial bones;
[0136] An operation determination module 3, used for determining a second adjustment operation on a second adjustment control corresponding to the adjusted facial bone according to the first adjustment operation;
[0137] The adjustment module 4 is used to adjust the adjusted facial bones according to the adjustment parameters.
[0138] Optionally, the bone determination module 2 is used to obtain the control state of the associated adjustment control; when the control state is in the on state, it is determined that the adjustment facial bones include the current facial bones and the facial bones associated with the current facial bones; when the control state is in the off state, it is determined that the adjustment facial bones are the current facial bones.
[0139] Optionally, when the control state is in the on state, the control state also includes an associated range level; the bone determination module 2 is further used to determine the associated facial bones of the current facial bones according to the associated range level.
[0140] Optionally, when the control state is in the on state, the operation determination module 3 includes:
[0141] a gear position determining unit, configured to determine a first adjustment gear position corresponding to the first adjustment operation;
[0142] A weight acquisition unit, used to acquire a first weight corresponding to the current facial bone and a second weight corresponding to the associated facial bone;
[0143] a gear calculation unit, configured to calculate a second adjustment gear corresponding to the second adjustment control according to the first adjustment gear, the first weight, and the second weight;
[0144] An operation determination unit is used to determine a second adjustment operation corresponding to the associated facial bone according to the second adjustment gear.
[0145] Optionally, an operation determination unit is used to obtain an intermediate gear and a parameter adjustment range corresponding to the associated facial bone, and the intermediate gear of the facial bone to be adjusted and the associated facial bone are the same; based on the intermediate gear and the parameter adjustment range, a second adjustment parameter corresponding to the second adjustment gear is determined.
[0146] Optionally, the device further comprises:
[0147] A range acquisition module 5 is used to acquire the first parameter adjustment range of the current facial bone, the second parameter adjustment range of the associated facial bone, and the number of gears of the first adjustment component and the second adjustment component;
[0148] An original gear determination module 6 is used to determine a first original gear corresponding to the original bone data of the current facial skeleton according to the first parameter adjustment range and the number of gears, and to determine a second original gear corresponding to the original bone data of the associated facial skeleton according to the second parameter adjustment range and the number of gears;
[0149] The intermediate gear calculation module 7 is used to calculate the intermediate gear according to the first original gear, the second original gear, the first weight and the second weight.
[0150] Optionally, when the second adjustment operation is a scaling operation, the adjustment module 4 is used to determine the adjustment bone corresponding to the adjustment facial bone, the adjustment bone is bound to the facial model and inherits the coordinates of the adjustment facial bone; according to the first scaling factor of the adjustment facial bone on the first coordinate axis, the second scaling factor of the adjustment bone on the first coordinate axis is obtained in reverse, wherein the first coordinate axis includes one coordinate axis or two coordinate axes of the adjustment facial bone, and the scaling operation of the adjustment facial bone on the first coordinate axis is opposite to that of the adjustment bone; according to the first coordinate axis and the second scaling factor, the auxiliary adjustment parameters of the adjustment bone are obtained; and the adjustment of the adjustment bone is performed according to the auxiliary adjustment parameters.
[0151] Optionally, the device further comprises:
[0152] A weight acquisition module 8, used to acquire a first skin weight corresponding to the head bones and a second skin weight corresponding to the facial bones, wherein the first skin weight is greater than or equal to a preset value;
[0153] The binding module 9 is used to bind the facial skeleton to the facial model according to the first skin weight and the second skin weight.
[0154] The present application also provides an electronic device, such as Fig. 9 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 .
[0155] Memory 1503, used for storing computer programs;
[0156] The processor 1501 is used to implement the steps of the above method embodiment when executing the computer program stored in the memory 1503.
[0157] 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.
[0158] The communication interface is used for communication between the above electronic device and other devices.
[0159] 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.
[0160] 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.
[0161] 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.
[0162] 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.
[0163] 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.
[0164] 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 bone processing method, characterized in that: include: Obtaining a first adjustment operation on a first adjustment control corresponding to the current facial bone; Determining an adjusted facial bone corresponding to the current facial bone; Determining, according to the first adjustment operation, a second adjustment operation on a second adjustment control corresponding to the adjusted facial bone; Determining, according to the second adjustment operation, an adjustment parameter corresponding to the adjustment of the facial bones; Adjusting the adjusted facial bones according to the adjustment parameters; The step of determining, according to the first adjustment operation, a second adjustment operation on a second adjustment control corresponding to the adjusted facial bone comprises: determining a first adjustment gear corresponding to the first adjustment operation; Obtaining a first weight corresponding to the current facial bone and a second weight corresponding to the associated facial bone; the associated facial bone is a bone associated with the current facial bone; Calculating a second adjustment gear corresponding to the second adjustment control according to the first adjustment gear, the first weight, and the second weight; Determining a second adjustment operation corresponding to the associated facial bone according to the second adjustment gear; The determining, according to the second adjustment gear, a second adjustment operation corresponding to the associated facial bone comprises: Obtaining the intermediate gear position and parameter adjustment range corresponding to the associated facial bone, wherein the intermediate gear position of the current facial bone and the associated facial bone is the same; wherein the intermediate gear position is the gear position corresponding to the intermediate state of the bone; Determining a second adjustment parameter corresponding to the second adjustment gear according to the intermediate gear and the parameter adjustment range; The method further comprises: Acquire the first parameter adjustment range of the current facial bone, the second parameter adjustment range of the associated facial bone, and the number of gears of the first adjustment component and the second adjustment component; Determine the first original gear corresponding to the current facial bone original bone data according to the first parameter adjustment range and the number of gears, and determine the second original gear corresponding to the associated facial bone original bone data according to the second parameter adjustment range and the number of gears; The intermediate gear is calculated according to the first original gear, the second original gear, the first weight and the second weight.
2. The method according to claim 1, characterized in that The step of determining the adjusted facial bone corresponding to the current facial bone comprises: Get the control status of the associated adjustment control; When the control state is in the on state, determining that the adjusted facial bones include the current facial bones and facial bones associated with the current facial bones; When the control state is a closed state, the adjusted facial bone is determined to be the current facial bone.
3. The method according to claim 2, characterized in that When the control state is in the on state, the control state also includes an associated range level; The step of determining the adjusted facial bones corresponding to the current facial bones further comprises: Determine the associated facial bones of the current facial bones according to the associated range level.
4. The method according to claim 1, characterized in that: The method further comprises: Obtaining a first skin weight corresponding to the head bone and a second skin weight corresponding to the facial bone, wherein the first skin weight is greater than or equal to a preset value; The facial skeleton is bound to the facial model according to the first skin weight and the second skin weight.
5. A facial bone processing device, characterized in that: include: An acquisition module, used for acquiring a first adjustment operation of a first adjustment control corresponding to a current facial bone; A bone determination module, used to determine the adjusted facial bone corresponding to the current facial bone; An operation determination module, configured to determine, according to the first adjustment operation, a second adjustment operation on a second adjustment control corresponding to the adjusted facial bone; A parameter determination module, used for determining the adjustment parameter corresponding to the adjustment of the facial bones according to the second adjustment operation; An adjustment module, used for adjusting the adjusted facial bones according to the adjustment parameters; The operation determination module is used to determine a first adjustment gear corresponding to the first adjustment operation; Obtaining a first weight corresponding to the current facial bone and a second weight corresponding to the associated facial bone; the associated facial bone is a bone associated with the current facial bone; calculating a second adjustment gear corresponding to the second adjustment control according to the first adjustment gear, the first weight and the second weight; determining a second adjustment operation corresponding to the associated facial bone according to the second adjustment gear; The operation determination module is used to obtain the intermediate gear position and parameter adjustment range corresponding to the associated facial bone, and the intermediate gear position of the current facial bone and the associated facial bone is the same; Determining a second adjustment parameter corresponding to the second adjustment gear according to the intermediate gear and the parameter adjustment range; The device also includes: a module for obtaining a first parameter adjustment range of the current facial bone, a second parameter adjustment range of the associated facial bone, and the number of gears of the first adjustment component and the second adjustment component; determining a first original gear corresponding to the original bone data of the current facial bone according to the first parameter adjustment range and the number of gears, and determining a second original gear corresponding to the original bone data of the associated facial bone according to the second parameter adjustment range and the number of gears; and calculating the intermediate gear according to the first original gear, the second original gear, the first weight and the second weight.
6. 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 to 4 when executing the computer program.
7. 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 4 are implemented.
Citation Information
Patent Citations
3D face expression control method and system
CN104268921A
Method for synthesizing images and image synthesizing device
CN106504309A
Method and device for adjusting face model of game character, processor and terminal
CN109191570A
Generation method and device of game role expressions and storage medium
CN109621419A
Method and a device for creating a human body virtual model
CN109829971A
