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 to fully qualify what a particular item is - for example,
-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 potentially general nature of some of the option arguments can
easily result in ambiguous cases. For example, "rtwizard -c car.g old_car.g car.png" could be interpreted as
"raytrace objects car.g, old_car.g and car.png in an unknown .g file" or "raytrace object car.g in old_car.g and output to car.png".
or even "raytrace old_car.g in car.g and output to car.png, with the -c option being passed an empty list". In that situation,
the unambiguous "rtwizard -i old_car.g -c car.g -o car.png" is required.
The following options are recognized.
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
ioption. Remember that some option flags accept multiple arguments and can create ambiguities about the meaning of a .g option and in such situations
ishould be used.
Specifying the geometry database containing the objects to be raytraced. The
ioption will override a non-flagged geometry file specification.
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
oshould be used.
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.
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.
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.
Run rtwizard's graphical interface, even if the command line options specify enough information to produce an image.
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 - User Level
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.
Set azimuth angle.
Set elevation angle.
Set twist angle.
Set the perspective angle.
Set the zoom factor (smaller factor results in a smaller object in the view, and vice versa).
X Y Z
Set the xyz coordinates of the center of the view.
Model View Options - Low Level
When specifying a low level view model is "all or nothing" - all options are required to correctly define the view. To get parameters for a given view, use the Archer command get_eyemodel.
Set the view size.
element_1 element_2 element_3 element_4"
Set view quaternion.
X Y Z"
Set twist angle.
eye_pt options are
required to be inside quotation marks - although there are multiple numbers supplied
to each option, the underlying option parsing code expects only one argument
in each case.
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
-i if it comes after a list of ghost objects.
Specify objects to render using full color.
Set the background color to use when raytracing full color objects. May use R/G/B or hex style color specification.
Specify objects to be rendered using ghosting.
Control the degree of visibility to use when rendering ghost objects.
Specify objects to render lines with using rtedge.
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.
Specify color rtedge will use for non-line rendering.
Specify the height of the generated image in pixels.
Specify the occlusion mode rtedge will use for line rendering.
Specify the width and height of the generated image in pixels. Width can be overridden by the
woption and height by the
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.
Specify the width of the generated image in pixels.
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.
This software is Copyright (c) 2001-2016 United States Government as represented by the U.S. Army Research Laboratory.
Most deficiencies observed while using the rtwizard program are a consequence of problems in commands used by rtwizard to generate images, such as rtedge.