Name

rtwizard — Combines images from several raytracing techniques to produce complex images.

Synopsis

rtwizard [options...]

DESCRIPTION

RtWizard is a tool that orchestrates several BRL-CAD utilities to produce complex images of geometry in prescribed styles. There are two primary modes of operation.

The first mode of operation is a graphical client to guide users through the process of creating images interactively. To invoke that mode, simply run rtwizard and a wizard-style GUI should appear. Graphical mode has integrated documentation and workflows, and is intended to be discoverable and self-explanatory.

The second mode of operation is a command line mode to allow users who already know what options they wish to use to quickly and automatically produce images. It is also useful for programmatic scripting and bulk rendering of images.

RtWizard generates and composites images in a variety of styles including full-color images, edge line drawings, and "ghosted" images with options for highlighting and emphasizing model features and subsets of models. Color ray tracings are produced by rt, "hidden-line drawings" produced by rtedge, and semi-transparent / faded greyscale "ghosted" ray tracings are produced with rt and a variety of image manipulation tools included with BRL-CAD. GUI-mode presents workflows for setting up each image type, and command-line mode provides the --type, described below.

The following command-line options are recognized by rtwizard:

Input/Output Options

-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.

-o output_file[.imgformat], --output output_file[.imgformat]

The name (and optionally the output image format) of the final 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

Under the hood, fbserv is run to assist with processing. The -d option specifies the type of framebuffer fbserv should use in lieu of the default memory-only interface (/dev/mem). See fbhelp for a listing of available device options. Framebuffer servers started by rtwizard are automatically closed after image generation is complete.

-p port_number, --fbserv-port port_number

The -p option specifies the framebuffer port number to use when running fbserv to establish a framebuffer. An existing framebuffer server port be specified. In the case of a pre-existing framebuffer servers, 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 "low level" specifiers, which are more typically used when rtwizard is run by automated scripts. The two methods are mutually exclusive.

-a angle, --azimuth angle)

Set azimuth angle (in degrees).

-e angle, --elevation angle

Set elevation angle (in degrees).

--twist angle

Set twist angle (in degrees).

-P angle, --perspective angle

Set the perspective angle (in degrees).

-z value, --zoom value

Set the zoom factor, specified as a multiplier on the default view size. Values less than one result in a smaller object in the view. Values greater than one result in larger objects (due to the view being zoomed).

--center X Y Z

Set the xyz coordinates of the center of the view.

Image Generation Options

-c obj1[,...] , --color-objects obj1[,...]

Specify objects to render using full color using a comma-separated list. The entire list may be enclosed in double-quotes if object names have spaces (e.g., -c "obj1,obj 2").

-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. The entire list may be enclosed in double-quotes if object names have spaces (e.g., -g "obj1,obj 2").

-G value, --ghost-intensity value

Control the degree of visibility to use when rendering ghost objects.

-l obj1[,...], --line-objects obj1[,...]

Specify objects to render edge lines for using a comma-separated list. The entire list may be enclosed in double-quotes if object names have spaces (e.g., -l "obj1,obj 2").

--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 the color to 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 to use for line rendering. See rtedge manual page for value options.

-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 produced by rtwizard are categorized by picture type. There are six picture types built on full color raytracing, ghost, and edge line renderings.

NOTE: 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

TypeNameDescription
ASimple Full-Color ImageStandard rt image.
BSimple Line DrawingStandard rtedge image.
CHighlighted ImageFull Color rt image enhanced with rtedge lines.
DMixed Full Color and EdgesLike Type C, except objects may be selectively enhanced with rtedge lines.
EGhost Image with InsertsA combination of Full Color elements and faded greyscale raytracings for context.
FGhost Image with Inserts and EdgesA Type E image further enhanced with rtedge lines.



-w value, --width value

Specify the width of the generated image in pixels.

Compatibility Options

geometry_file.g

For usage compatibility with rt and other tools, the first (leftmost) argument without an option flag that identifies an existing .g file is assumed to be the input geometry database. Note, some argument configurations can result in ambiguity (e.g., objects with a .g suffix). As such, The -i is preferred for specifying the input geometry database.

output_image.{pix|png}

This specifies the file name and image format of the resulting image to be output 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. Note that some option flags accept multiple arguments and can create ambiguity. In such situations -o should be used.

EXAMPLES

Introduction

Example 1. Simple Full-Color Image

rtwizard -i m35.g -c component -o m35.png

Results in a default color image of the m35 truck object named 'component' with output saved to m35.png



Example 2. Simple Line Drawing Image

rtwizard -d /dev/wgl -i m35.g -l component

Results in a line drawing of the m35 truck being display in a Windows-specific OpenGL window instead of saving to a file.



Example 3. Ghost Image with Inserts and Edges

rtwizard -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, with output saved to a default rtwizard.pix file.



Example 4. Complex Image with Non-Default View

rtwizard -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, with output saved to a default rtwizard.pix file.



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 in a Mac-/Linux-specific OpenGL window.



SEE ALSO

rt(1),rtedge(1),fbhelp(1),fbserv(1)

COPYRIGHT

This software is Copyright (c) 2001-2024 United States Government as represented by the U.S. Army Research Laboratory.

AUTHOR

BRL-CAD Team

BUG REPORTS

Reports of bugs or problems should be submitted via electronic mail to