INDEX

## NVIZ - Hints

### General

One nifty trick for navigating around Nviz is the "paste" feature supported in Tcl/Tk menus. Any pulldown menu may be pasted permanently on the screen by selecting the menu using the middle mouse button (as opposed to the first mouse button). The user may then click and drag the menu to another location on the screen. The menu will remain in its new position, regardless of the selections made from it, until the menu item which created the pulldown is selected using the first mouse button. For example, you can keep the "Panel" menu up for the duration of an Nviz session by selecting "Panel" from the main menu using the middle mouse button. Selecting "Panel" with the first mouse button moves the pasted menu back to its normal position and removes the menu after a selection has been made.

### Lighting

Lighting greatly enhances the level of detail that can be seen in the surface. For good lighting effects, position the light so that it creates a tilted half-moon on the sphere. Usually placing the light in the N-W corner when viewing from the south works well because of the way humans tend to interpret shading. To reveal very subtle gradual elevation changes, experiment with light placement and surface reflectivity. Keep resolution higher (3 or 4) while adjusting viewing position and lighting so that drawing time is fast. Then lower polygon resolution to 1 or 2 for the final rendering of the surface.

When rendering frames for animation, it is usually better to position lights so that they do not move with the viewer position (toggle Follow Viewpoint OFF).

### Animation

What follows is an example of creating an animation to help you get started.

#### Key frames

Using key frames is one of the easiest methods of animation it just takes some getting use to the Key Frame slider. For practice, just try making a circular path while always looking at the center of the data:

1. use look here to mark a fixed center of view in the middle of the surface.

2. move the puck in the XY position box to the southeast corner, adjust Height and Perspective until the data surface fills your graphics window.

3. pop up the Keyframe panel.

4. Click on add a key frame.

5. position the Key Frame slider bar to the next place to add a key frame by clicking a half inch or so farther along the slider.

6. move the XY position puck to the northeast corner.

7. Click on add a key frame and repeat step 5.

8. move the XY position puck to the northwest corner.

9. Click on add a key frame.

   You should now have enough key frames marked to define a path, so try clicking on show path and then run (NOT run and save images). If nothing happens, clear all key frames and go back to step 1. Now let's complete the circular path:

10. repeat step 5.

11. move the XY position puck to the southwest corner.

12. Click on add a key frame.

13. Now to close the loop, move the Key Frames slider down to frame 1, so that the first frame is displayed, release the mouse button, then click once on the slider in the empty part, past the last key frame, and click on add a key frame. This essentially copies the first key frame to the fifth & last key frame.

Now click on run. When the animation stops, adjust the spline tension or use linear interpolation, change the number of total frames, and run again. If you wanted to render the animated frames to .rgb files, you would now toggle show path OFF and click on run and save images, but why not wait until you get a little more creative - image files use a lot of disk space.

Changing key frames: With the above key frames loaded, try changing a key frame as follows:

1. Position the Key Frames slider so that it aligns with the arrow marking the second key frame.

2. Using the Height adjustment in the Movement panel, raise your viewing position. Notice that if you have show path toggled ON, you can see how your viewing position changes relative to the defined path by watching the south or east path views. The small red dot represents your current position.

3. Click on add a key frame. You will be asked in dialog box if you want to replace the old key frame:click ok .

4. Run the animation again to see how the path has changed.

5. Delete the middle key frame: grab its arrow marker (using your left mouse button), drag the marker completely off the slider to the garbage can icon at right, and release the mouse button. A dialog box will ask if you really want to delete. Click ok . Run again to see how path has changed.

6. Set total frames to about 50, then one at a time, grab the center key frame markers and slide them toward the right so that they are spaced something like:

       1........2..3..4

   Run again, notice how movement speed was affected.

7. Reverse the direction of travel by swapping the positions of the two interior key frame markers.

Parameters stored in the key frame path include viewing position and looking direction. The looking direction will be overridden though, when the path is running, if look here is active. To see this effect with the above path loaded, select look here and click on a corner of the data, setting a new fixed center of view. Now run the path again. Click on look cancel and run again. This is an example animation created in this way.

#### Image File Management

Because .rgb image files can end up taking a lot of disk space, users should be mindful of disk storage capacity when attempting to create an animation. Keeping animation files and image dumps in directories dedicated for such files helps in management. A single rgb image usually takes between 200K to 3M bytes of storage, depending upon size and complexity. If you use the SGI movie program to replay animations, each frame of the animation must have been saved to files of identical dimensions; so especially if you are creating an animation piecewise, at different sessions, it becomes important to maintain a consistent size for the graphics window. With the movie program and with other screen dump animating programs, there is a zoom option to enlarge the animation images at time of playback. So if you want the animation to fill your screen, you could set the width and height of the graphics window to half or a third their playback sizes when writing the image files, then use the zoom option (this will cause a loss of resolution though, since the zoom just replicates pixels). If you are making an animation to be recorded onto video tape, it may be necessary to set the width and height to specific dimensions.

New SGI programs released with IRIX 4.0.5, moviemaker and movieplayer, are also very useful for animations. Moviemaker allows you to create movie files from any number of rgb files at various frame rates. With movieplayer, much longer animations may be replayed than with movie since the frames are read directly from disk at run time rather than having to be loaded into memory.