Simulated Rack Focus

Moderators: Disciple, zlovatt

Post Reply
AndrewE
Posts: 3
Joined: November 29th, 2007, 12:17 pm
Location: Miramichi, NB
Contact:

Hey guys!

I figured I'd pass on a quick question to you as you are not only in the thick of it, but also the people I trust for answering such questions.

I'm looking at creating an expression that will allow me to create a slider so that I will be able to simulate a rack focus without using a 3d camera or 3d layers. Since I am a post supervisor at a small animation company here in Canada my expression programming is lacking, and thus why I turn to you fine gentleman and women.

The new show that we will be working on will be needing this effect quite regularly and I was curious to know if this is possible to link such layers together in this manner. I can wrap my mind around it, it's just the actual expression programming where I fail.

I know that I can attach a fast blur to the layer that I want to go out of focus on and control via keyframing but here's what I want to get sophiscated and then pick whip the other layer I want to "focus" on to but I need to have the inverse effect, thus giving the simulated rack focus.

If this doesn't make any sense whatsoever, please, please, let me know as this isn't absolute priority but I can see on the horizon this being VERY useful!

This thread could be playing host to more of my ramblings in the future as I will be trying to go outside of my safe zone within after effects and going forward into the great beyond.

Thank you for your read and possible solution. As I look forward to not only developing a better experience for us 2D animation guys in this new glorious future.

Have a great day!

(I've also posted the same question on CGTalk)
Cheers,

- Andrew
Dan Ebberts
Posts: 320
Joined: June 26th, 2004, 10:01 am
Location: Folsom, CA
Contact:

If you have a slider applied to a null layer named "control", you could apply this expression to one layer's Bluriness parameter:

maxBlur = 50;
slider = thisComp.layer("control").effect("Slider Control")("Slider");
linear(slider,0,100,0,maxBlur)

For the other layer, you would change the last line to this:

linear(slider,0,100,maxBlur,0)

Then as you move the slider between 0 and 100, focus would move from one layer to the other.

Is that what you meant?


Dan
AndrewE
Posts: 3
Joined: November 29th, 2007, 12:17 pm
Location: Miramichi, NB
Contact:

This is EXACTLY what I meant!

Thank you Dan so much! I'm very humbled and appreciative that you took your time to answer my question!

Thank you!
Cheers,

- Andrew
Post Reply