BTW, nuke can read film offsets with fbx 2010 files.  If you want to write
your converter though, Nuke uses NDC coordinates.  Here is the formula I use
inside Nuke to read in maya film back offsets which you should be able to
reverse engineer to export from inside Maya:

window translate u:
(2/haperture)*(mayaFilmOffset.x*25.4)

window translate v:
(((root.format.h/root.format.w)*2)/vaperture)*(mayaFilmOffset.y*25.4)

set cut_paste_input [stack 0]
version 6.1 v3
push $cut_paste_input
Camera2 {
 vaperture 10.08453016
 win_translate {{(2/haperture)*(mayaFilmOffset.x*25.4)}
{(((root.format.h/root.format.w)*2)/vaperture)*(mayaFilmOffset.y*25.4)}}
 name Camera2
 selected true
 xpos 2082
 ypos -481
 addUserKnob {20 MayaCameraSettings}
 addUserKnob {12 mayaFilmOffset l "Maya Film Offset"}
 mayaFilmOffset {-0.5 -0.1}
}

-deke

On Tue, Jul 19, 2011 at 06:34, 丰 <[email protected]> wrote:

> I would like to write a maya camera exporter to nuke, but I don't know
> how to translate maya camera's "film offset" attributes into nuke
> camera's "translate u & v" in the Projection tab.
> I did know it is possible to match the film offset attribute with the
> nuke equivalent, because I had done it a couple of days before. But I
> did it by adjusting the attribute, looking at the output image, and
> compared the one rendered with maya.
> nukeCam.translateU = mayaCam.horizontalFilmOffset/mayaCam.hfa did not
> do the trick.
>
>
> Sorry if there is any improper expression, for English is not my native
> tongue.
> --
> 2.6.32.26-175.fc12.x86_64
>
> --
> view archives: http://groups.google.com/group/python_inside_maya
> change your subscription settings:
> http://groups.google.com/group/python_inside_maya/subscribe
>

-- 
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings: 
http://groups.google.com/group/python_inside_maya/subscribe

Reply via email to