If you have both the interocular and the convergence distance, then you can
set up your second camera as just a position & rotation offset to your main
camera. Create a new Camera node, connect your main Camera to it, and then
just work out the offsets in your new camera.
You'll need an offset in translate.x, and rotate.y. Translate.x should just
be your interocular distance. Rotate.y is the angle of the right triangle
defined by the two given sides (IO and convergence). You already have the
two sides of that triangle, so you can solve for "angle =
degrees(atan(IO/convergence))"

Make sure your new camera has the same projection parameters as your main
camera (link them if necessary). Also, a good way to check that your
expressions are working correctly is to link the "focal_point" of both
cameras to your convergence distance (meaning the crosshair handle in the 3D
view should then overlap for the 2 cameras)

Here's a quick example:

set cut_paste_input [stack 0]
version 6.1 v5
push $cut_paste_input
Camera2 {
 translate {20 9 -53}
 rotate {-17 -41 0}
 focal_point {{Camera4.convergence}}
 name Camera3
 label "MAIN (left eye)"
 selected true
 xpos 647
 ypos 468
}
set N74b5be0 [stack 0]
Camera2 {
 translate {{interOcular} 0 0}
 rotate {0 {degrees(atan(interOcular/convergence))} 0}
 focal {{parent.Camera3.focal}}
 haperture {{parent.Camera3.haperture}}
 vaperture {{parent.Camera3.vaperture}}
 near {{parent.Camera3.near}}
 far {{parent.Camera3.far}}
 win_translate {{parent.Camera3.win_translate}
{parent.Camera3.win_translate}}
 win_scale {{parent.Camera3.win_scale} {parent.Camera3.win_scale}}
 winroll {{parent.Camera3.winroll}}
 focal_point {{convergence}}
 name Camera4
 label "RIGHT EYE"
 selected true
 xpos 812
 ypos 468
 addUserKnob {20 User}
 addUserKnob {7 interOcular}
 interOcular 1
 addUserKnob {7 convergence}
 convergence 28
}
push $N74b5be0
JoinViews {
 inputs 2
 name JoinViews2
 selected true
 xpos 722
 ypos 621
 viewassoc "lt\nrt"
}


Cheers,
Ivan


On Thu, Apr 28, 2011 at 8:53 AM, Oliver Armstrong <[email protected]
> wrote:

> Hi there.
>
> Does anyone know a way to generate the "other eye" camera in nuke. I have a
> shot camera and the interocular distance as well as the distance of the
> convergence plane.
>
> Thanks,
>
>
>
>
> --
> US: +1 (646) 229-5388
> UK: +44 7899 893 541
> Skype: oliverarmstrong
>
>
>
> _______________________________________________
> Nuke-users mailing list
> [email protected]
> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
>
>
_______________________________________________
Nuke-users mailing list
[email protected]
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users

Reply via email to