NAME

d.nviz - Creates a fly-through script to run in NVIZ.
(GRASS display Program)

SYNOPSIS

d.nviz

d.nviz help
d.nviz [-i] [-f] [-c] [-k] [-o] [-e] input=name output=name name=name dist=value ht=value frames=value start=value route=east,north[,east,north,east,north,...]

DESCRIPTION

The d.nviz 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 (-i) 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 Keyframe Animation panel for fine tuning or editting.

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

OPTIONS

Flags:

-i
Intercative mode
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.
-f
Full render
The script will draw all loaded NVIZ data and save scene to PPM image.
-c
Flay at constant elevation
With this flag the camera will be set to an elevation given by the ht= parameter. The default is to fly at ht= above the topography (i.e. camera height = elevation + ht)
-k
Output KeyFrame file
Generate a KeyFrame file that can be loaded from the NVIZ Keyframe Animation panel. The KeyFrame file is automatically assigned the script name with a .kanimator extension.
-o
Render the animation in an off-screen context
-e
Enable vector and sites drawing

Parameters:

input
The name of the GRASS raster file with elevation data.
This should be the same file that will be loaded in NVIZ.
output
The name of the NVIZ script to create.
name
The prefix for output images if running in full render mode (-f).
The defulat preifix is NVIZ (eg. NVIZ0000.ppm).
dist
The distance of the camera behind the center of view.
ht
The height of the camera above the center of view.
If the the -c flag is set, the height represents the actual camera height.
frames
The number of frames in the animation.
start
The starting frame number (default = 0).
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.
route
The comma seperated geographic coordinates for keyframe locations.
The interactive flag (-i) overrides this option.

EXAMPLE

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:
d.nviz -ik input=elev.rast output=nviz.script dist=250 ht=50 frames=500
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.

NOTES / HINTS

The user must select at least four key-frame locations (points) otherwise an error is generated.

If the GRASS region is changed the d.nviz command must be re-run.

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.

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 dist= parameter or increase the current region.

SEE ALSO

nviz

AUTHOR

Bob Covill

Last changed: $Date: 2004/07/22 06:19:16 $