Keywords

These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

1 Introduction

With the on-going development and evolution of 3D graphics, animation has proven to be of great importance. Energy and emotions can be injected to objects by means of animation. Thus, the dullest of features can be brought to life [1]. As of its great importance, many types of 3D animation have been developed. This includes key frame animation where the animator specifies the main key frames; that is defining the parameter values for these frames and the computer interpolates the parameter values for the in-between frames. This was used in the “Toy Story” movie [2]. Another technique has evolved called motion capture. Its idea is based on capturing the motion data of humans or animals using sensors (e.g. magnetic or vision-based sensors) and then applying this data to the 3D models. This technique was used in the “Polar Express” movie [3]. In addition, procedural/simulation animation evolved to overcome the problems presented by the previous techniques. This method is based on the usage of physical laws to produce the animation of objects and characters which adds more realism [1]. In this paper, both key frame and procedural animations are combined to create an automated gait cycle for various 3D characters given their stride length, walking base, cycle period and the overall walking duration. In this paper, we start by having an insight into the gait cycle. Followed by a description of the derived mathematical equations describing the gait cycle for different body parts in different gait phases. Finally, the output and the validation of the mathematical equations are being discussed.

2 Gait Cycle

Gait defines the walking style or manner and not the walking process itself [4]. Gait study has proven its importance in many fields including virtual reality, medical diagnostics, evaluation of athletic performance, biomechanics, etc. [5]. Figure 1 describes the full gait cycle.

Related Work: Many models have been done in order to describe gait cycles for 3D characters. Some of which used Lagrangian mechanics to derive a model for the lower body as done by Onyshko et al. [7]. Also the usage of ground contact reaction forces was exploited in understanding the walking movement as done by Brubaker et al. [8]. A combination of inverse dynamics along with optimization methods was suggested by Ren et al. to predict human normal walking [9]. Comparatively, Tsutsuguchi et al. took advantage of both dynamics and kinematics to produce natural-looking walking motion in 3D virtual realities by means of ground reaction forces [10]. Unlike the work presented in this paper, most of the generated models do not consider the variations within different gait cycles. Moreover, many of the generated models consider the lower body part only.

Fig. 1.
figure 1

Gait cycle: position of right leg (gray), left leg (black) [6].

Gait Characteristics: Gait is affected by many determinants. The following represents some of those determinants such as stride length, walking base and toe out (Refer to Fig. 2) and stride duration (known as cycle duration/period) [6].

Fig. 2.
figure 2

Feet displacement [6].

Gait Cycle Timing: Table 1 summarizes the complete timings of all major events and the periods of the gait cycle [4, 6].

Table 1. Gait cycle timings

3 Mathematical Models

The following equations are derived in order to simulate a full cycle. Since the rotation angles are applied similarly to all characters as there is almost no variation in rotations (rotations sums up to 360\(^\circ \)), the translations specified for each character can be calculated with respect to the rotation angles using trigonometry. These equations are used when the character is in a standing position oriented towards the positive z direction and the hands are laid down facing the body. The idea is to derive a model describing gait cycle in order to generate the latter via procedural animation to produce realistic and accurate results. These equations are derived for the controls associated with the IK (Inverse Kinematics) handles of the specified 3D rigged character.

Note: In the following equations, the tilde sign\(\thicksim \)is used to indicate that there is no need for an input to be entered. Hence, the computer will compute the corresponding value using interpolation simulating keyframe animation.

3.1 Right Foot and Toe

In all phases, the right foot’s x position will always be equivalent to \(-WalkingBase(WB)/2\). As for both the y and z positions, they are explained in more detail in this section. Figure 3 illustrates the difference between foot (FL) and toe lengths (TL) that will be used in the coming equations.

Fig. 3.
figure 3

Foot/toe lengths

Fig. 4.
figure 4

Foot rotation during initial contact

Initial Contact. As shown in Fig. 5, the right foot (indicated by thick black line) is rotated by \(-10^\circ \) from the horizontal position. The value by which the foot is rotated (\(-10^\circ \)) is being analyzed and validated in Sect. 4. Moreover, the toe (indicated by thick gray line) is rotated by 0\(^\circ \) with respect to foot. Due to these rotations, foot undergoes translations unwillingly (Refer to Fig. 4). Accordingly, vertical and horizontal distances need to be calculated to accommodate for these translations. From Fig. 5, the following equations are deduced:

$$\begin{aligned} \begin{aligned}&\text {Right Foot Translations} =\ (-WB/2,\ FL *|\sin (-10^\circ )|,\ (SL/4)-h) \\&where\ h\ =\ (FL+TL)-((FL+TL)*\cos (-10^\circ )) \\&\text {Right Foot Rotations} =\ (-10^\circ ,\ \thicksim ,\ \thicksim ),\ \text {Right Toe Rotations} =\ (0^\circ ,\ 0^\circ ,\ 0^\circ ) \end{aligned} \end{aligned}$$
(1)

where the term “StrideLength(SL)/4” is due to the fact that in initial contact, both legs are standing half stride length (SL) apart. That’s why the distance from the mid-point to each foot is a quarter stride length.

Fig. 5.
figure 5

Position of foot/toe in initial contact.

Opposite Toe Off. Just after this phase, both foot and toe are lying flat on the ground as single support phase begins. Accordingly, rotation about the x-axis is zero. In addition, no vertical translation occurs.

$$\begin{aligned} \begin{aligned}&\text {Right Foot Translations} =\ (\thicksim ,\ 0,\ \thicksim ),\ \text {Right Foot Rotations} =\ (0^\circ ,\ \thicksim ,\ \thicksim ) \end{aligned} \end{aligned}$$
(2)

Midstance. In midstance, we make sure that the foot stays aligned to the ground; this means that the vertical displacement remains zero. Moreover, since the midstance occurs at nearly quarter of the whole cycle time, translation in the z-axis becomes zero as well; because at this time the right foot is already half-way towards the other direction.

$$\begin{aligned} \begin{aligned}&\text {Right Foot Translations} =\ (\thicksim ,\ 0,\ 0),\ \text {Right Foot Rotations} =\ (0^\circ ,\ \thicksim ,\ \thicksim ) \end{aligned} \end{aligned}$$
(3)

Opposite Initial Contact. As shown in Fig. 6, the foot (indicated by thick black line) is rotated by 16\(^\circ \) from the horizontal position. The number 16\(^\circ \) is being analyzed and validated in Sect. 4. Moreover, the toe (indicated by thick gray line) is rotated by \(-16^\circ \) with respect to foot in order to be aligned with the horizontal plane. From Fig. 6, the following equations are deduced:

$$\begin{aligned} \begin{aligned}&\text {Right Foot Translations} =\ (\thicksim ,\ FL*|sin(16^\circ )|,\ -SL/4) \\&\text {Right Foot Rotations} =\ (16^\circ ,\ \thicksim ,\ \thicksim ),\ \text {Right Toe Rotations} =\ (-16^\circ ,\ \thicksim ,\ \thicksim ) \end{aligned} \end{aligned}$$
(4)
Fig. 6.
figure 6

The position of foot (black line) and toe (gray line) in opposite initial contact

Pre-swing. During pre-swing, and according to the Washington university’s animation course [4], the foot is rotated by 30\(^\circ \) from the horizontal position as in Fig. 7. Moreover, toe is rotated by 10\(^\circ \) with respect to foot. The latter number is based on the validation techniques used in Sect. 4.

Due to the foot and toe’s rotation, the foot needs to be translated both vertically and horizontally. Both distances are calculated from Fig. 7 as follows:

$$\begin{aligned} \begin{aligned}&\text {Right Foot Translations} =\ (\thicksim ,\ (FL*\sin (30^\circ ))+(TL*\sin (20^\circ )), (-SL/4)+h2) \\&where\ h2\ =\ (FL+TL)-((FL*\cos (30^\circ ))+(TL*\cos (-20^\circ ))) \\&\text {Right Foot Rotations} =\ (30^\circ ,\ \thicksim ,\ \thicksim ),\ \text {Right Toe Rotations} =\ (-10^\circ ,\ \thicksim ,\ \thicksim ) \end{aligned} \end{aligned}$$
(5)
Fig. 7.
figure 7

Position of foot/toe in pre-swing phase

Toe Off. In this period, the foot is rotated by 50\(^\circ \) anti-clockwise in order to begin its swing phase. This number (50\(^\circ \)) is being validated in Sect. 4. The toe, however, is aligned with the foot and that is why its rotation is indicated by a zero.

The distance traveled by foot both vertically and horizontally is calculated as shown in Fig. 8:

$$\begin{aligned} \begin{aligned}&\text {Right Foot Translations} =\\&(\thicksim ,\ (FL+TL)*\sin (50^\circ ), \ -(SL/4)+h) \\&where\ h\ =\ (FL+TL)-((FL+TL)*\cos (50^\circ )) \\&\text {Right Foot Rotations} =\ (50^\circ ,\ \thicksim ,\ \thicksim ),\ \text {Right Toe Rotations} =\ (0^\circ ,\ \thicksim ,\ \thicksim ) \end{aligned} \end{aligned}$$
(6)
Fig. 8.
figure 8

Position of foot/toe in toe off.

Feet Adjacent. Same idea as that of midstance, since feet adjacent occurs at nearly three quarters of the whole cycle time, translation in the z-axis is zero whereas toe’s rotation about the foot is zero.

$$\begin{aligned} \begin{aligned}&\text {Right Foot Translations} =\ (\thicksim ,\ \thicksim ,\ 0) \\&\text {Right Foot Rotations}\ =\ (\thicksim ,,\ \thicksim ,\ \thicksim ),\ \text {Right Toe Rotations}\ =\ (0^\circ ,\ \thicksim ,\ \thicksim ) \end{aligned} \end{aligned}$$
(7)

3.2 Left Foot and Toe

Unlike the right foot, left foot’s x position will always be at a distance of WalkingBase / 2 along the x-axis. As for both the y and z positions, they are nearly the same as that of the right foot but in alternating phases such that the right and left hemispheres are out of phase as indicated in Table 2.

Table 2. Corresponding phases for the right and left foot and toe

3.3 Torso

Only four phases have an effective impact on torso [4, 6]. Accordingly, only four equations are needed to generate the torso’s full motion during the gait cycle. These phases are the loading response, mid stance, pre-swing and feet adjacent where the torso reaches its highest position during both the mid stance and feet adjacent. On the other hand, its lowest position is achieved during both the loading response and pre-swing phases. In the coming equations, yTorso indicates the torso’s position when the character is standing which is the maximum displacement achieved by the torso vertically. Therefore, during mid stance and feet adjacent torso’s vertical displacement is yTorso. Form Fig. 1, we start by the initial contact phase, then torso’s translation needs to be calculated for that phase. As for the loading response and feet adjacent, translation is being calculated using interpolation.

Fig. 9.
figure 9

Torso in initial contact/opposite initial contact.

Initial Contact and Opposite Initial Contact: As deduced by Whittle [6], the knee rotation is about 5\(^\circ \). From Fig. 9, the knee lies in the middle of the leg (divides the leg length (LL) into two), accordingly the vertical displacement (VD) by which the torso is translated can be calculated as follows:

$$\begin{aligned} \begin{aligned}&\text {Torso Translations} =\ (0,\ yTorso\ -\ VD,\ 0) \\&where\ \text {Vertical Displacement (VD)} =\ |v1+v2| \\&v1\ =\ LL-h1,\ v2\ =\ |(0.5*LL*cos(\alpha -5^\circ ))-h2| \\&\alpha \ =\ sin^{ - 1}((SL/4)/LL) \\&h1\ =\ \sqrt{LL^2-(SL/4)^2} \rightarrow Pythagoras\ theorem,\ h2\ =\ 0.5*LL*cos(\alpha )\\ \end{aligned} \end{aligned}$$
(8)

where \(v_1\) and \(v_2\) are the vertical displacements due to the leg and foot rotations respectively. Same applies to \(h_1\) and \(h_2\), however, horizontally.

The numbers used in the torso’s rotations are based on the animation course of the university of Washington [4] as follows:

$$\begin{aligned} \begin{aligned}&\text {Torso Rotations in initial contact} =\ (0^\circ ,\ 4^\circ ,\ 2^\circ ) \\&\text {Torso Rotations in opposite\ initial contact} =\ (0^\circ ,\ -4^\circ ,\ -2^\circ ) \end{aligned} \end{aligned}$$
(9)

3.4 Head

As stated in the Washington University’s animation course, slight rotations occur to the head to cancel the effect of torso’s rotations. Thus, face is being kept forward [4]. Accordingly, rotations occurring to the head are similar to that of torso, however, in opposite directions (i.e. with opposite signs).

$$\begin{aligned} \begin{aligned}&\text {Head Rotations in initial contact} =\ (0^\circ ,\ -4^\circ ,\ -2^\circ ) \\&\text {Head Rotations in opposite initial contact} =\ (0^\circ ,\ 4^\circ ,\ 2^\circ ) \end{aligned} \end{aligned}$$
(10)

3.5 Right Hand

In all phases, the position of the right hand along the x-axis tends to remain unchanged. However, translations along both the y and z axes change. The main two phases where the position of the right hand changes are the initial and opposite initial contact. In the coming equations, xArmRt and yArm are terms used to indicate the original x and y positions of the right hand when character is standing. Similarly, rotateHandRight.x, rotateHandRight.y, rotateHandRight.z are used to indicate the initial rotations about the x, y and z axes of the right hand. Furthermore, the numbers concerned with hand rotations in the coming equations are based on the observation of characters using trial and error. These numbers are being validated in Sect. 4.

Fig. 10.
figure 10

Right hand in initial contact

Initial Contact. In initial contact, as deduced by Tsutsuguchi et al. [10], the shoulder is rotated by 9\(^\circ \) clockwise. Since torso is displaced downwards along the y-axis by a vertical distance (VDT) as previously deduced, this distance is being compensated by adding it to the vertical distance traveled by the right hand. Given Fig. 10:

$$\begin{aligned} \begin{aligned}&\text {Right Hand Translations} =\ (xArmRt, \ yArmRt+VD-VDT, \ zArmRt-HD) \\ \end{aligned} \end{aligned}$$
(11)

Since the character is facing the +z-axis, then accordingly, the rotation of right hand will only be along the x-axis. Watching as many 3D movies as possible along with videos of different people walking, one can deduce the values used for hand rotations. Also, testing these values on many 3D characters yielded good results. Thus, the hand’s rotation values are as follows:

$$\begin{aligned} \begin{aligned}&\text {Right Hand Rotations} =\ (-8^\circ , \ rotateHandRight.y,\ rotateHandRight.z) \\ \end{aligned} \end{aligned}$$
(12)
Fig. 11.
figure 11

Right hand in opposite initial contact.

Opposite Initial Contact. As stated Tsutsuguchi et al. [10], the shoulder’s rotation angle was found to be 30\(^\circ \). Moreover, the elbow’s rotation was calculated by Whittle [6] and found to be 8\(^\circ \) as in Fig. 11. Similar to what is previously stated in the initial contact, the torso’s vertical distance is to be compensated by the right hand leading to the coming equations:

$$\begin{aligned} \begin{aligned}&\text {Right Hand Translations} = (\thicksim , \ yArmRt+VD+VDT,\ HD) \\&where, \\&VD = v1\ +\ v2,\ HD = h1\ +\ h2 \\&h1 =\ Arm\ Length\ (AL)*sin(30^\circ ),\ h2 = 0.5*AL*sin(38^\circ )-0.5*AL*sin(30^\circ ) \\&v1 = AL-AL*cos(30^\circ ),\ v2 = 0.5*AL*cos(38^\circ )-0.5*AL*cos(30^\circ ) \\ \end{aligned} \end{aligned}$$
(13)

Testing the rotation values on several characters, it was deduced that the hand rotates by \(-42^\circ \) along the x-axis.

Toe Off. Though no significant translations occur in this phase, rotations are added to signify the concept of momentum. The idea is that the hand swings from its highest position on its way to its lowest position, accordingly, rotation of hand about the wrist follows the total excursion traveled by hand. Due to momentum, rotation is delayed a bit than the translation. Thus, hand rotation derived in this phase are greater than that of the opposite initial contact to apply momentum and considered to be \(-44^\circ \).

3.6 Left Hand

Similar to the idea of the right and left foot being out of phase, both hands have similar translations and rotations, however, in alternating phases as indicated in Table 3.

Table 3. Corresponding phases for the right and left hand

4 Output & Validation

Testing the validity of the equations led to outstanding results. For each character an automated gait cycle was produced efficiently and customized according to different entered inputs. Thus, different characters had different gait cycles. Figure 12 shows the gait cycle generated for character “Norman”. Many validation techniques have developed over the time. One way to ensure the validity of equations is to test them on a wide number of characters. This method was conducted by Johansen and Skovbo [11]. Accordingly, the equations have been tested on 24 3D characters and produced realistic gait cycles. In addition to testing the plugin and the validity of equations on various characters, interviews have been carried out with three different animators. Moreover, a survey was taken by a group of 19 users: 12 females and 7 males with an age range from 19 to 33 years old. The questionnaire was based on two video sets shown to the users: the first set had a total of three videos with different hand rotations and the second set was similar to the first one, however, it had different foot/toe rotations instead. For all videos, the duration was 4 seconds. In each video set, one of the videos contained the values used originally in the equations. For the remaining two videos, one of them had values less whereas the other had values greater than the original. In each set the user was required to choose the best video in the sense that it has the most realistic movement. Eleven candidates chose the video of the hand rotation used originally in the equations, 2 chose the video with hand rotation greater and 6 chose the video with less hand rotation. As for the foot and toe rotation videos, 12 agreed on the video with the values originally used in the equations whereas the 7 chose the video with foot and toe rotations greater than the original. Taking into account the survey results and the interviews conducted with the three animators, some modifications were applied to the values used in the mathematical equations: hand rotation at toe off was altered to be \(-45^\circ \) instead of \(-50^\circ \) and the angle of foot contact with the ground in the initial contact phase was increased from \(-8^\circ \) to \(-10^\circ \). Having applied these changes, the questionnaire was retaken one more time. However, this time more candidates joined, adding up to a total of 70 candidates: 49 females and 21 males with an age range from 16 to 45. Concerning foot and toe rotations, 37 agreed to the new values, 10 agreed that the values should be decreased whereas the remaining 23 saw that the angles need to be increased. Thus the newly calculated foot and toe rotation angles were used in the mathematical equations. As for the hand rotations, most of the candidates agreed that the hand rotations should be decreased thus the angle for hand rotation at toe off has been further decreased from \(-45^\circ \) to \(-44^\circ \).

Fig. 12.
figure 12

Gait cycle for “Norman”

5 Conclusion

Though much work has been done previously in generating gait cycles for 3D characters, the deduced equations have proved to be different in terms of generality, thus a customized gait cycle can be generated. In addition, the walking movement created was more realistic from those created previously. The work presented in this paper aimed at finding a way to create a generalized gait cycle for different characters, however, without relying on motion capture. Though motion capture has proved its reliability in the past two years, many companies have not still conducted this method due to its huge expenses. This work has proved its feasibility, simplicity of usage and effectiveness in-terms of the generated walking cycles.