Sophie

Sophie

distrib > Fedora > 13 > i386 > by-pkgid > 413e0bdb3c48563b2d8d9038d07d5533 > files > 1944

grass-6.3.0-15.fc13.i686.rpm

<html>

<head>
 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
 <title>GRASS Tutorial for nviz</title>
 <link rel="stylesheet" href="grassdocs.css" type="text/css">
</head>

<body bgcolor="#FFFFFF" link="#0000DF" vlink="#006000">

<img src="grass_logo.png"><hr align=center size=6 noshade>

<p><a href="nviz_toc.html">INDEX</a></p>

<h2>NVIZ - Hints</h2>

<h3>Animation</h3>

<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.
</p>

<p>This examples shows you how to create an animation.</p>  

<h4> Key frames </h4>

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

<ol>
 
<li>Select <strong>look here</strong> to mark a fixed center of view in
the middle of the surface.</li> 

<li>Move the puck in the <strong>XY position</strong> box to the
southeast corner, adjust <strong>Height</strong> and
<strong>Perspective</strong> until the data surface fills the <strong>NVIZ</strong> viewer.</li> 

<li>Select the <strong>Keyframe</strong> panel.</li>

<li>Click <strong>add a key frame</strong>.</li>

<li>Position the <strong>Key Frame</strong> slider bar to the next
place to add a key frame by clicking a half inch or so farther along
the slider.</li>

<li>Move the <strong>XY position</strong> puck to the northeast
corner.</li>  

<li>Click <strong>add a key frame</strong> and repeat step 5.</li>  

<li>Move the <strong>XY position</strong> puck to the northwest
corner.</li> 

<li>Click <strong>add a key frame</strong>.</li>

</ol>

<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,
clear all key frames and go back to step 1.</p>  

<p>Now let's complete the circular path:</p>

<ol>
<li>Repeat step 5.</li>

<li>Move the <strong>XY position</strong> puck to the southwest
corner.</li>

<li>Click <strong>add a key frame</strong>.</li> 

<li>To close the loop, move the <strong>Key Frames</strong>
slider down to frame 1, so the first frame displays, release
the mouse button, then click once on the slider in the empty part,
past the last key frame, and click <strong>add a key frame</strong>.
This essentially copies the first key frame to the fifth &amp; last
key frame.</li>  

</ol>

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

<h4>Changing key frames</h4>
<p>With the above key frames loaded, try changing a key frame as follows:</p> 

<ol>

<li>Position the <strong>Key Frames</strong> slider so that it
aligns with the arrow marking the second key frame.</li>

<li>Using the <strong>Height</strong> adjustment in the
<strong>Movement</strong> panel, raise your viewing position.
Notice that if you have <strong>show path</strong> 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.</li> 

<li>Click <strong>add a key frame</strong>.  You will be asked in
dialog box if you want to replace the old key frame:click <strong>ok
</strong>.</li>

<li>Run the animation again to see how the path changed.</li>

<li>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 <strong><em>ok
</em></strong>. Run again to see how path has changed.</li>

<li>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:<br>

<pre>
1........2..3..4  
</pre>

<p>Run again, notice how movement speed was affected.</p></li>

<li>Reverse the direction of travel by swapping the positions of the
two interior key frame markers.</li>

</ol>

<p>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 <strong>look here</strong> is active.
To see this effect with the above path loaded, select <strong>look
here</strong> and click on a corner of the data, setting a new
fixed center of view.  Now run the path again.  Click on <strong>look
cancel</strong> and run again. 
<a href="http://www2.gis.uiuc.edu:2280/modviz/viz/movies/flight.mpg">This</a>
is an example animation created in this way.</p>

<h4>Image File Management</h4>

<p>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 <strong><em>movie</em></strong> 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
<strong><em>movie</em></strong> 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.</p>

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

</body>
</html>