Expressions/Scripts/Presets

Moderators: Disciple, zlovatt

 
AndrewE
Topic Author
Posts: 3
Joined: Thu Nov 29, 2007 12:17 pm
Location: Miramichi, NB
Contact:

Simulated Rack Focus

Thu Nov 29, 2007 2:04 pm

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: 318
Joined: Sat Jun 26, 2004 10:01 am
Location: Folsom, CA
Contact:

Thu Nov 29, 2007 3:02 pm

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
Topic Author
Posts: 3
Joined: Thu Nov 29, 2007 12:17 pm
Location: Miramichi, NB
Contact:

Fri Nov 30, 2007 7:26 am

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

Who is online

Users browsing this forum: No registered users and 2 guests