1m.nviz.script(1) GRASS GIS User's Manual m.nviz.script(1)
2
3
4
6 m.nviz.script - Creates fly-through script to run in NVIZ.
7
9 miscellaneous, graphics, raster, raster3d, vector, visualization
10
12 m.nviz.script
13 m.nviz.script --help
14 m.nviz.script [-fckoe] input=name output=name [name=string]
15 [route=east,north[,east,north,...]] dist=float ht=float frames=integer
16 [start=integer] [--overwrite] [--help] [--verbose] [--quiet]
17 [--ui]
18
19 Flags:
20 -f
21 Full render -- Save images
22
23 -c
24 Fly at constant elevation (ht)
25
26 -k
27 Include command in the script to output a KeyFrame file
28
29 -o
30 Render images off-screen
31
32 -e
33 Enable vector and sites drawing
34
35 --overwrite
36 Allow output files to overwrite existing files
37
38 --help
39 Print usage summary
40
41 --verbose
42 Verbose module output
43
44 --quiet
45 Quiet module output
46
47 --ui
48 Force launching GUI dialog
49
50 Parameters:
51 input=name [required]
52 Name of input raster map
53
54 output=name [required]
55 Name of output script
56
57 name=string
58 Prefix of output images (default = NVIZ)
59
60 route=east,north[,east,north,...]
61 Route coordinates (east,north)
62
63 dist=float [required]
64 Camera layback distance (in map units)
65
66 ht=float [required]
67 Camera height above terrain
68
69 frames=integer [required]
70 Number of frames
71
72 start=integer
73 Start frame number (default=0)
74
76 The m.nviz.script program allows the user to easily create a script
77 that can be run in NVIZ to fly through a terrain. The NVIZ flight path
78 can be supplied on the command line as comma separated coordinates. The
79 program optionally allows a KeyFrame file to created (after running the
80 script). This KeyFrame file can be loaded into the Keyframe Animation
81 panel for fine tuning or editing.
82
83 The script generated by m.nviz.script can be run from the NVIZ command
84 line (nviz script=script_name) or after NVIZ is started by selecting
85 Scripting->Play Script.
86
88 Flags:
89 -f
90 Full render
91 The script will draw all loaded NVIZ data and save scene to PPM im‐
92 age.
93
94 -c
95 Flay at constant elevation
96 With this flag the camera will be set to an elevation given by the
97 ht= parameter. The default is to fly at ht= above the topography
98 (i.e. camera height = elevation + ht)
99
100 -k
101 Output KeyFrame file
102 Generate a KeyFrame file that can be loaded from the NVIZ Keyframe
103 Animation panel. The KeyFrame file is automatically assigned the
104 script name with a .kanimator extension.
105
106 -o
107 Render the animation in an off-screen context
108
109 -e
110 Enable vector and sites drawing
111
112 Parameters:
113 input
114 The name of the GRASS raster map with elevation data.
115 This should be the same file that will be loaded in NVIZ.
116
117 output
118 The name of the NVIZ script to create.
119
120 name
121 The prefix for output images if running in full render mode (-f).
122 The defulat preifix is NVIZ (eg. NVIZ0000.ppm).
123
124 dist
125 The distance of the camera behind the center of view.
126
127 ht
128 The height of the camera above the center of view.
129 If the the -c flag is set, the height represents the actual camera
130 height.
131
132 frames
133 The number of frames in the animation.
134
135 start
136 The starting frame number (default = 0).
137 This option may be useful in full render mode when creating an ani‐
138 mation in sections. For example the user may wish to start at frame
139 number 2000.
140
141 route
142 The comma separated geographic coordinates for keyframe locations.
143
145 To interactively create an NVIZ animation from raster elev.rast with
146 500 frames and the camera set to 50 meters above and 250 meters behind
147 the scene, run the following:
148 g.region raster=elevation.dem
149 d.rast elevation.dem
150 m.nviz.script -k input=elevation.dem output=nviz.script dist=2400 ht=1220 frames=1000
151 In the above the example the user is prompted to select the route from
152 the GRASS monitor. The output script, ’nviz.script.nvscr’, can then be
153 run in NVIZ:
154 nviz elevation=elevation.dem script=nviz.script.nvscr
155
157 The user must select at least four key-frame locations (points) other‐
158 wise an error is generated.
159
160 If the GRASS region is changed the m.nviz.script command must be
161 re-run.
162
163 The current GRASS region and the user supplied parameters are included
164 as a comment at the top of the output script. This information can be
165 used to easily re-create the animation.
166
167 The camera position is calculated backwards from the supplied posi‐
168 tion(s). It is possible that the camera position will lie outside the
169 current window, in which case a non-fatal error is generated (Error:
170 selected point is outside region). This error can result in jerky
171 movements during the animation. To correct this problem reduce the
172 dist= parameter or increase the current region.
173
174 Loading the script into NVIZ
175 The user can run the script at arbitrary resolution. To re-run it at
176 higher spatial resolution or different settings, the user first loads
177 the surface and sets the resolution, lighting, etc. Then internally the
178 script generated by m.nviz.script is run. Alternatively, the user can
179 run nviz with a previuosly saved state and the m.nviz.script generated
180 script:
181 nviz state=saved.state script=nviz.script.nvscr
182
183 Keyframe animator script
184 Running the script generated by m.nviz.script within NVIZ, a new script
185 for kanimator (keyframe animator) is created. The kanimator panel of‐
186 fers fine tuning of the speed (frame rate) as well as editing individ‐
187 ual frames or inserting new frames. This new kanimator script has to be
188 loaded from the Kanimator panel in NVIZ. In the Kanimator panel there
189 are Save and Load button which allow the user to save and re-load a
190 kanimator script. Once loaded, the key frames will appear in the GUI
191 and can then be edited there.
192
194 wxGUI 3D viewer (NVIZ)
195
197 Bob Covill
198
200 Available at: m.nviz.script source code (history)
201
202 Accessed: Saturday Oct 28 18:18:56 2023
203
204 Main index | Miscellaneous index | Topics index | Keywords index |
205 Graphical index | Full index
206
207 © 2003-2023 GRASS Development Team, GRASS GIS 8.3.1 Reference Manual
208
209
210
211GRASS 8.3.1 m.nviz.script(1)