CN112102453B - Animation model skeleton processing method and device, electronic equipment and storage medium - Google Patents

Animation model skeleton processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112102453B
CN112102453B CN202011036177.9A CN202011036177A CN112102453B CN 112102453 B CN112102453 B CN 112102453B CN 202011036177 A CN202011036177 A CN 202011036177A CN 112102453 B CN112102453 B CN 112102453B
Authority
CN
China
Prior art keywords
bone
skeleton
adjustment
sub
adjusting
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
CN202011036177.9A
Other languages
Chinese (zh)
Other versions
CN112102453A (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
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Perfect World Beijing Software Technology Development Co Ltd filed Critical Perfect World Beijing Software Technology Development Co Ltd
Priority to CN202011036177.9A priority Critical patent/CN112102453B/en
Publication of CN112102453A publication Critical patent/CN112102453A/en
Application granted granted Critical
Publication of CN112102453B publication Critical patent/CN112102453B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T13/00Animation
    • G06T13/203D [Three Dimensional] animation
    • G06T13/403D [Three Dimensional] animation of characters, e.g. humans, animals or virtual beings
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • G06T19/20Editing of 3D images, e.g. changing shapes or colours, aligning objects or positioning parts

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Architecture (AREA)
  • Computer Graphics (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The application relates to a method, a device, electronic equipment and a storage medium for processing an animation model skeleton, wherein the method comprises the following steps: determining a subset skeleton corresponding to a region skeleton to be adjusted in an animation model, wherein the subset skeleton comprises an adjusting skeleton, and the adjusting skeleton is bound with the animation model and inherits the coordinates of the region skeleton; acquiring a first adjusting parameter corresponding to a first adjusting operation of the regional skeleton; determining a second adjustment parameter for adjusting the bone according to the first adjustment parameter; and executing a second adjustment operation on the adjustment bone according to the second adjustment parameter. The technical scheme realizes the adjustment of the skeleton in the required axial direction, avoids the deformation of the skeleton during movement and realizes the free change of the animation model. And moreover, because the animation model is bound with the adjusting skeleton, the adjusted skeleton can adapt to animation movement and interaction effect.

Description

Animation model skeleton processing method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of computers, and in particular, to a method and an apparatus for processing an animation model skeleton, an electronic device, and a storage medium.
Background
In modern three-dimensional games, a large number of character models or animation models and animation resources exist, and skeleton models are three-dimensional models which are most widely applied. In a game, a skeletal model and its associated animation account for a large proportion of the corresponding character art resources.
At present, when a body part of an animation model needs to be adjusted in the related art, bones cannot be adjusted in a single axial direction, and only bones corresponding to the body part can be directly scaled in an equal proportion in all coordinate axial directions. For example, when the user wants to adjust the length of the arm of the animation model, the thickness of the arm is adjusted together. Therefore, when the large arm moves, the position of the lens changes or interactive action exists, the large arm generates animation deformation, and the adjusted arm effect is distorted.
Disclosure of Invention
In order to solve the technical problem or at least partially solve the technical problem, embodiments of the present application provide an animation model skeleton processing method, apparatus, electronic device and storage medium.
According to an aspect of an embodiment of the present application, there is provided an animation model skeleton processing method, including:
determining a subset skeleton corresponding to a region skeleton to be adjusted in an animation model, wherein the subset skeleton comprises an adjusting skeleton, and the adjusting skeleton is bound with the animation model and inherits the coordinates of the region skeleton;
acquiring a first adjusting parameter corresponding to a first adjusting operation of the regional skeleton;
determining a second adjustment parameter for adjusting the bone according to the first adjustment parameter;
and executing a second adjustment operation on the adjustment bone according to the second adjustment parameter.
Optionally, when the first adjustment operation is a zoom operation, the first adjustment parameter includes a zoom multiple in each coordinate axis of the regional bone;
said determining a second adjustment parameter for said adjusted bone from said first adjustment parameter, comprising:
reversely obtaining a second scaling factor of the adjusting bone in a first coordinate axis direction according to the first scaling factor of the regional bone in the first coordinate axis direction, wherein the first coordinate axis direction comprises one coordinate axis direction or two coordinate axis directions of the regional bone, and the scaling operation of the regional bone and the adjusting bone in the first coordinate axis direction is opposite;
and obtaining the second adjusting parameter according to the first coordinate axis and the second scaling multiple.
Optionally, the second scaling factor is smaller than the first scaling factor.
Optionally, the adjustment bone is a bone of the regional bone, aligned with a CS bone of the regional bone.
Optionally, the subset bone further comprises a sub-bone of the region bone;
the method further comprises the following steps:
determining a third adjustment parameter of the sub-skeleton according to the first adjustment parameter;
performing a third adjustment operation on the sub-skeleton according to the third adjustment parameter.
Optionally, when the first adjustment operation is a zoom operation, the determining a third adjustment parameter of the sub-skeleton according to the first adjustment parameter includes:
obtaining a third scaling multiple of the sub-skeleton according to the first scaling multiple of the scaling operation of the regional skeleton, wherein the scaling operation of the regional skeleton and the sub-skeleton is opposite;
and obtaining the third adjusting parameter according to the third scaling multiple.
Optionally, when the first adjusting operation is a displacement operation, the first adjusting parameter includes a displacement parameter;
said determining a third adjustment parameter for said sub-skeleton from said first adjustment parameter, comprising:
determining and adjusting a second coordinate axis of the sub-skeleton and a fourth scaling multiple in the second coordinate axis according to the displacement parameter;
determining a third adjustment parameter for the sub-skeleton according to the fourth scaling factor.
Optionally, the method further includes:
acquiring a sub-adjustment skeleton corresponding to the sub-skeleton, wherein the sub-adjustment skeleton is bound with the animation model and inherits the coordinates of the sub-skeleton;
determining a third coordinate axis of the sub-skeleton other than the second coordinate axis, the scaling factor of the sub-skeleton in the third coordinate axis being the fourth scaling factor;
reversely obtaining a fifth scaling multiple of the sub-adjusting bone in the third coordinate axial direction according to the fourth scaling multiple of the sub-bone in the third coordinate axial direction;
determining a fourth adjustment parameter of the sub-adjustment skeleton according to the third coordinate axis and the fifth zoom factor;
performing a fourth adjustment operation on the sub-adjusted bone according to the fourth adjustment parameter.
According to another aspect of an embodiment of the present application, there is provided an animated model skeleton processing device including:
the skeleton determining module is used for determining a subset skeleton corresponding to a region skeleton to be adjusted in the animation model, wherein the subset skeleton comprises an adjusting skeleton, and the adjusting skeleton is bound with the animation model and inherits the coordinates of the region skeleton;
the acquisition module is used for acquiring a first adjusting parameter corresponding to a first adjusting operation of the regional skeleton;
a parameter determination module for determining a second adjustment parameter of the adjusted bone from the first adjustment parameter;
and the execution module is used for executing a second adjustment operation on the adjustment bone according to the second adjustment parameter.
According to another aspect of the embodiments of the present application, there is also provided a storage medium including a stored program that executes the above steps when the program is executed.
According to another aspect of an embodiment of the present application, there is provided an electronic device including: the system comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus;
the memory is used for storing a computer program;
the processor is configured to implement the above method steps when executing the computer program.
According to another aspect of embodiments of the present application, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs 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 only one or two coordinate axes of the skeleton are required to be adjusted, after the skeleton in the region is integrally adjusted, other axes can be restored by adjusting the skeleton, so that the adjustment of the skeleton in the required axis is realized, deformation is caused when the skeleton is prevented from moving, and the free change of the animation model is realized. And moreover, because the animation model is bound with the adjusting skeleton, the adjusted skeleton can adapt to animation movement and interaction effect.
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 or technical solutions in the prior art of the present invention, the drawings used in the description of the embodiments or prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained based on these drawings without creative efforts.
FIGS. 1a to 1c are schematic diagrams illustrating the effect of arm movement after the reduction of the length of the upper arm in the related art;
FIG. 2 is a flowchart of a method for processing an animation model skeleton according to an embodiment of the present disclosure;
FIG. 3 is a skeletal level diagram provided in accordance with an embodiment of the present application;
FIG. 4 is a flowchart of a method for processing an animated skeleton according to another embodiment of the present disclosure;
FIG. 5a is a schematic diagram of the forearm bone provided in an embodiment of the present application before adjustment;
FIG. 5b is a schematic diagram of the forearm bone provided by an embodiment of the application after uniaxial scaling;
FIG. 6a is a schematic view of an embodiment of the present application before adjustment of the abdominal bones;
FIG. 6b is a schematic view of the abdominal bone Y, Z provided in an embodiment of the present application after axial scaling;
FIG. 7a is a schematic view of the shoulder bone provided in an embodiment of the present application before adjustment;
FIG. 7b is a schematic view of the displaced shoulder bone according to the embodiment of the present application;
FIG. 8 is a flowchart of a method for processing an animated skeleton according to another embodiment of the present application;
FIG. 9 is a block diagram of an animated skeleton processing device according to an embodiment of the present disclosure;
fig. 10 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In the related art, when the length of any part of the body is changed, the bone cannot be only subjected to uniaxial scaling on the part, so that the bone is deformed. For example, when the forearm bone length needs to be reduced, the entire forearm bone X, Y, Z needs to be reduced in three axial directions. When the large arm moves, such as lifting, Y, Z has a rotation angle in the axial direction, therefore, the bone scaling effect will follow the rotation angle in the axial direction Y, Z to deform. As shown in FIGS. 1 a-1 c, the same action will produce different length and thickness arm effects.
In the embodiment of the application, in order to overcome the technical problem that bones cannot be adjusted uniaxially in the related technology, the adjustment bones are implanted into the regional bones, that is, adjustment bones xxx _ Adjust (xxx is the name of the regional bones) are added into the subset bones of each regional bone, and the length, thickness, position and the like of each bone can be independently modified through the combined adjustment of the regional bones and the adjustment bones, so that the free change of the animation model body is realized.
First, a method for processing an animation model skeleton according to an embodiment of the present invention is described below.
Fig. 2 is a flowchart of a method for processing an animation model skeleton according to an embodiment of the present disclosure. As shown in fig. 2, the method comprises the steps of:
step S11, determining a subset skeleton corresponding to a region skeleton to be adjusted in the animation model, wherein the subset skeleton comprises an adjusting skeleton, and the adjusting skeleton is bound with the animation model and inherits the coordinates of the region skeleton;
step S12, acquiring a first adjusting parameter corresponding to a first adjusting operation of regional bones;
step S13, determining a second adjusting parameter for adjusting the bone according to the first adjusting parameter;
and step S14, executing a second adjusting operation on the adjusting bone according to the second adjusting parameter.
Through the steps S11 to S14, when only one or two coordinate axes of the bone need to be adjusted, after the regional bone is adjusted as a whole, the other axes can be restored by adjusting the bone, so that the adjustment of the bone in the required axis is realized, deformation occurs when the bone is prevented from moving, and free change of the body of the animated model is realized. And moreover, because the animation model is bound with the adjusting skeleton, the adjusted skeleton can adapt to animation movement and interaction effect.
Fig. 3 is a schematic skeleton level diagram provided in an embodiment of the present application. As shown in fig. 3, in step S11, each region bone has its corresponding subset bone, the subset bone includes the adjustment bone corresponding to the region bone, if there is a sub-bone in the region bone, the subset bone also includes a sub-bone, and the sub-bone also has its corresponding adjustment bone and sub-bone, … …
For example, regional bone A, B and Head bone Head are both the children of Root bone Root. Wherein the subset of regional bones a includes: the adjustment skeleton a _ Adjust of the region skeleton, and the sub-skeleton a _1 of the region skeleton a, the sub-skeleton a _1 also has its corresponding adjustment skeleton a _1_ Adjust.
The subset of regional bones B includes: the adjustment bone B _ Adjust of the regional bone, and the sub-bone B _1 of the regional bone B, the subset bone of the sub-bone B _1 comprising: regulating skeleton B _1_ Adjust and sub-skeleton B _2, and sub-skeleton B _2 also has its corresponding regulating skeleton B _2_ Adjust.
The subset skeleton of the Head skeleton Head includes the Head adjustment skeleton Head _ Adjust, while the facial skeletons C _1, C _2, and C _3 serve as the subset skeleton of the Head adjustment skeleton Head _ Adjust. Facial bones include the bones of the eyes, nose, mouth, etc.
And the adjusting skeleton inherits the coordinates of the skeleton in the corresponding area and is bound with the animation model.
Optionally, the bone is adjusted to be the bone of the regional bone, aligned with the CS bone of the regional bone.
The animation model has a skeleton structure formed by mutually connected animation skeletons, and generates animation for the model by changing the orientation and the position of the bone skeletons.
The CS skeleton, Character Studio, is a very important plug-in module for 3DS MAX to simulate the actions of humans and bipedal animals.
The adjustment bones are aligned with the CS bones, and the adjustment bones are scaled to conform to the CS bones size and moved to the same location as the CS bones.
Fig. 4 is a flowchart of a method for processing an animation model skeleton according to another embodiment of the present application. As shown in fig. 4, when the first adjustment operation in step S12 is a zoom operation, the first adjustment parameter includes a zoom factor in each coordinate axis of the regional bone; the above step S13 includes the following steps:
step S21, reversely obtaining a second scaling factor of the adjusting bone in the first coordinate axial direction according to the first scaling factor of the regional bone in the first coordinate axial direction, wherein the first coordinate axial direction comprises one coordinate axial direction or two coordinate axial directions of the regional bone, and the scaling operation of the regional bone and the adjusting bone in the first coordinate axial direction is opposite;
and step S22, obtaining a second adjusting parameter according to the first coordinate axis and the second scaling factor.
Wherein, as an alternative, the second scaling factor may be smaller than the first scaling factor.
For example, when it is desired to enlarge the length of the regional bone a, the first adjustment operation is an enlargement operation in which the regional bone a is enlarged in its entirety in the direction of the X, Y, Z three coordinate axes, the bone length in the X-axis direction, the bone thickness in the Y, Z axis direction, and the overall magnifications in the three axes are all the same.
In order to realize the length of the bone A only in the enlargement area, the bone A _ Adjust needs to be controlled and adjusted to perform the reduction operation in the Y, Z axial direction, and the reduction factor in the Y, Z axial direction can be slightly smaller than or equal to the integral magnification factor in three axes.
After the operation of enlarging the skeleton A in the combined region and the operation of reducing the adjusting skeleton A _ Adjust in this way, the skeleton A in the region is only lengthened in length and the thickness of the skeleton is not changed as a whole, so that the uniaxial adjustment of the skeleton is realized, and the free change of the body of the animation model is realized. And moreover, because the animation model is bound with the adjusting skeleton, the adjusted skeleton can adapt to animation movement and interaction effect.
For another example, when it is necessary to Adjust only the thickness of the regional bone B, the variation in the Y, Z axial direction of the adjustment bone B _ Adjust of the regional bone B can be adjusted only. For example, when scaling the thickness of the abdominal bone Abdomen, it is possible to Adjust the bone Abdomen _ Adjust only in the Y, Z axis direction.
Fig. 5a is a schematic diagram of the forearm skeleton before adjustment according to the embodiment of the present application. FIG. 5b is a schematic diagram of the forearm bone after uniaxial scaling according to the embodiment of the present application. Through comparison, the length of the large arm can be freely adjusted according to the needs of a user, and the thickness of the large arm is basically not changed.
Fig. 6a is a schematic view of an abdominal bone provided in an embodiment of the present application before adjustment. Fig. 6b is a schematic view of the abdominal bone Y, Z provided in an embodiment of the present application after axial scaling. By contrast, it has been found that it is possible to change only the thickness of the abdominal bones without simultaneously adjusting their length.
In an alternative embodiment, the subset bone further comprises a sub-bone of the region bone. The method further comprises the following steps:
step A1, determining a third adjusting parameter of the skeleton according to the first adjusting parameter;
and step A2, performing a third adjustment operation on the sub-skeleton according to the third adjustment parameter.
In this embodiment, when the bone of the region changes, the related sub-bones also need to be changed correspondingly in order to improve the authenticity of the bone change.
Optionally, when the first adjustment operation is a zoom operation, the step a1 includes:
step B1, obtaining a third zoom multiple of the sub-skeleton according to the first zoom multiple of the zoom operation of the regional skeleton, wherein the zoom operation of the regional skeleton and the sub-skeleton is opposite;
and step B2, obtaining a third adjusting parameter according to the third scaling factor.
For example, a subset of the large Arm bones Arm includes: the Forearm bone Forearm and the large Arm bone Arm _ Adjust. When the length of the big Arm bone needs to be lengthened, if the magnification is 1.5 times, the big Arm bone Arm is firstly enlarged 1.5 times in the X, Y, Z axial direction as a whole, the adjusting bone Arm _ Adjust is reduced 1.45 times in the Y, Z axial direction, and the small Arm bone Forearm is reduced 1.5 times in the X, Y, Z axial direction as a whole.
When the Forearm bone length is reduced, for example, by 0.2 times the original length, the Forearm bone Arm is first reduced by 0.2 times in the X, Y, Z axial direction as a whole, the adjustment bone Arm _ Adjust is enlarged by 0.19 times in the Y, Z axial direction, and the Forearm bone Forearm is enlarged by 0.2 times in the X, Y, Z axial direction as a whole.
For another example, when the thickness of the abdominal bone Abdomen is zoomed, the adjustment bone Abdomen _ Adjust may be adjusted only in the Y, Z axial direction, and the Pelvis bone Pelvis and the sternum bone sternum of the abdominal bone Abdomen may be adjusted according to the zoom factor of the abdominal bone Abdomen.
In a further alternative embodiment, the first adjustment parameter comprises a displacement parameter when the first adjustment operation is a displacement operation. The step a1 includes:
step C1, determining a second coordinate axial direction of the regulating sub-skeleton and a fourth scaling multiple in the second coordinate axial direction according to the displacement parameters;
and step C2, determining a third adjustment parameter of the sub-skeleton according to the fourth scaling factor.
For example, when the width of the shoulder bone changes, the shoulder bone may be displaced, and the width of the chest bone may be changed by scaling the thickness of the chest bone based on the displacement of the shoulder bone.
Fig. 7a is a schematic diagram of a shoulder bone provided in an embodiment of the present application before adjustment. Fig. 7b is a schematic view of the displaced shoulder bone according to the embodiment of the present application. By contrast, as the shoulder bone is displaced to be widened, the thoracic bone is correspondingly enlarged Y, Z in the axial direction, so that the thoracic bone is widened.
In an alternative embodiment, when the sub-bones of the regional bone are adjusted, they may also be adjusted only uniaxially. Fig. 8 is a flowchart of a method for processing an animation model skeleton according to another embodiment of the present application. As shown in fig. 8, the method further comprises the steps of:
step S31, acquiring a sub-adjustment skeleton corresponding to the sub-skeleton, and binding the sub-adjustment skeleton with the animation model and inheriting the coordinates of the sub-skeleton;
step S32, determining a third coordinate axial direction of the sub-skeleton except the second coordinate axial direction, wherein the zoom multiple of the sub-skeleton in the third coordinate axial direction is a fourth zoom multiple;
step S33, reversely obtaining a fifth scaling factor of the sub-adjusting skeleton in the third coordinate axial direction according to the fourth scaling factor of the sub-skeleton in the third coordinate axial direction;
step S34, determining a fourth adjusting parameter of the sub-adjusting skeleton according to the third coordinate axis and the fifth scaling factor;
and step S35, executing a fourth adjusting operation on the sub-adjustment bones according to the fourth adjusting parameter.
For example, as shown in fig. 3, when the regional bone B is enlarged in the X-axis direction, and the sub-bone B _1 is correspondingly reduced in the X-axis direction, the sub-bone B _1 can be firstly reduced in the X, Y, Z-axis direction as a whole, and then the adjustment bone B _1_ Adjust is enlarged in the Y, Z-axis direction, so that the sub-bone B _1 is reduced in the Y, Z-axis direction in a uniaxial direction. Similarly, when the sub-bone B _1 is contracted in the X-axis direction, the sub-bone B _2 can be enlarged in the Y, Z-axis direction, and only the adjustment bone B _2_ Adjust of the sub-bone B _2 is enlarged in the Y, Z-axis direction. Thus, the overall adjustment of the regional skeleton and its individual sub-skeletons is achieved.
The following are embodiments of the apparatus of the present application that may be used to perform embodiments of the method of the present application.
Fig. 9 is a block diagram of an animation model skeleton processing apparatus provided in an embodiment of the present application, which may be implemented as part of or all of an electronic device through software, hardware, or a combination of the two. As shown in fig. 9, the animation model skeleton processing apparatus includes:
the skeleton determining module 1 is configured to determine a subset skeleton corresponding to a region skeleton to be adjusted in an animation model, where the subset skeleton includes an adjustment skeleton, and the adjustment skeleton is bound to the animation model and inherits coordinates of the region skeleton;
the acquisition module 2 is used for acquiring a first adjustment parameter corresponding to a first adjustment operation of the regional bones;
a parameter determination module 3 for determining a second adjustment parameter of the adjusted bone according to the first adjustment parameter;
and the execution module 4 is used for executing a second adjustment operation on the adjustment bone according to the second adjustment parameter.
Optionally, when the first adjustment operation is a zoom operation, the first adjustment parameter includes a zoom factor in each coordinate axis of the region bone. The parameter determination module 3 includes:
a scaling factor determining unit, configured to inversely obtain a second scaling factor of the adjustment bone in a first coordinate axis direction according to the first scaling factor of the region bone in the first coordinate axis direction, where the first coordinate axis direction includes one coordinate axis direction or two coordinate axis directions of the region bone, and the scaling operation of the region bone and the adjustment bone in the first coordinate axis direction is opposite;
and the parameter determining unit is used for obtaining the second adjusting parameter according to the first coordinate axis and the second scaling factor.
Optionally, the second scaling factor is smaller than the first scaling factor.
Optionally, the bone is adjusted to be bone of the regional bone, aligned with CS bone of the regional bone.
Optionally, the subset bone further comprises a sub-bone of the region bone. In the device, the parameter determining module 3 is further configured to determine a third adjustment parameter of the sub-skeleton according to the first adjustment parameter; and the execution module 4 is further used for executing a third adjustment operation on the sub-skeleton according to the third adjustment parameter.
Optionally, the parameter determining module 3 is further configured to, when the first adjusting operation is a zooming operation, obtain a third zooming multiple of the sub-skeleton according to the first zooming multiple of the region skeleton zooming operation, where the region skeleton and the sub-skeleton zooming operation are opposite; and obtaining the third adjusting parameter according to the third scaling multiple.
When the first adjustment operation is a displacement operation, the first adjustment parameter comprises a displacement parameter; the parameter determination module 3 is further configured to determine, according to the displacement parameter, a second coordinate axis of the sub-skeleton and a fourth scaling factor in the second coordinate axis; determining a third adjustment parameter for the sub-skeleton according to the fourth scaling factor.
Optionally, in the apparatus, the bone determination module 1 is further configured to obtain a sub-adjustment bone corresponding to the sub-bone, where the sub-adjustment bone is bound to the animation model and inherits coordinates of the sub-bone. The parameter determination module 3 is further configured to determine a third coordinate axis of the sub-skeleton other than the second coordinate axis, where a scaling factor of the sub-skeleton in the third coordinate axis is the fourth scaling factor; reversely obtaining a fifth scaling multiple of the sub-adjusting bone in the third coordinate axial direction according to the fourth scaling multiple of the sub-bone in the third coordinate axial direction; and determining a fourth adjusting parameter of the sub-adjusting bone according to the third coordinate axis and the fifth scaling factor. And the execution module 4 is further used for executing a fourth adjustment operation on the sub-adjustment bone according to the fourth adjustment parameter.
An embodiment of the present application further provides an electronic device, as shown in fig. 10, the electronic device may include: the system 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 complete 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, is configured to implement the steps of the following method embodiments:
determining a subset skeleton corresponding to a region skeleton to be adjusted in an animation model, wherein the subset skeleton comprises an adjusting skeleton, and the adjusting skeleton is bound with the animation model and inherits the coordinates of the region skeleton;
acquiring a first adjusting parameter corresponding to a first adjusting operation of the regional skeleton;
determining a second adjustment parameter for adjusting the bone according to the first adjustment parameter;
and executing a second adjustment operation on the adjustment bone according to the second adjustment parameter.
Optionally, when the first adjustment operation is a zoom operation, the first adjustment parameter includes a zoom multiple in each coordinate axis of the regional bone;
said determining a second adjustment parameter for said adjusted bone from said first adjustment parameter, comprising:
reversely obtaining a second scaling factor of the adjusting bone in a first coordinate axis direction according to the first scaling factor of the regional bone in the first coordinate axis direction, wherein the first coordinate axis direction comprises one coordinate axis direction or two coordinate axis directions of the regional bone, and the scaling operation of the regional bone and the adjusting bone in the first coordinate axis direction is opposite;
and obtaining the second adjusting parameter according to the first coordinate axis and the second scaling multiple.
Optionally, the second scaling factor is smaller than the first scaling factor.
Optionally, the adjustment bone is a bone of the regional bone, aligned with a CS bone of the regional bone.
Optionally, the subset bone further comprises a sub-bone of the region bone;
the method further comprises the following steps:
determining a third adjustment parameter of the sub-skeleton according to the first adjustment parameter;
performing a third adjustment operation on the sub-skeleton according to the third adjustment parameter.
Optionally, when the first adjustment operation is a zoom operation, the determining a third adjustment parameter of the sub-skeleton according to the first adjustment parameter includes:
obtaining a third scaling multiple of the sub-skeleton according to the first scaling multiple of the scaling operation of the regional skeleton, wherein the scaling operation of the regional skeleton and the sub-skeleton is opposite;
and obtaining the third adjusting parameter according to the third scaling multiple.
Optionally, when the first adjusting operation is a displacement operation, the first adjusting parameter includes a displacement parameter;
said determining a third adjustment parameter for said sub-skeleton from said first adjustment parameter, comprising:
determining and adjusting a second coordinate axis of the sub-skeleton and a fourth scaling multiple in the second coordinate axis according to the displacement parameter;
determining a third adjustment parameter for the sub-skeleton according to the fourth scaling factor.
Optionally, the method further includes:
acquiring a sub-adjustment skeleton corresponding to the sub-skeleton, wherein the sub-adjustment skeleton is bound with the animation model and inherits the coordinates of the sub-skeleton;
determining a third coordinate axis of the sub-skeleton other than the second coordinate axis, the scaling factor of the sub-skeleton in the third coordinate axis being the fourth scaling factor;
reversely obtaining a fifth scaling multiple of the sub-adjusting bone in the third coordinate axial direction according to the fourth scaling multiple of the sub-bone in the third coordinate axial direction;
determining a fourth adjustment parameter of the sub-adjustment skeleton according to the third coordinate axis and the fifth zoom factor;
performing a fourth adjustment operation on the sub-adjusted bone according to the fourth adjustment parameter.
The communication bus mentioned in the electronic device may be a Peripheral component interconnect (pci) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
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 memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component.
The present application also provides a computer-readable storage medium having stored thereon a computer program which, when being executed by a processor, carries out the steps of the method embodiments described below.
It should be noted that, for the above-mentioned apparatus, electronic device and computer-readable storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiments.
It is further noted that, herein, relational terms such as "first" and "second," and the like, may be 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. Also, 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 an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The foregoing are merely exemplary embodiments of the present invention, which enable those skilled in the art to understand or practice the present 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 (10)

1. A method for processing an animation model skeleton is characterized by comprising the following steps:
determining a subset bone corresponding to a regional bone to be adjusted in an animation model, wherein the subset bone comprises an adjusting bone implanted into the regional bone, and the adjusting bone is bound with the animation model and inherits the coordinates of the regional bone;
acquiring a first adjusting parameter corresponding to a first adjusting operation of the regional skeleton;
determining a second adjustment parameter for adjusting the bone according to the first adjustment parameter;
performing a second adjustment operation on the adjusted bone according to the second adjustment parameter;
when the first adjustment operation is a zoom operation, the first adjustment parameter comprises a zoom multiple in each coordinate axis of the regional bone;
said determining a second adjustment parameter for said adjusted bone from said first adjustment parameter, comprising:
reversely obtaining a second scaling factor of the adjusting bone in a first coordinate axis direction according to the first scaling factor of the regional bone in the first coordinate axis direction, wherein the first coordinate axis direction comprises one coordinate axis direction or two coordinate axis directions of the regional bone, and the scaling operation of the regional bone and the adjusting bone in the first coordinate axis direction is opposite;
and obtaining the second adjusting parameter according to the first coordinate axis and the second scaling multiple.
2. The method of claim 1, wherein the second scaling factor is less than the first scaling factor.
3. The method of claim 1 or 2, wherein said conditioning bone is a bone of said regional bone, aligned with a CS bone of said regional bone.
4. The method of claim 1, wherein the subset bone further comprises a sub-bone of the region bone;
the method further comprises the following steps:
determining a third adjustment parameter of the sub-skeleton according to the first adjustment parameter;
performing a third adjustment operation on the sub-skeleton according to the third adjustment parameter.
5. The method of claim 4, wherein when the first adjustment operation is a zoom operation, said determining a third adjustment parameter for the sub-skeleton from the first adjustment parameter comprises:
obtaining a third scaling multiple of the sub-skeleton according to the first scaling multiple of the scaling operation of the regional skeleton, wherein the scaling operation of the regional skeleton and the sub-skeleton is opposite;
and obtaining the third adjusting parameter according to the third scaling multiple.
6. The method of claim 4, wherein when the first adjustment operation is a displacement operation, the first adjustment parameter comprises a displacement parameter;
said determining a third adjustment parameter for said sub-skeleton from said first adjustment parameter, comprising:
determining and adjusting a second coordinate axis of the sub-skeleton and a fourth scaling multiple in the second coordinate axis according to the displacement parameter;
determining a third adjustment parameter for the sub-skeleton according to the fourth scaling factor.
7. The method of claim 6, further comprising:
acquiring a sub-adjustment skeleton corresponding to the sub-skeleton, wherein the sub-adjustment skeleton is bound with the animation model and inherits the coordinates of the sub-skeleton;
determining a third coordinate axis of the sub-skeleton other than the second coordinate axis, the scaling factor of the sub-skeleton in the third coordinate axis being the fourth scaling factor;
reversely obtaining a fifth scaling multiple of the sub-adjusting bone in the third coordinate axial direction according to the fourth scaling multiple of the sub-bone in the third coordinate axial direction;
determining a fourth adjustment parameter of the sub-adjustment skeleton according to the third coordinate axis and the fifth zoom factor;
performing a fourth adjustment operation on the sub-adjusted bone according to the fourth adjustment parameter.
8. An animated skeleton processing device comprising:
the bone determination module is used for determining a subset bone corresponding to a regional bone to be adjusted in the animation model, wherein the subset bone comprises an adjustment bone implanted into the regional bone, and the adjustment bone is bound with the animation model and inherits the coordinates of the regional bone;
the acquisition module is used for acquiring a first adjusting parameter corresponding to a first adjusting operation of the regional skeleton;
a parameter determination module for determining a second adjustment parameter of the adjusted bone from the first adjustment parameter;
an execution module for executing a second adjustment operation on the adjustment bone according to the second adjustment parameter;
when the first adjustment operation is a zoom operation, the first adjustment parameter comprises a zoom multiple in each coordinate axis of the regional bone; the parameter determination module is used for reversely obtaining a second scaling factor of the adjusting bone in a first coordinate axial direction according to the first scaling factor of the regional bone in the first coordinate axial direction, wherein the first coordinate axial direction comprises one coordinate axial direction or two coordinate axial directions of the regional bone, and the scaling operation of the regional bone and the adjusting bone in the first coordinate axial direction is opposite; and obtaining the second adjusting parameter according to the first coordinate axis and the second scaling multiple.
9. An electronic device, comprising: the system comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus;
the memory is used for storing a computer program;
the processor, when executing the computer program, implementing the method steps of any of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method steps of any one of claims 1 to 7.
CN202011036177.9A 2020-09-27 2020-09-27 Animation model skeleton processing method and device, electronic equipment and storage medium Active CN112102453B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011036177.9A CN112102453B (en) 2020-09-27 2020-09-27 Animation model skeleton processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011036177.9A CN112102453B (en) 2020-09-27 2020-09-27 Animation model skeleton processing method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112102453A CN112102453A (en) 2020-12-18
CN112102453B true CN112102453B (en) 2021-06-18

Family

ID=73783444

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011036177.9A Active CN112102453B (en) 2020-09-27 2020-09-27 Animation model skeleton processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112102453B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113345059B (en) * 2021-05-31 2023-08-08 网易(杭州)网络有限公司 Animation generation method and device, storage medium and electronic equipment

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018095273A1 (en) * 2016-11-24 2018-05-31 腾讯科技(深圳)有限公司 Image synthesis method and device, and matching implementation method and device
CN110111417B (en) * 2019-05-15 2021-04-27 浙江商汤科技开发有限公司 Method, device and equipment for generating three-dimensional local human body model
CN111062864B (en) * 2019-12-20 2023-09-08 网易(杭州)网络有限公司 Animation model scaling method and device, electronic equipment and storage medium
CN111489423B (en) * 2020-05-18 2023-11-17 网易(杭州)网络有限公司 Animation processing method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN112102453A (en) 2020-12-18

Similar Documents

Publication Publication Date Title
US11017580B2 (en) Face image processing based on key point detection
US9418465B2 (en) Multipoint offset sampling deformation techniques
US20090135189A1 (en) Character animation system and method
CN107452049B (en) Three-dimensional head modeling method and device
US8405676B2 (en) Techniques for interior coordinates
Kim et al. Bulging‐free dual quaternion skinning
JP7138769B2 (en) Image processing method, device and computer storage medium
JP2010170279A (en) Skeleton motion control system, program, and information storage medium
CN112102453B (en) Animation model skeleton processing method and device, electronic equipment and storage medium
CN109698914A (en) A kind of lightning special efficacy rendering method, device, equipment and storage medium
CN110555812A (en) image adjusting method and device and computer equipment
JP2021515313A (en) Image processing methods, devices and computer storage media
CN111681302A (en) Method and device for generating 3D virtual image, electronic equipment and storage medium
JP2022518641A (en) Image processing methods and equipment, image processing devices and storage media
KR102610900B1 (en) Golf ball overhead detection method, system and storage medium
CN108876704B (en) Method and device for deforming human face image and computer storage medium
CN108510541A (en) A kind of information adjusting method, electronic equipment and computer readable storage medium
CN112090082A (en) Facial skeleton processing method and device, electronic equipment and storage medium
CN112000259A (en) Method and device for controlling camera based on touch event of mobile terminal
CN112169331B (en) Object control method and device
US7330183B1 (en) Techniques for projecting data maps
US6483506B1 (en) System and method for generating computer animated graphical images of a vascular structure attached to an anatomical structure
CN112102452A (en) Animation model processing method and device, electronic equipment and storage medium
CN113469900A (en) Track denoising method and related device and equipment
CN111027389A (en) Training data generation method based on deformable Gaussian kernel in crowd counting system

Legal Events

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