IP Library › Granted Patent US 12,725,339
Granted Patent B2
US 12,725,339 · App. 18/338,330 · Granted Sep 1, 2026

Method and apparatus for generating walk animation of virtual role, device and storage medium

Inventor: Shikai Liu (Shenzhen, CN)
Assignee: TENCENT TECHNOLOGY (SHENZHEN) COMPANY LIMITED
G06T13/40A63F13/57
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,725,339
App. No.
18/338,330
Granted
Sep 1, 2026
Kind
B2
Abstract

A method and apparatus for generating a walk animation of a virtual role includes: predicting touchdown points of a leg of the virtual role in the walk process according to a movement velocity and a movement direction of the virtual role; computing a position of a foot of the leg in a swing phase according to two adjacent touchdown points of the leg; performing, based on the position of the foot of the leg in the swing phase, inverse kinematics computation to obtain positions of bone points of the leg in the swing phase; and performing, based on the positions of the bone points of the leg in the swing phase, gait fusion to generate a walk animation of the virtual role.

Claims (80)

1 . A method for generating a walk animation of a virtual role comprising n legs, the method being performed by a computer device, a walk process of a leg of the virtual role including alternating swing phases and stance phases, and the method comprising:

predicting a predicted movement trajectory of the virtual role in the walk process according to a movement velocity and a movement direction of the virtual role in a virtual environment;

sampling multiple touchdown points of a leg on the predicted movement trajectory by taking a current pose of the leg of the virtual role as a predicted starting point, comprising:

computing, in response to that a current pose of an i th leg of the virtual role is in a t th second state in a swing phase, a predicted duration based on a remaining duration of the swing phase and a duration of a stance phase;

determining a position of moving forward for a predicted length along the predicted movement trajectory as a body position of the virtual role at a time of touchdown by taking a position of the current pose of the virtual role on the predicted movement trajectory as a starting point, the predicted length being calculated based on the predicted duration and the movement velocity;

calculating, based on the body position of the virtual role at the time of touchdown and a relative position relationship between a body and the i th leg of the virtual role, touchdown points of the i th leg of the virtual role on the predicted movement trajectory,

wherein i is a positive integer not greater than n, and a previous touchdown point of two adjacent touchdown points is a lift-up point of a next touchdown point of the two adjacent touchdown points;

after the multiple touchdown points are determined, computing positions of a foot of the leg in a swing phase according to the two adjacent touchdown points of the leg;

performing, based on the positions of the foot of the leg in the swing phase, inverse kinematics computation to obtain positions of bone points of the leg in the swing phase; and

performing, based on the positions of the bone points of the leg in the swing phase, gait fusion to generate a walk animation of the virtual role.

2 . The method according to claim 1 , wherein the performing, based on the positions of the bone points of the leg in the swing phase, gait fusion to generate the walk animation of the virtual role comprises:

acquiring pre-configured gait parameters; and

performing, based on the gait parameters, gait fusion on the positions of the bone points of the leg in the swing phase to generate the walk animation of the virtual role.

3 . The method according to claim 2 , wherein the gait parameters comprise: a gait period and leg parameters of the leg within the gait period;

the performing, based on the gait parameters, gait fusion on the positions of the bone points of the leg in the swing phase to generate the walk animation of the virtual role comprises:

performing, within the gait period, gait fusion on the positions of the bone points of the leg in the swing phase according to the leg parameters of the leg within the gait period to generate the walk animation of the virtual role;

wherein the gait period is an alternating period between the swing phase and a stance phase, and the leg parameters comprise at least one of a lift time point, a duration of the swing phase and a pace midpoint of the stance phase.

4 . The method according to claim 3 , wherein the gait parameters comprise a first gait parameter in a first motion pattern and a second gait parameter in a second motion pattern;

the method further comprises:

performing interpolation on the first gait parameter and the second gait parameter to obtain a first blended gait parameter; and

performing, based on the first blended gait parameter, gait fusion on the positions of the bone points of the leg in the swing phase to generate a transition animation of the leg of the virtual role to switch from the first motion pattern to the second motion pattern.

5 . The method according to claim 3 , wherein the gait parameters comprise a third gait parameter in a first movement direction and a fourth gait parameter in a second movement direction;

the method further comprises:

performing interpolation on the third gait parameter and the fourth gait parameter to obtain a second blended gait parameter; and

performing, based on the second blended gait parameter, gait fusion on the positions of the bone points of the leg in the swing phase to generate a walk animation of the leg of the virtual role in the third movement direction;

wherein the third movement direction is a movement direction between the first movement direction and the second movement direction.

6 . The method according to claim 1 , wherein the predicted duration is a sum of the remaining duration of the swing phase and half of the duration of the stance phase.

7 . The method according to claim 1 , further comprising:

Computing, in response to a ground where a touchdown point of the multiple touchdown points is located being a non-flat ground, a first projection point of the touchdown point on the non-flat ground in a vertical direction;

extracting, based on a leg swing distance, a reference point, from a line between the touchdown point and the first projection point; and

using a second projection point of the reference point on the non-flat ground in the vertical direction as an updated touchdown point.

8 . The method according to claim 7 , further comprising:

deflecting a pose of the foot at the time of touchdown according to the normal direction of the ground where the updated touchdown point is located.

9 . The method according to claim 7 , comprising:

determining a spline curve, in response to that an obstacle exists below a body of the virtual role, based on positions of the two adjacent touchdown points and the highest point of the obstacle; and

superposing the spline curve with the leg swing curve to obtain an updated leg swing curve.

10 . The method according to claim 1 , wherein the computing the positions of the foot of the leg in the swing phase according to the two adjacent touchdown points of the leg comprises:

determining, based on positions of the two adjacent touchdown points, a leg swing curve, the leg swing curve indicating a swing trajectory of the foot in the swing phase; and

performing, based on the leg swing curve, interpolation computation on the foot of the leg to determine the positions of the foot of the leg in the swing phase.

11 . The method according to claim 1 , wherein the performing, based on the positions of the foot of the leg in the swing phase, inverse kinematics computation to obtain positions of bone points of the leg in the swing phase comprises:

performing a cyclic coordinate descent inverse kinematics (CCDIK) computation according to the two adjacent touchdown points of the leg to obtain the positions of the bone points of the leg in the swing phase;

or

performing a forward and backward reaching inverse kinematics (FABRIK) computation according to the two adjacent touchdown points of the leg to obtain the positions of the bone points of the leg in the swing phase.

12 . The method according to claim 1 , further comprising:

acquiring a torso animation of the virtual role, the torso animation is an animation of a body of the virtual role in the walk process; and

fusing the torso animation of the virtual role with the walk animation of the virtual role to obtain a bodily movement animation of the virtual role.

13 . The method according to claim 12 , wherein the fusing the torso animation of the virtual role with the walk animation of the virtual role to obtain the bodily movement animation of the virtual role comprises:

scaling a duration of the torso animation of the virtual role according to a duration of a gait period to obtain a scaled torso animation; the gait period being an overall period of one swing phase and one alternating stance phase; and

fusing the scaled torso animation with the walk animation of the virtual role to obtain the bodily movement animation of the virtual role.

14 . The method according to claim 1 , further comprising:

determining, in response to that a body of the virtual role comprise elastic components, at least two levels of bone nodes corresponding to the elastic components in a bone tree of the virtual role; and

performing vibration computation of a three-dimensional vibration model starting from a root node of the at least two levels of bone nodes by taking a previous-level bone node as an origin and a next-level bone node as a vibrator, and determine a bone update position of the next-level bone node, until a bone update position of the elastic component is updated.

15 . The method according to claim 1 , further comprising:

computing a stance vector of the leg of the virtual role, the stance vector indicating an inclination of a touchdown point of a current leg relative to a torso of the virtual role;

computing, based on the stance vector of the leg, a pose angle of the torso of the virtual role; and

performing, based on the pose angle, lean compensation on the torso of the virtual role.

16 . The method according to claim 1 , further comprising:

computing, in response to that the virtual role is above a convex ground, an average height difference between the touchdown point of the leg of the virtual role and a vertex of the convex ground; and

performing raising compensation on a height of a torso of the virtual role according to the average height difference.

17 . The method according to claim 1 , wherein the movement direction of the virtual role is controlled in response to a user operation in a virtual game.

18 . An apparatus for generating a walk animation of a virtual role comprising n legs, a walk process of a leg of the virtual role including alternating swing phases and stance phases, and the apparatus comprising:

predicting a predicted movement trajectory of the virtual role in the walk process according to a movement velocity and a movement direction of the virtual role in a virtual environment;

sampling multiple touchdown points of a leg on the predicted movement trajectory by taking a current pose of the leg of the virtual role as a predicted starting point, comprising:

computing, in response to that a current pose of an i th leg of the virtual role is in a t th second state in a swing phase, a predicted duration based on a remaining duration of the swing phase and a duration of a stance phase;

determining a position of moving forward for a predicted length along the predicted movement trajectory as a body position of the virtual role at a time of touchdown by taking a position of the current pose of the virtual role on the predicted movement trajectory as a starting point, the predicted length being calculated based on the predicted duration and the movement velocity; and

calculating, based on the body position of the virtual role at the time of touchdown and a relative position relationship between a body and the i th leg of the virtual role, touchdown points of the i th leg of the virtual role on the predicted movement trajectory,

wherein i is a positive integer not greater than n, and a previous touchdown point of two adjacent touchdown points is a lift-up point of a next touchdown point of the two adjacent touchdown points;

after the multiple touchdown points are determined, computing positions of a foot of the leg in a swing phase according to the two adjacent touchdown points of the leg;

performing, based on the position of the foot of the leg in the swing phase, inverse kinematics computation to obtain positions of bone points of the leg in the swing phase; and

performing, based on the positions of the bone points of the leg in the swing phase, gait fusion to generate a walk animation of the virtual role.

19 . A non-transitory computer-readable storage medium, storing a computer-readable instruction, and the computer-readable instruction being loaded and executed by one or more processors to implement:

predicting a predicted movement trajectory of a virtual role in a walk process according to a movement velocity and a movement direction of the virtual role in a virtual environment, the walk process of a leg of the virtual role including alternating swing phases and stance phases, and the virtual role comprising n legs;

sampling multiple touchdown points of a leg on the predicted movement trajectory by taking a current pose of the leg of the virtual role as a predicted starting point, comprising:

computing, in response to that a current pose of an i th leg of the virtual role is in a t th second state in a swing phase, a predicted duration based on a remaining duration of the swing phase and a duration of a stance phase;

determining a position of moving forward for a predicted length along the predicted movement trajectory as a body position of the virtual role at a time of touchdown by taking a position of the current pose of the virtual role on the predicted movement trajectory as a starting point, the predicted length being calculated based on the predicted duration and the movement velocity; and

calculating, based on the body position of the virtual role at the time of touchdown and a relative position relationship between a body and the i th leg of the virtual role, touchdown points of the i th leg of the virtual role on the predicted movement trajectory,

wherein i is a positive integer not greater than n, and a previous touchdown point of two adjacent touchdown points is a lift-up point of a next touchdown point of the two adjacent touchdown points;

after the multiple touchdown points are determined, computing positions of a foot of the leg in a swing phase according to the two adjacent touchdown points of the leg;

performing, based on the positions of the foot of the leg in the swing phase, inverse kinematics computation to obtain positions of bone points of the leg in the swing phase; and

performing, based on the positions of the bone points of the leg in the swing phase, gait fusion to generate a walk animation of the virtual role.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 21, 2023
From: LIU, SHIKAI
To: TENCENT TECHNOLOGY (SHENZHEN) COMPANY LIMITED
Reel/Frame 064018/0779 →
Priority Claims (2)
CN 202111374361.9 · Nov 19, 2021 · national
CN 202111628788.7 · Dec 28, 2021 · national
Continuity (2)
Continuation PCTCN2022127073 · Oct 24, 2022
Related Publication 20230334744A1 · Oct 19, 2023
References Cited (25)
US 10351189B2 · Blankespoor · 2019 [cited by examiner]
US 20060250402A1 · Perlin · 2006 [cited by examiner]
US 20160324445A1 · Kim · 2016 [cited by examiner]
US 20170018110A1 · Raschke · 2017 [cited by examiner]
US 20170281085A1 · Lee · 2017 [cited by examiner]
US 20180107175A1 · Ha · 2018 [cited by examiner]
US 20190204848A1 · Xiong · 2019 [cited by examiner]
US 20210181765A1 · Bai · 2021 [cited by examiner]
CN 103514622A · 2014 [cited by applicant]
CN 105608309A · 2016 [cited by applicant]
CN 110728739A · 2020 [cited by applicant]
CN 111311714A · 2020 [cited by applicant]
CN 112348931A · 2021 [cited by applicant]
CN 113318439A · 2021 [cited by applicant]
CN 114283229A · 2022 [cited by applicant]
WO 2021045082A1 · 2021 [cited by applicant]
Sun et al., “Automating Gait Generation” (Year: 2001). [cited by examiner]
The World Intellectual Property Organization (WIPO) International Search Report for PCT/CN2022/127073 Jan. 19, 2023 13 Pages (including translation). [cited by applicant]
Ahmad et al., “Procedural locomotion of multi-legged characters in complex dynamic environments”, 11 pages. [cited by applicant]
Andreas et al., “FABRIK: A fast, iterative solver for the Inverse Kinematics problem”. Department of Engineering, University of Cambridge. 2011 18 pages. [cited by applicant]
Andreas et al., “Extending FABRIK with model constraints”, Computer Animation and Virtual Worlds, Comp. Anim. Virtual Worlds 2016; 27:35-57, Feb. 2, 2015 23 pages. [cited by applicant]
Jeff Lander, “Oh my God, I Inverseted kine!”, Game Developer 4 pages. [cited by applicant]
Jeff Lander, “Making Kine More Flexible”, Game Developer 5 pages. [cited by applicant]
David Rosen, Wolfire Games. Animation BootCamp, An Indie Approach to Procedural Animation. 5 pages. [cited by applicant]
Clifford Roche, Carlos TorresCros. Fitting the World: A biomechanical approach to foot ik. 5 pages. [cited by applicant]