Re: Camera distance to an object

2013-03-29 Thread Ben Davis
It looks like Distance to Output Camera from the viewport options is
spitting out the info from a plane in front of the camera based on the
distance from the null if it were in the center of your camera's view. If
your null is centered, the values are the same from the ICETree and the
viewport info.

The ICE info from the Get Distance Between is exactly the distance from
center to center (global.kine to global.kine). I don't see a problem with
using the info from ICE to feed into your DOF, you're probably going to get
a more precise focus placement (I'll accept being refuted by the
photographers out there :)

Hope that helps!

Ben

--
Ben Davis

www.moondog-animation.com

+33 6 88 48 54 50


On Fri, Mar 29, 2013 at 9:20 AM, Emilio Hernandez emi...@e-roja.com wrote:

 Hello I am trying to rig the camera DOF so I can attach the distance to a
 null.  I am the ICE distance between node.  But when I turn on the distance
 to output camera from the viewer, it gives me a different result.

 So the Distance to output camera from the viewport options is different
 than the Distance between node in the ICE tree using the kine.global.pos
 from the camera and the null.

 I will appreciate any help on this issue.

 --




Re: Camera distance to an object

2013-03-29 Thread Emilio Hernandez
Thx Ben.

The thing is the distance between node output is almost twice the distance
reported by the viewport. If I use the value of the Distance Between node,
the focus is farther than the expected.  I am right now dividing the result
by 2 and I think I am getting there and getting the focus plane where I
want.

I am trying to figure out the logic on this and the only thing that comes
up to my mind is that maybe the focus distance is splitted in two.  One
half is from camera to object and the other is from object to camera.
Don't know if I explained myself or is there some logic into this.


2013/3/29 Ben Davis benjamincliffordda...@gmail.com

 It looks like Distance to Output Camera from the viewport options is
 spitting out the info from a plane in front of the camera based on the
 distance from the null if it were in the center of your camera's view. If
 your null is centered, the values are the same from the ICETree and the
 viewport info.

 The ICE info from the Get Distance Between is exactly the distance from
 center to center (global.kine to global.kine). I don't see a problem with
 using the info from ICE to feed into your DOF, you're probably going to get
 a more precise focus placement (I'll accept being refuted by the
 photographers out there :)

 Hope that helps!

 Ben

 --
 Ben Davis

 www.moondog-animation.com

 +33 6 88 48 54 50


 On Fri, Mar 29, 2013 at 9:20 AM, Emilio Hernandez emi...@e-roja.comwrote:

 Hello I am trying to rig the camera DOF so I can attach the distance to a
 null.  I am the ICE distance between node.  But when I turn on the distance
 to output camera from the viewer, it gives me a different result.

 So the Distance to output camera from the viewport options is different
 than the Distance between node in the ICE tree using the kine.global.pos
 from the camera and the null.

 I will appreciate any help on this issue.

 --





--


Re: Camera distance to an object

2013-03-29 Thread Tim Leydecker

Hey Ben,

the farther offset the null is off center to the center of the camera view
the more off the DOF would be because the DOF effect is sets in respect
to the viewplane of the camera and it would take some Pythagorean theorem
(http://en.wikipedia.org/wiki/Hypotenuse) to get the desired major cathetus,
which is the Distance between Camera Center and a Plane from the shorter
cathetus.

To avoid that, it´s easier to constraint the camera to look at the null,
then the hypothenuse snaps back into the longer cathetus and there is
no offset anymore to worry about.

Cheers,

tim

On 29.03.2013 10:06, Ben Davis wrote:

It looks like Distance to Output Camera from the viewport options is
spitting out the info from a plane in front of the camera based on the
distance from the null if it were in the center of your camera's view. If
your null is centered, the values are the same from the ICETree and the
viewport info.

The ICE info from the Get Distance Between is exactly the distance from
center to center (global.kine to global.kine). I don't see a problem with
using the info from ICE to feed into your DOF, you're probably going to get
a more precise focus placement (I'll accept being refuted by the
photographers out there :)

Hope that helps!

Ben

--
Ben Davis

www.moondog-animation.com

+33 6 88 48 54 50


On Fri, Mar 29, 2013 at 9:20 AM, Emilio Hernandez emi...@e-roja.com wrote:


Hello I am trying to rig the camera DOF so I can attach the distance to a
null.  I am the ICE distance between node.  But when I turn on the distance
to output camera from the viewer, it gives me a different result.

So the Distance to output camera from the viewport options is different
than the Distance between node in the ICE tree using the kine.global.pos
from the camera and the null.

I will appreciate any help on this issue.

--






Re: Camera distance to an object

2013-03-29 Thread Ben Davis
Makes sense, thanks Tim!

That means that the info from the Distance to Output Camera is doing
exactly what you need Emilio, since when centered the ICETree info matches
perfectly.

--
Ben Davis

www.moondog-animation.com

+33 6 88 48 54 50


On Fri, Mar 29, 2013 at 10:31 AM, Tim Leydecker bauero...@gmx.de wrote:

 Hey Ben,

 the farther offset the null is off center to the center of the camera view
 the more off the DOF would be because the DOF effect is sets in respect
 to the viewplane of the camera and it would take some Pythagorean theorem
 (http://en.wikipedia.org/wiki/**Hypotenusehttp://en.wikipedia.org/wiki/Hypotenuse)
 to get the desired major cathetus,
 which is the Distance between Camera Center and a Plane from the shorter
 cathetus.

 To avoid that, it愀 easier to constraint the camera to look at the null,
 then the hypothenuse snaps back into the longer cathetus and there is
 no offset anymore to worry about.

 Cheers,

 tim


 On 29.03.2013 10:06, Ben Davis wrote:

 It looks like Distance to Output Camera from the viewport options is
 spitting out the info from a plane in front of the camera based on the
 distance from the null if it were in the center of your camera's view. If
 your null is centered, the values are the same from the ICETree and the
 viewport info.

 The ICE info from the Get Distance Between is exactly the distance from
 center to center (global.kine to global.kine). I don't see a problem with
 using the info from ICE to feed into your DOF, you're probably going to
 get
 a more precise focus placement (I'll accept being refuted by the
 photographers out there :)

 Hope that helps!

 Ben

 --
 Ben Davis

 www.moondog-animation.com

 +33 6 88 48 54 50


 On Fri, Mar 29, 2013 at 9:20 AM, Emilio Hernandez emi...@e-roja.com
 wrote:

  Hello I am trying to rig the camera DOF so I can attach the distance to a
 null.  I am the ICE distance between node.  But when I turn on the
 distance
 to output camera from the viewer, it gives me a different result.

 So the Distance to output camera from the viewport options is different
 than the Distance between node in the ICE tree using the kine.global.pos
 from the camera and the null.

 I will appreciate any help on this issue.

 --




attachment: DOF_center.PNG

Re: Camera distance to an object

2013-03-29 Thread Emilio Hernandez
Yes it's working with the null centered.  But what if I want the focus on
some moving object that is not always in the center of the camera and
coming near?  It is like a follow focus rig.




2013/3/29 Ben Davis benjamincliffordda...@gmail.com

 Makes sense, thanks Tim!

 That means that the info from the Distance to Output Camera is doing
 exactly what you need Emilio, since when centered the ICETree info matches
 perfectly.

 --
 Ben Davis

 www.moondog-animation.com

 +33 6 88 48 54 50


 On Fri, Mar 29, 2013 at 10:31 AM, Tim Leydecker bauero...@gmx.de wrote:

 Hey Ben,

 the farther offset the null is off center to the center of the camera view
 the more off the DOF would be because the DOF effect is sets in respect
 to the viewplane of the camera and it would take some Pythagorean theorem
 (http://en.wikipedia.org/wiki/**Hypotenusehttp://en.wikipedia.org/wiki/Hypotenuse)
 to get the desired major cathetus,
 which is the Distance between Camera Center and a Plane from the shorter
 cathetus.

 To avoid that, it愀 easier to constraint the camera to look at the null,
 then the hypothenuse snaps back into the longer cathetus and there is
 no offset anymore to worry about.

 Cheers,

 tim


 On 29.03.2013 10:06, Ben Davis wrote:

 It looks like Distance to Output Camera from the viewport options is
 spitting out the info from a plane in front of the camera based on the
 distance from the null if it were in the center of your camera's view. If
 your null is centered, the values are the same from the ICETree and the
 viewport info.

 The ICE info from the Get Distance Between is exactly the distance from
 center to center (global.kine to global.kine). I don't see a problem with
 using the info from ICE to feed into your DOF, you're probably going to
 get
 a more precise focus placement (I'll accept being refuted by the
 photographers out there :)

 Hope that helps!

 Ben

 --
 Ben Davis

 www.moondog-animation.com

 +33 6 88 48 54 50


 On Fri, Mar 29, 2013 at 9:20 AM, Emilio Hernandez emi...@e-roja.com
 wrote:

  Hello I am trying to rig the camera DOF so I can attach the distance to
 a
 null.  I am the ICE distance between node.  But when I turn on the
 distance
 to output camera from the viewer, it gives me a different result.

 So the Distance to output camera from the viewport options is different
 than the Distance between node in the ICE tree using the kine.global.pos
 from the camera and the null.

 I will appreciate any help on this issue.

 --







--


Re: Camera distance to an object

2013-03-29 Thread Andy Moorer
You then need a distance to plane calculation... the distance from the
camera to null is the hypotenuse of a right triangle. The angle of that
line versus the z axis of the camera then gives you enough information to
determine the distance to the camera plane the null is on.

cos(theta)=a/h where you want the length of the adjacent side (a)...

So the value you seek is cos(angle)*distance to null.




On Fri, Mar 29, 2013 at 3:38 AM, Emilio Hernandez emi...@e-roja.com wrote:

 Yes it's working with the null centered.  But what if I want the focus on
 some moving object that is not always in the center of the camera and
 coming near?  It is like a follow focus rig.




 2013/3/29 Ben Davis benjamincliffordda...@gmail.com

 Makes sense, thanks Tim!

 That means that the info from the Distance to Output Camera is doing
 exactly what you need Emilio, since when centered the ICETree info matches
 perfectly.

 --
 Ben Davis

 www.moondog-animation.com

 +33 6 88 48 54 50


 On Fri, Mar 29, 2013 at 10:31 AM, Tim Leydecker bauero...@gmx.de wrote:

 Hey Ben,

 the farther offset the null is off center to the center of the camera
 view
 the more off the DOF would be because the DOF effect is sets in respect
 to the viewplane of the camera and it would take some Pythagorean theorem
 (http://en.wikipedia.org/wiki/**Hypotenusehttp://en.wikipedia.org/wiki/Hypotenuse)
 to get the desired major cathetus,
 which is the Distance between Camera Center and a Plane from the
 shorter
 cathetus.

 To avoid that, it愀 easier to constraint the camera to look at the null,
 then the hypothenuse snaps back into the longer cathetus and there is
 no offset anymore to worry about.

 Cheers,

 tim


 On 29.03.2013 10:06, Ben Davis wrote:

 It looks like Distance to Output Camera from the viewport options is
 spitting out the info from a plane in front of the camera based on the
 distance from the null if it were in the center of your camera's view.
 If
 your null is centered, the values are the same from the ICETree and the
 viewport info.

 The ICE info from the Get Distance Between is exactly the distance
 from
 center to center (global.kine to global.kine). I don't see a problem
 with
 using the info from ICE to feed into your DOF, you're probably going to
 get
 a more precise focus placement (I'll accept being refuted by the
 photographers out there :)

 Hope that helps!

 Ben

 --
 Ben Davis

 www.moondog-animation.com

 +33 6 88 48 54 50


 On Fri, Mar 29, 2013 at 9:20 AM, Emilio Hernandez emi...@e-roja.com
 wrote:

  Hello I am trying to rig the camera DOF so I can attach the distance
 to a
 null.  I am the ICE distance between node.  But when I turn on the
 distance
 to output camera from the viewer, it gives me a different result.

 So the Distance to output camera from the viewport options is different
 than the Distance between node in the ICE tree using the
 kine.global.pos
 from the camera and the null.

 I will appreciate any help on this issue.

 --







 --




Re: Camera distance to an object

2013-03-29 Thread Emilio Hernandez
Cool I will try that thanks a lot!




2013/3/29 Andy Moorer andymoo...@gmail.com

 You then need a distance to plane calculation... the distance from the
 camera to null is the hypotenuse of a right triangle. The angle of that
 line versus the z axis of the camera then gives you enough information to
 determine the distance to the camera plane the null is on.

 cos(theta)=a/h where you want the length of the adjacent side (a)...

 So the value you seek is cos(angle)*distance to null.




 On Fri, Mar 29, 2013 at 3:38 AM, Emilio Hernandez emi...@e-roja.comwrote:

 Yes it's working with the null centered.  But what if I want the focus on
 some moving object that is not always in the center of the camera and
 coming near?  It is like a follow focus rig.




 2013/3/29 Ben Davis benjamincliffordda...@gmail.com

 Makes sense, thanks Tim!

 That means that the info from the Distance to Output Camera is doing
 exactly what you need Emilio, since when centered the ICETree info matches
 perfectly.

 --
 Ben Davis

 www.moondog-animation.com

 +33 6 88 48 54 50


 On Fri, Mar 29, 2013 at 10:31 AM, Tim Leydecker bauero...@gmx.dewrote:

 Hey Ben,

 the farther offset the null is off center to the center of the camera
 view
 the more off the DOF would be because the DOF effect is sets in
 respect
 to the viewplane of the camera and it would take some Pythagorean
 theorem
 (http://en.wikipedia.org/wiki/**Hypotenusehttp://en.wikipedia.org/wiki/Hypotenuse)
 to get the desired major cathetus,
 which is the Distance between Camera Center and a Plane from the
 shorter
 cathetus.

 To avoid that, it愀 easier to constraint the camera to look at the
 null,
 then the hypothenuse snaps back into the longer cathetus and there is
 no offset anymore to worry about.

 Cheers,

 tim


 On 29.03.2013 10:06, Ben Davis wrote:

 It looks like Distance to Output Camera from the viewport options is
 spitting out the info from a plane in front of the camera based on the
 distance from the null if it were in the center of your camera's view.
 If
 your null is centered, the values are the same from the ICETree and the
 viewport info.

 The ICE info from the Get Distance Between is exactly the distance
 from
 center to center (global.kine to global.kine). I don't see a problem
 with
 using the info from ICE to feed into your DOF, you're probably going
 to get
 a more precise focus placement (I'll accept being refuted by the
 photographers out there :)

 Hope that helps!

 Ben

 --
 Ben Davis

 www.moondog-animation.com

 +33 6 88 48 54 50


 On Fri, Mar 29, 2013 at 9:20 AM, Emilio Hernandez emi...@e-roja.com
 wrote:

  Hello I am trying to rig the camera DOF so I can attach the distance
 to a
 null.  I am the ICE distance between node.  But when I turn on the
 distance
 to output camera from the viewer, it gives me a different result.

 So the Distance to output camera from the viewport options is
 different
 than the Distance between node in the ICE tree using the
 kine.global.pos
 from the camera and the null.

 I will appreciate any help on this issue.

 --







 --





--