camera focus Distance - Troubles

   1148   1   1
User Avatar
Member
3 posts
Joined: Dec. 2022
Offline
I have a some questions.

I can't get Camera focus Distance right, if I use F-Stop and the Focus Distance, and I want to focus on 1 object then either the background is blur or the foreground is blur.

(I work in Houdini Apprentice 19.5.493)

Finally, after many attempts, I managed to focus on one of the 100 Spheres, but I wanted to focus on a sphere closer to the camera, but that just didn't work.

Is there a simple way to use a Null object as a Focus Target? Because when I Animate the Camera it takes me a long time to focus again.

In Maya,Cinema4D and Blender I can place a Null object and link it to the Focus Distance of the Camera, how does that work here in Houdini?

If I place a Null Object in Houdini and link it to the camera and I move the Null, I move the whole Camera instead of the pure Focus.

Can someone help me with this and show me an example?

Small nuance I'm new (just two months) in Houdini, and I can make very basic expressions in Parameters but certainly no hard coding yet.

Should that be necessary?
The point is that I have a setup fairly quickly?

Thank you very much in advance!😉😃

Here are some examples:

Image Not Found




Edited by fennanimations - Feb. 12, 2023 09:22:49

Attachments:
20230212_151107.jpg (2.8 MB)
20230212_151132.jpg (2.8 MB)
20230212_151136.jpg (2.4 MB)
20230212_151154.jpg (2.0 MB)
20230212_150919.jpg (2.8 MB)
20230212_150906.jpg (2.2 MB)
20230212_151102.jpg (3.2 MB)

User Avatar
Member
7770 posts
Joined: Sept. 2011
Offline
There's a parameter expression that can help--vtorigin(obj1, obj2) which gives the vector from one object to another. get the absolute value of the z axis from the result to get the focus distance.

abs(vtorigin(".", "TARGET")[2])

edit:

the similar function origin would work as well since we only need one component:
abs(origin(".", "TARGET", TZ))
Edited by jsmack - Feb. 12, 2023 13:18:27

Attachments:
focus_rig.hip (353.1 KB)

  • Quick Links