If your depth pass is reliably in the same units as your camera, you can directly calculate the distance from the camera to your axis with an expression on the focus plane knob, e.g.: 1/sqrt(pow(Axis1.translate.x-Camera1.translate.x, 2)+pow(Axis1.translate.y-Camera1.translate.y, 2)+pow(Axis1.translate.z-Camera1.translate.z, 2))
The above works for ScanlineRender's depth output, with the ZDefocus math knob set to the default far=0. If your CG uses absolute depths (really big numbers, background shows colour of "inf") the above works if you remove the 1/ at the begining and change the math knob to "depth". (Technically I think a lot of depth passes are distance to the camera plane rather than the camera point but the difference wasn't too big a deal last time I compared) John Mangia wrote: > even the best focus pullers in real > life aren't dead on with their focus +1! Removing 90% of the keyframes and leaving some overshoot helps... -- Lewis Saunders loves to steal axis data from maya rivets London
_______________________________________________ Nuke-users mailing list [email protected], http://forums.thefoundry.co.uk/ http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
