Animation, Character Essences, Research & Coding, Research & Play

Le Quack Walker v1.0

“People’s movements can change your impression of them.” 

(Isao Takahata)

 

 

Notes

Code: This blog post is a piece of personal research and development, which is very close to my heart. I encourage you to read, experiment with the code and Maya file available on Github and reference this post if you use it in your own work.

Research: I believe academic findings should be shared beyond the borders of peer reviewed journals and this is a small attempt at achieving that. I do recognize, however, the importance of published work. The current post does not aim to replace the latter, but to supplement it with findings that stem from curiosity rather than academic rigour. 

Learn: If you wish to learn more about designing, modelling and procedurally animating simple characters, please have a look at my upcoming course, Little Creatures with a Personality on Thinkific. 

 

Introduction

Patterns of movement, patterns of laughter, patterns of movement that make us laugh. There are many patterns that connect us, but the ones that truly matter speak the truth of our human nature. And if the truth is unique, otherwise it wouldn’t be called “the truth”, then it should have clear characteristics. There should be a code behind truthful behaviours that generate similar reactions in people, regardless of where they come from.

This project started as a question: What is it that makes ducks funny? Moreover, I wanted to know if there was a code behind the movement of a funny duck. After much thought, experimentation and scripting, I realized that the notion of funniness is too complex. Rather than attempting to understand everything at once, I chose a simple behaviour, walking, and investigated its “funny” potential. Since emotions are also seen among laughing people, they were chosen as nuances for the walking behaviour. This allowed a palette of walk cycles to be experimented with.

This report is part of the Character Essences project, which focuses on recreating believable actions using procedural animation. Actions are often hard to describe, but techniques like Laban Motion Analysis allow dividing complex behaviours into simple motions. Behaviours can thus be described and recreated as a cohesion of individual movements.

This observation is connected to emergence theory, where complex systems emerge from apparently simple rules. One example is Craig Reynolds’ flocking system (1987), where three simple rules govern the complexity of a moving flock of boids (ie. birds or fish). These rules are cohesion (boids must stick together), alignment (boids must travel in the same direction) and separation (boids mustn’t collide with each other).

Motivation

Before delving into the complexity of human behaviour, I wanted to have a look at a simple creature, a duck. Ducks are funny little birds, with their wagging tails and wobbly walks. Everything about a duck feels like out of a cartoon, even its brilliantly coloured feathers and beak. So what is it that makes a duck funny? Also, can I find the simple motions which form the complex behaviour of a wobbly duck? If the answers to these questions are found, I can then recreate a duck as a procedurally animated character.

Moreover, the feeling a procedural character conveys could inspire a similar effect in an observer. In other words, if we consider a walking duck to be funny, a similar reconstruction done for a procedural duck should also be classified as funny. This could extend to more types of characteristics and behaviours, which can lead to applications in video games, films and psychology.

Procedural characters could be used in simulations and interactions with users to entertain and aid them. If the psychological effect and believability are controllable to some extent, characters can react according to the context of a scene. In a video game, for example, a procedural character can display an angry walk if a user breaks the rules or it can have a joyful jump if they haven’t seen the player in a long time. 

Background

Firstly, let’s discuss the concept of “movement code”. I was introduced to this notion in Stephen Mottram’s puppeteering workshop, The Logic of Movement (2017). He spoke about every creature having a well defined method for moving, which is linked to their size, weight and emotion. As an example, the reason why a chicken thrusts its head forward when walking is to balance out the larger body weight left behind when taking a step.

The “movement code” is also linked to the more comprehensive Laban Motion Analysis (LMA) technique defined by Rudolf Laban and his students (2011). Laban was a movement theorist who studied and classified complex movement into a simple set of qualities. He looked at the shape of the body and space it moves in, as well as the conscious efforts humans make when performing an action.

The efforts described in LMA are weight, space, time and flow (Bishko 2014). Each effort varies between two movement qualities. Weight can vary between light and strong/heavy, space between indirect and direct, time between sudden and sustained, while flow varies between free and bound. Combinations of two qualities form states (awake, remote, stable, dream, rhythm and mobile) and three qualities form drives (action, passion, vision and spell).

By focusing on the four efforts, the question is whether these elements can form the basis of complex, emergent behaviour. In Melzer et. al (2019) basic emotions (Ekman 1992) like happiness, sadness and anger were recreated through sets of simple motions. The goal of the performing actors was to display core movements, without the knowledge of which emotion they were attempting to recreate. Participants then ranked the overall movement as emotions. The experiments showed not only that emotions can be recreated in the human body by simply repeating certain simple movements, but also that others recognise and empathize with such emotions.

The work I attempted relies on the aforementioned paper, but is not rigorous in its academic methodology. It is more of an early prototype, a hypothesis formed in the imagination, if you will. I wished to know whether similar techniques could be applied to a duck walk and whether people found the results funny. The duck walk was to be generated using mathematical functions, thus forming a repeatable movement code. 

Method

The software used to create the Le Quack Walker V1.0 prototype was Autodesk Maya 2018. A simple 3D mesh was modelled, textured and rigged to approximate the look and mechanics of a duck’s walk. NURBS controllers parent constrained joints in the feet, spine and neck areas to allow movement of the skinned joints.

duck1

Simple duck mesh, texturing and rig prototype.

Instead of keyframing curves by hand, a Python script plugin was written to generate keyframes depending on the desired parameters (code available on Github). The GUI below shows the options the user has when running the Python script. First the Animation Start and End Frames are established, together with the Frames per Second (FPS). By default, these values are 0, 120 and 24 respectively. When generating the walk cycle, a keyframe is added automatically for all the controllers every 3 frames to help create a smooth animation.

GUIDuck

 

The next values, Amplitude, Speed, Weight and Direction control the qualities of movement for the duck walk cycle. Weight and Direction are directly linked to the Laban efforts, mentioned in the Background section. Amplitude is the length of the stride, while Speed is how fast the duck goes. Unfortunately the latter parameter didn’t work out as expected and the default value of 5 that the plugin starts with is the best looking option.

Amplitude

Amplitude compensates for the issue with the Speed parameter, as a large stride coincides with a faster walk, since more ground is covered in the same amount of time as a smaller stride. The slider value varies between a low and a high Amplitude. This is mapped to the respective small and large step sizes. The forward translation is then calculated as a function of the amplitude and speed of the character. The side view images below show two frames from the Amplitude = 1 and Amplitude = 10 respectively. An amplitude of zero would result in no movement as the step size is 0.

AmplitudeOneTwoFrames

Frames 1 (right) and 36 (left) of the generated walk at Amplitude = 1

AmplitudeTenTwoFrames

Frames 1 (right) and 36 (left) of the generated walk at Amplitude = 10

Weight

A low Weight value on the available slider represents a light weight, while a high value is a strong/heavy weight. A light weight is similar to a feather floating through the air, while a heavy weight is like the sturdy step of an elephant. I added some additional bounce in the duck’s step for a lightweight animation. When the weight is heavy, the duck’s movement is closer to the ground, since it’s more affected by gravity. The side view images below show two frames from the minimum and maximum Weight values, 0 and 10 respectively. Notice the bounce in the step for the low weight value.

WeightZeroTwoFrames

Two frames of the generated walk at Weight = 0

WeightTenTwoFrames

Two frames of the generated walk at Weight = 10

Direction

Direction is direct for low slider values and indirect for high values. A direct motion is converted into little or no body rotation around the vertical (Y) axis. An indirect motion has more rotation around the Y axis, as well as some supporting side to side X axis translation. The side view images below show two frames from the minimum and maximum Direction values, 0 and 10 respectively. Notice the exaggerated sway in the second image when the movement is indirect.

DirectionZeroTwoFrames

Two frames of the generated walk at Direction = 1

DirectionTenTwoFrames

Two frames of the generated walk at Direction = 10

Emotions

Once these parameters were established, the question was whether combinations of them would reveal complex behaviour. There are many ways to express behaviour and personality, but among the most common ones are emotions. Two out of the six basic emotions described by Paul Ekman (1992) were chosen, joy and sadness. Attempts were made to recreate these emotions on top of the neutral walk cycle of the duck. The neutral state was estimated at Amplitude = 5, Speed = 5, Weight = 5 and Direction = 0. 

The available parameters were mapped to the parameters suggested in Melzer et. al (2019) for recreating emotions in humans. For example, their paper mentions that joy was recognized by participants in their study when elements like lightness, jumping and rising movements were observed. These could be replicated easily with small weight value, specifically Weight = 1.

Sadness, on the other hand, was recognized in Melzer et. al (2019) as passive, sinking weight along with other parameters. A high value, Weight = 9, was used for recreating this effect. Amplitude and Direction were also experimented with, but did not offer significant results in expressing joy or sadness.

Animation Graphs and Code

Once the desired parameters are established, for example Amplitude = 5, Speed = 5, Weight = 1, Direction = 0 the Generate button is pressed in the GUI Python plugin. This activates a sequence of functions that reset controller values and extract values from the GUI fields. These values are then fed into the generateWalk() function. A snipped of this function is shown below. 

Notice that trigonometric functions like sine and cosine are used with an angle theta as a parameter. This angle increases depending on the current frame and frames per second. The Amplitude parameter influences the amplitude of the trigonometric functions, resulting in the step size. Looking at lines 4 and 5 below, the variables currentFootTranslationY and currentFootTranslationZ are the coordinates for a point moving along an ellipse.

The ellipse flattens when touching the ground, as conditioned in lines 8 to 11. The resulting curve is the trajectory for the left foot inverse kinematics (IK) handle. The joint angles for the rest of the leg are calculated automatically by Maya’s Rotate Plane IK Solver. An example of the left foot animation graphs can be seen in the first image below.

The spine translation along the Y axis factors in the inverse Weight parameter. The sine wave graph that results shifts between higher and lower average values depending on whether the Weight is low or high respectively. An example of the Translate Y animation graph for a low Weight value can be seen in the second image below.

Notice that the maximum value is 1.5, while the minimum value is -0.5. This translates visually to the character bouncing up more than it gravitates towards the ground. Finally, in the third image you can see the animation graph for the Rotate Z values for the spine, which is directly proportional to the Rotate Y variable. The latter is the side to side movement of the spine, given by a cosine function.    

rotationAmplitude = amplitude * extraAmpFactor
currentLeftFootTranslationX = (amplitude / 3.0) * weight * math.fabs(math.sin(0.5 * teta))
currentRightFootTranslationX = currentLeftFootTranslationX - amplitude                
currentFootTranslationY = -amplitude * math.sin(teta) / asq
currentFootTranslationZ = amplitude * math.cos(teta) / bsq
currentLeftFootRotationX = -rotationAmplitude * math.sin(teta) / 2.0

if (currentFootTranslationY < 0):
    currentFootTranslationY = 0
if (currentLeftFootRotationX < 0):
    currentLeftFootRotationX = 0  
                    
currentLeftToeTranslationY = -currentFootTranslationY / asq
currentLeftFootTranslationZ = currentLeftToeTranslationY / asq                           
             
#Spine    
currentSpineTranslationX = currentLeftFootTranslationX - amplitude / 2.0                
currentSpineTranslationY = (weightCosValue / 2.0) + invWeight * math.sin(2 * teta) / asq 
currentSpineRotationY = -weight * rotationAmplitude * math.cos(teta)
currentSpineRotationZ = currentSpineRotationY / 3.0
currentTailRotationY = currentSpineRotationY / 2.0
                
#Assign values to controllers

Results

Fourteen combinations of low and high parameter values for Amplitude, Weights and Direction were made. The resulting animations were playblasted out of Autodesk Maya and uploaded as private videos on Youtube. These videos were then inserted into a Google Forms survey with thirty questions.

At the start and end of the survey, participants were asked how happy they were. This was to check whether the duck animations had any effect on the overall state of the observers. At the start, 73.5% of the participants were above 5 on a scale from 1 (not happy) to 10 (super happy). At the end, 79.4% of the participants were above 5. Although the change is not significant, it does show a tendency towards a more cheerful disposition after watching procedurally animated ducks.   

For each of the fourteen videos, participants were asked to name the emotion they thought the video expressed, with Happy, Sad, Angry, Fearful, Disgusted, Neutral and Other as potential answers. They were then asked whether the duck in the video was funny.

Thirty four participants answered the questionnaire anonymously. The most successful question was the one for video four (Amplitude = 5, Speed = 5, Weight = 1, Direction = 0). Over 90% of the participants recognized the light Weight animation as a Happy movement. In the graph below Excited was classified as Happy.

94% of the participants also found this animation as funny, with a score of 5 or above, where 1 is not funny, while 10 is super funny. 61% of participants gave a score of 7 or above to the same question. This result repeated itself for both the emotion and the degree of funniness for duck 12 (Amplitude = 7, Speed = 5, Weight = 1, Direction = 5), but to a lesser degree. About 67% of participants found the duck Happy, while over 85% said the duck was funny.

Duck 4 walk cycle results

Sadness and fear were often found at similar percentages of influence. For example, video thirteen (Amplitude = 3, Speed = 5, Weight = 9, Direction = 0) was classified as Sad by 38% of the participants, while 41.2% classified it as Fear. This was triggered by a high weight while walking, with the respective parameter Weight = 9. This observation is backed up by the sinking motion described by Melzer et al (2019) when defining sadness.

It is worth noting that Amplitude has an influence in the results. Videos five and thirteen both had Weight = 9, but only the latter was classified as sad and fearful. Amplitude = 5 for video five, while Amplitude = 3 for video thirteen. This might be linked to the enclosing behaviour recognized in fear and passive weight specific to sadness (Melzer et. al 2019).

Discussion and Conclusion

This report illustrated the creation of a procedural walk cycle for a duck character with the option of varying the movement style through a set of parameters (Amplitude, Weight and Direction). Two of these parameters, Weight and Direction, are linked to Laban’s efforts of movement. In specific combinations, Laban’s efforts have been shown to convey emotions. Thus the duck walk cycles can be nuanced through such emotions.

The survey results were conclusive only for the expression of joy, with sadness coming second. The most indicative parameter of such emotions was Weight. Low weights have been found to illustrate happiness, while high weights are more representative of sadness. These results are similar to the characteristics given to such emotions in a study on human movement and the link to emotions (Melzer et. al 2019). Moreover, people were more prone to find a duck funny when it was displaying a happy walk cycle.

More work is needed, however, to further understand the mechanics of stylized walk cycles, the emergent theories behind emotions and what comprises a funny behaviour. In the future, comparisons can be done with similar techniques from the field of physics simulations or machine learning algorithms, rather than purely mathematical procedural animation.

It must be said, however, that this report shows how simple movements have the potential to convey complex behaviours. Along with emergent theories, procedural animation could unlock nature’s hidden patterns of movement using the simplest of tools. In other words, we are slightly closer to discovering the “movement code” of a duck, which opens possibilities for other, more complicated beings, maybe even humans.

References

  • Bishko, L. 2014. Animation Principles and Laban Movement Analysis: Movement Frameworks for Creating Empathic Character Performances. Research Showcase at Carnegie Mellon University: Nonverbal Communication in Virtual Worlds: Understanding and Designing Expressive Characters.
  • Ekman, P. (1992). An argument for basic emotionsCognition and Emotion, 6(3-4), 169–200. [Link here]
  • Laban, R., Ullmann, L. (2011). The Mastery of Movement, Fourth Edition. A Dance Books Publication.
  • Melzer Ayelet, Shafir Tal, Tsachor Rachelle Palnick. (2019). How Do We Recognize Emotion From Movement? Specific Motor Components Contribute to the Recognition of Each Emotion. Frontiers in Psychology, Volume 10, 2019, Pages 1389, DOI=10.3389/fpsyg.2019.01389, ISSN=1664-1078 [Link here]
  • Reynolds, Craig W. (1987). Flocks, herds and schools: A distributed behavioral model. SIGGRAPH Comput. Graph. 21, 4 (July 1987), 25–34. DOI:https://doi.org/10.1145/37402.37406
  • Laughing Matters | Comedy Documentary  | Earful Comedy. (1985). Redistributed by Earful Comedy, narrated and starring Rowan Atkinson [Video] [Link here]
  • The Logic of Movement. Workshop by Stephen Mottram as part of the Pupeteering Festival, Bristol 2017.
Standard

2 thoughts on “Le Quack Walker v1.0

  1. Pingback: Le Quack Walker V1.0 – Anamation

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s