[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN112090082B - Facial bone processing method and device, electronic equipment and storage medium - Google Patents

Facial bone processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112090082B
CN112090082B CN202011036179.8A CN202011036179A CN112090082B CN 112090082 B CN112090082 B CN 112090082B CN 202011036179 A CN202011036179 A CN 202011036179A CN 112090082 B CN112090082 B CN 112090082B
Authority
CN
China
Prior art keywords
adjusting
bone
face
gear
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011036179.8A
Other languages
Chinese (zh)
Other versions
CN112090082A (en
Inventor
马浩然
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Perfect World Beijing Software Technology Development Co Ltd
Original Assignee
Perfect World Beijing Software Technology Development Co Ltd
Filing date
Publication date
Application filed by Perfect World Beijing Software Technology Development Co Ltd filed Critical Perfect World Beijing Software Technology Development Co Ltd
Priority to CN202011036179.8A priority Critical patent/CN112090082B/en
Publication of CN112090082A publication Critical patent/CN112090082A/en
Application granted granted Critical
Publication of CN112090082B publication Critical patent/CN112090082B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The application relates to a facial bone processing method, a facial bone processing device, electronic equipment and a storage medium, wherein the method comprises the following steps: acquiring a first adjusting operation of a first adjusting control corresponding to the current face skeleton; determining an adjusting facial bone corresponding to the current facial bone; determining a second adjusting operation of a second adjusting control corresponding to the face skeleton according to the first adjusting operation; determining adjusting parameters corresponding to the facial bones according to the second adjusting operation; and adjusting the facial bones according to the adjusting parameters. According to the technical scheme, synchronous adjustment of the facial bones and the facial bones related to the facial bones is realized, and the facial effect of the animation model is quickly and accurately adjusted according to the needs of a user. Meanwhile, the user does not need to manually adjust each skeleton one by one, and other related face pinching skeletons can be synchronously adjusted only by adjusting one face pinching skeleton, so that the complexity of face pinching operation is reduced.

Description

Facial bone processing method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a facial bone processing method, a facial bone processing device, an electronic device, and a storage medium.
Background
In the related game scene, the face pinching modes mainly comprise two modes: modifying model vertices and modifying model bones. The mode of modifying the model vertexes needs to carry out fine control on each vertex of the face model, so that the modification amount is huge and the modification flow is complex. In the mode of modifying the model skeleton, the number of the modified skeleton is controllable, but in order to ensure the expression capability of the game role, the mode of modifying the model skeleton still has more modification items, and 45 face skeletons have more than 100 face parameter modification items. When pinching the face, more adjustment and modification items are needed, the operation is complex, the adjustment effect on the face model is poor, and more computing resources and network bandwidth are occupied.
Disclosure of Invention
In order to solve the above technical problems or at least partially solve the above technical problems, embodiments of the present application provide a facial bone processing method, a facial bone processing device, an electronic device, and a storage medium.
According to an aspect of an embodiment of the present application, there is provided a facial bone treating method including:
Acquiring a first adjusting operation of a first adjusting control corresponding to the current face skeleton;
determining an adjusting facial bone corresponding to the current facial bone;
Determining a second adjusting operation of a second adjusting control corresponding to the face skeleton according to the first adjusting operation;
Determining adjusting parameters corresponding to the facial bones according to the second adjusting operation;
and adjusting the facial bones according to the adjusting parameters.
Optionally, the determining the adjusted face bone corresponding to the current face bone includes:
acquiring a control state of an associated adjustment control;
when the control state is an open state, determining that the adjusted face bones include the current face bone and associated face bones with the current face bone;
And when the control state is a closed state, determining that the adjusted facial bone is the current facial bone.
Optionally, when the control state is an on state, the control state further includes an association range level;
the determining the adjusting facial skeleton corresponding to the current facial skeleton further comprises:
and determining the associated face skeleton of the current face skeleton according to the associated range level.
Optionally, when the control state is an on state, determining, according to the first adjustment operation, a second adjustment operation for a second adjustment control corresponding to the adjustment face skeleton includes:
determining a first adjusting gear corresponding to the first adjusting operation;
acquiring a first weight corresponding to the current face skeleton and a second weight corresponding to the associated face skeleton;
calculating a second adjusting gear corresponding to the second adjusting control according to the first adjusting gear, the first weight and the second weight;
And determining a second adjusting operation corresponding to the associated face skeleton according to the second adjusting gear.
Optionally, the determining, according to the second adjustment operation, a second adjustment parameter corresponding to the associated face bone includes:
acquiring an intermediate gear and a parameter adjusting range corresponding to the related face bone, wherein the intermediate gear of the current face bone is the same as that of the related face bone;
And determining a second adjusting parameter corresponding to the second adjusting gear according to the intermediate gear and the parameter adjusting range.
Optionally, the method further comprises:
Acquiring a first parameter adjusting range of the current face bone, a second parameter adjusting range of the related face bone and the gear number of the first adjusting component and the second adjusting component;
determining a first original gear corresponding to the original bone data of the current face bone according to the first parameter adjusting range and the gear number, and determining a second original gear corresponding to the original bone data of the associated face bone according to the second parameter adjusting range and the gear number;
and calculating the intermediate gear according to the first original gear, the second original gear, the first weight and the second weight.
Optionally, the method further comprises:
Acquiring a first skin weight corresponding to head bones and a second skin weight corresponding to facial bones, wherein the first skin weight is greater than or equal to a preset value;
Binding the face bones with the face model according to the first skin weight and the second skin weight.
According to another aspect of an embodiment of the present application, there is provided a facial bone treating apparatus including:
the acquisition module is used for acquiring a first adjustment operation of a first adjustment control corresponding to the current face skeleton;
the bone determining module is used for determining an adjusting facial bone corresponding to the current facial bone;
The operation determining module is used for determining a second adjusting operation of a second adjusting control corresponding to the adjusting face skeleton according to the first adjusting operation;
the parameter determining module is used for determining adjusting parameters corresponding to the facial bones according to the second adjusting operation;
and the adjusting module is used for adjusting the facial bones according to the adjusting parameters.
According to another aspect of the embodiments of the present application, there is also provided a storage medium including a stored program that performs the above steps when running.
According to another aspect of an embodiment of the present application, there is provided an electronic apparatus including: the device comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
the memory is used for storing a computer program;
The processor is configured to implement the above-mentioned method steps when executing the computer program.
According to another aspect of an embodiment of the present application, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the above-mentioned method steps.
Compared with the prior art, the technical scheme provided by the embodiment of the application has the following advantages:
When a user adjusts the adjusting control of one of the face bones, the adjusting control corresponding to the adjusting face bone corresponding to the face bone is controlled to perform corresponding adjusting operation, so that the face bones and the associated face bones are synchronously adjusted, and the face effect of the animation model is quickly and accurately adjusted according to the needs of the user. Meanwhile, the user does not need to manually adjust each skeleton one by one, and other related face pinching skeletons can be synchronously adjusted only by adjusting one face pinching skeleton, so that the complexity of face pinching operation is reduced.
Drawings
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.
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required to be used in the description of the embodiments or the prior art will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is a schematic view of a facial bone hierarchy provided by an embodiment of the present application;
FIG. 2a is a schematic diagram of an embodiment of the present application before eye rotation;
FIG. 2b is a schematic diagram of an embodiment of the present application after eye rotation;
FIG. 3 is a flowchart of a facial bone treatment method according to an embodiment of the present application;
FIG. 4 is a schematic diagram of an adjustment control for facial bone according to an embodiment of the present application;
FIG. 5a is a schematic diagram of an associated adjustment control provided by an embodiment of the present application when closed;
FIG. 5b is a schematic diagram of an associated adjustment control provided by an embodiment of the present application when open;
FIG. 5c is a schematic diagram of an associated adjustment control provided in accordance with another embodiment of the present application;
FIG. 6 is a flowchart of a facial bone treating method according to another embodiment of the present application;
FIG. 7 is a flowchart of a facial bone treating method according to another embodiment of the present application;
FIG. 8 is a block diagram of an animation model skeleton processing device according to an embodiment of the present application;
Fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
In the embodiment of the application, the pinching face bones belong to the head bones in a subset. Fig. 1 is a schematic view of a facial skeleton hierarchy provided in an embodiment of the present application. As shown in fig. 1, the subset bones of the Head bones Head include a Head Adjust bone head_adjust, with each pinching face bone A, B, C … … N as a child of the Head Adjust bone head_adjust.
The face-related bones are specifically as follows:
(1) Eye portion
Right left orbit overall: eye_socket_ R, eye socket_l;
right left outer corner of eye: eye_Corner_R_02 eye_Corner_L_02;
Upper eyelid of right left eye: eyelid _R_01 Eyelid _l_01;
right left inner corner: eye_Corner_R_01 eye_Corner_L_01;
Lower eyelid of right left eye: eyelid _R_02 Eyelid _l_02;
right left eyeball: eye_ R, eye _l;
Right and left eyebrows: brow _ R, brow _l;
Right left eyebrow: brow _R_01 Brow _l_01;
Right left brow peak: brow _R_02 Brow _l_02;
left brow tail: brow _R_03 Brow _l_03.
Wherein, bones of the eye region are all bone bones of a bone, left and right sides are required to be aligned in parallel, all parallel subsets are parallel to the head, bone coordinates inherit root bone coordinates, and the bones do not have scaling values.
(2) Nose part
Mountain root: nose_root;
Nose bridge: nose_bridge;
nose head: nose_tip;
Nose wings: nose_wing.
The nose region bones all use bone bones, all parallel subsets of bones are parallel to the head, the bone coordinates inherit the root bone coordinates, and the bones do not have scaling values.
(3) Mouth part
Upper lip: mouth_lip_01; lower lip: mouth_lip_02;
Upper lip bead: mouth_lip_01_buffer; lower lip bead: mouth_lip_02_buffer;
Left and right mouth angle: mouth_Corner/u L, mouth _Corner_R;
The mouth is integrally scaled: mouth.
Wherein bones of the mouth region are all bone bones of bone, the bones of the left and right mouth corners are aligned parallel to each other, and all bones are parallel to the head. The bone coordinates inherit the root bone coordinates, and the bone does not have scaling values.
(4) Cheek of cheek
Cheek: face; cheekbones: cheekbone; apple muscle: cheek _ RCheek _l;
The lower jaw: mandible; chin: jaw_ Mandible; chin tip: jaw;
Forehead: forehead;
ear: pinna _R/Pinna _L; earlobe: earLobe _R/EarLobe _L.
Bones of cheek regions all use bone bones, all parallel subsets to head, bone coordinates inherit root bone coordinates, bones do not have scaling values.
FIG. 2a is a schematic diagram of an embodiment of the present application before eye rotation; fig. 2b is a schematic diagram of an embodiment of the application after eye rotation. When the eyes are to be rotated, for example, as shown in fig. 2a and 2b, the displacement and the rotation of the right inner and outer Eye bones eye_corner_r_02 and eye_corner_r_01 need to be adjusted in addition to the rotation of the right Eye Socket bone eye_socket_r; meanwhile, the left orbit bone eye_socket_l, the left inner and outer Eye Corner bones eye_corner_l_02 and eye_corner_l_01 are correspondingly adjusted so as to ensure symmetric adjustment of left and right eyes.
In this embodiment, the face pinching skeleton of the face can be adjusted through an adjusting control, such as a slide bar, a knob, and the like, and other pinching skeletons associated with the pinching skeletons are controlled to be correspondingly adjusted, so that the face effect of the animation model can be quickly and accurately adjusted according to the needs of a user, meanwhile, the user does not need to manually adjust each skeleton one by one, and the associated other pinching skeletons can be synchronously adjusted only by adjusting one pinching skeleton, so that the pinching operation complexity is reduced.
A method for treating facial bone according to an embodiment of the present invention will be described first.
Fig. 3 is a flowchart of a facial bone processing method according to an embodiment of the present application. As shown in fig. 3, the method comprises the steps of:
step S11, obtaining a first adjusting operation of a first adjusting control corresponding to the current face skeleton;
step S12, determining an adjusting facial skeleton corresponding to the current facial skeleton;
Step S13, determining a second adjusting operation of a second adjusting control corresponding to the adjusting facial skeleton according to the first adjusting operation;
step S14, determining adjusting parameters corresponding to facial bones according to the second adjusting operation;
and S15, adjusting the facial bones according to the adjustment parameters.
Fig. 4 is a schematic diagram of an adjustment control for a facial bone according to an embodiment of the present application. As shown in fig. 4, when the user rotates the eyes, the slider on the slide bar of the "right eye socket" is manually moved, and simultaneously, the sliders on the slide bars of the "right inner eye corner", "right outer eye corner", "left eye socket", "left inner eye corner" and "left outer eye corner" are correspondingly and automatically slid, so that the eyes are rotated, and the normal facial effect is obtained.
In this embodiment, when a user adjusts an adjustment control of one of the face bones, the adjustment control corresponding to the adjusted face bone corresponding to the face bone is controlled to perform a corresponding adjustment operation, so as to realize synchronous adjustment of the face bone and the associated face bone, and quickly and accurately adjust the face effect of the animation model according to the user's needs. Meanwhile, the user does not need to manually adjust each skeleton one by one, and other related face pinching skeletons can be synchronously adjusted only by adjusting one face pinching skeleton, so that the complexity of face pinching operation is reduced.
In step S12 of the above embodiment, the adjusted face bone range corresponding to the current face bone may be determined according to the on or off of the associated adjustment control. The step S12 includes: acquiring a control state of an associated adjustment control; when the control state is in an open state, determining that the adjusted face bones comprise a current face bone and an associated face bone with the current face bone; when the control state is the closed state, the adjusted face bone is determined to be the current face bone.
Fig. 5a and fig. 5b are schematic diagrams of the association adjustment control provided in the embodiment of the present application when closed and open, respectively. The associated adjustment control may be a knob switch. As shown in fig. 5a, when the knob 51 is vertical, the associated adjustment control is in the closed state, where the adjusted face bone is the current face bone itself only. When the knob 51 is horizontal, the associated adjustment control is in an on state, as shown in fig. 5b, at which point the adjusted facial bone treatment includes both the current facial bone itself and its associated facial bone.
For example, for bones corresponding to eyes, when the associated condition control is closed, as shown in fig. 4, when the user moves the slider of "right orbit", the sliders of the other bones "right inner eye corner", "right outer eye corner", "left orbit", "left inner eye corner", and "left outer eye corner" do not slide in association. The associated skeleton of the "right orbit" will be adjusted synchronously only when the associated condition control is on.
Optionally, when the control state is an on state, the control state further includes an association range level; the step S12 further includes: and determining the associated face skeleton of the current face skeleton according to the associated range level.
Fig. 5c is a schematic diagram of an associated adjustment control according to another embodiment of the present application. As shown in fig. 5c, in addition to opening and closing, a gear 52 is provided on the associated adjustment control, which gear 52 is used to control the selection of the associated face bone. For example, for the bones corresponding to the eyes, when the knob 51 is rotated to the gear 52, the user moves the slider of the "right eye socket", only the sliders of the "right inner eye corner" and the "right outer eye corner" follow the slide, and the sliders of the "left eye socket", "left inner eye corner" and the "left outer eye corner" do not slide in association.
Optionally, a plurality of gears can be further set on the associated adjustment control, and associated face skeletons corresponding to different gears are different in range. For example, for an eye bone, the associated face bone corresponding to gear 1 is all the eye bones; the relevant facial bones corresponding to the gear 2 comprise nose bones besides all bones of eyes; the relevant facial bones corresponding to the gear 2 comprise the bones of the mouth besides all the bones of the eyes and the bones of the nose.
In the above embodiment, each gear of the association adjustment control is associated with the face skeleton data selection range of the tree shape. When the associated adjustment control is opened, reading all the sub-bones of the current face bone; when the associated adjustment control is closed, only the current face skeleton is read; when the associated adjusting control is in a certain gear, reading the sub-skeleton of the corresponding range of the gear. In the process of adjusting the facial bones, the father bones of the current facial bones are not affected generally, but the father bones of the current facial bones can be controlled to make corresponding following adjustment when adjusting the specific facial bones according to the needs.
Because there are multiple associated bones involved in the adjustment, the position of the adjustment control of each bone at the time of the associated adjustment is difficult to determine. Fig. 6 is a flowchart of a facial bone treating method according to another embodiment of the present application. In an alternative embodiment, as shown in fig. 6, when the control state is the on state, the step S13 includes the following steps:
step S21, determining a first adjusting gear corresponding to a first adjusting operation;
step S22, obtaining a first weight corresponding to the current face skeleton and a second weight corresponding to the associated face skeleton;
step S23, calculating a second adjusting gear corresponding to the second adjusting control according to the first adjusting gear, the first weight and the second weight;
And step S24, determining a second adjusting operation corresponding to the relevant facial skeleton according to the second adjusting gear.
For interrelated bones, each bone has its corresponding weight representing the corresponding adjustment relationship of the bones during adjustment. For example, each bone is divided into 31 gears of-15 to 15 according to the original bone data, the weight of the current face bone A is 0.6, the weight of the associated face bone B is 1.2, and every time the current face bone A adjusts 0.6 gears, the associated face bone B adjusts 1.2 gears. If the current face bone a is adjusted 3 gears from the initial position, the associated face bone B is adjusted 3×1.2++0.6=6 gears.
Optionally, the weight may also be an adjustment relationship between actual bone data, including a relationship between adjustment parameters such as a rotation angle, a displacement distance, and the like, that is, the adjustment parameters are directly calculated according to the bone data of the current face bone, and the adjustment parameters corresponding to the associated face bone are calculated according to the weight of each bone.
In an alternative embodiment, when multiple associated bones are adjusted, each bone requires a uniform initial state, i.e., multiple bones begin to adjust from the same initial state. The step S24 includes: acquiring an intermediate gear and a parameter adjusting range corresponding to the related face bone, wherein the intermediate gear of the current face bone is the same as that of the related face bone; and determining a second adjusting parameter corresponding to the second adjusting gear according to the intermediate gear and the parameter adjusting range.
When adjusting a plurality of associated bones, the initial states of the bones, namely the intermediate states of the bones, need to be synchronized, so that the associated bones can be uniformly adjusted later. Fig. 7 is a flowchart of a facial bone treating method according to another embodiment of the present application. As shown in fig. 7, the method further includes the step of determining an intermediate gear, specifically as follows:
Step S31, acquiring a first parameter adjusting range of the current face bone, a second parameter adjusting range of the related face bone and the gear number of the first adjusting component and the second adjusting component;
Step S32, determining a first original gear corresponding to the original bone data of the current face bone according to a first parameter adjusting range and the number of gears, and determining a second original gear corresponding to the original bone data of the related face bone according to a second parameter adjusting range and the number of gears;
step S33, calculating an intermediate gear according to the first original gear, the second original gear, the first weight and the second weight.
The process of determining the intermediate gear is described in detail below by way of one specific example.
Each facial skeleton is divided into 30 gears of 15 to 15 according to the original skeleton data.
The three associated kneading bones A, B, C are used for calculating the original gear positions of-10, 7 and 1 according to the original bone data.
If the weights corresponding to the pinching face bones A, B, C are the same, the middle gear is
If the weights corresponding to the pinching face bones A, B, C are 0.6,1.2,0.8 respectively, the intermediate gear is
In this way, the pinching skeleton A, B, C uses the same middle gear as the starting point to adjust, and although the initial state is different from the original facial effect, the error is relatively small, so that the subsequent multi-skeleton association adjustment is convenient.
In this embodiment, the differences between the maximum value and the minimum value of the bone data of each bone and the original bone data can be set according to the requirements, if the effect is exaggerated, the differences between the maximum value and the minimum value and the original bone data can be increased, and if the effect is more natural, the differences between the maximum value and the minimum value and the original bone data can be decreased. In order to obtain a more exaggerated effect, the adjusting threshold value can be integrally amplified to accept a slight lasting phenomenon.
In another alternative embodiment, the method further comprises, in the skinning, considering that the face bone needs to be affected by the head bone: acquiring a first skin weight corresponding to head bones and a second skin weight corresponding to facial bones, wherein the first skin weight is greater than or equal to a preset value; binding the face skeleton with the face model according to the first skin weight and the second skin weight.
The preset value may be 30%, that is, the skin weight of the Head skeleton Head is greater than or equal to 30% during the skin.
In this embodiment, in order to more freely adjust the bones, the user may pinch an exaggerated and abnormal face shape, so that the user can freely play the face shape, and at least one-way adjustment of the face bones is allowed when the face bones are zoomed in the face pinching process.
The following are examples of the apparatus of the present application that may be used to perform the method embodiments of the present application.
Fig. 8 is a block diagram of an animation model skeleton processing device according to an embodiment of the present application, where the device may be implemented as part or all of an electronic device by software, hardware, or a combination of both. As shown in fig. 8, the animation model skeleton processing device comprises:
The acquisition module 1 is used for acquiring a first adjustment operation of a first adjustment control corresponding to the current face skeleton;
A bone determination module 2, configured to determine an adjusted facial bone corresponding to the current facial bone;
An operation determining module 3, configured to determine, according to the first adjustment operation, a second adjustment operation for a second adjustment control corresponding to the adjusted face skeleton;
and the adjusting module 4 is used for adjusting the adjusting facial bones according to the adjusting parameters.
Optionally, the skeleton determining module 2 is configured to obtain a control state of the associated adjustment control; when the control state is an open state, determining that the adjusted face bones include the current face bone and associated face bones with the current face bone; and when the control state is a closed state, determining that the adjusted facial bone is the current facial bone.
Optionally, when the control state is an on state, the control state further includes an association range level; the bone determination module 2 is further configured to determine an associated face bone of the current face bone according to the association range level.
Optionally, when the control state is an on state, the operation determining module 3 includes:
the gear determining unit is used for determining a first adjusting gear corresponding to the first adjusting operation;
the weight acquisition unit is used for acquiring a first weight corresponding to the current face skeleton and a second weight corresponding to the associated face skeleton;
The gear calculating unit is used for calculating a second adjusting gear corresponding to the second adjusting control according to the first adjusting gear, the first weight and the second weight;
And the operation determining unit is used for determining a second adjusting operation corresponding to the associated face skeleton according to the second adjusting gear.
Optionally, the operation determining unit is configured to obtain an intermediate gear and a parameter adjustment range corresponding to the associated face skeleton, where the intermediate gear of the face skeleton to be adjusted is the same as the intermediate gear of the associated face skeleton; and determining a second adjusting parameter corresponding to the second adjusting gear according to the intermediate gear and the parameter adjusting range.
Optionally, the apparatus further comprises:
A range obtaining module 5, configured to obtain a first parameter adjustment range of the current face bone, a second parameter adjustment range of the associated face bone, and a number of gear positions of the first adjustment assembly and the second adjustment assembly;
The original gear determining module 6 is configured to determine a first original gear corresponding to the original bone data of the current face bone according to the first parameter adjustment range and the gear number, and determine a second original gear corresponding to the original bone data of the associated face bone according to the second parameter adjustment range and the gear number;
and the intermediate gear calculating module 7 is used for calculating the intermediate gear according to the first original gear, the second original gear, the first weight and the second weight.
Optionally, when the second adjustment operation is a scaling operation, the adjustment module 4 is configured to determine an adjustment bone corresponding to the adjustment face bone, where the adjustment bone binds with the face model and inherits coordinates of the adjustment face bone; reversely obtaining a second scaling multiple of the adjusting skeleton in the first coordinate axis according to the first scaling multiple of the adjusting face skeleton in the first coordinate axis, wherein the first coordinate axis comprises one coordinate axis or two coordinate axes of the adjusting face skeleton, and the scaling operation of the adjusting face skeleton in the first coordinate axis is opposite to that of the adjusting skeleton; obtaining auxiliary adjusting parameters of the adjusting bones according to the first coordinate axial direction and the second scaling multiple; and performing an adjustment of the adjustment bone according to the auxiliary adjustment parameter.
Optionally, the apparatus further comprises:
the weight acquisition module 8 is configured to acquire a first skin weight corresponding to a head skeleton and a second skin weight corresponding to a face skeleton, where the first skin weight is greater than or equal to a preset value;
And the binding module 9 is used for binding the face skeleton and the face model according to the first skin weight and the second skin weight.
The embodiment of the application also provides an electronic device, as shown in fig. 9, the electronic device may include: the device comprises 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 are in communication with each other through the communication bus 1504.
A memory 1503 for storing a computer program;
The processor 1501, when executing the computer program stored in the memory 1503, implements the steps of the method embodiments described below.
The communication bus mentioned above for the electronic device may be a peripheral component interconnect standard (PERIPHERAL COMPONENT INTERCONNECT, pi) bus or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, etc. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface is used for communication between the electronic device and other devices.
The Memory may include random access Memory (Random Access Memory, RAM) or may include Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; but may also be a Digital signal processor (Digital SignalProcessing, DSP), application SPECIFIC INTEGRATED Circuit (ASIC), field-Programmable gate array (Field-Programmable GATE ARRAY, FPGA) or other Programmable logic device, discrete gate or transistor logic device, discrete hardware components.
The application also provides a computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method embodiments described below.
It should be noted that, with respect to the apparatus, electronic device, and computer-readable storage medium embodiments described above, since they are substantially similar to the method embodiments, the description is relatively simple, and reference should be made to the description of the method embodiments for relevant points.
It is further noted that relational terms such as "first" and "second", and the like, are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing is only a specific embodiment of the invention to enable those skilled in the art to understand or practice the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (7)

1. A method of facial bone treatment, comprising:
Acquiring a first adjusting operation of a first adjusting control corresponding to the current face skeleton;
determining an adjusting facial bone corresponding to the current facial bone;
Determining a second adjusting operation of a second adjusting control corresponding to the face skeleton according to the first adjusting operation;
Determining adjusting parameters corresponding to the facial bones according to the second adjusting operation;
adjusting the adjusted facial bones according to the adjustment parameters;
The determining, according to the first adjustment operation, a second adjustment operation for a second adjustment control corresponding to the adjusted face bone includes:
determining a first adjusting gear corresponding to the first adjusting operation;
acquiring a first weight corresponding to the current face skeleton and a second weight corresponding to the associated face skeleton; the associated face bone is a bone associated with the current face bone;
calculating a second adjusting gear corresponding to the second adjusting control according to the first adjusting gear, the first weight and the second weight;
Determining a second adjustment operation corresponding to the associated face bone according to the second adjustment gear;
The determining, according to the second adjustment gear, a second adjustment operation corresponding to the associated face bone includes:
acquiring an intermediate gear and a parameter adjusting range corresponding to the related face bone, wherein the intermediate gear of the current face bone is the same as that of the related face bone; the intermediate gear is a gear corresponding to the intermediate state of the skeleton;
Determining a second adjusting parameter corresponding to the second adjusting gear according to the intermediate gear and the parameter adjusting range;
The method further comprises the steps of:
Acquiring a first parameter adjusting range of the current face bone, a second parameter adjusting range of the related face bone, and the gear numbers of the first adjusting component and the second adjusting component;
determining a first original gear corresponding to the original bone data of the current face bone according to the first parameter adjusting range and the gear number, and determining a second original gear corresponding to the original bone data of the associated face bone according to the second parameter adjusting range and the gear number;
and calculating the intermediate gear according to the first original gear, the second original gear, the first weight and the second weight.
2. The method of claim 1, wherein the determining an adjusted facial bone corresponding to the current facial bone comprises:
acquiring a control state of an associated adjustment control;
when the control state is an open state, determining that the adjusted face bones include the current face bone and associated face bones with the current face bone;
And when the control state is a closed state, determining that the adjusted facial bone is the current facial bone.
3. The method of claim 2, wherein when the control state is an on state, the control state further comprises an associated scope level;
the determining the adjusting facial skeleton corresponding to the current facial skeleton further comprises:
and determining the associated face skeleton of the current face skeleton according to the associated range level.
4. The method according to claim 1, wherein the method further comprises:
Acquiring a first skin weight corresponding to head bones and a second skin weight corresponding to facial bones, wherein the first skin weight is greater than or equal to a preset value;
Binding the face bones with the face model according to the first skin weight and the second skin weight.
5. A facial bone treating apparatus, comprising:
the acquisition module is used for acquiring a first adjustment operation of a first adjustment control corresponding to the current face skeleton;
the bone determining module is used for determining an adjusting facial bone corresponding to the current facial bone;
The operation determining module is used for determining a second adjusting operation of a second adjusting control corresponding to the adjusting face skeleton according to the first adjusting operation;
the parameter determining module is used for determining adjusting parameters corresponding to the facial bones according to the second adjusting operation;
The adjusting module is used for adjusting the facial bones according to the adjusting parameters;
the operation determining module is used for determining a first adjusting gear corresponding to the first adjusting operation; acquiring a first weight corresponding to the current face skeleton and a second weight corresponding to the associated face skeleton; the associated face bone is a bone associated with the current face bone; calculating a second adjusting gear corresponding to the second adjusting control according to the first adjusting gear, the first weight and the second weight; determining a second adjustment operation corresponding to the associated face bone according to the second adjustment gear;
The operation determining module is used for obtaining the intermediate gear and the parameter adjusting range corresponding to the related face bone, and the intermediate gear of the current face bone is the same as that of the related face bone; determining a second adjusting parameter corresponding to the second adjusting gear according to the intermediate gear and the parameter adjusting range;
The apparatus further comprises: the method comprises the steps of acquiring a first parameter adjusting range of the current face bone, a second parameter adjusting range of the related face bone and the gear number of a first adjusting component and a second adjusting component; determining a first original gear corresponding to the original bone data of the current face bone according to the first parameter adjusting range and the gear number, and determining a second original gear corresponding to the original bone data of the associated face bone according to the second parameter adjusting range and the gear number; and the module is used for 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, comprising: the device comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
the memory is used for storing a computer program;
The processor being adapted to carry out the method steps of any of claims 1-4 when the computer program is executed.
7. A computer-readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, carries out the method steps of any of claims 1-4.
CN202011036179.8A 2020-09-27 Facial bone processing method and device, electronic equipment and storage medium Active CN112090082B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011036179.8A CN112090082B (en) 2020-09-27 Facial bone processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011036179.8A CN112090082B (en) 2020-09-27 Facial bone processing method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112090082A CN112090082A (en) 2020-12-18
CN112090082B true CN112090082B (en) 2024-11-12

Family

ID=

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110111417A (en) * 2019-05-15 2019-08-09 浙江商汤科技开发有限公司 Generation method, device and the equipment of three-dimensional partial body's model

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110111417A (en) * 2019-05-15 2019-08-09 浙江商汤科技开发有限公司 Generation method, device and the equipment of three-dimensional partial body's model

Similar Documents

Publication Publication Date Title
US10872452B2 (en) Expression animation generation method and apparatus, storage medium, and electronic apparatus
CN109063560B (en) Image processing method, image processing device, computer-readable storage medium and terminal
CN108229278B (en) Face image processing method and device and electronic equipment
US11328455B2 (en) Method and apparatus for generating face model, storage medium, and terminal
TW202034280A (en) Method for image processing and device thereof
CN106920274A (en) Mobile terminal 2D key points rapid translating is the human face model building of 3D fusion deformations
CN106874861A (en) A kind of face antidote and system
US11238569B2 (en) Image processing method and apparatus, image device, and storage medium
CN106295476A (en) Face key point localization method and device
CN107784630B (en) Method, device and terminal for turning attributes of face image
CN109659006B (en) Facial muscle training method and device and electronic equipment
US11978145B2 (en) Expression generation for animation object
WO2023010796A1 (en) Image processing method and related apparatus
CN104331564A (en) Dressing instruction method based on terminal equipment and terminal equipment
CN106846240A (en) A kind of method for adjusting fusion material, device and equipment
CN110377201A (en) Terminal equipment control method, device, computer installation and readable storage medium storing program for executing
CN110624244A (en) Method and device for editing face model in game and terminal equipment
CN112090082B (en) Facial bone processing method and device, electronic equipment and storage medium
CN108765551B (en) Method and terminal for realizing face pinching of 3D model
CN112090082A (en) Facial skeleton processing method and device, electronic equipment and storage medium
WO2024174836A1 (en) Face model construction method, apparatus and device, storage medium, and product
CN113450444B (en) Method and device for generating illumination map, storage medium and electronic equipment
CN116843809A (en) Virtual character processing method and device
CN112102453B (en) Animation model skeleton processing method and device, electronic equipment and storage medium
CN112107865A (en) Facial animation model processing method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
SE01 Entry into force of request for substantive examination
GR01 Patent grant