In my experience, you can't trust that an fbx export from another package
will give you the right values to replicate that camera in Nuke.

Importing an FBX camera into Nuke will only bring in the same values you had
in your camera on your 3d package of choice, but that won't necessarily give
you a camera that "sees the same thing", because different apps have
different camera models, and FBX doesn't do anything to account for those
differences.

As Deke said, the win_translate value in Maya is expressed in inches (just
like the filmback size), whereas in Nuke it's a normalized value (it's
expressed as a percentage to the filmback's width and height) where -1 =
translation of the window by its full size to the left/down, and 1 =
translation of the window by its full size to the right/up.

So, long story short, I think it's normal that the values you're getting
from your FBX import are not the values you need in order to replicate the
same camera behavior.

If you want to figure out the values for Nuke's window_translate based on
your FBX exports, you could do something like this (assuming you're
exporting a camera from Maya):

win_translate.u:

Nuke_win_translate.u = (mayaFilmTranslate.x / mayaHorizontalAperture)*2
or
Nuke_win_translate.u = (mayaFilmTranslate.x / (NukeHorizontalAperture*25.4)
)*2

win_translate.v:

Nuke_win_translate.v = (mayaFilmTranslate.y / mayaHorizontalAperture)*2
or
Nuke_win_translate.v = (mayaFilmTranslate.y / (NukeHorizontalAperture*25.4)
)*2


In other words, if you want to get a camera that "sees" the same as your
Maya camera, don't rely on the values you get out of the FBX, and use one of
the above equations instead. If you want to make sure that you're doing the
right thing, try rendering some basic, flat shaded geometry in Maya, export
that geo  and rebuild the scene in Nuke(flat shaded geo, camera). Then,
compare the output of a ScanlineRender with your rendered image, and see
what values in your camera's "window translate" get you a perfect match.

Hope that helps.
Cheers,
Ivan


On Mon, May 2, 2011 at 6:24 AM, John RA Benson <j...@macguff.fr> wrote:

>  width = 1998
>
>   lens
>  offset
>  calculated offset from camera u
>
> (-u/2)*width
>
>  calculated u from offset
>
> -1*(2/width*offset
>
>  win_translate.u (from camera fbx file)  20 -24 -18.34 0.024
>  0.01835662  23.1 -24 -5.34 0.024
>  0.00534497  24 -38 -29.04 0.038
>  0.02906466  24 -24 -18.34 0.024
>  0.01835662  35 -30 -22.92 0.030
>  0.02294578
> Strange - something funny with our fbx conversions then? Or maybe the
> win_translate isn't the filmback offset?
> I would have thought the values for offset and calculated offset would be
> the same, and the actual win_translate.u and the calculated u would be the
> same.
> the actual offset for the first shot is -24 pixels and the win_translate.u
> = 0.18, yet the calculated u is 0.024.
>
> The 2 cameras with offsets of -24 both had a u of 0.018, but by using these
> calculations it should be 0.024. I'm not sure what's correct...
>
> jrab
>
>
> Deke Kincaid wrote:
>
> u would be:
> -1 * (2/width * offset)
>
> v would be:
> ((root.format.h/root.format.w)*2)/root.format.h * offset
>
>
> -deke
>
> On Thu, Apr 28, 2011 at 14:26, John RA Benson<john.benson.macg...@gmail.com> 
> <john.benson.macg...@gmail.com> wrote:
>
>
>  While we're on the subject of cameras and a little matrix math -
>
> does anyone have the math for converting pixel values of the offset of a 
> filmback into the window u value for the camera?
>
> Say I want to offset the image by 15 pixels, I'd need to adjust the window u 
> by ... ?
>
> thanks!
> JRAB_______________________________________________
> Nuke-python mailing 
> listnuke-pyt...@support.thefoundry.co.ukhttp://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
>
>      _______________________________________________
> Nuke-python mailing 
> listnuke-pyt...@support.thefoundry.co.ukhttp://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
>
>
>
> _______________________________________________
> Nuke-python mailing list
> Nuke-python@support.thefoundry.co.uk
> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
>
>
_______________________________________________
Nuke-python mailing list
Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python

Reply via email to