Page 1 of 1

Depth of field and Manual Focus

Posted: Tue Sep 07, 2010 6:38 pm
by p3tamaxwell
I read a discussion of depth of field and am a bit confused.... would love any input.
I set up two cameras in Maya. Standard default and new Camera with Aim.

I animated the depth of field focus distance from my standard camera to the objects I wanted to be sharp and left Maxwell's Camera Manual setting off.

Then I animated the second camera's AIM node to be right on the objects I wanted to be in focus and did the same thing.

IT SEEEMS... the only thing that gives me accurate focus in Maxwell Render is the Manual focus in teh maxwell render camera settings and that is not key frameable?

Any ideas on how to get a change in focus from within Maya to work in Maxwell render?

Thanks

Re: Depth of field and Manual Focus

Posted: Tue Sep 07, 2010 10:36 pm
by Mihnea Balta
The focus distance control from the "Depth of Field" rollup is not used in Maxwell. If you want to control the distance explicitly, you have to check "Manual Focus Distance" in the "Maxwell Render" rollup and use the distance control in there.

The Maxwell focus distance attribute is keyable. First set it to a non-default value, so that it gets created (the custom attributes aren't created until you set them explicitly, to prevent bloating the scene). After you do that, it will also show up in the "Extra Attributes" rollup, and you can key it or connect other nodes to it from there. You can't key it with the control found in the "Maxwell Render" rollup because that control is special (it has to handle non-existing attributes, as explained above). Some people create a linear distance tool and connect it to this attribute, as they find it easier to manipulate that than the aim locator.

I'm not sure why animating the aim locator didn't work. It has to work, since that's the distance that we pass to Maxwell as the focus distance. Can you show me your set-up?

Re: Depth of field and Manual Focus

Posted: Wed Sep 08, 2010 3:46 am
by p3tamaxwell
Thanks for the quick feedback.
I wil try a real simple aim example and let you know if it works as this is a pretty big scene.

Peter

Re: Depth of field and Manual Focus

Posted: Wed Sep 08, 2010 5:23 am
by dmeyer
In Maya, I prefer to do the following...

- Create camera with aim (and up if you need it)
- create measure distance tool which will give you two locators in the scene plus the measure distance
- snap one of the locators to the camera plane, and then parent it to the camera
- group the other locator in the top level camera group
- connect the distance attr to the mxFocusdistance of the camera

This will given you independent control over aim and focus so you could do effects such as a rack focus without changing the aim.

Re: Depth of field and Manual Focus

Posted: Thu Sep 09, 2010 12:35 am
by p3tamaxwell
Many thanks will give it a whirl if I am able.

Re: Depth of field and Manual Focus

Posted: Fri Sep 24, 2010 1:06 am
by itsallgoode9
dmeyer wrote:In Maya, I prefer to do the following...

- Create camera with aim (and up if you need it)
- create measure distance tool which will give you two locators in the scene plus the measure distance
- snap one of the locators to the camera plane, and then parent it to the camera
- group the other locator in the top level camera group
- connect the distance attr to the mxFocusdistance of the camera

This will given you independent control over aim and focus so you could do effects such as a rack focus without changing the aim.
Do you do this using set driven key? I am trying to do this and it just isn't work. it looks like i have the two connected, but then when i play my animation, the Focus Distance is not updating.

I'm not sure what is happening, it seems pretty straight forward and i think i'm doing it correctly.

Re: Depth of field and Manual Focus

Posted: Fri Sep 24, 2010 1:23 am
by itsallgoode9
nevermind, i figured it out. I just had to drag and drop the node in the Hypershade. I worked correctly after I did that :)

Re: Depth of field and Manual Focus

Posted: Fri Sep 24, 2010 3:26 pm
by dmeyer
I usually just use the script editor...something like:

connectAttr measureTool.distance camera1shape.mxfocusDistance;

Although, i've found that you have to jiggle the handle first on the manual focus under the Maxwell attributes in the handle for the mxfocusDistance attribute to become active.