Jump to content

Camera follow or 'pull' focus example

Recommended Posts


So I understand that now we are using the new constraints for 'Loot At' and Follow path.

But what if you need to pull focus as well using a shallow DOF.

How is this accomplished?


Can anyone possibly share an example(camera on path + pull focus) ?


A simple checkbox under the Sampling tab  labeled  'Focus on Look At Object' would be the simplest solution!


A search here on odforce turned up this thread which suggests a convoluted python script as the only solution.

Further searching on the forums turns up this expression for Focus Distance

abs(vtorigin("/obj/cam1", "/obj/focus_follow")[2])

but when I try my camera renders nothing!

Can anyone suggest what might be wrong?

Edited by art3mis

Share this post

Link to post
Share on other sites

That expression should work fine, but bear in mind that will place the focus of the camera at the centroid of the follow object, which isn't how we usually focus on things, so you might want to subtract a slight value from the result to shift the focus distance more in line with the nearest face of the object. 

You can check where the focus distance is by hitting Z when you have your camera transforms active in the viewport - This brings up the focus handles. You can also right click and select focus handle there. Oddly when you have a camera lookat constraint it doesn't orient the focus handle with the look direction of the camera which makes visualizing it a bit tricky - Not sure if there is a fix for this or if you'll just have to do spot renders and check focus. 



  • Like 1

Share this post

Link to post
Share on other sites

Thanks for this topic and solution. This helped me build a camera rig.

Edited by bonassus

Share this post

Link to post
Share on other sites

edit: I didnt mean to reply to this post, I had another tab open : (

Edited by ejr32123

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now