by tchoa » Tue Jul 17, 2012 3:03 pm
tchoa
Tue Jul 17, 2012 3:03 pm
You can simply use a distanceBetween node and a geometryConstraint.
Create a distanceBetween node and a locator.
Connect the center attribute of your camera to the first point of the distanceBetween.
Connect the center attribute of the locator to the other point attribute of the distanceBetween.
Connect the distance result of the distanceBetween to the focusDistance of the camera.
Then if you want to change the point in focus of the surface you want in focus you can use a geometryConstraint on the surface for the locator.
If you're using the octane for maya plugin then simply connect the distance result to the octFocalDepth attribute.
Win XP x64 | Q6600 2.40GHz | 8Go | GTX470 1.28Go // Win 7 x64 | I7 Q740 1.73Ghz | 6Go | GTX460m 1.5Go