« Blender Conference 2007 report
Python is my friend… »

Tutorial: 2D animated eyes, “Pocoyó” style

MaloyoIn the “Pocoyó” CG series, even when everything is 3D the character’s eyes are 2D. Looking for a technque that allowed me to imitate this in a way that was also easy to animate I tried this method I’d like to share with you all.Let’s start by explaining what is this about. The idea is to have a control bone in our rig that let us change certain image texture in a material. The “poses” of the eyes are simply image textures that we need to change during animation as if they were a kind of flipbook. In this particular case, all we need is a one frame time change without any kind of interpolation.

Problem is that we cannot load different textures during animation time, they need to be pre-loaded in some way…

Material Settings

Texture settings

In my case, what I did was to load each texture on eac of the 10 texture channels available for a material. Using the same base material as the one I used for the face, I added image textures with alpha channel for each of the expressions I liked to have in my character’s eyes.
Them in IPO window I created a curve for the “Col” channel of EVERY texture channel (as simple as copy & paste the IPO curve once we chose texture channel from the little button you can see in the screenshot). The texture should only work on Col channel whenever needed. IPO Curve shape will depend only on control strategie we choose.

IPOs for textures
This is not hard to do, but we better be careful as to not regret our choice when we start animating. What worked best for me was to set up a radial system, I mean control everything using the rotation of a bone so when the bone rotates let’s say from -30 to 30 degrees, a “regular eye” texture is used, when it rotates in the -30 to -60 degrees range, the “Emo, look to your right side” texture is used, when the range is 30 to 60 degrees, the “look at left side” is used instead, etc. Depending on how many poses we are going to use, we set up a different rotation range so we can use the 360 degrees to cover all needed poses. For instance if I’m going to use 10 poses, I’d choose a 36 degrees range or less (360/10) . This leads to IPO curves that look like “tables” covering the desired range for each texture.

We need to create IPO drivers for these tables where we tell Blender which bone and which transformation of that bone will trigger the texture change. In this case I have assigned this IPO to the Z rotation of bone “ctrl.ojo.L” as you can see in the screenshot above.

As 10 texture channels might be too few to store all possible expressions for BOTH eyes, you can split the eyes in two identical materials using different material indices. This way you’ll be able to control each eye pose independently and get “combined” poses (like eyes strobic) without adding new textures. The best aproach is to setup completely ONE material including drivers and all and duplicate that in the end to save some time.

Now, if you rotate the bone, the texture changes though we couldn’t tell unless we render ! we need a “monitor” something that visually indicates what’s going on with the eyes. A way to do this is to add a couple extra bones with animated custom shapes. Let’s do that. First model a schematic of a 2D eye using curves or meshes (in the end you need to convert everything to mesh). Then add to that mesh some shapekeys ressembling the textures or eye poses. In this case I created 6 shapekeys trying to reproduce the textures I used. I named them “Normal”, “Left”, “Right” as you can see in the screenshot below…

Since we want this shapes to be controlled simultaneously and in exactly same way as textures, we can just copy and paste the IPO curves used for texture drivers, into the shapekey channels, doing this will also create all needed drivers for us.

IPO drivers for shapes used for bones

As last step we need to assign this animated custom shape to the bones we are going to use as “monitors” by filling in the OB: field for those bones using the custom shape object’s name and pressing the DrawShapes button in the armature.

Bones without shapesBones with animated custom shapesPreview Render

Now if you rotate the control bone, the monitors will change their shape indicating the texture that will be rendered. Nice huh ?

You can use this same technique for any objects that you need to change image textures durig animation like the screens of a computer, or anything you can imagine.

Take care and happy blending !

This entry was posted on Friday, November 9th, 2007 at 10:47 am and is filed under Blender, Maloyo Project, Rigger Tips. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

5 Responses to “Tutorial: 2D animated eyes, “Pocoyó” style”

  1. endragiri Says:
    November 14th, 2007 at 5:14 am

    I hope there are video tutorial for this coz with vit-tut I will more understand.

  2. cyberspark Says:
    November 20th, 2007 at 3:14 am

    Would be nice if we have a Video Tutorial on this ” 2 D animated eye” ………Great ….

  3. cyberspark Says:
    December 24th, 2007 at 11:09 am

    i got this

  4. darek Says:
    February 17th, 2008 at 4:50 pm

    Nice technique. At first I expected animated gifs, but this is much better. :D

  5. IIIDarts Says:
    November 1st, 2008 at 3:10 am

    Thanks guys this was exactly what I needed. I was doing this in a similar way but it was limiting. Your method helped me tune it up right! Blessings be upon you!!!!

    IIID

Leave a Reply


malefico’s spot is proudly powered by WordPress
Entries (RSS) and Comments (RSS).