rtwizard is a tool that automates the use of several BRL-CAD graphical programs to produce complex images. There are two primary modes of operation - a graphical client to guide users through the process of creating images, and a command line mode to allow users who already know what options they wish to use to quickly and automatically produce images. Graphical mode is used when insufficient information is supplied to produce an image (unless an option specifically ruling out graphical mode is passed) and command line mode (used automatically when there is enough information to produce an image, unless GUI mode is specifically requested.) When in graphical mode, rtwizard is self explanatory. This manual documents the command line options available when not operating in graphical mode.
Images produced by rtwizard use three primary elements - standard full color raytracings produced by rt, "line drawing" style images produced by rtedge, and a faded greyscale version of color raytracings produced with a variety of image manipulation tools included with BRL-CAD.
When specifying options on the command line, it is usually better practice to fully qualify what a particular item is - for example,
using -i
to specifically identify the input file instead of relying on the .g suffix. There is a limited ability to recognize
common usage patterns (for example, "rtwizard file.g output_image.png geometry_object" will
generate an image of geometry_object in the file output_image.png) but the most unambigous specification uses the options.
The following options are recognized.
Input/Output Options
geometry_file.g
The first argument without an option flag (the leftmost argument is regarded as the first) that
identifies an existing file with a .g suffix will be used to specify the working geometry database,
unless overridden by the i
option. Remember that some option flags accept multiple
arguments and can create ambiguities about the meaning of a .g option and in such situations i
should be used.
-i
geometry_file
, --input
geometry_file
Specifying the geometry database containing the objects to be raytraced. The i
option
will override a non-flagged geometry file specification.
output_file.imgformat
The name and image format of the final output image generated by rtwizard. When specifying the
output file name without using a flag, a .pix or .png image format extension is necessary. The first
valid, unflagged output file name will be used unless overridden by the o
. If the
output filename uses a .png image format extension, the Portable Network Graphics image format
will be used when writing out the file. Otherwise, a standard BRL-CAD pix image will be generated.
Remember that some option flags accept multiple
arguments and can create ambiguities about the meaning of a image name option and in such situations o
should be used.
-o
output_file[.imgformat]
, --output
output_file[.imgformat]
The name (and optionally the image format) of the final output image generated by rtwizard. If the output filename uses a .png file extension, the Portable Network Graphics image format will be used when writing out the file. Otherwise, a standard BRL-CAD pix image will be generated.
-d
framebuffer_device
, --fbserv-device
framebuffer_device
The type of framebuffer to use when running fbserv to establish a framebuffer. By default, "/dev/mem" is used for a non-graphical framebuffer - other options include /dev/X, /dev/ogl, and (Windows only) /dev/wgl. A /dev/mem framebuffer created by rtwizard will be closed after the image generation is complete.
-p
port_number
, --fbserv-port
port_number
The number of the framebuffer port to use when running fbserv to establish a framebuffer. An existing framebuffer may also be specified and used. In the case of a pre-existing non-graphical framebuffer, rtwizard will not close the framebuffer automatically after the raytracing process is complete.
--gui
Run rtwizard's graphical interface, even if the command line options specify enough information to produce an image.
--no-gui
Run rtwizard on the command line, even if the command line options do not specify enough information to produce an image. Overridden by --gui option if both are specified.
Model View Options
When it comes to preparing the view for an RtWizard image, there are two options. One is to use the "user level" controls, which reflect the view manipulations used by users on the command line. The other is to use the "low level" specifiers, which are more typically used when rtwizard is run by automated scripts. The two methods are mutually exclusive.
-a
angle (degrees)
, --azimuth
angle (degrees)
Set azimuth angle.
-e
angle (degrees)
, --elevation
angle (degrees)
Set elevation angle.
--twist
angle (degrees)
Set twist angle.
-P
angle (degrees)
, --perspective
angle (degrees)
Set the perspective angle.
-z
value
, --zoom
value
Set the zoom factor (smaller factor results in a smaller object in the view, and vice versa).
--center
X Y Z
Set the xyz coordinates of the center of the view.
Image Generation Options
The three options that are used to input geometry object lists need to parse
multiple arguments, so any options immediately following either of them need to use
an explicit argument flag to signal termination of the input list to the option
parser - for example, an input .g file needs to be specified with
the -i
if it comes after a list of ghost objects.
-c
obj1[,...]
, --color-objects
obj1[,...]
Specify objects to render using full color using a comma separated list.
-C
value
, --background-color
value
Set the background color to use when raytracing full color objects. May use R/G/B or hex style color specification.
-g
obj1[,...]
, --ghost-objects
obj1[,...]
Specify objects to be rendered using ghosting using a comma separated list.
-G
value
, --ghosting-intensity
value
Control the degree of visibility to use when rendering ghost objects.
-l
obj1[,...]
, --line-objects
obj1[,...]
Specify objects to render lines with using rtedge using a comma separated list.
--line-color
value
Specify color to use when rendering edge lines. In addition to R/G/B and hex color specifications, the keyword "region" is also supported - in the latter case, region colors will be used for lines.
--non-line-color
value
Specify color rtedge will use for non-line rendering.
-n
value
, --height
value
Specify the height of the generated image in pixels.
-O
value
, --occlusion
value
Specify the occlusion mode rtedge will use for line rendering.
-s
value
, --size
value
Specify the width and height of the generated image in pixels. Width can be overridden by the w
option and height by the n
option.
-t
image_type
, --type
image_type
Specify the type of image to be rendered. The images produces by rtwizard are categorized by picture type - there are six picture types built on full color raytracing, ghosting, and rtedge line renderings. If a type is specified and insufficient information is supplied to generate that particular image type, rtwizard will exit with an error.
Table 1. RtWizard Image Types
Type | Name | Description |
---|---|---|
A | Simple Full-Color Image | Standard rt image. |
B | Simple Line Drawing | Standard rtedge image. |
C | Highlighted Image | Full Color rt image enhanced with rtedge lines. |
D | Mixed Full Color and Edges | Like Type C, except objects may be selectively enhanced with rtedge lines. |
E | Ghost Image with Inserts | A combination of Full Color elements and faded greyscale raytracings for context. |
F | Ghost Image with Inserts and Edges | A Type E image further enhanced with rtedge lines. |
-w
value
, --width
value
Specify the width of the generated image in pixels.
Introduction
Example 1. Basic Color Image
rtwizard m35.g component
Results in a default color image of the m35 truck, output to rtwizard.pix
Example 2. Line Drawing Image
rtwizard -d /dev/ogl m35.g -l component
Results in a line drawing of the m35 truck being display in an OpenGL framebuffer
Example 3. Complex Image
rtwizard -d /dev/ogl -i m35.g -c component/power.train -g component -l component
Results in a view of the m35 truck highlighting the engine (in color) with the truck being shown as a ghosted, edged background.
Example 4. Complex Image with Non-Default View
rtwizard -d /dev/ogl -i m35.g -c component/power.train -g component -l component -a -35 -e 15 -z 1.6
Same as the previous image, except viewing the truck from a different direction and zoomed in closer.
Example 5. Multiple Color Objects
rtwizard -d /dev/ogl -i m35.g -c component/power.train,component/suspension -z 1.6
View the power train and suspension of the truck as color objects.
This software is Copyright (c) 2001-2020 United States Government as represented by the U.S. Army Research Laboratory.