kinda weird, but putting in the cm to inches conversion is close. Glad I'm not 
working for NASA.

(-1*(2.0/width*offset))/2.54*2

gives me *almost* the value in the file. Close enough, but not exact, due to 
rounding errors I imagine. this is the left camera, opposite value for the 
right camera.

thanks!
JRAB

On May 2, 2011, at 6:13 PM, Deke Kincaid wrote:

> If your getting an fbx with an existing offset from an app like maya, then 
> shouldn't you need the offset in distance, not pixels?  Maya's filmback 
> offset is measured in inches.
> 
> -deke
> 
> On Mon, May 2, 2011 at 06:24, John RA Benson <[email protected]> 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
>> <[email protected]> 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 list
>>> [email protected]
>>> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
>>> 
>>>     
>> _______________________________________________
>> Nuke-python mailing list
>> [email protected]
>> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
>> 
>> 
>>   
> 
> _______________________________________________
> Nuke-python mailing list
> [email protected]
> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
> 
> 
> _______________________________________________
> Nuke-python mailing list
> [email protected]
> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python

_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python

Reply via email to