Focal Depth and Center of Interest

Forums: Focal Depth and Center of Interest
Autodesk Maya (Plugin developed by JimStar)

Moderator: JimStar

Focal Depth and Center of Interest

Postby vanlicht » Wed Nov 17, 2010 11:59 pm

vanlicht Wed Nov 17, 2010 11:59 pm
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
Windows 7 64bit | Maya 2010 64 bit (main) | Maya 2011 | Intel i7-920 | Nvidia Quadro FX1800 | Nvidia GTX480
vanlicht
Licensed Customer
Licensed Customer
 
Posts: 139
Joined: Fri Feb 26, 2010 8:19 am
Location: Los Angeles

Re: Focal Depth and Center of Interest

Postby bazuka » Thu Nov 18, 2010 3:14 pm

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

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

cheers
Maya 2009 x64 & Maya 2011 x64
Windows 7 x64 & Windows XP x64
2x Quad Core Q6600, 8gb, Nvidia Gtx 260 & Gtx 460
bazuka
Licensed Customer
Licensed Customer
 
Posts: 259
Joined: Thu Apr 22, 2010 3:47 pm

Re: Focal Depth and Center of Interest

Postby tchoa » Fri Nov 19, 2010 9:25 pm

tchoa Fri Nov 19, 2010 9:25 pm
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
Win XP x64 | Q6600 2.40GHz | 8Go | GTX470 1.28Go // Win 7 x64 | I7 Q740 1.73Ghz | 6Go | GTX460m 1.5Go
tchoa
Licensed Customer
Licensed Customer
 
Posts: 189
Joined: Thu Jul 01, 2010 12:33 pm
Location: Montpellier

Re: Focal Depth and Center of Interest

Postby bazuka » Sat Nov 20, 2010 9:55 pm

bazuka Sat Nov 20, 2010 9:55 pm
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
Maya 2009 x64 & Maya 2011 x64
Windows 7 x64 & Windows XP x64
2x Quad Core Q6600, 8gb, Nvidia Gtx 260 & Gtx 460
bazuka
Licensed Customer
Licensed Customer
 
Posts: 259
Joined: Thu Apr 22, 2010 3:47 pm

Re: Focal Depth and Center of Interest

Postby tchoa » Sun Nov 21, 2010 7:56 pm

tchoa Sun Nov 21, 2010 7:56 pm
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...
Win XP x64 | Q6600 2.40GHz | 8Go | GTX470 1.28Go // Win 7 x64 | I7 Q740 1.73Ghz | 6Go | GTX460m 1.5Go
tchoa
Licensed Customer
Licensed Customer
 
Posts: 189
Joined: Thu Jul 01, 2010 12:33 pm
Location: Montpellier

Re: Focal Depth and Center of Interest

Postby bazuka » Mon Nov 22, 2010 11:56 am

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

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
Maya 2009 x64 & Maya 2011 x64
Windows 7 x64 & Windows XP x64
2x Quad Core Q6600, 8gb, Nvidia Gtx 260 & Gtx 460
bazuka
Licensed Customer
Licensed Customer
 
Posts: 259
Joined: Thu Apr 22, 2010 3:47 pm

Re: Focal Depth and Center of Interest

Postby MTECH » Mon Nov 22, 2010 4:55 pm

MTECH Mon Nov 22, 2010 4:55 pm
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
Core i7 920 | 12 GB RAM | Nvidia GTX 470 & 260 | Win Vista x64 | Maya 2012.5 x64 | Octane beta2.57
MTECH
Licensed Customer
Licensed Customer
 
Posts: 42
Joined: Tue Sep 14, 2010 8:22 pm

Re: Focal Depth and Center of Interest

Postby tchoa » Mon Nov 22, 2010 6:02 pm

tchoa Mon Nov 22, 2010 6:02 pm
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
Win XP x64 | Q6600 2.40GHz | 8Go | GTX470 1.28Go // Win 7 x64 | I7 Q740 1.73Ghz | 6Go | GTX460m 1.5Go
tchoa
Licensed Customer
Licensed Customer
 
Posts: 189
Joined: Thu Jul 01, 2010 12:33 pm
Location: Montpellier

Re: Focal Depth and Center of Interest

Postby MTECH » Mon Nov 22, 2010 6:56 pm

MTECH Mon Nov 22, 2010 6:56 pm
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.
Core i7 920 | 12 GB RAM | Nvidia GTX 470 & 260 | Win Vista x64 | Maya 2012.5 x64 | Octane beta2.57
MTECH
Licensed Customer
Licensed Customer
 
Posts: 42
Joined: Tue Sep 14, 2010 8:22 pm

Re: Focal Depth and Center of Interest

Postby tchoa » Mon Nov 22, 2010 8:36 pm

tchoa Mon Nov 22, 2010 8:36 pm
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
Win XP x64 | Q6600 2.40GHz | 8Go | GTX470 1.28Go // Win 7 x64 | I7 Q740 1.73Ghz | 6Go | GTX460m 1.5Go
tchoa
Licensed Customer
Licensed Customer
 
Posts: 189
Joined: Thu Jul 01, 2010 12:33 pm
Location: Montpellier
Next

Return to Autodesk Maya


Who is online

Users browsing this forum: No registered users and 6 guests

Sat May 25, 2024 5:54 pm [ UTC ]