April 6, 1998 Kuperin.ms is a Max Script program which imports Kuper ASCII data files into 3D Studio Max R2 or later. It will not work with versions before R2. It is not particularly robust, and depends on the operator to specify the correct file name, and for all six virtual axes to be saved in the file, even if only a few of the virtual axes are actually used. It does seem to work however, and accurately represents the motion control move in the computer graphic scene. We will be enhancing Kuperin.ms as time goes by. It is now quite stupid about handling error conditions -- we still need to learn a lot about MAXScript. If you manage to improve it in any way, we would love to hear from you. GENERAL CONSIDERATIONS: --You must make your motion control move with the virtual axes, even if you are only recording pan and tilt. --Your system must be very accurately calibrated. It should be tracked so that when Pan and Tilt are at 0.000, and the center of the camera field does not drift sideways or up and down as the track moves over its entire length. --The center of the digitized image should match the center of the viewfinder image. The center of the camera’s optical axis should fall on the central pixel of the digitized image. --The 3D Studio camera’s field of view should be the same as the physical camera’s effective field of view, based on a digitized image. Shoot a film test with each lens you plan on using. View a digitized frame for each lens. With the axes in the original test position, jog the motion control camera pan and tilt so the cross hairs are pointing at each of the two extremes of the digitized image. Subtract the extreme positions to arrive at the effective field of view for each lens. --The photographic lens should have a minimum amount of barrel distortion. Straight lines in the set should appear straight in the film image, rather than curved. Small aperture lenses generally have less barrel distortion than faster apertures. Zoom lenses should not be used. --When you save the Kuper ASCII file, you MUST save all six virtual axes, and no others. This is true even if you are only using one or two axes. Kuperin.ms will fail unless in finds exactly six axes in the file. When you save the file with the Kuper AsciiFiles command, select the Center on Blurred Image option. --When you save your original move files on the motion control set, save them using the normal SaveMove command, rather than with the AsciiFiles command. This preserves the maximum amount of resolution. SaveMove is basically a lossless file format, like PhotoShop .PSD files. The Kuper AsciiFiles format is somewhat like JPEG, in that each time you load and resave the same file you loose a little information. A file that has been loaded as an ASCII File should never be re-saved. Later on, when you are ready to transfer the data files to ASCII format, use LoadMove to reload the original high-resolution move data. Then save the move using the AsciiFiles command with the Center on Blurred Image option. Be sure to save all six of the virtual axes (VTRACK, VNS, VEW, VPAN, VTILT, VROLL) and no others. INSTALLING KUPERIN.MS: Copy Kuperin.ms into your \3DSMAX2\SCRIPTS directory. This only needs to be done once. IMPORTING KUPER ASCII FILES: If you already have a camera named KuperCam in the scene, delete the camera. In 3DSMAX R2, Click on the hammer icon (Utilites) at screen upper right. Click on MAXScript. Click on Run Script. A file selection dialogue should appear. If it isn’t already pointed at the Scripts folder, use Browse to do so. Select Kuperin.ms and click Open. You should see Kuper ASCII Import listed in the drop down window named Utiltites, just below Run Script. Click on the drop down arrow just to the right of Kuper ASCII Import. Another Kuper ASCII Import line will appear, highlighted blue. Click on the blue highlighted Kuper ASCII Import. You may need to use the hand tool to shift the tools up. Click on Load Kuper ASCII File, specify the file name, and click Open. This will load the data, and create a camera named KuperCam. If for some reason the import fails, such as from an incorrect file name, or other than six axes being saved in the file, or the pre- existance of a KuperCam in the scene, error message boxes will appear. Just click them away, click Close under Kuper ASCII Import, and try again. Now just move the Time Slider, and watch KuperCam do its thing. You may modify the KuperCam FOV to match the effective FOV value you determined experimentally for your real camera. But do not modify KuperCam in any other way. Note that the imported file will have a move length that is one frame less that the original motion control move. This is because the Kuper system shoots between frames, while Max shoots on the frame. A move that goes from 0 to 100 in Kuper exposes 100 between-frame images. The identical move for Max goes from 0 to 99, but still exposes 100 frames because it shoots on-the-frame. This conversion is automatic in Kuperin.ms, and the images will lineup exactly, but it is all dependent on the motion control operator saving his ASCII file Centered-On-Blur. You can load the Kuper file at any time relative to generating the scene. SOME MUST KNOW THINGS: Each time you load a Kuper ASCII file, a new KuperCam will be generated in the scene. This can lead to more than one KuperCam in the same scene, which will call the Kuperin.ms script to fail. Before you load a Kuper ASCII file, be sure to delete any KuperCam in the scene. If the import fails, you probably already had a KuperCam. NEVER EDIT OR ANIMATE, OR EVEN GRAB KUPERCAM! Because of the way 3DSMax animation works, if you accidentally move KuperCam it may offset or distort the original file data. When you are ready to render the scene, you may want to delete your working KuperCam, and reload the move data file just before rendering. Of course, render the scene from the KuperCam viewport. The coordinate systems are different in 3DSMax and Kuper. 3DSMax is steadfastly right-handed, while Kuper is relentlessly ambidextrous. Kuperin.ms automatically adjusts the imported data to compensate. You do not need to modify the polarity of any Kuper axis before saving it in AsciiFile format. When set scale is an issue, the motion control and computer graphics parties must decide before hand what units will be used for the linear axes, such as centimeters or inches, and the linear Kuper virtual axes (VTRACK, VNS, VEW) should be calibrated accordingly. We have included the Kuper test data file N50TOP50.ASC which moves all the virtual axes except VROLL from -50.000 to +50.000 over 100 frames. VROLL remains at 0.000 for the whole move. --At frame 0, pan is left, tilt is down, track is forward, ew is left, and ns is down. --At frame 50, all the axis positions are at 0.000. --At frame 100, pan is right, tilt is up, track has moved backwards, ew is right, and ns is up. This will verify that things are working, and give you a handle on the differences between the Kuper and 3DSMax world XYZ systems.