.TH m.nviz.script 1grass "" "GRASS 7.8.5" "GRASS GIS User's Manual" .SH NAME \fI\fBm.nviz.script\fR\fR \- Creates fly\-through script to run in NVIZ. .SH KEYWORDS miscellaneous, graphics, raster, raster3d, vector, visualization .SH SYNOPSIS \fBm.nviz.script\fR .br \fBm.nviz.script \-\-help\fR .br \fBm.nviz.script\fR [\-\fBfckoe\fR] \fBinput\fR=\fIname\fR \fBoutput\fR=\fIname\fR [\fBname\fR=\fIstring\fR] [\fBroute\fR=\fIeast,north\fR[,\fIeast,north\fR,...]] \fBdist\fR=\fIfloat\fR \fBht\fR=\fIfloat\fR \fBframes\fR=\fIinteger\fR [\fBstart\fR=\fIinteger\fR] [\-\-\fBoverwrite\fR] [\-\-\fBhelp\fR] [\-\-\fBverbose\fR] [\-\-\fBquiet\fR] [\-\-\fBui\fR] .SS Flags: .IP "\fB\-f\fR" 4m .br Full render \-\- Save images .IP "\fB\-c\fR" 4m .br Fly at constant elevation (ht) .IP "\fB\-k\fR" 4m .br Include command in the script to output a KeyFrame file .IP "\fB\-o\fR" 4m .br Render images off\-screen .IP "\fB\-e\fR" 4m .br Enable vector and sites drawing .IP "\fB\-\-overwrite\fR" 4m .br Allow output files to overwrite existing files .IP "\fB\-\-help\fR" 4m .br Print usage summary .IP "\fB\-\-verbose\fR" 4m .br Verbose module output .IP "\fB\-\-quiet\fR" 4m .br Quiet module output .IP "\fB\-\-ui\fR" 4m .br Force launching GUI dialog .SS Parameters: .IP "\fBinput\fR=\fIname\fR \fB[required]\fR" 4m .br Name of input raster map .IP "\fBoutput\fR=\fIname\fR \fB[required]\fR" 4m .br Name of output script .IP "\fBname\fR=\fIstring\fR" 4m .br Prefix of output images (default = NVIZ) .IP "\fBroute\fR=\fIeast,north[,\fIeast,north\fR,...]\fR" 4m .br Route coordinates (east,north) .IP "\fBdist\fR=\fIfloat\fR \fB[required]\fR" 4m .br Camera layback distance (in map units) .IP "\fBht\fR=\fIfloat\fR \fB[required]\fR" 4m .br Camera height above terrain .IP "\fBframes\fR=\fIinteger\fR \fB[required]\fR" 4m .br Number of frames .IP "\fBstart\fR=\fIinteger\fR" 4m .br Start frame number (default=0) .SH DESCRIPTION The \fIm.nviz.script\fR 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 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 \fIKeyframe Animation\fR panel for fine tuning or editing. .PP The script generated by \fIm.nviz.script\fR can be run from the NVIZ command line (nviz script=script_name) or after NVIZ is started by selecting \fIScripting\->Play Script\fR. .SH OPTIONS .SS Flags: .IP "\fB\-f\fR " 4m .br Full render .br The script will draw all loaded NVIZ data and save scene to PPM image. .IP "\fB\-c\fR " 4m .br Flay at constant elevation .br With this flag the camera will be set to an elevation given by the \fIht=\fR parameter. The default is to fly at \fIht=\fR above the topography (i.e. camera height = elevation + ht) .IP "\fB\-k\fR " 4m .br Output KeyFrame file .br Generate a KeyFrame file that can be loaded from the NVIZ \fIKeyframe Animation\fR panel. The KeyFrame file is automatically assigned the script name with a \fI.kanimator\fR extension. .IP "\fB\-o\fR " 4m .br Render the animation in an off\-screen context .IP "\fB\-e\fR " 4m .br Enable vector and sites drawing .SS Parameters: .IP "\fBinput\fR " 4m .br The name of the GRASS raster map with elevation data. .br This should be the same file that will be loaded in NVIZ. .IP "\fBoutput\fR " 4m .br The name of the NVIZ script to create. .IP "\fBname\fR " 4m .br The prefix for output images if running in full render mode (\fI\-f\fR). .br The defulat preifix is NVIZ (eg. NVIZ0000.ppm). .IP "\fBdist\fR " 4m .br The distance of the camera behind the center of view. .IP "\fBht\fR " 4m .br The height of the camera above the center of view. .br If the the \fI\-c\fR flag is set, the height represents the actual camera height. .IP "\fBframes\fR " 4m .br The number of frames in the animation. .IP "\fBstart\fR " 4m .br The starting frame number (default = 0). .br 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. .IP "\fBroute\fR " 4m .br The comma separated geographic coordinates for keyframe locations. .SH 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: .br .nf \fC g.region raster=elevation.dem d.rast elevation.dem m.nviz.script \-k input=elevation.dem output=nviz.script dist=2400 ht=1220 frames=1000 \fR .fi In the above the example the user is prompted to select the route from the GRASS monitor. The output script, \(cqnviz.script.nvscr\(cq, can then be run in NVIZ: .br .nf \fC nviz elevation=elevation.dem script=nviz.script.nvscr \fR .fi .SH NOTES / HINTS The user must select at least four key\-frame locations (points) otherwise an error is generated. .PP If the GRASS region is changed the \fIm.nviz.script\fR command must be re\-run. .PP The current GRASS region and the user supplied parameters are included as a comment at the top of the output script. This information can be used to easily re\-create the animation. .PP 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 \fIdist=\fR parameter or increase the current region. .SS Loading the script into NVIZ 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 \fIm.nviz.script\fR is run. Alternatively, the user can run nviz with a previuosly saved state and the \fIm.nviz.script\fR generated script: .br .nf \fC nviz state=saved.state script=nviz.script.nvscr \fR .fi .SS Keyframe animator script Running the script generated by \fIm.nviz.script\fR 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. .SH SEE ALSO \fIwxGUI 3D viewer (NVIZ)\fR .SH AUTHOR Bob Covill .SH SOURCE CODE .PP Available at: m.nviz.script source code (history) .PP Main index | Miscellaneous index | Topics index | Keywords index | Graphical index | Full index .PP © 2003\-2020 GRASS Development Team, GRASS GIS 7.8.5 Reference Manual