Character Essences, Research & Coding

Robin Animator V1.0

Note: The code and Maya file are available on GitHub.

The Robin Animator V1.0 is a Maya plugin written in Python for animation prototyping. It can be used to generate basic procedural animations of little bird characters. These animations can then be exported for your games, rendered in your films or can serve as reference for more complex animations.

Motivation

The question behind this project was to see whether we can create complex bird animations using simple movement components. This can be linked to emergence theory and subsumption architecture. The former talks about how a complex system is greater than the sum of its parts, while the latter shows how apparently intelligent looking behaviour can arise from a set of simple, separate component behaviours. In other words, complex character animation CAN be the result of simple movements working together!  In our case, the component behaviours link to the way each body part moves and tend to act independently from each other.

I chose to focus on little bird characters, robins, to be more precise. The reason behind this is that I’m fascinated by how these little creatures move. Their speed seems to be in a different time frame from ours, due to their minute proportions.  After looking at robins in the real world for a while, I decided to approximate their movement with a geometric prototype model.

Geometry and Movement

The geometric body parts link to the movement components that our robin displays. The following list shows the link between the two.

  • The Head
    • Geometry: Sphere and cone
    • Movement: Shake (Rotate Y), Nod (Rotate Z)
  • The Torso
    • Geometry: Sphere scaled along Y axis
    • Movement: Bend (Rotate Z) – Moves with Feet
  • Wings
    • Geometry: Flattened spheres
    • Movement: Lift (Rotate X)
  • Tail
    • Geometry: Extruded cube
    • Movement: Wag (Rotate Y), Lift (Rotate Z)
  • Feet
    • Geometry: Modified cubes
    • Movement: Bend (Rotate Z) – Moves with Torso

The robin’s movement is controlled by the RobinCTRL, a circle at the base of the character. The added attributes inside of it (eg. Lift Tail, Wag Tail etc.) are connected to the corresponding rotation fields for each geometric component of the character. These rotation fields usually have a minimum and maximum rotation limit to avoid self-intersections.

The main rule behind the rotation of any character component is a sine wave:

Where R is the rotation angle, A is the amplitude, S is the speed and is the angle linked to the current frame. The amplitude and speed can be set from the graphical user interface for each character component. The current frame is usually the one being considered for the addition of a key. To better understand the process, let us have a look at the GUI and the Python code behind it.

The GUI and the Code Behind It

The GUI has the following components:

  • Reset Robin button
    • Clears all the key frames of the animation
  • Animation Start Frame
    • Sets the start frame for any animation component
  • Animation End Frame
    • Sets the end frame for any animation component
  • Component tabs
    • Feet control the hopping movement
    • Torso controls the bending of the torso
    • Wings controls the flapping of the wings
    • Head controls the shaking and nodding of the head
    • Tail controls the wagging and lifting of the tail

Each tab usually has fields for setting up the frames per movement, the amplitude and speed. The frames per movement refers to the number of frames necessary to perform that action once. A hop taking place over 10 frames is faster than a hop over 20 frames for example. Speed can be used to tweak this effect of course.

In the case of the Feet tab, once these settings are typed into the fields, the user can press the Hop button, which calls the following method.

#Head nodding animation
def createNodHeadAnimation():
    robinCtrl = cmds.select('RobinCTRL', r=True)
    getAnimationStart()
    getAnimationEnd()
    getNodHeadFrames()
    getNodHeadAmplitude()  
    getNodHeadSpeed()     
    flip = 1
            
    for i in range(animationStart, animationEnd, nodHeadFrames):
        if mirrorNodHead:
            flip = -flip    
        
        for j in range(0, nodHeadFrames, 1):
            if (i+j < animationEnd):
                teta = j*pi/nodHeadFrames            
                headRotation = flip * nodHeadAmplitude * math.sin(nodHeadSpeed * teta) 
                        
                if headRotation > 90.0:
                    headRotation = 90.0
                cmds.setAttr('RobinCTRL.NodHead', headRotation)
                cmds.setKeyframe('RobinCTRL', attribute='NodHead', t=i+j )  
            else:
                break

The RobinCTRL circle is first selected. Then the animation start and end frame values are extracted from the GUI.  Next getNodHeadFrames(), getNodHeadAmplitude(), getNodHeadSpeed() extract the frames per hop, amplitude and speed values from the GUI. The flip parameter is a boolean which decides whether the movement should be symmetric or not (ie. hopping up and down, rather than hopping up and then jumping to a down pose briskly).

The two for loops that follow travel through the frames of animation and set a keyframe at every step. The inner loop is the one that creates the individual hopping movement, while the outer loop makes sure all the frames between the start and end frames are covered. The  angle, which controls the point on the sine wave we’re currently at, goes from 0 to  in nodHeadFrames steps. This is the parameter set by the getNodHeadFrames() methodThe last two lines from the inner for loop set the calculated headRotation in the NodHead field of the RobinCTRL circle controller and add a keyframe to this new value.

Similar steps can be seen in the remaining movement component tabs. Individual methods were written for each tab, but I believe they can be reduced considerably as the current code is repetitive. For future work, it would be nice to introduce techniques for creating animation sequences (eg. hop for 30 frames, stop, look around etc.). Also, saving parameter settings would be useful for recreating popular animations like flying or whatever the user enjoyed doing.

Please have a play with the code (link to GitHub code and Maya file) and tell me what you think! Thank you!

Standard
Chasing the Light, Flash Fiction, Stories

Murmur

A writing exercise done during a Bath Writers: Beyond the Margins meeting…

Someone let the cat out in the rain. Or did it leave by itself? Doing what most people at the Broken Institute could not do. The cat stepped reluctantly onto the wet grass. Its white persian fur was covered in hard dents of rain. It shivered, but stepped forward.

Soon the windows of the building were filled with faces. Porcelain faces of people wrung with regret. Their hands flattened against the glass. One red haired lady mouthed the word ‘Murmur’. She was dressed in her lavender nightgown at four in the afternoon. ‘Come back!’ she whispered.

Her eyes were swollen from the tears she had cried in the morning. But Murmur had comforted her then. The cat would come to each room, to be stroked. It would start with her, Lorelei, and then walk to each of her neighbours. From morning till dusk Murmur was the sole comforter. It would hear each sigh, and wipe even the smallest tear away. It would listen to stories of woe, of lost children, of burnt down houses or harsh words, spoken at a wrong time.

At night, Murmur would rest by the fireplace, where it could lay aside the worries of the day. But now someone had let the cat out. Or maybe it left by itself. Maybe it thought people could comfort each other. Or at least step out into the rain.

Standard
Formal and Polite, Poetry

The Shiny Shoes

Hubert Rhubarb makes great shoes
Of all sizes, shines and soles,
Him, George Ginger and Bob Booze,
Are co-craftsmen at “Stuffed Holes”.

They’re all shoeglots from the Shoeglot clan
With round noses, crass hands and tiny feet,
They shuffle quickly with their plan,
To make bright shoes for King Plum’s fleet.

Hubert Rhubarb was ordered by the king
To make the brightest shoes of all,
‘My men’s feet should sparkle as this ring,
When sailing back with the victory call’.

On the day of King Plum’s battle
The men shone bright from head to toe.
They were so proud they caused a rattle
Competing in whose shoes had the best glow.

The enemy fleet of King Pomhen
Sailed anxiously to meet its doom,
But seeing the distracted men
They shook off their prior gloom.

King Plum’s soldiers stared at their shoes
Flinging their swords round without aim,
Neither brother nor king made such great muse
As gawping at their feet, bent, without shame.

The king returned with a dozen men
Weeping that their feet were bare
The king wrote to “Stuffed Holes” again
‘From now, dull shoes are my men to wear.’

Standard
Chasing the Light, Essays, Stories, Thoughts About Life

The Songs of Birds

magnolia

God gave the sweetest melody to the smallest of birds. A cluster of goldcrests fly from branch to branch. Their little tails shake with anticipation, while their beaks are picking at the sweet flowers. Ah and the tree, a magnificent giant covered in ivy! I can’t even see its trunk or begin to decide what family of trees it belongs to. It stands there, with its crooked branches pleading to the heavens. Covered in parasitic veins and leaves, it breathes heavily. The bark bleeds under the tight grip of the ivy, but it still finds love for the little creatures that play amongst its withered forms.

The tree reminds me of a man, whose once rich possessions have succumbed to decay and misfortune. His status, albeit stained by wretched gossip, strains to stay afloat. He sits on a chest in the middle of his once grand, now empty, ballroom. His eyes close with delight as the soft voices of songs once sung there caress his soul. ‘I have lost my worldly glory.’ he whispers. ‘I have seen the cruelty of man at its peak and have tasted the bitterness of poisonous lips!’

‘Alas’, he sighs, ‘But I cannot forget the beauty of man’s soul when he loves. And when one loves, one sings! I shall have one last ball here, with the last of my earthly possessions. Let the grandest singers and musicians come and share their tunes! And after everyone has heard their songs and got their fill of gladness, I shall go into the world happy. Poor in my attire, but rich in my heart.’

Such is this tree as it listens to the goldcrests and black birds nesting in its wounds. For this tree is wiser than me. It bears its pain with patience, listening for what rings true and lets it rest on its shoulders. It does not shake the winged messengers away, but rejoices in their gifts. The tree knows that its roots are deep inside the earth and that the ivy is tight around its neck. It also knows that the songs of birds speak of a world it cannot yet see, but whose beauty and truth bring a promise of freedom.

Standard
Animation, Character Essences, Research & Coding

E-StopMotion

Digitizing stop motion animation has been my Engineering Doctorate project for the past three years. The aim was to simplify the workload for artists and offer them tools to bring their handmade creations in a 3D environment. The following video shows a simple pipeline for digitizing characters from the game Clay Jam, by Fat Pebble. This is now published work and open for film and game companies to use.

Publications

[1] Anamaria Ciucanu, Naval Bhandari, Xiaokun Wu, Shridhar Ravikumar​, Yong-Liang Yang, Darren Cosker. 2018. E-StopMotion: Digitizing Stop Motion for Enhanced Animation and Games. In MIG 18: Motion, Interaction and Games (MIG 18), November 8-10, 2018, Limassol, Cyprus. ACM, New York, USA, 11 pages.  [PDF]

 

hellidropter2_1_0024-e1496355516523.png

Hellidropter says Hi!

Abstract

Nonrigid registration has made great progress in recent years, taking more steps towards matching characters that have undergone non-isometric deformations. The state-of-the-art is, however,still linked more to elastic or locally shape preserving matching, leaving room for improvement in the plastic deformation area.
When the local and global shape of a character changes significantly from pose to pose, methods that rely on shape analysis or proximity measures fail to give satisfying results.
We argue that by using information about the material the models are made from and the general deformation path, we can enhance the matches significantly. Hence, by addressing mainly plasticine characters, we attempt to reverse engineer the deformations they undergo in the hands of an artist.
We propose a mainly extrinsic technique, which makes use of the physical properties we can control (stiffness, volume) to give a realistic match. Moreover, we show that this approach overcomes limitations from previous related methods by generating physically plausible intermediate poses, which can be used further in the animation pipeline.

Project Links

You can follow the research progress on Vimeo and GitHub. This is a work in progress project, in collaboration with the Centre for Digital Entertainment at University of Bath and Fat Pebble, under the supervision of Darren Cosker.

Standard
Chasing the Light, Thoughts About Life

Pebbles in the Storm

‘Let the little children come to Me, and do not hinder them! For the kingdom of heaven belongs to such as these.’ (Christ)

girls

Girls in front of a mosque in Mumbai.

This week has been heartwrenching, but also eye-opening and fun. It started with a three day training led by Ash Perrin from the Flying Seagull Project. It ended with a masterpiece film, Capernaum, directed by Nadine Labaki and starring syrian refugee Zain Al Rafeea. The voices that echoed throughout the week, however, were the voices of children.

Children in refugee camps. Children running away from authority. Children making their own justice. Angry, sad, hungry, tired, alone children, who have lost so much and yet still find the strength to take care of each other. Like Zain (Capernaum) helping his sister hide her period from her mother, since the blood stain meant she was ready for marriage, at eleven. Or how Zain took care of an infant whose mother had been arrested due to illegal immigration.

Oh, child of the past, where are thou now? What deserts are you wandering through? Who feeds you and gives you drink? Who tells you bedtime stories and gives you shelter? For I have sheltered you in the depths of my heart and people have told me to leave you there. I added more and more layers of wood and brick and your voice became like a distant whisper.

‘Be more mature.’, ‘You have to drop the silliness.’, ‘You’d be so pretty with some makeup on.’, ‘It’s time you got a real job.’, ‘You’ve been in school long enough.’, ‘Stop running after princes and fairy tales.’, they said, sometimes even my family, although I know they meant well. But this week something changed. I was allowed to play. Actually I was told to be sillier, goofier, wilder! Improv for me is usually a place to play and be free, but the Flying Seagull Project (FSP) training was much more than that.

FSP have brought smiles to thousands of refugee and underprivileged children. Dressed up as figments of our imagination, Ash and his crew believe that childhood is a right that everyone should have. They bring games, songs and magic to children all around the world to help them play again. After training with FPS I believe that us grown ups can also learn a thing or two about the joy of being daft.  

Oh, how the tables have turned! Grown ups teaching children to play and children teaching grown ups to raise their young. But we need this, because in order to clean and bandage the wounds of our Earth, we need grown ups to be childlike and humble, while children need to be heard and taken seriously.

So if you have reached the end of this article, take a moment to think. How can you be a pebble in this stormy sea we live in today? Your ripples might seem swallowed by the waves, but they are never lost. The Flying Seagull Project (and I :D) will bring hope, courage and smiles to children. Capernaum and other similar films will help fight child neglect. How can your gifts be used to bring a voice to children…and not only the ones out there, but also the one inside your soul?    

Standard
Formal and Polite, Poetry

The Interview

Mr. Perkings is quite glad,
This could be the job he had
Were he rich and educated
At top schools that man created.

He puts on a long blue tie,
Shines his shoes with deep dark dye,
Perkings likes his long grey beard
Bank Deadend likes them quite sheared.

‘Good afternoon, you must be Mr. Perk!’
‘Perkings ma’am’, he gave a smirk,
‘Mr. Banks will see you soon,
Have a seat in the saloon’.

As he sat on a small chair,
A dozen others turned to stare,
They were dressed the same as him
With a tie and chin quite trim.

One was counting notes with speed,
Another stacking coins with greed,
Perkings had nothing to count
That could add to some amount.

‘Perkings!’, ‘Yes sir! I am here,
Of assistance with great cheer!’
He then stepped through a grey door
Of an office with grey floor.

‘I can see from your CV,
You can count to level three.’
‘I worked hard, sir, to become,
Through this job a level one!’

Mr. Banks gave him one glance,
From his dyed shoes to his hands.
‘We want at least a level two,
Don’t call us, sir, we’ll call you.’

(From  Formal and Polite)

Standard