perpetual motion machine that you will never hear about again./0.jpg"/> perpetual motion machine that you will never hear about again./0.jpg" />
Nice Rack Focus Experiment

In a recent tutorial Animating a Still, we used tracking data from a real hand-held camera to give our still image a natural look, as opposed to using a mathematical expression like the wiggle. This gave our footage a natural organic look that would be difficult to achieve with expressions.

Then I thought I would try a similar experiment utilizing a real optical rack focus.

So I filmed a dark square while performing a real rack focus to see if I could extract the information inside of after effects to use with a 3D camera.

And since I’m actually posting this, you can assume it worked, unlike my perpetual motion machine that you will never hear about again.

Watch Tutorial Experiment

Download Footage

June 21st, 2010 @ 5:09 pm
lol, the title threw me off a bit. but nice info and vid man!
June 21st, 2010 @ 5:13 pm
I love to experiment with this type of stuff.
Thanks bro
June 21st, 2010 @ 5:16 pm
Really superb.... you ROCKS.... but we need somewhhat advacned tutorials, please
June 21st, 2010 @ 5:19 pm
Very nice job Andrew!
June 21st, 2010 @ 5:25 pm
Thanks for this Andrew! Will be using this very often!
June 21st, 2010 @ 5:26 pm
It actually never crossed my mind that you could capture the rack focus..... Makes me wonder what else someone could bring into after effects from real camera elements.
June 21st, 2010 @ 5:26 pm
Ah, very nice, very organic, natural feel! Couldn't think how you were going to apply tracked motion to a blur, very nicely done.

I was wondering the other day if there was a way to use the lens objects from OF as a lens blur bokeh object, instead of just a polygon.
June 21st, 2010 @ 5:27 pm
really nice, your so helpful
June 21st, 2010 @ 5:30 pm
that was cool
thanks andrew!
check this out:
me and my friends made it
June 21st, 2010 @ 5:31 pm
Hey man They should start payin for the tutorials cuz i know its alot of time and hardwork that puts in 2 these stuff and alot of ppl just get wants and demands of wot ur tutorials should b some of 'em just don't appreciate even ifs its cheap and couple cents let dem pay u got a family u gatta maintain man i'm sure all of us can afford man ANDREW UR STUFF R GR8 THANKS BRO 4 EVERYTHIN U'VE HELP ALOT OF US IN WAYS U CAN'T EVEN IMAGINE U JUST DON'T KNOW U ROCK!!!! DUDE
June 21st, 2010 @ 5:33 pm
True Super Geek
June 21st, 2010 @ 5:38 pm
I like focusing on nice racks. :)
Jack Howard
June 21st, 2010 @ 5:41 pm
All I saw was "Nice Rack" and I clicked! How disappointed I was...
June 21st, 2010 @ 5:44 pm
Hey Andrew,

While you are being very experimental how about checking this out and see what you think.

A fellow mad AE scientist.
June 21st, 2010 @ 5:44 pm
i told you Andrew , i love you , hahaha you're my brother, keep going, i have learnt alot from your tutorials. hugs from Cambodia.
June 21st, 2010 @ 5:46 pm
ha ha I'm doing some of this stuff right now. Normally the way these things work is, I try hard to figure it out, finish a project, and 2 weeks later AK comes out with something. Can't wait to read it when I get out of the office.
Diego G
June 21st, 2010 @ 5:50 pm
How come the tutorial isn't in the tutorials part?
June 21st, 2010 @ 5:57 pm
So Pretty Smart!!!!!!!!!!!! grettings from VENEZUELA
June 21st, 2010 @ 6:00 pm
The title got me interested in something else, but very interesting experiment;however, I would like to see Elephants on acid, or possibly After Effects on acid.
Gerge Ftw
June 21st, 2010 @ 6:15 pm
Hey andwer ive watched ur tutorials for some time know and i noticed that when ur using after effects u never experience any lag so can u tell me how u do that because i use after effects and every few minutes it either freezes and/or crashes for me
June 21st, 2010 @ 6:19 pm
June 21st, 2010 @ 6:36 pm
Stay Off Drugs!! .. Andrew thats key my friend...KEY!(frame)
June 21st, 2010 @ 6:53 pm
Its good to know your're a simpsons fan. an the rack focus is cool too. :D
June 21st, 2010 @ 7:01 pm
I see the potential for a new plug in!

Organic hand-held cam instead of wiggle. Organic rack focus. Organic ISO. Organic Exposure. Organic zoom. Organic camera roll. Organic shutter speed. Organic WB.

June 21st, 2010 @ 7:06 pm
lol at first i only saw nice rack and instantly clicked the link
June 21st, 2010 @ 7:11 pm
Tracking rack focus is a cool idea. I would suggest an alternative method that may be even faster and simpler: instead of converting the grayscale "focus value" to a position using a tracker, use the layer method sampleImage() to directly read the color value of some appropriate area. You can use a point control to position the sampling center. And you may be even able to track focus on production footage by converting it to grayscale and positioning the point control near some reference contrast point.

You can check out and for clear and detailed explanations, and even on your own forum :) for some ideas.

It may even be cool to implement it as a "Focus Sampler" preset. Just drop it on some footage, position the point control near a contrasted area, adjust some threshold and you're done! Target a camera depth of fiend or some blur filter.

Thanks and keep up the great work Andrew!
June 21st, 2010 @ 7:27 pm
Or just watch maltaannon's tutorial posted above by 10 PolarBears which does exactly what I described :)
June 21st, 2010 @ 7:33 pm
Nice and subtile..would be definitely useful...nice jokes parts as always..thanks Andrew!
June 21st, 2010 @ 7:34 pm
I might have done it like this:

tint - black and white
levels - crush blacks and whites
threshold - turn anything non-white into black
Invert - that
Expression: sampleImage()
June 21st, 2010 @ 7:42 pm
Buku cleaver!!!
Thinking like and artist and technoid at the same time.

Speaking of technoid, here's a real perpetual motion machine. At least in the context of the earth. As long as the earth turns, it will rotate. If you take it to OZ, it will rotate the 'wrong' way.

...and rack focus is how I met my wife.
June 21st, 2010 @ 7:51 pm
Lol the title made me do a double take when it popped up in the RSS feed. :)
June 21st, 2010 @ 7:52 pm
Once i saw the test video before the tutorial i kinda already knew what you andrew was going to do. It's pretty smart and has made me think of a few ideas of my own
June 21st, 2010 @ 8:13 pm
Thanks for the tutorial. You sir are a genious! Chicago loves you, you should come visit us!
June 21st, 2010 @ 8:15 pm
Very helpful I would say...Maybe not the most interesting like you said Andrew.
Domingo Santay
June 21st, 2010 @ 8:20 pm
Gracias por toda la informacion Here una buena persona
June 21st, 2010 @ 8:23 pm

Such a brilliant idea! Never even crossed my mind that this was possible! Thanks for the awesome tip!
June 21st, 2010 @ 8:36 pm
Just finished doing something similar: strapped a vibrator to my camera shot a test grid and used that to control the blur on some landscape footage shot from the top of a hill, to make it look like it was shot from a helicopter without a stabilizer.
Wish I had seen this first, it would have saved me hours of mussing around to get the expressions running right!
June 21st, 2010 @ 8:41 pm
Hey Andrew I like your ideas I actually just made a video with fake camera movement but I used your aftershake plugin and just set the slide to 1 check it out
June 21st, 2010 @ 9:44 pm
Very nice experiment! Thanks Andrew!
June 21st, 2010 @ 9:56 pm
What would be cool is a way to save the data in some form so you simply have to apply as a preset or plugin, called Organicam. Some of the presets could be called, Frantic, Drunk, Shaken not Stirred...etc.
June 21st, 2010 @ 10:09 pm
Haha I got kinda excited two words in, but hey, still cool!
June 21st, 2010 @ 10:18 pm
Nice. Great little thing to know how to do...may seem pointless but I bet this technique will be handing for SOMETHING.
Ben Wotton
June 21st, 2010 @ 10:31 pm
Man that's genius! I seriously want to know how this experiment started! :)
June 21st, 2010 @ 10:38 pm
Wow, that's actually pretty interesting that you can convert a rack focus to numerical data in AE. I wonder if that's possible for the iris somehow as well?

I know professionally you're not supposed to change the iris whilst filming, but it'd be a cool organic intro to a title graphic if mixed with this rack focus technique.

Cool stuff AK.
June 21st, 2010 @ 11:04 pm
You are a genius Andrew!
June 21st, 2010 @ 11:12 pm
Hi Andrew,

This is absolutely brilliant. I commend you for your ability to think outside the box and devise a way to extract numerical data from an image.

I was bummed when you mentioned using real camera shake data in your earlier tutorial. I had devised the same method a few years ago as a solution to an effects shot I was working on and was so very proud of myself. You've stolen my mind!

Anyway, I, like everyone here, am so grateful for your tutorials and fantastic products. You're an invaluable resource to any AE artist. Thank you for what you do.

June 21st, 2010 @ 11:32 pm
hey Andrew that was smarter than the wiggle part in the previous tutorial for real, but can we do that for a zoom in zoom out with a wiggle? ive been always wanted that man thnx
June 21st, 2010 @ 11:32 pm
I mean real zoom in zoom out and real wiggle :)
June 21st, 2010 @ 11:56 pm
Yo Andrew! This guy on youtube, you've probably seen him but he has taken a lot of these techniques and used them in his vids! Check them out.
June 22nd, 2010 @ 12:12 am
Hey Andrew, thanks for this tut, I really like this technique of extracting data from actual footage. If you're looking for a realistic looking effect, what better source than the actual footage right? You mentioned at the end you could do this with a flickering light, which I might try out myself, but I've used this expression for a few years for flickering effects and it works really well. Just copy and paste this into almost any property, opacity works well, and you get a pretty awesome effect. If you use this on position properties you can get a very weird effect too. Might give you a seizure, but what won't these days?

// HIGHER values for probability make a random opacity LESS likely.
// A value of 1 will always create a random opacity, a value of 2 will
// create a random opacity 50% of the time, value of 4 will be 25%, etc.
probability = 6;
// "opacity_normal" is the value set for opacity when the a random
// opacity is NOT chosen.
opacity_normal = 100;
x = random(probability);
if (x <= 1) {opacity = random(100);} else {opacity = opacity_normal;}
June 22nd, 2010 @ 12:15 am
"ill press edit... duplicate!"
Gene Ween
June 22nd, 2010 @ 12:43 am
creating natural Blur from Tracking data??... it's insane. It's math. It's beautiful. Well done Sir, Well done
Some Guy
June 22nd, 2010 @ 1:03 am
This was a very interesting experiment, thank you!
I wonder why you didn't make it a tutorial (or a Short Cuts episode), so it will show up on the tutorial page and people can find it later, without searching the blog.
June 22nd, 2010 @ 1:29 am
Stay off drugs?? What fun would that be? You said to enjoy the rest of my week..
June 22nd, 2010 @ 1:47 am
Cool men! keep on coming
June 22nd, 2010 @ 2:17 am
Blows my mind...
June 22nd, 2010 @ 2:26 am
it's important to stay or even better PLAY with focus!

But i have to say this technique seems to be very complicated, maybe for really specific project it will be usefull.
June 22nd, 2010 @ 2:26 am
When You told about light flickering, first I thought about was Optical flares. I don't have Optical flares so i can't make an experiment, sadly :(
June 22nd, 2010 @ 2:31 am
lol, really cool experiment
June 22nd, 2010 @ 2:43 am
June 22nd, 2010 @ 2:47 am
"" - Extract defocus? This is madness!

Cool idea! thx for tut

June 22nd, 2010 @ 2:50 am
Nice... Yet again you open the door to new possibilities for us! Keep it up!
June 22nd, 2010 @ 4:36 am
Yeah! that is one more step into realistic CG, thank you, this video gives a birth to different and innovative ideas.
June 22nd, 2010 @ 5:47 am
I missed the "I am Andrew Kramer and we will see you next time." part at the end.. :P
Bob K
June 22nd, 2010 @ 7:04 am
The potential in this for management of the built-in camera is enormous!
Thanks for helping us to better understand the science!
June 22nd, 2010 @ 7:36 am
Wow I'm inspired! Gonna see what other in-camera things I can take to my digital canvas.

... lol how do you come up with this stuff?
June 22nd, 2010 @ 7:59 am
I think maybe you should be piloting rocket ships or something. VERY clever.. I can see the possibilities of this already. Very clever indeed.
June 22nd, 2010 @ 8:10 am
Pure genius - well done Andrew.
June 22nd, 2010 @ 9:04 am
The title made me think something completely different...

I had the same idea awhile back, but didn't get anywhere because I was still fairly basic in AE and didnt know very much about it. Couldn't you write a plugin with this method (on simple shots, of course) to remove DOF?

Anyways, thanks for making this concept a reality. Now I want to know how you figured this out, since you said it was embarrassing. :)
June 22nd, 2010 @ 9:11 am
I wonder if these would work with a circle instead of a square? I think it's a lot easier to write a good story about a circle, than of a square...
copilot user
June 22nd, 2010 @ 9:44 am
Andrew, really thanks! You are an amazing man who inspired me to work with movies especially with fx. Very thanks!
June 22nd, 2010 @ 9:44 am
Dude, that's seriously clever. At first I was like "I have no idea how to do that", and the method you were using completely blew my mind.
You should be an engineer or something, that was pure genius.

Keep it up, cheers!
June 22nd, 2010 @ 10:00 am
Nice experiment, realy nice idea!
It can use almost anything for organic way of look in
animation of camera, light...
realy nice!
June 22nd, 2010 @ 10:20 am
Very cool idea! Thanks for sharing!
June 22nd, 2010 @ 10:34 am
Now do we to start calling you "Professor Andrew Kramer"
or Just The Mad Professor?

Very Cool Experiment :)
June 22nd, 2010 @ 11:17 am
Very niiiice! and nice title too!
Zackery Zounes
June 22nd, 2010 @ 11:19 am
DUDE!!! You are a freaking GENIUS!!! I would never have thought of that on my own. How in the world did you do that?
Eric Cavazos
June 22nd, 2010 @ 11:54 am
I would like to see a real life flicker of a light bulb or element to a flare. Maybe sun flicker applied to a imitation flare from Optical Flares. Of course if the sun flickered we would all be dead, but I am sure you know what I mean.
Göran Thorén
June 22nd, 2010 @ 12:41 pm
Ok, I have stopped being supprised by your magic and creativity. You're a tru wizzard Kramer!

This little experiment is going to come in handy.
June 22nd, 2010 @ 2:29 pm
Very nice experiment, hopefully i can find something to use it on.
June 22nd, 2010 @ 2:36 pm
Something that you can do in 3dsmax to get more of a 'hand animated' or motion capture feel and would be nice to somehow incorporate into ae is the ability to keyframe & record live keyboard, mouse and/or joystick controls and then use that live recording in your animation.

There are tutorials out there on animating characters in 3dsmax with joysticks, more like puppeteering. Anyway I think this might help make your process go faster.

I think it would be fun to use a wii remote's acceleromater data to control a 3d camera in ae and then be able to record your motion live.
June 22nd, 2010 @ 2:51 pm
@Andrew Kramer - You mentioned a flickering light as a source for extracting data. A similar technique was used in Lord of the Rings. They used fire and flames data and blended on scenes to simulate a windy chaotic world, when frodo put on the ring.
June 22nd, 2010 @ 3:07 pm
Please do more Experiments :)
June 22nd, 2010 @ 3:34 pm
Sounds like a new video copilot dvd - "real camera movement keyframes" :)
June 22nd, 2010 @ 5:45 pm
Excellent!!.this kind of stuff deserves a new preset or plug-in " VC real-camera data" Ill will pay for that for sure.
June 22nd, 2010 @ 8:10 pm
andrew you are mad! how did you get there!? it's madness!
June 22nd, 2010 @ 9:00 pm
always klever, always Kramer.
June 22nd, 2010 @ 11:13 pm
Outstanding information as usual. Thx from Oregon
June 23rd, 2010 @ 12:10 am
Genius! This seems like you might have been an elephant in the 60's to come up with that, but useful as heck actually!

June 23rd, 2010 @ 1:50 am
Nice experiment Andrew!

I was browsing through videos of YouTube and I found this video:
(a greek song's videoclip)

It seems that the used one of these techniques to give the video an organic look.
How did they create this artistic-organic look?
Maybe they used another technique of getting info out of real world footage and compositing them into a moving photo or video...
Marçal Solé
June 23rd, 2010 @ 2:02 am
I don't believe in God. I believe in Andrew Kramer.
Rough Cut
June 23rd, 2010 @ 3:13 am
That is absolutely incredible. So many possibilities.
June 23rd, 2010 @ 3:18 am
Nice thinking man, looking at these tutorials I imagine that you spend 24 hours a day, working on AfterEffects. :DD
June 23rd, 2010 @ 3:36 am
Hi there! I uploaded that Simpsons video to youtube ;]
Since you posted it here many people watch it and comment it. That was nice suprise, because suddenly thousands of people started to watch this video and many posted your name on it :D
Maybe Im gonna start learning Adobe After Effects this summer...
PS: Simpsons rock!
Greetings from Poland.
June 23rd, 2010 @ 6:22 am
Pretty cool, technique. I will test this idea with the flickering light, sound amewsome! :D
June 23rd, 2010 @ 8:35 am
Lol :D i just love your videos. great job
June 23rd, 2010 @ 9:28 am
Deja Vu = Glitch in the matrix = the agents are close...............RUUUUUUUUUNNNNNNNN!!!!!
June 23rd, 2010 @ 12:27 pm
Very cool done Andrew!

check this out, it's a school project what I made with some friends.
June 23rd, 2010 @ 1:09 pm
just got dissapointed :D
June 23rd, 2010 @ 1:46 pm
That was actually a very clever useless experiment. The end product looks beautiful. This seems more ground breaking the more I think about it. As well as the elephants
June 23rd, 2010 @ 1:50 pm
Solution très ingénieuse et intelligente! Comme d'habitude avec Andrew !
June 23rd, 2010 @ 3:56 pm
Great stuff. It'd be interesting to see how this approach compares with using a drawing tablet with Motion Sketch, to cull the data from natural movement.
June 23rd, 2010 @ 7:40 pm
Andrew, God Bless You! We love you Man!
June 23rd, 2010 @ 8:23 pm
I was really hoping for some sort of Boob reference!
June 23rd, 2010 @ 9:24 pm
Andrew you are awesome!
Kyle Hatch
June 24th, 2010 @ 12:08 am
That wall... was certainly not white my friend. haha.
June 24th, 2010 @ 1:10 am
I really wish that you or anyone replies to this.

I have to design my school building collapsing for my institutes video-competition but my brain is just not processing in that direction. Please give me some suggestions. I don't want it to be hardcore 3D - like modeling the building and then shattering it... it would be to painful to do that way.

please, help me!!!
June 24th, 2010 @ 4:35 am
Can you tell us how to remove a shadow between the rack ?
I encounter these shadows between an C and D rack.
June 24th, 2010 @ 5:10 am
This was very interesting.
Along with the shaky motion this really creates a realistic feel.

Well done.
June 24th, 2010 @ 5:11 am
how to make Camera Projection with cc particle world
how to pause cc particle world effect 5,6 second
June 24th, 2010 @ 7:08 am
RAHUL, I think this tutorial can help you, Andrew makes realistics building with some planes in After effects and not too hard to do :

good luck
June 24th, 2010 @ 7:32 am

Hey, not sure if this is the sort of thing you're after, but I figured I'd give it a go anyway...

Check it out. If that's what you're after then head over to my site where you can find my e-mail address.
June 24th, 2010 @ 1:22 pm
Hi .. as always nice..

But I am kinda pissed no one is replying to my support request emails...

Bradley Bell
June 24th, 2010 @ 2:29 pm
Nic work as always :) just enough time to watch before school.
Thankyou, Andrew.
June 24th, 2010 @ 3:02 pm
It´s completely amazing how you´ve guess the way to "track" the focus. I just want to say you are a genius!! ;)
June 24th, 2010 @ 9:48 pm
Man...Even your useless experiments are surprisingly creative.

Bravo!! All respects to A.K.
Steve Green
June 25th, 2010 @ 4:47 am
Nice work Andrew,

On a kind of related topic,
Seeing that the new iphone has a gyroscope, I wondered whether the tracking data from that would be any use to solve a camera match move...

There is an app for recording data from the accelerometer, but obviously that's not particularly accurate...
June 25th, 2010 @ 8:02 am
Big Big Andrew... Coooool Experiment!
L'ho testato sul Focus Distance con una bella expression!
very very good!
Grazie dei tuoi preziosi consigli!
Ivan P
June 25th, 2010 @ 9:14 am
Hey Andrew, nice rack...focus.
June 26th, 2010 @ 5:07 am
Hey Andrew. Insane ideas. Love the way you open doors to thinking in organic motion. Seems so obvious once you 'fix the blur' on the co-relations between perception and reality. Quite genius.
June 27th, 2010 @ 9:29 pm
I don't know why this experiment is so cool to me. I've had a glass of wine at the end of my workday, so that might explain it. That said, I'm really impressed by how you came up with a method to get mathematical values from the rack focus. Awesome, as usual.
June 28th, 2010 @ 1:33 am
Very Professio-null :) Keep going !
June 28th, 2010 @ 3:47 pm
Nice rack focus experiment ... ha ha, good choice of title Andy !
Before Posting
We're trying to encourage more thoughtful commenting.  Please take a moment to write a meaningful response to this post.
* Name
* Email (will not be published)
* field is required