1d.nviz(1) Grass User's Manual d.nviz(1)
2
3
4
6 d.nviz - Create fly-through script to run in NVIZ
7
9 display
10
12 d.nviz
13 d.nviz help
14 d.nviz [-ifckoe] input=string output=string [name=string]
15 [route=east,north[,east,north,...]] dist=float ht=float frames=integer
16 [start=integer]
17
18 Flags:
19 -i Interactively select route
20
21 -f Full render -- Save images
22
23 -c Fly at constant elevation (ht)
24
25 -k Include command in the script to output a KeyFrame file
26
27 -o Render images off-screen
28
29 -e Enable vector and sites drawing
30
31 Parameters:
32 input=string
33 Name of existing raster map
34
35 output=string
36 Name of output script
37
38 name=string
39 Prefix of output images (default = NVIZ)
40
41 route=east,north[,east,north,...]
42 Route coordinates (east,north)
43
44 dist=float
45 Camera layback distance (in map units)
46
47 ht=float
48 Camera height above terrain
49
50 frames=integer
51 Number of frames
52
53 start=integer
54 Start frame number (default=0)
55
57 The d.nviz program allows the user to easily create a script that can
58 be run in NVIZ to fly through a terrain. The NVIZ flight path can be
59 chosen interactively from the GRASS monitor (-i) or supplied on the
60 command line as comma separated coordinates. The program optionally
61 allows a KeyFrame file to created (after running the script). This
62 KeyFrame file can be loaded into the Keyframe Animation panel for fine
63 tuning or editing.
64
65 The script generated by d.nviz can be run from the NVIZ command line
66 (nviz script=script_name) or after NVIZ is started by selecting Script‐
67 ing->Play Script.
68
70 Flags:
71 -i Intercative mode The user selects the camera path from the GRASS
72 monitor by clicking the left mouse button along the route. Click
73 the right mouse button to finish.
74
75 -f Full render The script will draw all loaded NVIZ data and save
76 scene to PPM image.
77
78 -c Flay at constant elevation With this flag the camera will be set
79 to an elevation given by the ht= parameter. The default is to
80 fly at ht= above the topography (i.e. camera height = elevation
81 + ht)
82
83 -k Output KeyFrame file Generate a KeyFrame file that can be loaded
84 from the NVIZ Keyframe Animation panel. The KeyFrame file is
85 automatically assigned the script name with a .kanimator exten‐
86 sion.
87
88 -o Render the animation in an off-screen context
89
90 -e Enable vector and sites drawing
91
92 Parameters:
93 input The name of the GRASS raster file with elevation data. This
94 should be the same file that will be loaded in NVIZ.
95
96 output The name of the NVIZ script to create.
97
98 name The prefix for output images if running in full render mode
99 (-f). The defulat preifix is NVIZ (eg. NVIZ0000.ppm).
100
101 dist The distance of the camera behind the center of view.
102
103 ht The height of the camera above the center of view. If the the
104 -c flag is set, the height represents the actual camera height.
105
106 frames The number of frames in the animation.
107
108 start The starting frame number (default = 0). This option may be
109 useful in full render mode when creating an animation in sec‐
110 tions. For example the user may wish to start at frame number
111 2000.
112
113 route The comma seperated geographic coordinates for keyframe loca‐
114 tions. The interactive flag (-i) overrides this option.
115
117 To interactively create an NVIZ animation from raster elev.rast with
118 500 frames and the camera set to 50 meters above and 250 meters behind
119 the scene, run the following:
120 d.nviz -ik input=elevation.dem output=nviz.script dist=2400 ht=1220
121 frames=1000
122 In the above the example the user is prompted to select the route from
123 the GRASS monitor. The output script, nviz.script, can then be run in
124 NVIZ:
125 nviz el=elevation.dem script=nviz.script
126
127
129 The user must select at least four key-frame locations (points) other‐
130 wise an error is generated.
131
132 If the GRASS region is changed the d.nviz command must be re-run.
133
134 The current GRASS region and the user supplied paramters are included
135 as a comment at the top of the output script. This information can be
136 used to easily re-create the animation.
137
138 The camera position is calculated backwards from the supplied posi‐
139 tion(s). It is possible that the camera position will lie outside the
140 current window, in which case a non-fatal error is generated (Error:
141 selected point is outside region). This error can result in jerky
142 movements during the animation. To correct this problem reduce the
143 dist= parameter or increase the current region.
144
145 Loading the script into NVIZ
146 The user can run the script at arbitrary resolution. To re-run it at
147 higher spatial resolution or different settings, the user first loads
148 the surface and sets the resolution, lighting, etc. Then internally the
149 script generated by d.nviz is run. Alternatively, the user can run nviz
150 with a previuosly saved state and the d.nviz generated script:
151 nviz state=saved.state script=nviz.script
152
153
154 Keyframe animator script
155 Running the script generated by d.nviz within NVIZ, a new script for
156 kanimator (keyframe animator) is created. The kanimator panel offers
157 fine tuning of the speed (frame rate) as well as editing individual
158 frames or inserting new frames. This new kanimator script has to be
159 loaded from the Kanimator panel in NVIZ. In the Kanimator panel there
160 are Save and Load button which allow the user to save and re-load a
161 kanimator script. Once loaded, the key frames will appear in the GUI
162 and can then be edited there.
163
165 nviz
166
168 Bob Covill
169
170 Last changed: $Date: 2006/03/27 12:55:52 $
171
172 Full index
173
174
175
176GRASS 6.2.2 d.nviz(1)