SimplyMaya Forums

Welcome to the forum, feel free to ask questions here.

Home / forum / Lounges / Maya Basics & Newbie Lounge / Connecting to "distance from camera"
Register FAQ Members List Calendar Mark Forums Read

New Thread
 
Thread Tools
Old 31-10-2004, 07:36 PM   #1
discostu
Registered User
 
Join Date: Apr 2003
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
Question Connecting to "distance from camera"

I want to link the focus distance on a camera to a locator's "distance from camera" attribute. I can't seem to find that in the Connection Editor. Basically what I want to do is be able to move the locator to the position I want to be in focus.

This way I can animate the locator and change what is in focus over time.

Any suggestions?

Thanks,
Stu
discostu is offline   Reply With Quote
Old 08-11-2004, 04:34 AM   #2
discostu
Registered User
 
Join Date: Apr 2003
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
Lightbulb Solved

yay! I've solved my own problem! I created a Creat->Measure Tools->Distance Tool. This creates a tool that has two locators and measures the distance between them. I named one startLocator and the other endLocator. I connected the location of the startLocator to the location of the camera, so it will move with the camera. Then I put the endLocator and the part I want to be in focus (the f-stop value determines how much in front and behind the focus distance will be in focus. f:5.6 means a small distance, wher f:64 means practically everything is in focus). Then I connected the camera's focus distance to the Distance Tool's distance attribute. I had to do this in the script editor cause I couldn't find the options in the connection editor.
Code:
connectAttr -f distanceDimension1.distance cameraShape1.focusDistance;
And now it works. Yay!
discostu is offline   Reply With Quote
New Thread

« Previous Thread | Next Thread »

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

1 Month

$34

Month-to-month billing
$34/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
 
 

3 months

$87

Billing every 3 months
$29/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
Save $5 per month or $15 in total compared to monthly billing with this package.

12 months

$288

Billing every 12 months
$24/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
Save $10 per month or $120 in total compared to monthly billing with this package.

Your plan will automatically renew. You can cancel at any time via your PayPal account to avoid being charged again.

You can view the FAQ on our video plans here. You can contact us directly here. By clicking one of the buttons above, you agree to our Terms and Privacy Policy.