Maya Training

Introduction to Hard Surface Modeling

Maya Training

Interiors and Furniture Vol 1 & 2 - Modeling & Cloth

Maya Training

Shading, Lighting and Rendering the Bedroom in MR

Maya Training

Robot volume one - Modeling with animation in mind

Maya Training

Spach-Alspaugh House the complete courseware

Maya Training

Burt The Cartoon Dinosaur Vol 01 - Modeling

New Maya Training

Robot Volume 02 - Hybrid Rigging
You are here > Home > SimplyMaya Community Forums
Loading

Welcome to Simply Maya

Please Sign in or Sign up for an account

Member Login

Lost your password?

Not a member yet? Sign Up!

Old 31-10-2004, 08: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, 05: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

A little bit about who we are
Links you might find useful
Catch up with SimplyMaya
SimplyMaya specialises in Maya tutorials. We offer over 1,000 individual Maya training videos, ranging from basic Maya tutorials through to intermediate Maya tutorials. Our tutorials are created by instructors with industry experience and are designed to get you up and running in Maya quickly without making it seem like hard work.

Copyright © 1999-2015 SimplyMaya - vBulletin® Copyright © 2000-2015, Jelsoft Enterprises Ltd.