1. Home
  2. Blog
  3. Headtrack Showcase: Stick the Bandana
Headtrack Showcase: Stick the Bandana

Headtrack Showcase: Stick the Bandana


A surprising way to create a head-track in After Effects so you can fit a fabric on a rotating head or any other curved surface.

A few months ago, during a cinema project i took part of, i was asked to cover a the head of a young actress  with a bandana (hijab, to be accurate…), in a shot that was already taken. The reason was to show the character’s progress in getting close to religion.

Theoretically, with a little track, i can even stick a raccoon on any head (if I really need to). But when i got the shot and took a close look at it i realized the magnitude of the challenge:

Point track won’t cut it because her head is spinning in a way that position, rotation or scale can’t recreate.

Mocha tracking is a little bit better but gives a very flat look, which reminds more the movement of a crusty tortilla than a bandana.

3D tracking sounds like a good idea: Track the head, get a 3d camera solve which moves oppositely to the “static” head, put a lot of “patch” layers (dispersed in 3D space) that make the bandana and get paid. But this solution, which works nice in theory, stopped in the first phase- to get a solid track. Every 3d tracking engine (AE, boujou and C4D) failed miserably because the head in the shot was to small to get a camera solve.

3d Headtrack after effects
3d Headtrack after effects
3d Headtrack after effects

After digging through the internet i realized that there is nothing more than these 3 methods, and to say to the client that this is impossible is not an option. So now i realized that this is a unique problem, that need to get solved… but it seems like there are no more bunnies to pull out of the hat/After Effects tool box. But actually there is, just not the tool i thought could be useful in this case. because other than CC Sphere (and believe me, I tried) what can give me a three dimensional rotation of a head? the Puppet Tool.4 The Puppet Tool seems like a nice candidate for this job because of his ability to deform any texture like the bandana with his pins, and this was the “eureka” moment .if i’ll enough points on the head and apply them to the bandana puppet pins, maybe there is a slight chance of  the bandana will deform and curve with the head movement and rotation? will it work? (spoiler alert)… it did! and these are the steps:

Step One:

First of all we need to track “strategic” points on the head. the native point track in after effects did a really good job in most cases but mocha ,the best track tool in “Class”, was there to help in the “Hard to Track” points. in the end of each track procedure i applied the track data to new null layer, as a preparation to the next steps.


Step Two:

I placed the bandana layer on the head of the actress’s head- a layer that was prepared in advance in Photoshop to fit the head of the girl in a specific frame. now it’s the time to take the Puppet Tool and place the pins on the location of the corresponding null layers.


Step Three:

Now we need to connect the Puppet pins to the null layers, and because it’s not a “straight forward” procedure, i used the following expression on each puppet pin and replaced the “Null name” part of the expression with the correlating null name:

x=thisComp.layer(“Null name”);



This expression is converting the layer space to the puppet pin’s space and moving the pins in a correct manner like the nulls. now, when everything is starting to look right, and we wiped off the tears of joy we can continue to the next step- cleaning and adjusting.


Step Four:

This is why i’m here- compositing- to make everything connect: to build shadows, adjust the colors, fix the lighting so it will fit in the frame, blur, match the grain and any other thing that could make the bandana a seamless part of the shot, be generous with the time and effort you put on this step.8

Step Five:

Continue to the rest of the shots because i burned too much time on this one. 9

Even after you know After Effects for some time, once in a while comes a case like this and reminds you that there is always something more to learn.


Leave a Comment