Camera matching

 From:  Michael Gibson
3644.5 In reply to 3644.1 
Hi PaQ try the following script:

script: /* Set camera by eye and lookat points */ var vm = moi.vectorMath; var eye = vm.createPoint( 10, 10, 10 ); var lookat = vm.createPoint( 0, 0, 0 ); moi.ui.mainWindow.viewpanel.getViewport( '3D' ).setCameraAndTarget( eye, lookat );


That should set the 3D view direction given an eye point and a "look at" point.

Substitute your camera coordinates for the eye which above is set at 10,10,10 and also substitute your look-at coordinates which are set to 0,0,0 above.


For setting the field of view angle, go to Options > View > 3D view angles, it's the 4th one (on the bottom) of that dialog.

But you may need to do some calculation to get a full horizontal field of view, the one you set in MoI will control the view angle of the inner most square region of the viewport, like this:





- Michael
Attachments: