Sophie

Sophie

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

grass-6.3.0-15.fc13.i686.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>GRASS GIS: d.nviz</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="grassdocs.css" type="text/css">
</head>
<body bgcolor="white">

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

<h2>NAME</h2>
<em><b>d.nviz</b></em>  - Creates fly-through script to run in NVIZ.
<h2>KEYWORDS</h2>
display
<h2>SYNOPSIS</h2>
<b>d.nviz</b><br>
<b>d.nviz help</b><br>
<b>d.nviz</b> [-<b>ifckoe</b>] <b>input</b>=<em>name</em> <b>output</b>=<em>name</em>  [<b>name</b>=<em>string</em>]   [<b>route</b>=<em>east,north</em>[,<i>east,north</i>,...]]  <b>dist</b>=<em>float</em> <b>ht</b>=<em>float</em> <b>frames</b>=<em>integer</em>  [<b>start</b>=<em>integer</em>]   [--<b>verbose</b>]  [--<b>quiet</b>] 

<h3>Flags:</h3>
<DL>
<DT><b>-i</b></DT>
<DD>Interactively select route</DD>

<DT><b>-f</b></DT>
<DD>Full render -- Save images</DD>

<DT><b>-c</b></DT>
<DD>Fly at constant elevation (ht)</DD>

<DT><b>-k</b></DT>
<DD>Include command in the script to output a KeyFrame file</DD>

<DT><b>-o</b></DT>
<DD>Render images off-screen</DD>

<DT><b>-e</b></DT>
<DD>Enable vector and sites drawing</DD>

<DT><b>--verbose</b></DT>
<DD>Verbose module output</DD>
<DT><b>--quiet</b></DT>
<DD>Quiet module output</DD>
</DL>

<h3>Parameters:</h3>
<DL>
<DT><b>input</b>=<em>name</em></DT>
<DD>Name of input raster map</DD>

<DT><b>output</b>=<em>name</em></DT>
<DD>Name of output script</DD>

<DT><b>name</b>=<em>string</em></DT>
<DD>Prefix of output images (default = NVIZ)</DD>

<DT><b>route</b>=<em>east,north[,<i>east,north</i>,...]</em></DT>
<DD>Route coordinates (east,north)</DD>

<DT><b>dist</b>=<em>float</em></DT>
<DD>Camera layback distance (in map units)</DD>

<DT><b>ht</b>=<em>float</em></DT>
<DD>Camera height above terrain</DD>

<DT><b>frames</b>=<em>integer</em></DT>
<DD>Number of frames</DD>

<DT><b>start</b>=<em>integer</em></DT>
<DD>Start frame number (default=0)</DD>

</DL>
<H2>DESCRIPTION</H2>

The <EM>d.nviz</EM> program allows the user to easily create a script
that can be run in NVIZ to fly through a terrain.

The NVIZ flight path can be chosen interactively from the GRASS
monitor (<EM>-i</EM>) or supplied on the command line as comma
separated coordinates. The program optionally allows a KeyFrame
file to created (after running the script). This KeyFrame file can
be loaded into the <EM>Keyframe Animation</EM> panel for fine
tuning or editing.

<p>
The script generated by <EM>d.nviz</EM> can be run from the NVIZ
command line (nviz script=script_name) or after NVIZ is started by
selecting <EM>Scripting->Play Script</EM>.

<H2>OPTIONS</H2>

<H3>Flags:</H3>
<DL>
<DT><B>-i</B>
<DD>Intercative mode
<DD>The user selects the camera path from the GRASS monitor by
	clicking the left mouse button along the route. Click the
	right mouse button to finish.
<DT><B>-f</B>
<DD>Full render
<DD>The script will draw all loaded NVIZ data and save scene to PPM image.
<DT><B>-c</B>
<DD>Flay at constant elevation
<DD>With this flag the camera will be set to an elevation given by the
	<EM>ht=</EM> parameter. The default is to fly at <EM>ht=</EM>
	above the topography (i.e. camera height = elevation + ht)
<DT><B>-k</B>
<DD>Output KeyFrame file
<DD>Generate a KeyFrame file that can be loaded from the NVIZ
	<EM>Keyframe Animation</EM> panel. The KeyFrame file is
	automatically assigned the script name with a
	<EM>.kanimator</EM> extension.
<DT><B>-o</B>
<DD>Render the animation in an off-screen context
<DT><B>-e</B>
<DD>Enable vector and sites drawing
</DL>


<H3>Parameters:</H3>
<DL>
<DT><B>input</B>
<DD>The name of the GRASS raster map with elevation data. 
<DD>This should be the same file that will be loaded in NVIZ.

<DT><B>output</B>
<DD>The name of the NVIZ script to create.

<DT><B>name</B>
<DD>The prefix for output images if running in full render mode (<EM>-f</EM>).
<DD>The defulat preifix is NVIZ (eg. NVIZ0000.ppm).

<DT><B>dist</B>
<DD>The distance of the camera behind the center of view.

<DT><B>ht</B>
<DD>The height of the camera above the center of view.
<DD>If the the <EM>-c</EM> flag is set, the height represents the actual camera height.

<DT><B>frames</B>
<DD>The number of frames in the animation.

<DT><B>start</B>
<DD>The starting frame number (default = 0).
<DD> This option may be useful in full render mode when creating an
animation in sections. For example the user may wish to start at frame
number 2000.

<DT><B>route</B>
<DD>The comma seperated geographic coordinates for keyframe locations.
<DD>The interactive flag (<EM>-i</EM>) overrides this option.

</DL>

<H2>EXAMPLE</H2>
To interactively create an NVIZ animation from raster elev.rast with
500 frames and the camera set to 50 meters above and 250 meters behind
the scene, run the following:

<div class="code"><pre>
d.nviz -ik input=elevation.dem output=nviz.script dist=2400 ht=1220 frames=1000
</pre></div>
In the above the example the user is prompted to select the route from the GRASS monitor.
The output script, nviz.script, can then be run in NVIZ:
<div class="code"><pre>
nviz el=elevation.dem script=nviz.script
</pre></div>

<H2>NOTES / HINTS</H2>
The user must select at least four key-frame locations (points)
 otherwise an error is generated.
<p>
If the GRASS region is changed the <EM>d.nviz</EM> command must be re-run.
<p>
The current GRASS region and the user supplied paramters are included
as a comment at the top of the output script. This information can be
used to easily re-create the animation.
<p>
The camera position is calculated backwards from the supplied
position(s). It is possible that the camera position will lie outside
the current window, in which case a non-fatal error is generated
(Error: selected point is outside region).  This error can result in
jerky movements during the animation.  To correct this problem reduce
the <EM>dist=</EM> parameter or increase the current region.

<h3>Loading the script into NVIZ</h3>

The user can run the script at arbitrary resolution. To re-run it at
higher spatial resolution or different settings, the user first loads
the surface and sets the resolution, lighting, etc. Then internally
the script generated by <em>d.nviz</em> is run. Alternatively, the
user can run nviz with a previuosly saved state and the
<em>d.nviz</em> generated script:

<div class="code"><pre>
nviz state=saved.state script=nviz.script
</pre></div>

<h3>Keyframe animator script</h3>
Running the script generated by d.nviz within NVIZ, a new script for
kanimator (keyframe animator) is created. The kanimator panel offers
fine tuning of the speed (frame rate) as well as editing individual
frames or inserting new frames. This new kanimator script has to be
loaded from the Kanimator panel in NVIZ. In the Kanimator panel there
are Save and Load button which allow the user to save and re-load a
kanimator script. Once loaded, the key frames will appear in the GUI
and can then be edited there.

<H2>SEE ALSO</H2>

<EM><A HREF="nviz.html">nviz</A></EM>

<H2>AUTHOR</H2>

<A HREF=mailto:bcovill@tekmap.ns.ca>Bob Covill</A>
<p><i>Last changed: $Date: 2006-12-13 15:21:43 +0100 (Wed, 13 Dec 2006) $</i>
<HR>
<P><a href="index.html">Main index</a> - <a href="display.html">display index</a> - <a href="full_index.html">Full index</a></P>
<P>&copy; 2003-2008 <a href="http://grass.osgeo.org">GRASS Development Team</a></p>
</body>
</html>