3
The <em>d.nviz</em> program allows the user to easily create a script
4
that can be run in NVIZ to fly through a terrain.
6
The NVIZ flight path can be chosen interactively from the GRASS
7
monitor (<em>-i</em>) or supplied on the command line as comma
8
separated coordinates. The program optionally allows a KeyFrame
9
file to created (after running the script). This KeyFrame file can
10
be loaded into the <em>Keyframe Animation</em> panel for fine
14
The script generated by <em>d.nviz</em> can be run from the NVIZ
15
command line (nviz script=script_name) or after NVIZ is started by
16
selecting <em>Scripting->Play Script</em>.
24
<dd>The user selects the camera path from the GRASS monitor by
25
clicking the left mouse button along the route. Click the
26
right mouse button to finish.
29
<dd>The script will draw all loaded NVIZ data and save scene to PPM image.
31
<dd>Flay at constant elevation
32
<dd>With this flag the camera will be set to an elevation given by the
33
<em>ht=</em> parameter. The default is to fly at <em>ht=</em>
34
above the topography (i.e. camera height = elevation + ht)
36
<dd>Output KeyFrame file
37
<dd>Generate a KeyFrame file that can be loaded from the NVIZ
38
<em>Keyframe Animation</em> panel. The KeyFrame file is
39
automatically assigned the script name with a
40
<em>.kanimator</em> extension.
42
<dd>Render the animation in an off-screen context
44
<dd>Enable vector and sites drawing
51
<dd>The name of the GRASS raster map with elevation data.
52
<dd>This should be the same file that will be loaded in NVIZ.
55
<dd>The name of the NVIZ script to create.
58
<dd>The prefix for output images if running in full render mode (<em>-f</em>).
59
<dd>The defulat preifix is NVIZ (eg. NVIZ0000.ppm).
62
<dd>The distance of the camera behind the center of view.
65
<dd>The height of the camera above the center of view.
66
<dd>If the the <em>-c</em> flag is set, the height represents the actual camera height.
69
<dd>The number of frames in the animation.
72
<dd>The starting frame number (default = 0).
73
<dd> This option may be useful in full render mode when creating an
74
animation in sections. For example the user may wish to start at frame
78
<dd>The comma separated geographic coordinates for keyframe locations.
79
<dd>The interactive flag (<em>-i</em>) overrides this option.
84
To interactively create an NVIZ animation from raster elev.rast with
85
500 frames and the camera set to 50 meters above and 250 meters behind
86
the scene, run the following:
88
<div class="code"><pre>
89
g.region rast=elevation.dem
91
d.nviz -ik input=elevation.dem output=nviz.script dist=2400 ht=1220 frames=1000
93
In the above the example the user is prompted to select the route from the GRASS monitor.
94
The output script, 'nviz.script.nvscr', can then be run in NVIZ:
95
<div class="code"><pre>
96
nviz elevation=elevation.dem script=nviz.script.nvscr
99
<h2>NOTES / HINTS</h2>
100
The user must select at least four key-frame locations (points)
101
otherwise an error is generated.
103
If the GRASS region is changed the <em>d.nviz</em> command must be re-run.
105
The current GRASS region and the user supplied parameters are included
106
as a comment at the top of the output script. This information can be
107
used to easily re-create the animation.
109
The camera position is calculated backwards from the supplied
110
position(s). It is possible that the camera position will lie outside
111
the current window, in which case a non-fatal error is generated
112
(Error: selected point is outside region). This error can result in
113
jerky movements during the animation. To correct this problem reduce
114
the <em>dist=</em> parameter or increase the current region.
116
<h3>Loading the script into NVIZ</h3>
118
The user can run the script at arbitrary resolution. To re-run it at
119
higher spatial resolution or different settings, the user first loads
120
the surface and sets the resolution, lighting, etc. Then internally
121
the script generated by <em>d.nviz</em> is run. Alternatively, the
122
user can run nviz with a previuosly saved state and the
123
<em>d.nviz</em> generated script:
125
<div class="code"><pre>
126
nviz state=saved.state script=nviz.script.nvscr
129
<h3>Keyframe animator script</h3>
130
Running the script generated by d.nviz within NVIZ, a new script for
131
kanimator (keyframe animator) is created. The kanimator panel offers
132
fine tuning of the speed (frame rate) as well as editing individual
133
frames or inserting new frames. This new kanimator script has to be
134
loaded from the Kanimator panel in NVIZ. In the Kanimator panel there
135
are Save and Load button which allow the user to save and re-load a
136
kanimator script. Once loaded, the key frames will appear in the GUI
137
and can then be edited there.
141
<em><a href="nviz.html">nviz</a></em>
145
<a href="mailto:bcovill@tekmap.ns.ca">Bob Covill</a>
146
<p><i>Last changed: $Date: 2011-11-08 12:29:50 +0100 (Tue, 08 Nov 2011) $</i>