CN111784809A - Virtual character skeleton animation control method and device, storage medium and electronic equipment - Google Patents

Virtual character skeleton animation control method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN111784809A
CN111784809A CN202010658048.7A CN202010658048A CN111784809A CN 111784809 A CN111784809 A CN 111784809A CN 202010658048 A CN202010658048 A CN 202010658048A CN 111784809 A CN111784809 A CN 111784809A
Authority
CN
China
Prior art keywords
virtual character
parameter
bone
gravity
bone motion
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.)
Granted
Application number
CN202010658048.7A
Other languages
Chinese (zh)
Other versions
CN111784809B (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.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network 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 Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN202010658048.7A priority Critical patent/CN111784809B/en
Publication of CN111784809A publication Critical patent/CN111784809A/en
Application granted granted Critical
Publication of CN111784809B publication Critical patent/CN111784809B/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

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The present disclosure relates to the field of image processing technologies, and in particular, to a method and an apparatus for controlling a virtual character skeleton animation, a computer-readable storage medium, and an electronic device, where the method includes: determining a first gravity parameter of a virtual environment in which a virtual character is located; determining a first bone motion parameter of the virtual character according to the first gravity parameter; controlling the bone motion state in the target bone animation of the virtual character according to the first bone motion parameter; responding to the change of the first gravity parameter of the virtual character into a second gravity parameter, and determining a second bone motion parameter of the virtual character according to the second gravity parameter; controlling the bone motion state in the target bone animation of the virtual character according to the second bone motion parameter; wherein the first bone motion parameter is different from the second bone motion parameter. The technical scheme of the embodiment of the disclosure overcomes the defects of more waste of human resources and slower response in the prior art.

Description

Virtual character skeleton animation control method and device, storage medium and electronic equipment
Technical Field
The present disclosure relates to the field of image processing technologies, and in particular, to a method and an apparatus for controlling a virtual character skeleton animation, a computer-readable storage medium, and an electronic device.
Background
When the gravity of the scene environment is different from that of the earth, the action of the character needs to be represented differently from that of the earth in order to render a more realistic character.
In the prior art, a plurality of sets of actions are artificially made in advance to adapt to different environments, so that a lot of workload is increased and more human resources are wasted when a plurality of gravity scenes are in a large number.
Therefore, a new method for controlling the skeletal animation of the virtual character is needed.
It is to be noted that the information disclosed in the above background section is only for enhancement of understanding of the background of the present disclosure, and thus may include information that does not constitute prior art known to those of ordinary skill in the art.
Disclosure of Invention
The present disclosure is directed to a method and an apparatus for controlling a skeletal animation of a virtual character, a computer-readable storage medium, and an electronic device, so as to overcome the disadvantages of the prior art, such as high human resource consumption and slow response.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows, or in part will be obvious from the description, or may be learned by practice of the disclosure.
According to a first aspect of the present disclosure, there is provided a virtual character skeleton animation control method, including:
determining a first gravity parameter of a virtual environment in which a virtual character is located;
determining a first bone motion parameter of the virtual character according to the first gravity parameter;
controlling the bone motion state in the target bone animation of the virtual character according to the first bone motion parameter;
responding to the change of the first gravity parameter of the virtual character into a second gravity parameter, and determining a second bone motion parameter of the virtual character according to the second gravity parameter;
controlling the bone motion profile in the target bone animation of the virtual character according to the second bone motion parameter; wherein the first bone motion parameter is different from the second bone motion parameter.
In an exemplary embodiment of the present disclosure, determining a first gravity parameter of a virtual environment in which a virtual character is located includes:
acquiring a first gravity acceleration of a virtual environment where the virtual character is located; and are
Calculating a first proportional coefficient between the first gravity acceleration and the initial gravity acceleration as a first gravity parameter;
wherein the initial gravitational acceleration is an average gravitational acceleration of the earth's surface.
In an exemplary embodiment of the present disclosure, determining a first bone motion parameter of the virtual character from the first gravity parameter comprises:
establishing a first mapping relationship between the first gravity parameter and a first bone motion parameter of the virtual character;
and determining a first bone motion parameter of the virtual character by utilizing the first mapping relation according to the first gravity parameter.
In an exemplary embodiment of the present disclosure, establishing a mapping relationship between the first gravity parameter and the first bone motion parameter of the virtual character includes:
acquiring initial motion parameters of the virtual character under the initial gravitational acceleration;
acquiring preset parameters of the virtual character under a first gravity acceleration according to the initial motion parameters;
and establishing a functional relation between the first bone motion parameter and the proportionality coefficient according to preset parameters.
In an exemplary embodiment of the present disclosure, responding to the change of the second gravity parameter of the virtual character to the second gravity parameter comprises:
acquiring a second gravity acceleration of the virtual environment where the virtual character is located; and are
Calculating a second proportionality coefficient between the second gravity acceleration and the initial gravity acceleration as a second gravity parameter;
wherein the initial gravitational acceleration is an average gravitational acceleration of the earth's surface.
In an exemplary embodiment of the present disclosure, determining a second bone motion parameter of the virtual character from the second gravity parameter comprises:
establishing a second mapping relationship between the second gravity parameter and a second bone motion parameter of the virtual character;
and determining a second bone motion parameter of the virtual character by utilizing the second mapping relation according to the second gravity parameter.
In an exemplary embodiment of the present disclosure, establishing a mapping relationship between the second gravity parameter and the second bone motion parameter of the virtual character includes:
acquiring initial motion parameters of the virtual character under the initial gravitational acceleration;
acquiring preset parameters of the virtual character under a second gravitational acceleration according to the initial motion parameters;
and establishing a functional relation between the second bone motion parameter and the proportionality coefficient according to preset parameters.
In an exemplary embodiment of the present disclosure, the bone motion parameter includes at least one of: the height of the foot of the virtual character in a preset time, and the bending direction and angle of the vertebra and the skull of the virtual character when walking.
In an exemplary embodiment of the present disclosure, the bone motion parameter includes a height of a foot of the virtual character within a preset time, and controlling a bone motion shape in a target bone animation of the virtual character according to the first bone motion parameter includes:
determining the motion direction of the foot of the virtual character within the preset time;
and adjusting the height of the foot of the virtual character within preset time by utilizing the first mapping relation according to the first gravity parameter and the motion direction.
In an exemplary embodiment of the present disclosure, the bone motion parameters include bending directions and angles of a vertebra and a skull of the virtual character while walking, and controlling a bone motion shape in a target bone animation of the virtual character according to the first bone motion parameters includes:
respectively determining a vertebra bending angle coefficient and a skull bending angle coefficient according to the body structure of the virtual character;
determining the bending direction of the vertebra and the skull according to the empty foot of the virtual character during walking;
adjusting the bending angle of the vertebra relative to its parent bone according to the vertebra bending angle coefficient and the first mapping relation;
and adjusting the bending angle of the skull relative to the father bone according to the skull bending angle coefficient and the first mapping relation.
In an exemplary embodiment of the present disclosure, the bone motion parameters include a height of a foot of the virtual character within a preset time, and the controlling the bone motion shape in the target bone animation of the virtual character according to the second bone motion parameters includes:
determining the motion direction of the foot of the virtual character within the preset time;
and adjusting the foot height of the virtual character within preset time by utilizing the second mapping relation according to the second gravity parameter and the motion direction.
In an exemplary embodiment of the present disclosure, the bone motion parameters include bending directions and angles of a vertebra and a skull of the virtual character while walking, and controlling the bone motion morphology in the target bone animation of the virtual character according to the second bone motion parameters includes:
respectively determining a vertebra bending angle coefficient and a skull bending angle coefficient according to the body structure of the virtual character;
determining the bending direction of the vertebra and the skull according to the empty foot of the virtual character during walking;
adjusting the bending angle of the vertebra relative to the parent bone thereof according to the vertebra bending angle coefficient and the second mapping relation;
and adjusting the bending angle of the skull relative to the father bone according to the skull bending angle coefficient and the second mapping relation.
In an exemplary embodiment of the present disclosure, the method further comprises:
acquiring the initial movement speed of the virtual character under the initial gravitational acceleration;
when the first gravity parameter is larger than 1, increasing the overall movement speed of the virtual character according to the first mapping relation;
when the first gravity parameter is smaller than 1, reducing the overall movement speed according to the first mapping relation;
when the second gravity parameter is larger than 1, increasing the overall movement speed according to the second mapping relation;
and when the second gravity parameter is smaller than 1, reducing the overall movement speed according to the second mapping relation.
According to an aspect of the present disclosure, there is provided a virtual character skeleton animation control apparatus including:
the parameter determining module is used for determining a first gravity parameter of a virtual environment where the virtual character is located;
the first calculation module is used for determining a first bone motion parameter of the virtual character according to the first gravity parameter;
a first adjusting module for controlling the bone motion state in the target bone animation of the virtual character according to the first bone motion parameter
The second calculation module is used for responding to the change of the first gravity parameter of the virtual character into a second gravity parameter and determining a second bone motion parameter of the virtual character according to the second gravity parameter;
a second adjustment module for controlling the bone motion profile in the target bone animation of the virtual character according to the second bone motion parameter; wherein the first bone motion parameter is different from the second bone motion parameter.
According to an aspect of the present disclosure, there is provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a virtual character skeletal animation control method as recited in any of the above.
According to an aspect of the present disclosure, there is provided an electronic device including:
a processor; and
memory storing one or more programs that, when executed by the one or more processors, cause the one or more processors to implement a virtual character skeletal animation control method as recited in any of the above.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
in the virtual character skeleton animation control provided by one embodiment of the disclosure, the method
Determining a first gravity parameter of a virtual environment in which a virtual character is located; determining a first bone motion parameter of the virtual character according to the first gravity parameter; controlling the bone motion state in the target bone animation of the virtual character according to the first bone motion parameter; responding to the change of the first gravity parameter of the virtual character into a second gravity parameter, and determining a second bone motion parameter of the virtual character according to the second gravity parameter; controlling the bone motion state in the target bone animation of the virtual character according to the second bone motion parameter; wherein the first bone motion parameter is different from the second bone motion parameter. Compared with the prior art, on one hand, the skeleton motion parameters can be adjusted according to the gravity parameters, the skeleton motion parameters do not need to be manufactured in advance, and the skeleton motion parameters can quickly respond when meeting a new gravity environment; on the other hand, different bone motion parameters do not need to be made manually, so that the waste of human resources is reduced, and errors caused by human errors can be reduced.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure. It is to be understood that the drawings in the following description are merely exemplary of the disclosure, and that other drawings may be derived from those drawings by one of ordinary skill in the art without the exercise of inventive faculty. In the drawings:
FIG. 1 schematically illustrates a flow chart of a method for virtual character skeletal animation control in an exemplary embodiment of the present disclosure;
FIG. 2 schematically illustrates a graph of foot height versus time for a foot step lift with a first scaling factor greater than 1 in an exemplary embodiment of the disclosure;
FIG. 3 schematically illustrates a foot height versus time plot for a foot motion as a drop with a first scaling factor greater than 1 in an exemplary embodiment of the disclosure;
FIG. 4 schematically illustrates a graph of foot height versus time for a foot step lift with a first scaling factor less than 1 in an exemplary embodiment of the disclosure;
FIG. 5 schematically illustrates a foot height versus time plot for a foot motion as a drop with a first scaling factor less than 1 in an exemplary embodiment of the disclosure;
fig. 6 is a view schematically illustrating a curvature structure of a vertebra and a skull when a virtual character moves in an exemplary embodiment of the present disclosure;
fig. 7 is a view schematically illustrating a structure of a motion of a virtual character when a first scale factor is greater than 1 in an exemplary embodiment of the present disclosure;
fig. 8 is a view schematically illustrating a structure of a motion of a virtual character when a first scale factor is less than 1 in an exemplary embodiment of the present disclosure;
FIG. 9 is a schematic diagram illustrating the components of an apparatus for controlling the skeletal animation of a virtual character in an exemplary embodiment of the present disclosure;
FIG. 10 schematically illustrates a structural diagram of a computer system suitable for use with an electronic device that implements an exemplary embodiment of the present disclosure;
fig. 11 schematically illustrates a schematic diagram of a computer-readable storage medium, according to some embodiments of the present disclosure.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus their repetitive description will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
In the present exemplary embodiment, there is first provided a virtual character skeletal animation control method, which may include, as shown in fig. 1, the steps of:
s110, determining a first gravity parameter of a virtual environment where a virtual character is located;
s120, determining a first bone motion parameter of the virtual character according to the first gravity parameter;
s130, controlling the bone motion form in the target bone animation of the virtual character according to the first bone motion parameter;
s140, responding to the change of the first gravity parameter of the virtual character into a second gravity parameter, and determining a second bone motion parameter of the virtual character according to the second gravity parameter;
s150, controlling the bone motion form in the target bone animation of the virtual character according to the second bone motion parameter; wherein the first bone motion parameter is different from the second bone motion parameter.
Compared with the prior art, according to the virtual character skeleton animation control method provided in the exemplary embodiment, on one hand, the skeleton motion parameters can be adjusted according to the gravity parameters, advance production is not needed, and quick response can be achieved when a new gravity environment is met; on the other hand, different bone motion parameters do not need to be made manually, so that the waste of human resources is reduced, and errors caused by human errors can be reduced.
Hereinafter, the steps of the virtual character skeleton animation control method in the exemplary embodiment will be described in more detail with reference to the drawings and the embodiment.
Step S110, determining a first gravity parameter of a virtual environment in which the virtual character is located.
In an example embodiment of the present disclosure, a first gravitational acceleration of a virtual environment in which the virtual character is located may be first obtained.
In an example embodiment of the present disclosure, the virtual character may be a character in a game, or may be a character in an animation, where the character may be a character, an animal, or the like, and is not particularly limited in this example embodiment.
In this example embodiment, the first gravitational acceleration may be a gravitational acceleration set by the system to the virtual environment in which the virtual character is located.
In the present exemplary embodiment, after the acquisition of the first gravitational acceleration is completed, a first scale coefficient between the first gravitational acceleration and an initial gravitational acceleration may be calculated, where the initial gravitational acceleration is an average gravitational acceleration of the earth's surface.
In an example embodiment of the present disclosure, the initial gravitational acceleration is an average gravitational acceleration of the earth's surface, which may be defined as 9.8m/s2Can also be defined as 10m/s2The present exemplary embodiment is not particularly limited. And calculating a first proportional coefficient of the first gravitational acceleration and the initial gravitational acceleration.
Step S120, determining a first bone motion parameter of the virtual character according to the first gravity parameter.
In an example embodiment of the present disclosure, the first bone motion parameter may include at least one of a height of a foot of the virtual character within a preset time, a bending direction and angle of a vertebra and a skull of the virtual character while walking, and a speed of overall motion of the virtual character.
In an example embodiment of the present disclosure, an initial motion parameter of the virtual character under the initial gravitational acceleration may be first obtained, and a preset parameter may be obtained according to the initial motion parameter, and then a functional relationship between the bone motion parameter and the proportional relationship may be established according to the preset parameter.
In the present exemplary embodiment, the virtual character may be taken as an example, the moving direction of the foot of the virtual character within a preset time may be determined first, and the moving direction may be a lifting or a dropping.
In the present exemplary embodiment, when the foot of the virtual character is raised, the functional relationship between the bone motion parameter and the first gravitational acceleration may be established according to the first scale coefficient. Respectively establishing a functional relation between the bone motion parameter and the first gravitational acceleration when the first proportion coefficient is larger than 1, the running direction is uplifted, the first proportion coefficient is larger than 1, the running direction is fallen, the first proportion coefficient is smaller than 1, the running direction is uplifted, the first proportion coefficient is smaller than 1, and the running direction is fallen.
In an example embodiment of the present disclosure, a functional relationship between the height of the foot and the first gravitational acceleration of the virtual character within a preset time may be first established when the first scale factor is greater than 1, that is, the first gravitational acceleration is greater than the initial gravitational acceleration, and when the foot is lifted up, the height of the foot of each frame is lower than the height of the foot of the initial action at the same time when the first scale factor is greater than 1. When the foot is dropped, the height of the foot is made higher than the initial motion at the same time for each frame. That is, the speed of lifting and lowering the feet is changed from the constant speed of the initial motion to the speed of the initial motion, so that the walking weight can be displayed.
In the present exemplary embodiment, referring to fig. 2, a curve 21 is an initial motion parameter under an initial gravitational acceleration, and the acquired preset parameters may include that the foot height is 0 at time 0 and is raised to a maximum height h at time t.
In the present exemplary embodiment, referring to fig. 2, when the foot is lifted, the height of the foot is 0 at time 0, and the highest point h is lifted at time t, wherein the heights at 0 and t are the same under different gravity parameters, and the difference between time 0 and t is different from the initial action, first, a concave function with height 0 and h can be determined to realize that the change of the height of the foot between time 0 and t is slow first and then fast when the change meets time 0 and t, and the walking weight can be embodied by using the concave function, for example, the function is the function
Figure BDA0002577472760000091
Namely, it is
Figure BDA0002577472760000092
However, since the selected curves also show different degrees of difference in gravity increase, g can be used to represent the first scale factor, i.e. the ratio of the current first gravitational acceleration to the initial gravitational acceleration. Therefore, a function can be established
Figure BDA0002577472760000093
Namely, it is
Figure BDA0002577472760000094
As a first functional relationship between the height of the foot and the first scale factor for the virtual character within the preset time. Wherein f (x) represents the foot height, x represents time, h represents the foot height of the virtual character foot at time t, and g represents the first scale coefficient. Is the ratio of the first gravitational acceleration to the initial gravitational acceleration in the above-mentioned specific gravity relationship. Wherein 21 in fig. 2 represents the curve when g takes 1, 22 in fig. 1.5 and 23 in fig. 2.
It should be noted that, in the real-time manner of this example, when the first functional relationship is established, the selected concave function may satisfy the time 0 and the time t, and the heights are only 0 and h, respectively.
In this exemplary embodiment, the value of the first scaling factor g may be 1.5, or may be other values such as 2, 2.3, and 3, which are not specifically limited in this exemplary embodiment.
In the present exemplary embodiment, a functional relationship between the height of the foot and the first gravitational acceleration of the virtual character in the preset time when the first scale factor is greater than 1 and the running direction is the falling direction can be established
Referring to fig. 3, a curve 31 is an initial motion parameter under an initial gravitational acceleration, and the obtained preset parameters may include that the foot height is h at time 0 and is raised to the highest point 0 at time t.
Referring to fig. 3, when the foot falls, the height of the foot is h at time 0 and falls to the lowest position 0 at time t, wherein the heights at 0 and t are the same under different gravity parameters, and the difference between 0 and t is different from the initial action, first, a convex function with the heights h and 0 can be determined to realize that the change of the height of the foot between 0 and t is slow first and fast second when the change meets the requirements of 0 and t, and then, the convex function can embody heavy walking, for example, the function is heavy
Figure BDA0002577472760000101
Namely, it is
Figure BDA0002577472760000102
Because the selected curves also represent different degrees of difference in gravity increase, g can be used to represent the first scale factor, i.e. the ratio of the current first gravitational acceleration to the initial gravitational acceleration. Therefore, a function can be established
Figure BDA0002577472760000103
Namely, it is
Figure BDA0002577472760000104
As a second function between the height of the foot and the first scaling factor for the virtual character within a predetermined timeAnd (4) relationship. Wherein f (x) represents the foot height, x represents time, h represents the foot height of the virtual character foot at time t, and g represents the first scale coefficient. Is the ratio of the first gravitational acceleration to the initial gravitational acceleration in the above-mentioned specific gravity relationship. Wherein 31 in fig. 3 represents the curve when g takes 1, 32 in fig. 3 represents the curve when g takes 1.5, and 33 in fig. 3 represents the curve when g takes 2.
It should be noted that, in the real-time manner of this example, when the second functional relationship is established, the selected convex function may satisfy the time 0 and the time t, and the heights are h and 0, respectively.
In this exemplary embodiment, the value of the first scaling factor g may be 1.5, or may be other values such as 2, 2.3, and 3, which are not specifically limited in this exemplary embodiment.
In an example embodiment of the present disclosure, when the first scale factor is smaller than 1, that is, the first gravitational acceleration is smaller than the functional relationship between the height of the foot and the first gravitational acceleration of the initial gravitational acceleration virtual character within the preset time may also be established. When the foot is raised, the height of the foot is made higher for each frame than the initial motion at the same time. When the foot is dropped, the height of the foot is made lower than the initial motion at the same time for each frame. That is, the speed of lifting and lowering the foot is changed from the constant speed change of the initial motion to the first speed and then the second speed, so that the walking lightness can be displayed.
In the present exemplary embodiment, referring to fig. 4, a curve 41 is an initial motion parameter under an initial gravitational acceleration, and the acquired preset parameters may include that the foot height is 0 at time 0 and is raised to a maximum height h at time t. When the foot part is lifted, the height of the foot part is 0 at the moment 0 and is lifted to the highest position h at the moment t, wherein the heights at the moment 0 and the moment t are the same under different gravity parameters, and the difference is between the moment 0 and the moment t from the initial action, firstly, a convex function which meets the moment 0 and the moment t and has the heights of 0 and h can be firstly determined to realize the momentThe change of the foot height between 0 and t is fast first and then slow, and at the moment, the walking lightness can be embodied by adopting a convex function, such as a function
Figure BDA0002577472760000111
Namely, it is
Figure BDA0002577472760000112
A function. Similarly, because the selected curves also represent different degrees of gravity increase, g can be used to represent the first scale factor, i.e. the ratio of the current first gravitational acceleration to the initial gravitational acceleration. Therefore, a function can be established
Figure BDA0002577472760000113
Namely, it is
Figure BDA0002577472760000114
As a third functional relationship between the height of the foot and the first scale factor within the preset time of the virtual character. Wherein f (x) represents the foot height, x represents time, h represents the foot height of the virtual character foot at time t, and g represents the first scale coefficient. Is the ratio of the first gravitational acceleration to the initial gravitational acceleration in the above-mentioned specific gravity relationship. In which 41 in fig. 4 represents the curve when g takes 1, 42 in fig. 4 represents the curve when g takes 0.75, and 43 in fig. 4 represents the curve when g takes 0.5.
It should be noted that, in the real-time manner of this example, when the third functional relationship is established, the selected convex function may satisfy the time 0 and the time t, and the heights are only 0 and h, respectively.
In the present exemplary embodiment, referring to fig. 5, a curve 51 is an initial motion parameter under an initial gravitational acceleration, and the acquired preset parameters may include that the foot height is h at time 0, and the foot height is raised to 0 at time t.
When the foot falls, the foot height is h at time 0 and falls to the lowest 0 at time t, wherein the foot does not fallUnder the same gravity parameter, the heights at 0 and t are the same, and the heights between 0 and t are different from the initial action, firstly, a concave function with the heights h and 0 can be determined to realize that the change of the height of the foot between 0 and t is fast before slow when the height of the foot meets the requirements of 0 and t, and at the moment, the concave function can embody walking lightness, for example, the function
Figure BDA0002577472760000121
Figure BDA0002577472760000122
Because the selected curves also represent different degrees of difference in gravity increase, g can be used to represent the first scale factor, i.e. the ratio of the current first gravitational acceleration to the initial gravitational acceleration. Therefore, a function can be established
Figure BDA0002577472760000123
As a fourth functional relationship between the height of the foot and the first scale factor within the preset time of the virtual character. Wherein f (x) represents the foot height, x represents time, h represents the foot height of the virtual character foot at time t, and g represents the first scale coefficient. Is the ratio of the first gravitational acceleration to the initial gravitational acceleration in the above-mentioned specific gravity relationship. Wherein 51 in fig. 5 represents the curve when g takes 1, 52 in fig. 5 represents the curve when g takes 0.75, and 53 in fig. 5 represents the curve when g takes 0.5.
It should be noted that, in the real-time manner of this example, when the fourth functional relationship is established, the selected concave function may satisfy the time 0 and the time t, and the heights are h and 0, respectively.
In the present exemplary embodiment, the value of the first scaling factor g may be 0.75, or may be other positive numbers such as 0.5, 0.2, 0.1, and is not particularly limited in the present exemplary embodiment.
In an exemplary embodiment of the present disclosure, the above-mentioned bone motion parameters are taken as examples of the bending direction and angle of the vertebra and skull when the virtual character walks, and in the exemplary embodiment, first, the functional relationship between the bending direction and angle of the vertebra and skull when the virtual character walks and the first gravitational acceleration may be set when the first scale factor is greater than 1.
The empty foot of the virtual character is first determined to determine the bending direction, i.e. the body of the character bends to the left when the right foot is lifted and bends to the right when the left foot is lifted. At the same time, the waist is also bent forward.
In the present exemplary embodiment, referring to FIG. 6, a fifth functional relationship between the bending angles of the second and third spinal segments 2, 3 when the right foot is raised and the first scaling factor is established, the second and third spinal segments 2, 3 additionally bend to the left upon initial motion relative to their parent bones, first and second segments 1, 2, respectively, the angle of bending depends on the current value of the reference gravity, and a fifth functional relationship α is established1The adjustment angle is calculated as a × (g-1.0), where g represents the first scale factor, a represents the bending angle factor, which may be a constant representing the angle, such as 10 degrees, and a may be customized according to the requirement, and the expression of the fifth functional relationship may include various types, i.e., the bending angle factor may not be used to calculate the bending angle, as long as the bending angles of the second and third vertebra segments 2 and 3 can be calculated, respectively, and is not limited in this exemplary embodiment.
In the present exemplary embodiment, a functional relationship between the bending angle of the skull and the first scale factor is established, the skull 4 bends to the right with respect to the third segment 3 of the vertebra, which is the parent bone, and a sixth functional relationship α is established2The adjustment angle is calculated as b × (g-1.0), where b represents a bending angle coefficient, and may be a constant value representing the angle, such as 20 degrees, and b may also be customized according to the requirement.
When the left foot is raised, the bending angles of the vertebra and skull are calculated the same, but the bending directions are exactly opposite. For this reason, no further description is provided herein.
Meanwhile, the second segment 2 and the third segment 3 of the vertebra are modified to be additionally bent forwards relative to the first segment 1 and the second segment 2 of the father bone respectively on the basis of the initial action so as to show the bending effect, the bending angle is determined according to the current value of the first gravitational acceleration, and a seventh functional relation α is established3The forward bending angle is calculated as c × (g-1.0), wherein c represents a bending angle coefficient, and may be a constant value representing the angle, such as 10 degrees, and c may be customized according to the requirement.
In an example embodiment of the present disclosure, the overall movement speed of the virtual character may be further adjusted, and when the first scale factor is greater than 1, the character animation playing speed and the character advancing speed need to be modified to be slower than the initial movement in a certain ratio. When the first scale factor is smaller than 1, the character animation playing speed and the character advancing speed need to be modified, and the first scale factor is faster than the initial action in a certain proportion.
Setting the ratio of the current gravity to the earth gravity as g, an eighth functional relationship can be established to calculate a speed coefficient to complete adjustment and control of the overall movement speed of the virtual character, wherein the eighth functional relationship is as follows:
Figure BDA0002577472760000141
wherein m is the minimum speed coefficient when the first proportional coefficient is more than 1, and m is more than 0 and less than 1.0. That is, the minimum value of the animation play speed and the forward speed of the character is m times of the speed at the initial gravitational acceleration regardless of the increase of the gravitational force.
n is the maximum speed coefficient when the first scale coefficient is less than 1, and satisfies 1.0 < n. That is, the overall movement speed of the character, i.e., the maximum value of the animation playback speed and the forward speed, is n times the speed at the initial gravitational acceleration regardless of the decrease in the gravitational force.
In step S130, a bone motion state in the target bone animation of the virtual character is controlled according to the first bone motion parameter.
In the present exemplary embodiment, the expression of the eighth functional relationship may include a plurality of expressions as long as the calculation of the speed coefficient can be completed, and is not particularly limited in the present exemplary embodiment.
In an example embodiment of the present disclosure, a moving direction of a step of the virtual character within a preset time may be first determined, and a height of the step of the virtual character within the preset time may be adjusted according to the first mapping relationship and the first proportional relationship.
In this exemplary embodiment, when the first scale factor is greater than 1 and the operation direction is raised, the foot height of the virtual character within the preset time may be adjusted by using a first functional relationship; when the first scale coefficient is larger than 1 and the running direction is falling, the foot height of the virtual character in the preset time can be adjusted by adopting a second functional relationship, and when the first scale coefficient is smaller than 1 and the running direction is rising, the foot height of the virtual character in the preset time can be adjusted by adopting a third functional relationship; when the first scale factor is smaller than 1 and the running direction is falling, the foot height of the virtual character in the preset time can be adjusted by adopting a fourth functional relation.
In the present exemplary embodiment, when the bone motion parameters include the bending direction and angle of the vertebra and skull when the virtual character is walking, the vertebra bending angle coefficient and skull bending angle coefficient, i.e., the values of a, b, and c described above, respectively, may be first determined by the body structure of the virtual character, and then the vacant foot of the virtual character, i.e., which foot of the virtual character is raised, may be determined.
When the right foot is raised, as shown in fig. 6, the second and third segments 2 and 3 of the vertebrae are additionally bent to the left relative to their parent bones, i.e., the first and second segments 1 and 2, respectively, upon initial motion. The bending angle depends on the current value of the reference gravity, and the bending angle can be calculated by adopting the fifth functional relationship. The skull 4 bends to the right with respect to the third segment 3 of the vertebra, which is the parent bone, and the bending angle can be calculated by using the above-mentioned sixth functional relationship.
When the left foot is raised, the vertebral second and third segments 2 and 3 are additionally bent to the right relative to their parent bones, i.e. the first and second segments 1 and 2, respectively, on the basis of the initial motion. The bending angle depends on the current value of the reference gravity, and the bending angle can be calculated by adopting the fifth functional relationship. The skull 4 bends to the left with respect to the third segment 3 of the vertebra, which is the parent bone, and the bending angle can be calculated by using the above-mentioned sixth functional relationship.
Meanwhile, the second and third segments 2 and 3 of the vertebra respectively bend forwards relative to the father bone, namely the first and second segments 1 and 2, on the basis of the initial action, and the specific bending angle can be calculated by adopting the seventh functional relationship.
In an exemplary embodiment of the present disclosure, when the first scale factor is 1 or more, it is that each step of the virtual character falls on the ground by the sole, and after stopping for a rest time, the next step is performed, so that the walking weight at the time of the increase of gravity can be expressed more realistically.
In the present exemplary embodiment, the rest time may be 0.05 seconds, or may be 0.02s, and h may also be, for example, 0.08s, 0.1s, or more, and is not particularly limited in the present exemplary embodiment.
In the present exemplary embodiment, referring to fig. 7 and 8, the present solution detects a first gravitational acceleration of the virtual environment in real time, and adjusts bone motion parameters of the virtual character, so that the motion state of the virtual character is more realistic, for example, when the first gravitational acceleration is greater than the initial gravitational acceleration, the motion state of the virtual character assumes a state of walking weight as shown in fig. 7, and when the first gravitational acceleration is less than the initial gravitational acceleration, the motion state of the virtual character assumes a state of walking light as shown in fig. 8. And different bone motion parameters do not need to be made manually, so that the waste of human resources is reduced.
In step S140, in response to the change of the first gravity parameter of the virtual character to the second gravity parameter, determining a second bone motion parameter of the virtual character according to the second gravity parameter.
In an example embodiment of the present disclosure, a change of a gravity parameter of a user is detected in real time, and when the gravity parameter of the virtual character changes from a first gravity parameter to a second gravity parameter, a second bone motion parameter of the virtual character is determined according to the second gravity parameter.
Specifically, a second proportionality coefficient between a second gravitational acceleration and an initial gravitational acceleration is calculated, wherein the initial gravitational acceleration is an average gravitational acceleration of the earth's surface.
In an example embodiment of the present disclosure, the initial gravitational acceleration is an average gravitational acceleration of the earth's surface, which may be defined as 9.8m/s2Can also be defined as 10m/s2The present exemplary embodiment is not particularly limited. And calculating a second proportionality coefficient of the second gravity acceleration and the initial gravity acceleration.
In an example embodiment of the present disclosure, the second skeletal motion parameter may include at least one of a height of a foot of the virtual character within a preset time, a bending direction and angle of a vertebra and a skull of the virtual character while walking, and a speed of overall motion of the virtual character.
In an example embodiment of the present disclosure, an initial motion parameter of the virtual character under the initial gravitational acceleration may be first obtained, and a preset parameter may be obtained according to the initial motion parameter, and then a functional relationship between the bone motion parameter and the proportional relationship may be established according to the preset parameter.
In the present exemplary embodiment, the virtual character may be taken as an example, the moving direction of the foot of the virtual character within a preset time may be determined first, and the moving direction may be a lifting or a dropping.
In the present exemplary embodiment, when the foot of the virtual character is raised, the functional relationship between the bone motion parameter and the second gravitational acceleration may be established according to the second scale factor. And respectively establishing a functional relation between the bone motion parameter and the second gravitational acceleration when the second proportionality coefficient is greater than 1, the running direction is raised, the second proportionality coefficient is greater than 1, the running direction is fallen, the second proportionality coefficient is less than 1, the running direction is raised, the second proportionality coefficient is less than 1, and the running direction is fallen.
In an exemplary embodiment of the present disclosure, a functional relationship between the height of the foot and the second gravitational acceleration of the virtual character within the preset time when the second proportionality coefficient is greater than 1, that is, the second gravitational acceleration is greater than the initial gravitational acceleration, may be first established, and when the second proportionality coefficient is greater than 1, the height of the foot of each frame is lower than the height of the foot of the initial motion at the same time when the foot is lifted. When the foot is dropped, the height of the foot is made higher than the initial motion at the same time for each frame. That is, the speed of lifting and lowering the feet is changed from the constant speed of the initial motion to the speed of the initial motion, so that the walking weight can be displayed.
Specifically, how to determine the second bone motion parameter of the virtual character according to the second gravity parameter is the same as the step of determining the first bone motion parameter of the virtual character according to the first gravity parameter, and reference may be specifically made to step S120, which is not described herein again.
In step S150, controlling the bone motion morphology in the target bone animation of the virtual character according to the second bone motion parameter; wherein the first bone motion parameter is different from the second bone motion parameter.
In an example embodiment of the present disclosure, the moving direction of the steps of the virtual character within the preset time may be firstly determined, and the height of the feet of the virtual character within the preset time may be adjusted according to the second mapping relationship and the second proportional relationship.
In this exemplary embodiment, when the second scaling factor is greater than 1 and the moving direction is raised, the foot height of the virtual character within the preset time may be adjusted by using the functional relationship of the second gravity parameter corresponding to the first functional relationship; when the second proportionality coefficient is greater than 1 and the running direction is falling, the height of the foot of the virtual character in the preset time can be adjusted by adopting the functional relation of the second gravity parameter corresponding to the second functional relation, and when the second proportionality coefficient is less than 1 and the running direction is rising, the height of the foot of the virtual character in the preset time can be adjusted by adopting the functional relation of the second gravity parameter corresponding to the third functional relation; when the second proportionality coefficient is smaller than 1 and the running direction is falling, the height of the foot of the virtual character in the preset time can be adjusted by adopting the functional relationship of the second gravity parameter corresponding to the fourth functional relationship.
In the present exemplary embodiment, when the bone motion parameters include the bending direction and angle of the vertebra and skull when the virtual character is walking, the vertebra bending angle coefficient and skull bending angle coefficient, i.e., the values of a, b, and c described above, respectively, may be first determined by the body structure of the virtual character, and then the vacant foot of the virtual character, i.e., which foot of the virtual character is raised, may be determined.
When the right foot is raised, as shown in fig. 6, the second and third segments 2 and 3 of the vertebrae are additionally bent to the left relative to their parent bones, i.e., the first and second segments 1 and 2, respectively, upon initial motion. The bending angle is determined according to the current value of the reference gravity, and the bending angle can be calculated by adopting the functional relationship of the second gravity parameter corresponding to the fifth functional relationship. The skull 4 bends to the right with respect to the third segment 3 of the vertebra, which is the parent bone, and the bending angle can be calculated by using the function relationship of the second gravity parameter corresponding to the sixth function relationship.
When the left foot is raised, the vertebral second and third segments 2 and 3 are additionally bent to the right relative to their parent bones, i.e. the first and second segments 1 and 2, respectively, on the basis of the initial motion. The bending angle is determined according to the current value of the reference gravity, and the bending angle can be calculated by adopting the functional relationship of the second gravity parameter corresponding to the fifth functional relationship. The skull 4 bends to the left with respect to the third segment 3 of the vertebra, which is the parent bone, and the bending angle can be calculated by using the function relationship of the second gravity parameter corresponding to the sixth function relationship.
Meanwhile, the second and third segments 2 and 3 of the vertebra respectively bend forwards relative to the father bone, namely the first and second segments 1 and 2, on the basis of the initial action, and the specific bending angle can be calculated by adopting the function relation of the second gravity parameter corresponding to the seventh function relation.
In an exemplary embodiment of the present disclosure, when the first scale factor is 1 or more, it is that each step of the virtual character falls on the ground by the sole, and after stopping for a rest time, the next step is performed, so that the walking weight at the time of the increase of gravity can be expressed more realistically.
In the present exemplary embodiment, the rest time may be 0.05 seconds, or may be 0.02s, and h may also be, for example, 0.08s, 0.1s, or more, and is not particularly limited in the present exemplary embodiment.
In the present exemplary embodiment, referring to fig. 7 and 8, the present solution detects the second gravitational acceleration of the virtual environment in real time, and adjusts the bone motion parameters of the virtual character, so that the motion state of the virtual character is more realistic, for example, when the second gravitational acceleration is greater than the initial gravitational acceleration, the motion state of the virtual character assumes a state of walking weight as shown in fig. 7, and when the first gravitational acceleration is less than the initial gravitational acceleration, the motion state of the virtual character assumes a state of walking light as shown in fig. 8. And different bone motion parameters do not need to be made manually, so that the waste of human resources is reduced.
Embodiments of the apparatus of the present disclosure are described below, which may be used to implement the virtual character skeletal animation control methods of the present disclosure described above. In addition, in an exemplary embodiment of the present disclosure, a virtual character skeleton animation control device is also provided. Referring to fig. 9, the virtual character skeleton animation control device 900 includes: a parameter determination module 910, a first calculation module 920, a first adjustment module 930, a second calculation module 940, and a second adjustment module 950.
The parameter determining module 910 may be configured to determine a first gravity parameter of a virtual environment in which a virtual character is located; the first computing module 920 may be configured to determine a first bone motion parameter of the virtual character according to the first gravity parameter; the first adjustment module 930 may be configured to control a bone motion profile in a target bone animation of the virtual character according to the first bone motion parameter; the second computing module 940 may be configured to determine a second bone motion parameter of the virtual character according to the second gravity parameter in response to the change of the first gravity parameter of the virtual character into the second gravity parameter; a second adjustment module 950 can be used to control the skeletal motion profile in the target skeletal animation of the virtual character according to the second skeletal motion parameter; wherein the first bone motion parameter is different from the second bone motion parameter. .
For details which are not disclosed in the embodiments of the apparatus of the present disclosure, please refer to the embodiments of the virtual character skeleton animation control method of the present disclosure for the details which are not disclosed in the embodiments of the apparatus of the present disclosure.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
In addition, in an exemplary embodiment of the present disclosure, an electronic device capable of implementing the virtual character skeleton animation control method is also provided.
As will be appreciated by one skilled in the art, aspects of the present disclosure may be embodied as a system, method or program product. Accordingly, various aspects of the present disclosure may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" system.
An electronic device 1000 according to such an embodiment of the present disclosure is described below with reference to fig. 10. The electronic device 1000 shown in fig. 10 is only an example and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 10, the electronic device 1000 is embodied in the form of a general purpose computing device. The components of the electronic device 1000 may include, but are not limited to: the at least one processing unit 1010, the at least one memory unit 1020, a bus 1030 connecting different system components (including the memory unit 1020 and the processing unit 1010), and a display unit 1040.
Wherein the storage unit stores program code that is executable by the processing unit 1010 to cause the processing unit 1010 to perform steps according to various exemplary embodiments of the present disclosure described in the "exemplary methods" section above in this specification. For example, the processing unit 1010 may execute S110 shown in fig. 1, and determine a first gravity parameter of the virtual environment in which the virtual character is located; s120, determining a first bone motion parameter of the virtual character according to the first gravity parameter; s130, controlling the bone motion form in the target bone animation of the virtual character according to the first bone motion parameter; s140, responding to the change of the first gravity parameter of the virtual character into a second gravity parameter, and determining a second bone motion parameter of the virtual character according to the second gravity parameter; s150, controlling the bone motion form in the target bone animation of the virtual character according to the second bone motion parameter; wherein the first bone motion parameter is different from the second bone motion parameter.
As another example, the electronic device may implement the steps shown in FIG. 1.
The memory unit 1020 may include readable media in the form of volatile memory units, such as a random access memory unit (RAM)1021 and/or a cache memory unit 1022, and may further include a read-only memory unit (ROM) 1023.
Storage unit 1020 may also include a program/utility 1024 having a set (at least one) of program modules 1025, such program modules 1025 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 1030 may be any one or more of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, and a local bus using any of a variety of bus architectures.
The electronic device 1000 may also communicate with one or more external devices 1070 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device 1000, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 1000 to communicate with one or more other computing devices. Such communication may occur through input/output (I/O) interfaces 1050. Also, the electronic device 1000 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the internet) via the network adapter 1060. As shown, the network adapter 1060 communicates with the other modules of the electronic device 1000 over the bus 1030. It should be appreciated that although not shown, other hardware and/or software modules may be used in conjunction with the electronic device 1000, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
In an exemplary embodiment of the present disclosure, there is also provided a computer-readable storage medium having stored thereon a program product capable of implementing the above-described method of the present specification. In some possible embodiments, aspects of the present disclosure may also be implemented in the form of a program product comprising program code for causing a terminal device to perform the steps according to various exemplary embodiments of the present disclosure described in the "exemplary methods" section above of this specification, when the program product is run on the terminal device.
Referring to fig. 11, a program product 1100 for implementing the above method according to an embodiment of the present disclosure is described, which may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
A computer readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
Furthermore, the above-described figures are merely schematic illustrations of processes included in methods according to exemplary embodiments of the present disclosure, and are not intended to be limiting. It will be readily understood that the processes shown in the above figures are not intended to indicate or limit the chronological order of the processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, e.g., in multiple modules.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is to be limited only by the terms of the appended claims.

Claims (16)

1. A method for controlling a skeletal animation of a virtual character, comprising:
determining a first gravity parameter of a virtual environment in which a virtual character is located;
determining a first bone motion parameter of the virtual character according to the first gravity parameter;
controlling the bone motion state in the target bone animation of the virtual character according to the first bone motion parameter;
responding to the change of the first gravity parameter of the virtual character into a second gravity parameter, and determining a second bone motion parameter of the virtual character according to the second gravity parameter;
controlling the bone motion profile in the target bone animation of the virtual character according to the second bone motion parameter; wherein the first bone motion parameter is different from the second bone motion parameter.
2. The method of claim 1, wherein determining the first gravity parameter of the virtual environment in which the virtual character resides comprises:
acquiring a first gravity acceleration of a virtual environment where the virtual character is located; and are
Calculating a first proportional coefficient between the first gravity acceleration and the initial gravity acceleration as a first gravity parameter;
wherein the initial gravitational acceleration is an average gravitational acceleration of the earth's surface.
3. The method of claim 2, wherein determining a first bone motion parameter of the virtual character from the first gravity parameter comprises:
establishing a first mapping relationship between the first gravity parameter and a first bone motion parameter of the virtual character;
and determining a first bone motion parameter of the virtual character by utilizing the first mapping relation according to the first gravity parameter.
4. The method of claim 2, wherein establishing a mapping between the first gravity parameter and a first bone motion parameter of the virtual character comprises:
acquiring initial motion parameters of the virtual character under the initial gravitational acceleration;
acquiring preset parameters of the virtual character under a first gravity acceleration according to the initial motion parameters;
and establishing a functional relation between the first bone motion parameter and the proportionality coefficient according to preset parameters.
5. The method of claim 3, wherein responding to a change in the second gravity parameter of the virtual character to a second gravity parameter comprises:
acquiring a second gravity acceleration of the virtual environment where the virtual character is located; and are
Calculating a second proportionality coefficient between the second gravity acceleration and the initial gravity acceleration as a second gravity parameter;
wherein the initial gravitational acceleration is an average gravitational acceleration of the earth's surface.
6. The method of claim 5, wherein determining a second bone motion parameter of the virtual character from the second gravity parameter comprises:
establishing a second mapping relationship between the second gravity parameter and a second bone motion parameter of the virtual character;
and determining a second bone motion parameter of the virtual character by utilizing the second mapping relation according to the second gravity parameter.
7. The method of claim 5, wherein establishing a mapping between the second gravity parameter and a second bone motion parameter of the virtual character comprises:
acquiring initial motion parameters of the virtual character under the initial gravitational acceleration;
acquiring preset parameters of the virtual character under a second gravitational acceleration according to the initial motion parameters;
and establishing a functional relation between the second bone motion parameter and the proportionality coefficient according to preset parameters.
8. The method of claim 6, wherein the bone motion parameters include at least one of: the height of the foot of the virtual character in a preset time, and the bending direction and angle of the vertebra and the skull of the virtual character when walking.
9. The method of claim 8, wherein the bone motion parameters include a height of a foot of the virtual character within a preset time, and wherein controlling a bone motion profile in a target bone animation of the virtual character according to the first bone motion parameters comprises:
determining the motion direction of the foot of the virtual character within the preset time;
and adjusting the height of the foot of the virtual character within preset time by utilizing the first mapping relation according to the first gravity parameter and the motion direction.
10. The method of claim 8, wherein the bone motion parameters include a bending direction and an angle of a vertebra and a skull of the virtual character while walking, and wherein controlling a bone motion shape in a target bone animation of the virtual character according to the first bone motion parameters comprises:
respectively determining a vertebra bending angle coefficient and a skull bending angle coefficient according to the body structure of the virtual character;
determining the bending direction of the vertebra and the skull according to the empty foot of the virtual character during walking;
adjusting the bending angle of the vertebra relative to its parent bone according to the vertebra bending angle coefficient and the first mapping relation;
and adjusting the bending angle of the skull relative to the father bone according to the skull bending angle coefficient and the first mapping relation.
11. The method of claim 8, wherein the bone motion parameters comprise a foot height of the virtual character within a preset time, and wherein controlling the bone motion profile in the target bone animation of the virtual character according to the second bone motion parameters comprises:
determining the motion direction of the foot of the virtual character within the preset time;
and adjusting the foot height of the virtual character within preset time by utilizing the second mapping relation according to the second gravity parameter and the motion direction.
12. The method of claim 8, wherein the bone motion parameters include a bending direction and an angle of a vertebra and a skull of the virtual character while walking, and wherein controlling the bone motion profile in the target bone animation of the virtual character according to the second bone motion parameters comprises:
respectively determining a vertebra bending angle coefficient and a skull bending angle coefficient according to the body structure of the virtual character;
determining the bending direction of the vertebra and the skull according to the empty foot of the virtual character during walking;
adjusting the bending angle of the vertebra relative to the parent bone thereof according to the vertebra bending angle coefficient and the second mapping relation;
and adjusting the bending angle of the skull relative to the father bone according to the skull bending angle coefficient and the second mapping relation.
13. The method of claim 6, further comprising:
acquiring the initial movement speed of the virtual character under the initial gravitational acceleration;
when the first gravity parameter is larger than 1, increasing the overall movement speed of the virtual character according to the first mapping relation;
when the first gravity parameter is smaller than 1, reducing the overall movement speed according to the first mapping relation;
when the second gravity parameter is larger than 1, increasing the overall movement speed according to the second mapping relation;
and when the second gravity parameter is smaller than 1, reducing the overall movement speed according to the second mapping relation.
14. An apparatus for controlling a skeletal animation of a virtual character, comprising:
the parameter determining module is used for determining a first gravity parameter of a virtual environment where the virtual character is located;
the first calculation module is used for determining a first bone motion parameter of the virtual character according to the first gravity parameter;
a first adjusting module for controlling the bone motion state in the target bone animation of the virtual character according to the first bone motion parameter
The second calculation module is used for responding to the change of the first gravity parameter of the virtual character into a second gravity parameter and determining a second bone motion parameter of the virtual character according to the second gravity parameter;
a second adjustment module for controlling the bone motion profile in the target bone animation of the virtual character according to the second bone motion parameter; wherein the first bone motion parameter is different from the second bone motion parameter.
15. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out a virtual character skeletal animation control method according to any one of claims 1 to 13.
16. An electronic device, comprising:
a processor; and
memory storing one or more programs that, when executed by the one or more processors, cause the one or more processors to implement the virtual character skeletal animation control method of any of claims 1 to 13.
CN202010658048.7A 2020-07-09 2020-07-09 Virtual character skeleton animation control method and device, storage medium and electronic equipment Active CN111784809B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010658048.7A CN111784809B (en) 2020-07-09 2020-07-09 Virtual character skeleton animation control method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010658048.7A CN111784809B (en) 2020-07-09 2020-07-09 Virtual character skeleton animation control method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN111784809A true CN111784809A (en) 2020-10-16
CN111784809B CN111784809B (en) 2023-07-28

Family

ID=72758499

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010658048.7A Active CN111784809B (en) 2020-07-09 2020-07-09 Virtual character skeleton animation control method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN111784809B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114170354A (en) * 2021-11-03 2022-03-11 完美世界(北京)软件科技发展有限公司 Virtual character clothing manufacturing method, device, equipment, program and readable medium

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100182329A1 (en) * 2009-01-21 2010-07-22 Namco Bandai Games Inc. Information storage medium, skeleton motion control device, and skeleton motion control method
GB201305384D0 (en) * 2013-03-25 2013-05-08 Naturalmotion Ltd Animation of a virtual object
CN105551072A (en) * 2015-12-11 2016-05-04 网易(杭州)网络有限公司 Method and system for realizing local real-time movement of role model
CN106296778A (en) * 2016-07-29 2017-01-04 网易(杭州)网络有限公司 Virtual objects motion control method and device
CN107608993A (en) * 2016-07-12 2018-01-19 腾讯科技(深圳)有限公司 The method and apparatus of web animation generation
CN109550250A (en) * 2018-11-16 2019-04-02 网易(杭州)网络有限公司 Virtual objects skeleton data processing method and processing device, storage medium, electronic equipment
CN109885163A (en) * 2019-02-18 2019-06-14 广州卓远虚拟现实科技有限公司 A kind of more people's interactive cooperation method and systems of virtual reality
CN110136232A (en) * 2019-05-16 2019-08-16 北京迈格威科技有限公司 Processing method, device, electronic equipment and the storage medium of Skeletal Skinned Animation
CN111161427A (en) * 2019-12-04 2020-05-15 北京代码乾坤科技有限公司 Self-adaptive adjustment method and device of virtual skeleton model and electronic device
CN111223170A (en) * 2020-01-07 2020-06-02 腾讯科技(深圳)有限公司 Animation generation method and device, electronic equipment and storage medium
CN111369647A (en) * 2020-03-16 2020-07-03 网易(杭州)网络有限公司 Information processing method and device, computer storage medium and electronic equipment

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100182329A1 (en) * 2009-01-21 2010-07-22 Namco Bandai Games Inc. Information storage medium, skeleton motion control device, and skeleton motion control method
GB201305384D0 (en) * 2013-03-25 2013-05-08 Naturalmotion Ltd Animation of a virtual object
CN105551072A (en) * 2015-12-11 2016-05-04 网易(杭州)网络有限公司 Method and system for realizing local real-time movement of role model
CN107608993A (en) * 2016-07-12 2018-01-19 腾讯科技(深圳)有限公司 The method and apparatus of web animation generation
CN106296778A (en) * 2016-07-29 2017-01-04 网易(杭州)网络有限公司 Virtual objects motion control method and device
CN109550250A (en) * 2018-11-16 2019-04-02 网易(杭州)网络有限公司 Virtual objects skeleton data processing method and processing device, storage medium, electronic equipment
CN109885163A (en) * 2019-02-18 2019-06-14 广州卓远虚拟现实科技有限公司 A kind of more people's interactive cooperation method and systems of virtual reality
CN110136232A (en) * 2019-05-16 2019-08-16 北京迈格威科技有限公司 Processing method, device, electronic equipment and the storage medium of Skeletal Skinned Animation
CN111161427A (en) * 2019-12-04 2020-05-15 北京代码乾坤科技有限公司 Self-adaptive adjustment method and device of virtual skeleton model and electronic device
CN111223170A (en) * 2020-01-07 2020-06-02 腾讯科技(深圳)有限公司 Animation generation method and device, electronic equipment and storage medium
CN111369647A (en) * 2020-03-16 2020-07-03 网易(杭州)网络有限公司 Information processing method and device, computer storage medium and electronic equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114170354A (en) * 2021-11-03 2022-03-11 完美世界(北京)软件科技发展有限公司 Virtual character clothing manufacturing method, device, equipment, program and readable medium
CN114170354B (en) * 2021-11-03 2022-08-26 完美世界(北京)软件科技发展有限公司 Virtual character clothing manufacturing method, device, equipment, program and readable medium

Also Published As

Publication number Publication date
CN111784809B (en) 2023-07-28

Similar Documents

Publication Publication Date Title
CN109550250B (en) Virtual object skeleton data processing method and device, storage medium and electronic equipment
AU2019291869B2 (en) Multi-sync ensemble model for device localization
CN111773709B (en) Scene map generation method and device, computer storage medium and electronic equipment
CN113658309B (en) Three-dimensional reconstruction method, device, equipment and storage medium
CN112819971B (en) Method, device, equipment and medium for generating virtual image
CN107204044B (en) Picture display method based on virtual reality and related equipment
CN110288688B (en) Virtual vegetation rendering method and device, storage medium and electronic equipment
KR20140105609A (en) Online gaming
CN109697689A (en) Storage medium, electronic equipment, image synthesizing method and device
US10656783B2 (en) Variable height terrain surface
CN113240778A (en) Virtual image generation method and device, electronic equipment and storage medium
CN115131476A (en) Bone binding migration method, device, equipment and storage medium of virtual object
CN111784809B (en) Virtual character skeleton animation control method and device, storage medium and electronic equipment
CN114677572B (en) Object description parameter generation method and deep learning model training method
CN112016678A (en) Training method and device for strategy generation network for reinforcement learning and electronic equipment
CN114747200A (en) Click-to-lock zoom camera user interface
CN108290071B (en) Media, apparatus, system, and method for determining resource allocation for performing rendering with prediction of player&#39;s intention
US9104980B2 (en) Information processing device, information processing method, and program
CN110152295B (en) Virtual object control method and device, storage medium and electronic equipment
CN111833391A (en) Method and device for estimating image depth information
US20230081128A1 (en) Picture quality-sensitive semantic segmentation for use in training image generation adversarial networks
CN112473138B (en) Game display control method and device, readable storage medium and electronic equipment
US11478707B2 (en) Gap jumping simulation of stretchable character in computer game
CN114245907A (en) Auto-exposure ray tracing
CN108499102B (en) Information interface display method and device, storage medium and electronic equipment

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