CN111784809B - 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
CN111784809B
CN111784809B CN202010658048.7A CN202010658048A CN111784809B CN 111784809 B CN111784809 B CN 111784809B CN 202010658048 A CN202010658048 A CN 202010658048A CN 111784809 B CN111784809 B CN 111784809B
Authority
CN
China
Prior art keywords
parameter
virtual character
skeletal
gravity
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.)
Active
Application number
CN202010658048.7A
Other languages
Chinese (zh)
Other versions
CN111784809A (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

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 apparatus for controlling skeletal animation of a virtual character, a computer readable storage medium, and an electronic device, where the method includes: determining a first gravity parameter of a virtual environment where a virtual character is located; determining a first skeletal motion parameter of the virtual character according to the first gravity parameter; controlling a skeletal motion state in a target skeletal animation of the virtual character according to the first skeletal motion parameter; responding to the change of the first gravity parameter of the virtual character to a second gravity parameter, and determining a second skeleton movement parameter of the virtual character according to the second gravity parameter; controlling the skeleton movement form in the target skeleton animation of the virtual character according to the second skeleton movement parameter; wherein the first bone movement parameter is different from the second bone movement parameter. The technical scheme of the embodiment of the disclosure overcomes the defects of more wasted manpower 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 virtual character skeleton animation control method and apparatus, a computer readable storage medium, and an electronic device.
Background
When the gravity of the scene environment is different from that on the earth, the action of the character needs to be represented differently from that on the earth in order to render a more realistic character.
In the prior art, a plurality of sets of actions are manufactured manually in advance to adapt to different environments, when the gravitational field is more, a lot of workload is increased, more manpower resources are wasted, meanwhile, due to the fact that the manufacturing is needed in advance, when a new environment is met, the manufacturing is needed again, and the response is slow.
It is therefore necessary to devise a new virtual character skeletal animation control method.
It should be noted that the information disclosed in the above background section is only for enhancing 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 aims to provide a virtual character skeleton animation control method and apparatus, a computer readable storage medium and an electronic device, so as to overcome the disadvantages of more wasted human resources and slower response in the prior art at least to a certain extent.
Other features and advantages of the present disclosure will be apparent from the following detailed description, or may be learned in part by the practice of the disclosure.
According to a first aspect of the present disclosure, there is provided a virtual character skeletal animation control method, including:
determining a first gravity parameter of a virtual environment where a virtual character is located;
determining a first skeletal motion parameter of the virtual character according to the first gravity parameter;
controlling skeleton movement morphology in a target skeleton animation of the virtual character according to the first skeleton movement parameter;
responding to the change of the first gravity parameter of the virtual character to a second gravity parameter, and determining a second skeleton movement parameter of the virtual character according to the second gravity parameter;
controlling the skeletal motion morphology in the target skeletal animation of the virtual character according to the second skeletal motion parameter; wherein the first bone movement parameter is different from the second bone movement 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 is combined with
Calculating a first proportional coefficient between the first gravitational acceleration and the initial gravitational acceleration as a first gravitational 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 skeletal motion parameter of the virtual character from the first gravitational parameter includes:
establishing a first mapping relation between the first gravity parameter and a first skeleton motion parameter of the virtual character;
and determining a first skeleton motion parameter of the virtual character according to the first gravity parameter by utilizing the first mapping relation.
In an exemplary embodiment of the present disclosure, establishing a mapping relationship between the first gravity parameter and a first skeletal motion parameter of the virtual character includes:
acquiring initial motion parameters of the virtual character under initial gravitational acceleration;
acquiring preset parameters of the virtual character under the 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 a preset parameter.
In one exemplary embodiment of the present disclosure, the changing of the second gravity parameter in response to the virtual character to the second gravity parameter includes:
acquiring a second gravitational acceleration of a virtual environment where the virtual character is located; and is combined with
Calculating a second proportionality coefficient between the second gravitational acceleration and the initial gravitational acceleration as a second gravitational 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 skeletal motion parameter of the virtual character from the second gravity parameter includes:
establishing a second mapping relation between the second gravity parameter and a second skeleton motion parameter of the virtual character;
and determining a second skeleton movement parameter of the virtual character according to the second gravity parameter by utilizing the second mapping relation.
In an exemplary embodiment of the present disclosure, establishing a mapping relationship between the second gravity parameter and a second skeletal motion parameter of the virtual character includes:
acquiring initial motion parameters of the virtual character under initial gravitational acceleration;
acquiring preset parameters of the virtual character under the 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 a preset parameter.
In an exemplary embodiment of the present disclosure, the bone motion parameters include at least one of the following: the virtual character has foot height, and the bending direction and angle of the vertebra and the skull when walking in preset time.
In an exemplary embodiment of the present disclosure, the skeletal motion parameters include a foot height of the virtual character for a preset time, and controlling a skeletal motion morphology in a target skeletal animation of the virtual character according to the first skeletal motion parameters includes:
determining the movement direction of the feet of the virtual character within the preset time;
and adjusting the height of the feet of the virtual character within a preset time by utilizing the first mapping relation according to the first gravity parameter and the movement direction.
In an exemplary embodiment of the present disclosure, the skeletal motion parameters include a bending direction and an angle of a vertebra and a skull of the virtual character while walking, and controlling a skeletal motion profile in a target skeletal animation of the virtual character according to the first skeletal 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 in the walking process;
adjusting the bending angle of the vertebra relative to the 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 parent bone according to the skull bending angle coefficient and the first mapping relation.
In an exemplary embodiment of the present disclosure, the skeletal motion parameters include a foot height of the virtual character for a preset time, and controlling the skeletal motion morphology in the target skeletal animation of the virtual character according to the second skeletal motion parameters includes:
determining the movement direction of the feet of the virtual character within the preset time;
and adjusting the height of the feet of the virtual character within the preset time by utilizing the second mapping relation according to the second gravity parameter and the movement direction.
In an exemplary embodiment of the present disclosure, the skeletal motion parameters include a bending direction and an angle of a vertebra and a skull of the virtual character while walking, and controlling the skeletal motion morphology in the target skeletal animation of the virtual character according to the second skeletal 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 in the walking process;
Adjusting the bending angle of the vertebra relative to the parent bone according to the vertebra bending angle coefficient and the second mapping relation;
and adjusting the bending angle of the skull relative to the parent 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 an initial movement speed of the virtual character under the initial gravitational acceleration;
when the first gravity parameter is greater 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 greater 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 whole movement speed according to the second mapping relation.
According to an aspect of the present disclosure, there is provided a virtual character skeletal animation control apparatus including:
the parameter determining module is used for determining a first gravity parameter of the virtual environment where the virtual character is located;
a first computing module for determining a first skeletal motion parameter of the virtual character based on the first gravitational parameter;
A first adjustment module for controlling the skeleton movement form in the target skeleton animation of the virtual character according to the first skeleton movement 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 skeleton movement parameter of the virtual character according to the second gravity parameter;
a second adjustment module for controlling the skeletal motion modality in the target skeletal animation of the virtual character according to the second skeletal motion parameter; wherein the first bone movement parameter is different from the second bone movement parameter.
According to one 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 the virtual character skeletal animation control method of any one of the above.
According to one aspect of the present disclosure, there is provided an electronic device including:
a processor; and
a memory for storing one or more programs that, when executed by the one or more processors, cause the one or more processors to implement the avatar skeletal animation control method of any one of the above.
The technical scheme provided by the embodiment of the disclosure can comprise the following beneficial effects:
in virtual character skeletal animation control provided by one embodiment of the present disclosure, the virtual character skeletal animation control is implemented by
Determining a first gravity parameter of a virtual environment where a virtual character is located; determining a first skeletal motion parameter of the virtual character according to the first gravity parameter; controlling a skeletal motion state in a target skeletal animation of the virtual character according to the first skeletal motion parameter; responding to the change of the first gravity parameter of the virtual character to a second gravity parameter, and determining a second skeleton movement parameter of the virtual character according to the second gravity parameter; controlling the skeleton movement form in the target skeleton animation of the virtual character according to the second skeleton movement parameter; wherein the first bone movement parameter is different from the second bone movement parameter. Compared with the prior art, on one hand, the skeleton movement parameters can be adjusted according to the gravity parameters, the advanced manufacturing is not needed, and the quick response can be realized when a new gravity environment is met; on the other hand, the human body movement parameters are not required to be manufactured artificially, the waste of human resources is reduced, and meanwhile, 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 disclosure and together with the description, serve to explain the principles of the disclosure. It will be apparent to those of ordinary skill in the art that the drawings in the following description are merely examples of the disclosure and that other drawings may be derived from them without undue effort. In the drawings:
FIG. 1 schematically illustrates a flow chart of a virtual character skeletal animation control method in an exemplary embodiment of the present disclosure;
FIG. 2 schematically illustrates a graph of foot height versus time with a first scale factor greater than 1 and a foot motion being raised in an exemplary embodiment of the present disclosure;
FIG. 3 schematically illustrates a graph of foot height versus time with a first scale factor greater than 1 and a foot motion being dropped in an exemplary embodiment of the present disclosure;
FIG. 4 schematically illustrates a graph of foot height versus time with a first scale factor of less than 1 and a foot motion being raised in an exemplary embodiment of the present disclosure;
FIG. 5 schematically illustrates a graph of foot height versus time with a first scale factor of less than 1 and a foot motion being dropped in an exemplary embodiment of the present disclosure;
Fig. 6 schematically illustrates a bending structural view of a vertebra and a skull when a virtual character moves in an exemplary embodiment of the present disclosure;
fig. 7 schematically illustrates a motion structure diagram of a virtual character when a first scale factor is greater than 1 in an exemplary embodiment of the present disclosure;
fig. 8 schematically illustrates a motion structure diagram of a virtual character when a first scale factor is less than 1 in an exemplary embodiment of the present disclosure;
FIG. 9 schematically illustrates a composition diagram of a virtual character skeletal animation control device in an exemplary embodiment of the present disclosure;
FIG. 10 schematically illustrates a structural schematic diagram of a computer system suitable for use in implementing the electronic device of the exemplary embodiments 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. However, the exemplary embodiments may be embodied in many 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 the 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 a repetitive description thereof 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 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 provided a virtual character skeletal animation control method, which may include the steps of, with reference to fig. 1:
s110, determining a first gravity parameter of a virtual environment where a virtual character is located;
s120, determining a first skeleton movement parameter of the virtual character according to the first gravity parameter;
s130, controlling skeleton movement forms in target skeleton animation of the virtual character according to the first skeleton movement parameters;
s140, responding to the change of the first gravity parameter of the virtual character to a second gravity parameter, and determining a second skeleton movement parameter of the virtual character according to the second gravity parameter;
S150, controlling the bone movement morphology in the target bone animation of the virtual character according to the second bone movement parameter; wherein the first bone movement parameter is different from the second bone movement parameter.
According to the virtual character skeleton animation control method provided by the exemplary embodiment, compared with the prior art, on one hand, skeleton motion parameters can be adjusted according to gravity parameters, advanced production is not needed, and quick response can be realized when a new gravity environment is met; on the other hand, the human body movement parameters are not required to be manufactured artificially, the waste of human resources is reduced, and meanwhile, errors caused by human errors can be reduced.
Hereinafter, each step of the virtual character skeleton animation control method in the present exemplary embodiment will be described in more detail with reference to the accompanying drawings and embodiments.
Step S110, determining a first gravity parameter of a virtual environment where 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 an animation, wherein 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 this example embodiment, after the acquisition of the first gravitational acceleration is completed, a first ratio coefficient between the first gravitational acceleration and an initial gravitational acceleration, which is an average gravitational acceleration of the earth's surface, may be calculated.
In one example embodiment of the present disclosure, the initial gravitational acceleration is the average gravitational acceleration of the earth's surface, which may be defined as 9.8m/s 2 Can also be defined as 10m/s 2 The present exemplary embodiment is not particularly limited. And calculating a first proportional coefficient of the first gravitational acceleration and the initial gravitational acceleration.
And step S120, determining a first skeleton movement parameter of the virtual character according to the first gravity parameter.
In one example embodiment of the present disclosure, the first skeletal motion parameter may include at least one of a foot height of the avatar during a preset time, a bending direction and angle of the vertebra and the skull of the avatar while walking, and an overall motion speed of the avatar.
In an example embodiment of the present disclosure, initial motion parameters of a virtual character under initial gravitational acceleration may be first obtained, and preset parameters may be obtained according to the initial motion parameters, so as to establish a functional relationship between the skeletal motion parameters and the proportional relationship according to the preset parameters.
In this exemplary embodiment, the above-described virtual character may be taken as an example, and a movement direction of the foot of the virtual character may be determined first within a preset time, and the movement direction may be raised or lowered.
In this example embodiment, when the foot of the avatar is lifted, a functional relationship between the skeletal motion parameter and the first gravitational acceleration may be established according to the first scale factor described above. And respectively establishing a functional relation between the bone movement parameter and the first gravity acceleration when the first proportional coefficient is larger than 1 and the running direction is lifting, the first proportional coefficient is larger than 1 and the running direction is falling, the first proportional coefficient is smaller than 1 and the running direction is lifting, and the first proportional coefficient is smaller than 1 and the running direction is falling.
In an example embodiment of the present disclosure, when the first scale coefficient is greater than 1, that is, the first gravitational acceleration is greater than the functional relationship between the height of the foot and the first gravitational acceleration in the preset time of the virtual character with the initial gravitational acceleration, when the first scale coefficient is greater than 1, the height of the foot of each frame is made to be lower than the initial motion at the same time when the foot is lifted. When the foot falls, the height of the foot of each frame is higher than that of the initial motion at the same time. That is, the speed of lifting and falling feet is changed from the constant speed of the initial motion to the slow speed and then the fast speed, so that the walking weight can be displayed.
In this exemplary embodiment, referring to fig. 2, a curve 21 is an initial motion parameter under an initial gravitational acceleration, and the acquired preset parameter may include a foot height of 0 at a time 0 and a height of h raised to a highest position at a 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 height is lifted to the highest position h at time t, wherein the heights at 0 and t are the same under different gravity parameters, and between time 0 and t, different from the initial action, firstly, a concave function satisfying the heights 0 and t at time 0 and h can be determined firstly to realize that the change of the height of the foot between time 0 and t is slow and fast, and the walking weight can be embodied by adopting the concave function, such as the functionI.e. < ->However, since the selected curve also shows a difference in the degree of increase of gravity, g may be used to represent the first ratio coefficient, that is, the ratio of the current first gravitational acceleration to the initial gravitational acceleration. Therefore, a function can be established +.>I.e. < ->As a first functional relationship between the foot height and the first scaling factor for a pre-set time for the avatar. Where f (x) denotes the foot height, x denotes the time, h denotes the foot height of the virtual character foot at time t, and g denotes the first scale factor. The specific gravity relationship is the ratio of the first gravitational acceleration to the initial gravitational acceleration. Wherein 21 in FIG. 2 represents the graph when g is taken as 1, 22 in the graph represents the graph when g is taken as 1.5, and 23 in the graph represents the graph when g is taken as 2.
In 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 0 and h, which are not specifically limited in this example embodiment, that is, the first functional relationship may have different expression forms, which is not specifically limited in this example embodiment.
In the present exemplary embodiment, the value of the first ratio coefficient g may be 1.5, or may be another value such as 2, 2.3, or 3, which is not specifically limited in the present exemplary embodiment.
In this exemplary embodiment, a functional relationship between the foot height and the first gravitational acceleration of the character under the condition that the first proportional coefficient is greater than 1 and the running direction is falling within a preset time may be established
Referring to fig. 3, a curve 31 is an initial motion parameter under an initial gravitational acceleration, and the acquired preset parameters may include a foot height h at a time 0 and a foot height raised to a highest position 0 at a 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 time 0 and t are the same under different gravity parameters, and the difference between time 0 and t is different from the initial action, firstly, a convex function meeting the conditions of time 0 and t and having the heights of h and 0 can be firstly determined to realize that the change of the foot height between time 0 and t is firstly slow and then fast, and the walking weight can be embodied by adopting the convex function at the moment, such as a function I.e.Because the curves selected also exhibit different degrees of gravity increase, g may be used to represent the first scaling factor, i.e., the ratio of the current first gravitational acceleration to the initial gravitational acceleration. Therefore, a function can be established +.>I.e. < ->As a second functional relationship between the foot height and the first scale factor for a preset time period for the avatar. Where f (x) denotes the foot height, x denotes the time, h denotes the foot height of the virtual character foot at time t, and g denotes the first scale factor. The specific gravity relationship is the ratio of the first gravitational acceleration to the initial gravitational acceleration. Wherein 31 in fig. 3 represents a graph when g is taken as 1, 32 in fig. 3 represents a graph when g is taken as 1.5, and 33 in fig. 3 represents a graph when g is taken as 2.
In this example, when the second functional relationship is established, the selected convex functions may satisfy the time 0 and the time t, and the heights are h and 0, which are not specifically limited in this example embodiment, that is, the second functional relationship may have different expression forms, which is not specifically limited in this example embodiment.
In the present exemplary embodiment, the value of the first ratio coefficient g may be 1.5, or may be another value such as 2, 2.3, or 3, which is not specifically limited in the present exemplary embodiment.
In an example embodiment of the present disclosure, a functional relationship between the foot height and the first gravitational acceleration may also be established when the first scale factor is less than 1, i.e., the first gravitational acceleration is less than the initial gravitational acceleration virtual character for a preset time. When the foot is lifted, the height of the foot of each frame is made higher than the initial motion at the same time. When the foot falls, the height of the foot of each frame is lower than that of the initial motion at the same time. That is, the speed of lifting and falling feet is changed from the constant speed of the initial motion to the first speed and then the second speed, so that the walking is light.
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 parameter may include a foot height of 0 at a time 0 and a height of h raised to a highest position at a time t. When the foot is lifted, the height of the foot is 0 at the moment 0 and is lifted to the highest position h at the moment t, wherein under different gravity parameters, the heights at the moment 0 and the moment t are the same, and the difference from the initial action is different between the moment 0 and the moment t, firstly, a convex function meeting the moment 0 and the moment t and with the heights 0 and h can be firstly determined to realize the change of the height of the foot between the moment 0 and the moment t, and at the moment, the walking light can be embodied by adopting the convex function, such as a function I.e. < ->A function. Also, because the curves selected also exhibit different degrees of gravity increase, g may be used to represent the first scaling factor, i.e., the ratio of the current first gravitational acceleration to the initial gravitational acceleration. Therefore, a function can be establishedI.e. < ->As a third functional relationship between the foot height and the first scaling factor for a predetermined time period for the avatar. Where f (x) denotes the foot height, x denotes the time, h denotes the foot height of the virtual character foot at time t, and g denotes the first scale factor. The specific gravity relationship is the ratio of the first gravitational acceleration to the initial gravitational acceleration. Wherein 41 in fig. 4 represents a curve when g is taken as 1, 42 in fig. 4 represents a curve when g is taken as 0.75, and 43 in fig. 4 represents a curve when g is taken as 0.5.
In this example, when the third functional relationship is established, the selected convex functions may satisfy the time 0 and the time t, and the heights are 0 and h, which are not specifically limited in this example embodiment, that is, the third functional relationship may have different expression forms, which is not specifically limited in this example embodiment.
In this exemplary embodiment, referring to fig. 5, a curve 51 is an initial motion parameter under an initial gravitational acceleration, and the acquired preset parameter may include a foot height h at a time 0 and a foot height raised to a highest position 0 at a time t.
When the foot falls, the height of the foot is h at the moment 0 and falls to the lowest position 0 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 from the initial action is different between the moment 0 and the moment t, firstly, a concave function meeting the conditions of the moment 0 and the moment t and having the heights of h and 0 can be firstly determined to realize the speed of the change of the foot height between the moment 0 and the moment t, and at the moment, the light walking can be embodied by adopting the concave function, such as the function Because the selected curves also exhibit differences in the degree of increase in gravity, g may be used to represent the first scale factor, i.e., the current firstRatio of gravitational acceleration to initial gravitational acceleration. Therefore, a function can be established +.>As a fourth functional relationship between the foot height and the first scale factor for a preset time period for the avatar. Where f (x) denotes the foot height, x denotes the time, h denotes the foot height of the virtual character foot at time t, and g denotes the first scale factor. The specific gravity relationship is the ratio of the first gravitational acceleration to the initial gravitational acceleration. Wherein 51 in FIG. 5 represents a graph when g is taken as 1, 52 in FIG. 5 represents a graph when g is taken as 0.75, and 53 in FIG. 5 represents a graph when g is taken as 0.5.
In this example embodiment, the heights h and 0 are only required to be respectively set when the fourth functional relationship is established and the selected concave function can satisfy the time 0 and the time t, which is not specifically limited in this example embodiment, that is, the fourth functional relationship may have different expression forms, which is not specifically limited in this example embodiment.
In the present exemplary embodiment, the value of the first scaling factor g may be 0.75, or may be another positive number such as 0.5, 0.2, or 0.1, which is not specifically limited in the present exemplary embodiment.
In an exemplary embodiment of the present disclosure, taking the above bone movement parameters as an example, the bending direction and angle of the vertebra and the skull of the virtual character when walking are described in detail, the functional relationship between the bending direction and angle of the vertebra and the skull of the virtual character when walking and the first gravitational acceleration may be first described in this exemplary embodiment in which the first scale factor is greater than 1.
Firstly, the empty foot of the virtual character is determined so as to determine the bending direction, namely the body of the character bends leftwards when the right foot is lifted, and the body bends rightwards when the left foot is lifted. At the same time, the waist portion 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 vertebral members 2, 3 and the first ratio coefficient is established when the right foot is lifted, the second and third vertebral members 2, 3 3 are additionally bent to the left on the basis of the initial motion with respect to their parent bones, i.e. the first and second segments 1 and 2, respectively. The angle of the bending depends on the current reference gravity value, and a fifth functional relation alpha is established 1 The adjustment angle is calculated by =a× (g-1.0), where g represents the first scale factor, a represents the bending angle factor, and may be a constant representing the angle, such as 10 degrees, and a may be customized according to the requirement. The expression of the fifth functional relationship may include a plurality of modes, that is, the bending angle may be calculated without using the bending angle coefficient, as long as the bending angles of the second and third vertebral members 2 and 3 can be calculated, respectively, and is not particularly limited in this exemplary embodiment.
In the present exemplary embodiment, a functional relationship is established between the bending angle of the skull and the first proportionality coefficient, and the skull 4 bends rightward with respect to the third section 3 of the bone which is the parent bone thereof, and a sixth functional relationship α is established 2 The adjustment angle is calculated by =b× (g-1.0), where b represents a bending angle coefficient, which may be a constant representing the angle, such as 20 degrees, and b may be customized according to the requirement. The expression of the sixth functional relationship may include a plurality of expressions as long as the bending angle of the skull can be calculated, and is not particularly limited in the present exemplary embodiment.
When the left foot is lifted, the bending angles of the vertebra and the skull are calculated identically, but the bending directions are just opposite. As such, they are not described in detail herein.
At the same time, the second and third sections 2 and 3 of the vertebra are modified to be additionally bent forward on the basis of the initial motion with respect to the first and second sections 1 and 2 of the parent bone, respectively, to exhibit a bowing effect. The angle of the bending is determined according to the current value of the first gravitational acceleration, and a seventh functional relation alpha is established 3 The forward bend angle is calculated by =c× (g-1.0), where c represents the bend angle coefficient, which may be a constant representing the angle, e.g. 10 degrees, and c may be custom-defined as desired. The expression of the seventh functional relationship may include a plurality of expressions as long as the forward bending angles of the second and third sections 2 and 3 of the spinal vertebrae can be calculated, and is not particularly limited in the present exemplary embodiment.
In an exemplary embodiment of the present disclosure, the overall movement speed of the virtual character may be 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 motion by a certain proportion. When the first ratio coefficient is smaller than 1, the character animation playing speed and the character advancing speed need to be modified to be faster than the initial action by a certain ratio.
And setting the ratio of the current gravity to the earth gravity as g, and establishing an eighth functional relation to calculate a speed coefficient to finish adjusting and controlling the overall movement speed of the virtual character, wherein the eighth functional relation is as follows:
wherein m is the minimum speed coefficient when the first ratio coefficient is greater than 1, and satisfies 0 < m < 1.0. That is, the minimum value of the animation play speed and the forward speed of the character is m times the speed at the initial gravitational acceleration, no matter how much the gravitational force increases.
n is the maximum speed coefficient when the first scale coefficient is smaller than 1, and satisfies 1.0 < n. I.e. the overall movement speed of the character, i.e. the maximum of the animation play speed and the forward speed, is n times the speed at the initial gravitational acceleration, no matter how much the gravitational force is reduced.
In step S130, a skeletal motion shape in a target skeletal animation of the virtual character is controlled according to the first skeletal motion parameter.
In the present exemplary embodiment, the expression of the eighth functional relationship may include a plurality of types as long as the calculation of the velocity coefficient can be completed, and is not particularly limited in the present exemplary embodiment.
In an example embodiment of the present disclosure, a movement direction of a foot step of a virtual character within a preset time may be first confirmed, and a foot height of the virtual character within the preset time may be adjusted according to a first mapping relationship and a first proportional relationship.
In this example embodiment, when the first scale factor is greater than 1 and the running direction is raised, the foot height of the virtual character in the preset time may be adjusted by using a first functional relationship; when the first ratio 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 the second functional relation, and when the first ratio coefficient is smaller than 1 and the running direction is lifting, the foot height of the virtual character in the preset time can be adjusted by adopting the third functional relation; when the first proportional coefficient 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 skeletal motion parameters include the bending directions and angles of the vertebrae and the skull of the avatar while walking, it is possible to first determine the vertebral bending angle coefficient and the skull bending angle coefficient, i.e., the values of a, b, and c described above, respectively, by the body structure of the avatar, and then determine the foot of the avatar, i.e., which foot of the avatar is lifted.
When the right foot is lifted, referring to fig. 6, the second and third sections 2 and 3 of the vertebral bone are additionally bent to the left with respect to their parent bones, i.e., the first and second sections 1 and 2, respectively, on the basis of the initial motion. The bending angle depends on the current reference gravity value, and the bending angle can be calculated by using the fifth functional relation. The skull 4 is bent to the right with respect to its parent bone, the third section 3 of the vertebra, the bending angle being calculated using the sixth functional relation described above.
When the left foot is lifted, the second 2 and third 3 sections of the vertebra are additionally bent to the right on the basis of the initial movement with respect to their parent bones, i.e. the first 1 and second 2 sections, respectively. The bending angle depends on the current reference gravity value, and the bending angle can be calculated by using the fifth functional relation. The skull 4 is bent to the left with respect to its parent bone, the third section 3 of the vertebra, the bending angle being calculated using the sixth functional relation described above.
Meanwhile, the second and third sections 2 and 3 of the vertebra are bent forward relative to the parent bones, i.e., the first and second sections 1 and 2, respectively, based on the initial motion, and the specific bending angle can be calculated by using the seventh functional relation.
In an example embodiment of the present disclosure, the first scale factor of 1 or more is that each step of the virtual character is landed 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 in gravity can be more realistically represented.
In the present exemplary embodiment, the rest time may be 0.05 seconds, may be 0.02s, h may be, for example, 0.08s, 0.1s or more, and is not particularly limited in the present exemplary embodiment.
In this exemplary embodiment, referring to fig. 7 and 8, the present embodiment detects the first gravitational acceleration of the virtual environment in real time, and adjusts the skeletal 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 heavy walking state 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 light walking state as shown in fig. 8. And the human body does not need to make different skeleton movement parameters, thereby reducing the waste of human resources.
In step S140, in response to the change of the first gravity parameter of the virtual character to a second gravity parameter, a second skeletal motion parameter of the virtual character is determined from the second gravity parameter.
In one example embodiment of the present disclosure, a change in a user gravity parameter is detected in real time, and a second skeletal motion parameter of the virtual character is determined from the second gravity parameter when the gravity parameter of the virtual character is changed from the first gravity parameter 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 one example embodiment of the present disclosure, the initial gravitational acceleration is the average gravitational acceleration of the earth's surface, which may be defined as 9.8m/s 2 Can also be defined as 10m/s 2 The present exemplary embodiment is not particularly limited. And calculating a second proportionality coefficient of the second gravitational acceleration and the initial gravitational acceleration.
In one example embodiment of the present disclosure, the second skeletal motion parameter may include at least one of a foot height of the avatar during a preset time, a bending direction and angle of the vertebra and the skull of the avatar while walking, and an overall motion speed of the avatar.
In an example embodiment of the present disclosure, initial motion parameters of a virtual character under initial gravitational acceleration may be first obtained, and preset parameters may be obtained according to the initial motion parameters, so as to establish a functional relationship between the skeletal motion parameters and the proportional relationship according to the preset parameters.
In this exemplary embodiment, the above-described virtual character may be taken as an example, and a movement direction of the foot of the virtual character may be determined first within a preset time, and the movement direction may be raised or lowered.
In this example embodiment, when the foot of the avatar is lifted, a functional relationship between the skeletal motion parameter and the second gravitational acceleration may be established according to the second scaling factor described above. And respectively establishing a functional relation between the skeleton motion parameter and the second gravity acceleration when the second proportionality coefficient is larger than 1 and the running direction is lifting, the second proportionality coefficient is larger than 1 and the running direction is falling, the second proportionality coefficient is smaller than 1 and the running direction is lifting, and the second proportionality coefficient is smaller than 1 and the running direction is falling.
In an example embodiment of the present disclosure, when the second proportionality coefficient is greater than 1, that is, the second gravitational acceleration is greater than the functional relationship between the height of the foot and the second gravitational acceleration in the preset time of the virtual character, when the second proportionality coefficient is greater than 1, the height of the foot of each frame is made to be lower than the initial motion at the same time when the foot is lifted. When the foot falls, the height of the foot of each frame is higher than that of the initial motion at the same time. That is, the speed of lifting and falling feet is changed from the constant speed of the initial motion to the slow speed and then the fast speed, so that the walking weight can be displayed.
How to determine the second skeletal motion parameter of the virtual character according to the second gravity parameter is the same as the step of determining the first skeletal motion parameter of the virtual character according to the first gravity parameter, and the detailed description of step S120 will be omitted herein.
In step S150, controlling the skeletal motion morphology in the target skeletal animation of the virtual character according to the second skeletal motion parameter; wherein the first bone movement parameter is different from the second bone movement parameter.
In an example embodiment of the present disclosure, a movement direction of a step of a virtual character within a preset time may be first confirmed, and a height of a foot of the virtual character within the preset time may be adjusted according to a second mapping relationship and a second proportional relationship.
In this example embodiment, when the second scaling factor is greater than 1 and the running direction is raised, the foot height of the virtual character in the preset time may be adjusted by using a functional relationship of the second gravity parameter corresponding to the first functional relationship; when the second proportion coefficient is larger than 1 and the running direction is falling, the functional relation of the second gravity parameter corresponding to the second functional relation can be adopted to adjust the foot height of the virtual character in the preset time, and when the second proportion coefficient is smaller than 1 and the running direction is lifting, the functional relation of the second gravity parameter corresponding to the third functional relation can be adopted to adjust the foot height of the virtual character in the preset time; when the second proportionality coefficient is smaller than 1 and the running direction is falling, the functional relation of the second gravity parameter corresponding to the fourth functional relation can be adopted to adjust the foot height of the virtual character in the preset time.
In the present exemplary embodiment, when the skeletal motion parameters include the bending directions and angles of the vertebrae and the skull of the avatar while walking, it is possible to first determine the vertebral bending angle coefficient and the skull bending angle coefficient, i.e., the values of a, b, and c described above, respectively, by the body structure of the avatar, and then determine the foot of the avatar, i.e., which foot of the avatar is lifted.
When the right foot is lifted, referring to fig. 6, the second and third sections 2 and 3 of the vertebral bone are additionally bent to the left with respect to their parent bones, i.e., the first and second sections 1 and 2, respectively, on the basis of the initial motion. The bending angle is determined according to the current reference gravity value, and the bending angle can be calculated by adopting the functional relation of the second gravity parameter corresponding to the fifth functional relation. The skull 4 is bent to the right relative to its parent bone, i.e. the third section 3 of the vertebra, and the bending angle can be calculated by using the functional relation of the second gravitational parameter corresponding to the sixth functional relation.
When the left foot is lifted, the second 2 and third 3 sections of the vertebra are additionally bent to the right on the basis of the initial movement with respect to their parent bones, i.e. the first 1 and second 2 sections, respectively. The bending angle is determined according to the current reference gravity value, and the bending angle can be calculated by adopting the functional relation of the second gravity parameter corresponding to the fifth functional relation. The skull 4 is bent to the left relative to its parent bone, i.e. the third section 3 of the vertebra, and the bending angle can be calculated by using the functional relation of the second gravitational parameter corresponding to the sixth functional relation.
Meanwhile, the second section 2 and the third section 3 of the vertebra can bend forward relative to the father bones, namely the first section 1 and the second section 2, respectively, on the basis of initial actions, and the specific bending angle can be calculated by adopting the functional relation of the second gravity parameter corresponding to the seventh functional relation.
In an example embodiment of the present disclosure, the first scale factor of 1 or more is that each step of the virtual character is landed 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 in gravity can be more realistically represented.
In the present exemplary embodiment, the rest time may be 0.05 seconds, may be 0.02s, h may be, for example, 0.08s, 0.1s or more, and is not particularly limited in the present exemplary embodiment.
In this exemplary embodiment, referring to fig. 7 and 8, the present embodiment detects the second gravitational acceleration of the virtual environment in real time, and adjusts the skeletal 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 heavy walking 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 light walking as shown in fig. 8. And the human body does not need to make different skeleton movement parameters, thereby reducing the waste of human resources.
The following describes embodiments of the apparatus of the present disclosure that may be used to perform the virtual character skeletal animation control methods described above in the present disclosure. 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 skeletal animation control apparatus 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 the virtual character is located; the first calculation module 920 may be configured to determine a first skeletal motion parameter of the virtual character based on the first gravity parameter; the first adjustment module 930 may be configured to control a skeletal motion shape in a target skeletal animation of the virtual character according to the first skeletal motion parameter; a second calculation module 940 may be configured to determine a second skeletal motion parameter of the virtual character based on the second gravity parameter in response to the first gravity parameter of the virtual character changing to the second gravity parameter; a second adjustment module 950 may be used to control the skeletal motion morphology in the target skeletal animation of the virtual character in accordance with the second skeletal motion parameter; wherein the first bone movement parameter is different from the second bone movement parameter. .
Since each functional module of the avatar skeleton animation control device of the exemplary embodiment of the present disclosure corresponds to a step of the exemplary embodiment of the above-described avatar skeleton animation control method, for details not disclosed in the embodiment of the present disclosure, please refer to the embodiment of the above-described avatar skeleton animation control method of the present disclosure.
It should be noted that although in the above detailed description several modules or units of a 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 in accordance with embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into a plurality of modules or units to be embodied.
In addition, in the exemplary embodiment of the present disclosure, an electronic device capable of implementing the above-mentioned virtual character skeletal animation control method is also provided.
Those skilled in the art will appreciate that the various aspects of the present disclosure may be implemented as a system, method, or program product. Accordingly, various aspects of the disclosure may be embodied in the following forms, namely: an entirely hardware embodiment, an entirely software embodiment (including firmware, micro-code, etc.) or an embodiment combining hardware and software aspects may 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 merely an example and should not be construed as limiting the functionality and scope of use of the disclosed embodiments.
As shown in fig. 10, the electronic device 1000 is embodied in the form of a general purpose computing device. Components of 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 the various 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 such that the processing unit 1010 performs steps according to various exemplary embodiments of the present disclosure described in the above-described "exemplary methods" section of the present specification. For example, the processing unit 1010 may execute S110 shown in fig. 1 to determine a first gravity parameter of a virtual environment where the virtual character is located; s120, determining a first skeleton movement parameter of the virtual character according to the first gravity parameter; s130, controlling skeleton movement forms in target skeleton animation of the virtual character according to the first skeleton movement parameters; s140, responding to the change of the first gravity parameter of the virtual character to a second gravity parameter, and determining a second skeleton movement parameter of the virtual character according to the second gravity parameter; s150, controlling the bone movement morphology in the target bone animation of the virtual character according to the second bone movement parameter; wherein the first bone movement parameter is different from the second bone movement 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 Random Access Memory (RAM) 1021 and/or cache memory unit 1022, and may further include Read Only Memory (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 or some combination of which may include an implementation of a network environment.
Bus 1030 may be representing 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, or a local bus using any of a variety of bus architectures.
The electronic device 1000 can 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 device (e.g., router, modem, etc.) that enables the electronic device 1000 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 1050. Also, electronic device 1000 can communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet, through network adapter 1060. As shown, the network adapter 1060 communicates with 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 connection with the electronic device 1000, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
From the above description of embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or in combination with the necessary hardware. Thus, 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 (may be a CD-ROM, a U-disk, a mobile hard disk, etc.) or on a network, and includes several instructions to cause a computing device (may be a personal computer, a server, a terminal device, or a network device, etc.) to perform the method according to the embodiments of the present disclosure.
In an exemplary embodiment of the present disclosure, a computer-readable storage medium having stored thereon a program product capable of implementing the method described above in the present specification is also provided. In some possible embodiments, the various 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 carry out the steps according to the various exemplary embodiments of the disclosure as described in the "exemplary methods" section 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-described 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. The readable storage medium can be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable signal medium may include a data signal propagated in baseband or as part of a carrier wave with readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. 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 of 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, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, 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., connected via the Internet using an Internet service provider).
Furthermore, the above-described figures are only schematic illustrations of processes included in the method according to the exemplary embodiments of the present disclosure, and are not intended to be limiting. It will be readily appreciated that the processes shown in the above figures do not indicate or limit the temporal order of these processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, for example, among a plurality of 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 adaptations, uses, or adaptations of the disclosure following the general 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 is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (14)

1. A method for controlling skeletal animation of a virtual character, comprising:
Determining a first gravity parameter of a virtual environment where a virtual character is located;
determining a first skeletal motion parameter of the virtual character according to the first gravity parameter;
controlling skeleton movement morphology in a target skeleton animation of the virtual character according to the first skeleton movement parameter;
responding to the change of the first gravity parameter of the virtual character to a second gravity parameter, and determining a second skeleton movement parameter of the virtual character according to the second gravity parameter;
controlling the skeletal motion morphology in the target skeletal animation of the virtual character according to the second skeletal motion parameter; wherein the first bone movement parameter is different from the second bone movement parameter;
wherein said determining a first skeletal motion parameter of the virtual character from the first gravitational parameter comprises:
establishing a first mapping relation between the first gravity parameter and a first skeleton motion parameter of the virtual character;
determining a first skeleton motion parameter of the virtual character according to the first gravity parameter by utilizing the first mapping relation;
the skeletal motion parameters comprise the foot height of the virtual character in preset time, and the skeletal motion state in the target skeletal animation of the virtual character is controlled according to the first skeletal motion parameters, and the skeletal motion parameters comprise:
Determining the movement direction of the feet of the virtual character within the preset time;
and adjusting the height of the feet of the virtual character within a preset time by utilizing the first mapping relation according to the first gravity parameter and the movement direction.
2. The method of claim 1, wherein determining a first gravity parameter of a virtual environment in which the avatar is located comprises:
acquiring a first gravity acceleration of a virtual environment where the virtual character is located; and is combined with
Calculating a first proportional coefficient between the first gravitational acceleration and the initial gravitational acceleration as a first gravitational parameter;
wherein the initial gravitational acceleration is an average gravitational acceleration of the earth's surface.
3. The method of claim 2, wherein establishing a mapping between the first gravitational parameter and the first skeletal motion parameter of the virtual character comprises:
acquiring initial motion parameters of the virtual character under initial gravitational acceleration;
acquiring preset parameters of the virtual character under the 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 a preset parameter.
4. The method of claim 1, wherein changing the second gravity parameter to the second gravity parameter in response to the virtual character comprises:
acquiring a second gravitational acceleration of a virtual environment where the virtual character is located; and is combined with
Calculating a second proportionality coefficient between the second gravitational acceleration and the initial gravitational acceleration as a second gravitational parameter;
wherein the initial gravitational acceleration is an average gravitational acceleration of the earth's surface.
5. The method of claim 4, wherein determining a second skeletal motion parameter of the virtual character from the second gravitational parameter comprises:
establishing a second mapping relation between the second gravity parameter and a second skeleton motion parameter of the virtual character;
and determining a second skeleton movement parameter of the virtual character according to the second gravity parameter by utilizing the second mapping relation.
6. The method of claim 4, wherein establishing a mapping between the second gravitational parameter and a second skeletal motion parameter of the virtual character comprises:
acquiring initial motion parameters of the virtual character under initial gravitational acceleration;
acquiring preset parameters of the virtual character under the 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 a preset parameter.
7. The method of claim 5, wherein the bone movement parameters include at least one of the following: the virtual character has foot height, and the bending direction and angle of the vertebra and the skull when walking in preset time.
8. The method of claim 1, wherein the skeletal motion parameters include a bending direction and angle of a vertebra and a skull of the virtual character while walking, and controlling a skeletal motion profile in a target skeletal animation of the virtual character according to the first skeletal 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 in the walking process;
adjusting the bending angle of the vertebra relative to the 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 parent bone according to the skull bending angle coefficient and the first mapping relation.
9. The method of claim 5, wherein the skeletal motion parameters include foot height of the avatar for a preset time, and controlling the skeletal motion morphology in the target skeletal animation of the avatar in accordance with the second skeletal motion parameters comprises:
determining the movement direction of the feet of the virtual character within the preset time;
and adjusting the height of the feet of the virtual character within the preset time by utilizing the second mapping relation according to the second gravity parameter and the movement direction.
10. The method of claim 5, wherein the skeletal motion parameters include a bending direction and angle of a vertebra and a skull of the virtual character while walking, and controlling the skeletal motion profile in the target skeletal animation of the virtual character according to the second skeletal 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 in the walking process;
adjusting the bending angle of the vertebra relative to the parent bone according to the vertebra bending angle coefficient and the second mapping relation;
And adjusting the bending angle of the skull relative to the parent bone according to the skull bending angle coefficient and the second mapping relation.
11. The method of claim 5, wherein the method further comprises:
acquiring an initial movement speed of the virtual character under the initial gravitational acceleration;
when the first gravity parameter is greater 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 greater 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 whole movement speed according to the second mapping relation.
12. A virtual character skeletal animation control device, comprising:
the parameter determining module is used for determining a first gravity parameter of the virtual environment where the virtual character is located;
a first computing module for determining a first skeletal motion parameter of the virtual character based on the first gravitational parameter;
a first adjustment module for controlling the skeleton movement form in the target skeleton animation of the virtual character according to the first skeleton movement 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 skeleton movement parameter of the virtual character according to the second gravity parameter;
a second adjustment module for controlling the skeletal motion modality in the target skeletal animation of the virtual character according to the second skeletal motion parameter; wherein the first bone movement parameter is different from the second bone movement parameter;
wherein said determining a first skeletal motion parameter of the virtual character from the first gravitational parameter comprises:
establishing a first mapping relation between the first gravity parameter and a first skeleton motion parameter of the virtual character;
determining a first skeleton motion parameter of the virtual character according to the first gravity parameter by utilizing the first mapping relation;
the skeletal motion parameters comprise the foot height of the virtual character in preset time, and the skeletal motion state in the target skeletal animation of the virtual character is controlled according to the first skeletal motion parameters, and the skeletal motion parameters comprise:
determining the movement direction of the feet of the virtual character within the preset time;
and adjusting the height of the feet of the virtual character within a preset time by utilizing the first mapping relation according to the first gravity parameter and the movement direction.
13. A computer-readable storage medium, on which a computer program is stored, characterized in that the program, when executed by a processor, implements the virtual character skeletal animation control method according to any one of claims 1 to 11.
14. An electronic device, comprising:
a processor; and
a memory for 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 one of claims 1 to 11.
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 CN111784809A (en) 2020-10-16
CN111784809B true 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)

Families Citing this family (1)

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

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010170279A (en) * 2009-01-21 2010-08-05 Namco Bandai Games Inc Skeleton motion control system, program, and information storage medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Also Published As

Publication number Publication date
CN111784809A (en) 2020-10-16

Similar Documents

Publication Publication Date Title
US11468645B2 (en) Optimizing head mounted displays for augmented reality
CN109550250B (en) Virtual object skeleton data processing method and device, storage medium and electronic equipment
CN111773709B (en) Scene map generation method and device, computer storage medium and electronic equipment
CN111260764B (en) Method, device and storage medium for making animation
EP3117601B1 (en) Latency reduction in camera-projection systems
CN112819971B (en) Method, device, equipment and medium for generating virtual image
US11533468B2 (en) System and method for generating a mixed reality experience
CN110288688B (en) Virtual vegetation rendering method and device, storage medium and electronic equipment
US11800053B2 (en) Method, device and computer readable storage medium for video frame interpolation
CN111784809B (en) Virtual character skeleton animation control method and device, storage medium and electronic equipment
CN113289327A (en) Display control method and device of mobile terminal, storage medium and electronic equipment
CN115131476A (en) Bone binding migration method, device, equipment and storage medium of virtual object
CN112016678A (en) Training method and device for strategy generation network for reinforcement learning and electronic equipment
CN110930492A (en) Model rendering method and device, computer readable medium and electronic equipment
CN110152295B (en) Virtual object control method and device, storage medium and electronic equipment
US20230081128A1 (en) Picture quality-sensitive semantic segmentation for use in training image generation adversarial networks
CN108734774B (en) Virtual limb construction method and device and human-computer interaction method
CN110410952A (en) A kind of air conditioner control system, control method and computer readable storage medium
CN112473138B (en) Game display control method and device, readable storage medium and electronic equipment
CN102193499B (en) efficiency control method aiming at group drawing
CN114849234A (en) Virtual lens control method and device, storage medium and electronic equipment
CN107704165B (en) Virtual lens control method and device, storage medium and electronic equipment
CN107050848B (en) Somatosensory game implementation method and device based on body area network
US20230245328A1 (en) Multi-frame optical flow network with lossless pyramid micro-architecture
CN114035684A (en) Method and apparatus for outputting information

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