Camera Trigonometry

Written by Frank Rueter on .

Here is a scribble for some camera trigonometry.

Keep in mind that if you have an image / image sequence that corresponds to the camera (i.e. match move), then the horizontal  aperture and vertical aperture need to reflect the image aspect, otherwise your render won't match the scans.
CameraTrig

Comments   

 
0 # revaz kvaratskhelia 2011-01-19 02:06
thanks!
well, is there any tutorial explaining how this can be used in practice? In Nuke
 
 
+1 # Frank Rueter 2011-01-19 02:34
it's good for calculating simple (!) 2D to 3D projections and vise versa. There are heaps of uses though, so in a nutshell, if you don't know how to use this, you very likely don't need it ;-).
 
 
0 # Rafael Perez 2011-04-11 00:16
Hi Frank, I was wondering about a expression to convert a 3d to 2d point (exactly like reconcile 3d, but without the mess). Do you have this expression in your hat?
 
 
0 # George Anison 2012-09-23 06:22
It isn't necessary to use trigonometry to solve this problem. Just use this expression in your camera's haperture:

"((width/height)*haperture)/(haperture/vaperture)"
 
 
+3 # Frank Rueter 2012-09-23 14:59
these days you can use the pre-packaged nukescrtips.sna p3D package:

for X:
cam = nuke.toNode('Camera1')
axis = nuke.toNode('Axis1')
wm = axis['world_matrix'].valueAt(nuke.frame())
xform = nuke.math.Vecto r3(wm[3], wm[7], wm[11])
ret = nukescripts.sna p3d.projectPoin t(cam, xform).x

and Y:
cam = nuke.toNode('Camera1')
axis = nuke.toNode('Axis1')
wm = axis['world_matrix'].valueAt(nuke.frame())
xform = nuke.math.Vecto r3(wm[3], wm[7], wm[11])
ret = nukescripts.sna p3d.projectPoin t(cam, xform).y
 

You have no rights to post comments

We have 4114 guests and 35 members online