Page 1 of 2

Focal Depth and Center of Interest

PostPosted: Wed Nov 17, 2010 11:59 pm
by vanlicht
Hi Bazuka,

I encountered two problems here, which you might be able to solve.
1.
I animate Focal Depth attribute in the plugin, which it also links to the maya camera's Focal Lenth.
Say I have 10 frames to render. If I render manually frame 1 and frame 10, I see the change of Focal Depth.
However, if I hit Render Animation , then frame 1 ~ frame 10 images have the same Focal Depth, which does not change.

2.
Do we adjust the center of focus by defining Center of Interest attribute in Maya's Camera? I keyed the values but the focal point doesn't animate in the pictures either.

Any fixes?

Cheers,
Thomas

Re: Focal Depth and Center of Interest

PostPosted: Thu Nov 18, 2010 3:14 pm
by bazuka
Hi Thomas

ill check tonight about the probl u have and try to fix them ;)

cheers

Re: Focal Depth and Center of Interest

PostPosted: Fri Nov 19, 2010 9:25 pm
by tchoa
As some users have, and so do I, have problems with the maya2octane 'exporter' script I'll try to help there.
First, I have to say that the script could be improved and does include weird and even wrong things.
Coding for maya is part of my daily work so I guess I can discuss about that... and remember I'm not there to blame bazuka.

So, concerning the focal point issue, that's because of a misunderstanding. The 'Focal Depth' is not the focal length or fov (field of vue). It's the focal point and should be written in the command line launching octane by this flag : --cam-focaldepth.
It's not a good idea to present that attribute in the maya2octane UI.
This parameter could be set/keyframed with the camera's centerOfInterest attribute or the focusDistance attribute wich are pretty much the same thing (note that you can connect the centerOfInterest -> focusDistance).

So, a workaround for you at this time could be to not use the 'Focal Depth' of the maya2octane script and replace some lines in the script (could be more solid; be done once...) by adding these lines :

$cmdLine += " --cam-focaldepth " + (getAttr (`optionMenuGrp -q -v activeCam` + ".focusDistance"));
after line 368 and 375

and

$animCmdLine += " --cam-focaldepth " + (getAttr (`optionMenuGrp -q -v activeCam` + ".focusDistance"));
after line 474, 484 and 491

This should have been done since...
Hope that helps.

F

Re: Focal Depth and Center of Interest

PostPosted: Sat Nov 20, 2010 9:55 pm
by bazuka
looks like i misunderstood some things here, 10x for pointing it, ill try to fix then in new rls

for 'Focal Depth' in GUI i was thinking of camera focal lenght, i wrote it wrong but its not a bug coz scripts sends to octane proper values, only thing is that confuses the user :) my mistake...


if u find more bug/ideas let me know ;)

cheers

Re: Focal Depth and Center of Interest

PostPosted: Sun Nov 21, 2010 7:56 pm
by tchoa
Yep Bazuka.
I would like to help but I'm missing for time (just did some code on the fly to correct things and have your script fitting my needs). Wish I can offer some 'rewriting', procedures and ideas soon...

Re: Focal Depth and Center of Interest

PostPosted: Mon Nov 22, 2010 11:56 am
by bazuka
;)

i have also run into some project so i didint have time to check everything...

did u find anything else in my code that u dont like it, or the only probl u find was the focaldepth?

im going to upload fixes later today ;)

cheers

Re: Focal Depth and Center of Interest

PostPosted: Mon Nov 22, 2010 4:55 pm
by MTECH
Hope I'm not hijacking this at all; I'm having the exact same issue with Maya not saving the focus depth information. In addition, scenes loaded into Octane always come in with Autofocus turned on, no matter how I save the scene prior. Will that also get addressed by this script mod or an updated version of the plug-in? Thanks,

Pete, MTECH Labs

Re: Focal Depth and Center of Interest

PostPosted: Mon Nov 22, 2010 6:02 pm
by tchoa
This should be adressed with the modifications I wrote... or next update by bazuka.
maya2octane is just a mel script, not a plugin (c++).
This lines just 'send' the focusDistance attribute's value of your selected camera to octane by constructing a command line.
To be clear, that this command line will include the --cam-focaldepth flag followed by the focusDistance value.
So this attribute has to be set or keyframed for your camera in your scene.

F

Re: Focal Depth and Center of Interest

PostPosted: Mon Nov 22, 2010 6:56 pm
by MTECH
I'm using the 2.4 beta script and adding your extra lines works well. Thank you! It's still a little weird to see the Autofocus icon remaining on, but at least the focus point seems to obey Maya's camera settings now.

Re: Focal Depth and Center of Interest

PostPosted: Mon Nov 22, 2010 8:36 pm
by tchoa
You're welcome.
There's no command line flag to turn off autofocus. If the --cam-focaldepth is given then it takes over the AF.
F