4
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
5
<title>GRASS Tutorial for nviz</title>
6
<link rel="stylesheet" href="grassdocs.css" type="text/css">
9
<body bgcolor="#FFFFFF" link="#0000DF" vlink="#006000">
11
<img src="grass_logo.png"><hr align=center size=6 noshade>
13
<p><a href="nviz_toc.html">INDEX</a></p>
19
<p><strong>NOTE:</strong> This page is still under construction. Future additions will include: Keyframe animation, off-screen rendering, how to assemble an animation, tips on NVIZ sliders, NVIZ environment variables, etc.
22
<p>This examples shows you how to create an animation.</p>
26
<p>Using key frames is one of the easiest methods of animation it just
27
takes some getting use to the <strong>Key Frame</strong> slider. For
28
practice, just try making a circular path while always looking at the
29
center of the data:</p>
33
<li>Select <strong>look here</strong> to mark a fixed center of view in
34
the middle of the surface.</li>
36
<li>Move the puck in the <strong>XY position</strong> box to the
37
southeast corner, adjust <strong>Height</strong> and
38
<strong>Perspective</strong> until the data surface fills the <strong>NVIZ</strong> viewer.</li>
40
<li>Select the <strong>Keyframe</strong> panel.</li>
42
<li>Click <strong>add a key frame</strong>.</li>
44
<li>Position the <strong>Key Frame</strong> slider bar to the next
45
place to add a key frame by clicking a half inch or so farther along
48
<li>Move the <strong>XY position</strong> puck to the northeast
51
<li>Click <strong>add a key frame</strong> and repeat step 5.</li>
53
<li>Move the <strong>XY position</strong> puck to the northwest
56
<li>Click <strong>add a key frame</strong>.</li>
60
<p>You should now have enough key frames marked to define a path. Click <strong>show path</strong> and then <strong>run</strong>(NOT <strong>run and save images</strong>). If nothing happens,
61
clear all key frames and go back to step 1.</p>
63
<p>Now let's complete the circular path:</p>
66
<li>Repeat step 5.</li>
68
<li>Move the <strong>XY position</strong> puck to the southwest
71
<li>Click <strong>add a key frame</strong>.</li>
73
<li>To close the loop, move the <strong>Key Frames</strong>
74
slider down to frame 1, so the first frame displays, release
75
the mouse button, then click once on the slider in the empty part,
76
past the last key frame, and click <strong>add a key frame</strong>.
77
This essentially copies the first key frame to the fifth & last
82
<p>Now click <strong>run</strong>. When the animation stops, adjust
83
the spline tension or use linear interpolation, change the number of
84
total frames, and run again. If you want to render the animated
85
frames to .rgb files, you would now toggle <strong>show path</strong>
86
OFF and click <strong>run and save images</strong>, but why not
87
wait until you get a little more creative - image files use a lot of
90
<h4>Changing key frames</h4>
91
<p>With the above key frames loaded, try changing a key frame as follows:</p>
95
<li>Position the <strong>Key Frames</strong> slider so that it
96
aligns with the arrow marking the second key frame.</li>
98
<li>Using the <strong>Height</strong> adjustment in the
99
<strong>Movement</strong> panel, raise your viewing position.
100
Notice that if you have <strong>show path</strong> toggled ON, you
101
can see how your viewing position changes relative to the defined path
102
by watching the south or east path views. The small red dot
103
represents your current position.</li>
105
<li>Click <strong>add a key frame</strong>. You will be asked in
106
dialog box if you want to replace the old key frame:click <strong>ok
109
<li>Run the animation again to see how the path changed.</li>
111
<li>Delete the middle key frame: grab its arrow marker (using your
112
left mouse button), drag the marker completely off the slider to the
113
garbage can icon at right, and release the mouse button. A dialog box
114
will ask if you really want to delete. Click <strong><em>ok
115
</em></strong>. Run again to see how path has changed.</li>
117
<li>Set total frames to about 50, then one at a time, grab the center
118
key frame markers and slide them toward the right so that they are
119
spaced something like:<br>
125
<p>Run again, notice how movement speed was affected.</p></li>
127
<li>Reverse the direction of travel by swapping the positions of the
128
two interior key frame markers.</li>
132
<p>Parameters stored in the key frame path include viewing position and
133
looking direction. The looking direction will be overridden though,
134
when the path is running, if <strong>look here</strong> is active.
135
To see this effect with the above path loaded, select <strong>look
136
here</strong> and click on a corner of the data, setting a new
137
fixed center of view. Now run the path again. Click on <strong>look
138
cancel</strong> and run again.
139
<a href="http://www2.gis.uiuc.edu:2280/modviz/viz/movies/flight.mpg">This</a>
140
is an example animation created in this way.</p>
142
<h4>Image File Management</h4>
144
<p>Because .rgb image files can end up taking a lot of disk space, users
145
should be mindful of disk storage capacity when attempting to create
146
an animation. Keeping animation files and image dumps in directories
147
dedicated for such files helps in management. A single rgb image
148
usually takes between 200K to 3M bytes of storage, depending upon size
149
and complexity. If you use the SGI <strong><em>movie</em></strong> program to
150
replay animations, each frame of the animation must have been saved to
151
files of identical dimensions; so especially if you are creating an
152
animation piecewise, at different sessions, it becomes important to
153
maintain a consistent size for the graphics window. With the
154
<strong><em>movie</em></strong> program and with other screen dump animating
155
programs, there is a zoom option to enlarge the animation images at
156
time of playback. So if you want the animation to fill your screen,
157
you could set the width and height of the graphics window to half or a
158
third their playback sizes when writing the image files, then use the
159
zoom option (this will cause a loss of resolution though, since the
160
zoom just replicates pixels). If you are making an animation to be
161
recorded onto video tape, it may be necessary to set the width and
162
height to specific dimensions.</p>
164
<p>New SGI programs released with IRIX 4.0.5,
165
<strong><em>moviemaker</em></strong> and <strong><em>movieplayer</em></strong>, are
166
also very useful for animations. <strong><em>Moviemaker</em></strong> allows
167
you to create movie files from any number of rgb files at various
168
frame rates. With <strong><em>movieplayer</em></strong>, much longer
169
animations may be replayed than with <strong><em>movie</em></strong> since the
170
frames are read directly from disk at run time rather than having to
171
be loaded into memory.</p>