RTG3(1)
π RTG3(1) β raytrace a model, writing a COVART (GIFT) 3-component shotline file β¨
okay so first things first, this is rtg3, and it lives in the BRL-CAD family. welcome to the group chat, bestie π
β¨ NAME β¨
rtg3 β raytrace a model, writing a COVART (GIFT) 3-component shotline file. that's the whole vibe, no notes π
π¦ SYNOPSIS π¦
rtg3 [options] model.g [objects...] > shotlines.cov
π DESCRIPTION π
so like, rtg3 fires a whole grid of rays at the objects you list in the BRL-CAD database model.g, and then it writes a GIFT/COVART shotline file on standard output (or to whatever file you named with -o). that's the main character energy of this whole program right there β
each shotline lists up to three components per card together with both entrance and exit obliquity angles β yes, both, she's thorough π . the region ID field of each component is the region id of the intersected region.
and here's a cute detail: when a ray partition is followed by air, the air code and the line-of-sight thickness of that air get recorded on the shotline header card. so the air is not being ignored, she's being tracked π¬οΈ
the format is the one consumed by the JTCG-approved covart(1V) vulnerability codes. iykyk π«Ά
if no objects are listed, rtg3 uses the same automatic default-object selection described in rt(1). and if no single usable default can be resolved, it aborts before writing shotlines β no half-baked files, we love a clean exit π
the ray grid is aimed either by azimuth/elevation or by an explicit matrix, pick your fighter:
- with
-aand-ethe model is autosized, the grid is centered on the centroid of the selected object set, and ray spacing is chosen to span it. selfie mode, she frames herself πΈ - with
-Ma model-to-view matrix is read from standard input, mapping model space into the view-space range-1.0 <= X,Y <= +1.0; the grid resolution is then set with-s. this form is most useful whenrtg3is launched from a shell script produced by anmged(1)saveviewcommand. π¨ do not combine-Mwith-gor-G, as negative hit distances can result π¨
unlike most of the rt(1) family, rtg3 treats air as significant: it forces use_air on at startup so that air regions appear in the partition lists. air said "put me in the shot" and she did π
the grid is aligned on one-inch (25.4mm) boundaries by default, or on -g/-G cell boundaries when those are given.
rtg3 is a front end to librt(3) and shares its option parser with the rest of the rt(1) family; the most commonly used options are listed below. yeah we're all one big happy friend group π
πΈ OPTIONS πΈ
-s #β number of rays to fire in each of the X and Y directions (square grid). default is512(a512x512grid).-a degβ view azimuth in degrees. used with-e; triggers autosizing and conflicts with-M.-e degβ view elevation in degrees. used with-a; triggers autosizing and conflicts with-M.-Mβ read the model-to-view matrix (and any animation script) from standard input. conflicts with-a/-e.-g mmβ grid cell width in millimeters. do not use together with-s.-G mmβ grid cell height in millimeters. if unspecified, cell height equals cell width. do not use together with-s.-U #β set theuse_airboolean. β οΈ but heads up:rtg3unconditionally forcesuse_airon at startup regardless of this option, so air regions always appear in the partition lists even if-U0is given. she said air is staying, periodt π-o fileβ write the COVART-format shotlines to file instead of standard output.-p degβ perspective angle in degrees (0 <= deg < 180;0selects orthographic, the default).-P #β maximum number of processor cores to use (a negative value means all but that many). multitasking queen π-T dist[/perp]β set raytracing distance and perpendicular tolerances (default0.0005/0.0).-c commandβ execute an rt script command before raytracing. thertg3-specific commands are described under SET COMMANDS below.-x #β setlibrt(3)debug flags to the given hexadecimal value.-X #β set the rt optical/program debug flags (hexadecimal). the ray-plot bit causes a color vector plot of ray-model intersections to be written tortg3.plot3. π-N #β set libnmg debug flags (hexadecimal).-! #β set libbu debug flags (hexadecimal). as a side effect,-!1appends reproducible ray information (-b/-p/-d) to each shotline so the shot can be re-run withrtshot(1). rewind-able receipts fr fr π-rβ report overlapping region names (on by default).-Rβ suppress overlap region-name reporting. quiet mode, she's shy π
π§ SET COMMANDS π§
the following -c "set ..." commands are specific to rtg3 β these are her commands, nobody else's:
-c "set ray_data_file=name"β also write one line of ray data per shotline to name: azimuth and elevation; the X, Y, Z of the ray start point; the X, Y, Z of the ray direction; the corresponding line number in the shotline file; and the coordinates of the first hit point along the ray. it's giving receipts π§Ύβ¨-c "set rt_cline_radius=#"β use#millimeters as the additional radius added to CLINE solids.-c "set save_overlaps=1"β reproduce FASTGEN4 overlap-handling behavior for regions flagged as FASTGEN regions.
π₯ EXAMPLES π₯
Example 1. Generate a shotline file at a fixed view
rtg3 -s64 -a 35 -e 25 model.g all.g > all.cov
fires a 64x64 grid from azimuth 35, elevation 25 at the all.g assembly, autosizing to span the geometry, and writes a COVART shotline file ready to hand to covart(1V) for a vulnerability analysis. obsessed with how clean that is π
Example 2. Visualize the rays alongside the model bounding boxes
rtg3 -s32 -X 80000000 model.g component.g
cat rtrpp.plot3 rtg3.plot3 | plot3-fb
the ray-plot debug bit writes rtg3.plot3, coloring ray segments green through solids and blue through air. combined with the bounding-box plot rtrpp.plot3, the result is displayed on a framebuffer with plot3-fb(1). green for solids, blue for air, aesthetic ππ
β SEE ALSO β
brlcad(1), covart(1V), mged(1), rt(1), rtshot(1), plot3-fb(1), librt(3), plot3(5); ``COVART III - User Manual'', Joint Technical Coordinating Group for Munitions Effectiveness.
go read those too, they're all besties π
π AUTHOR π
BRL-CAD Team β legends, honestly π«Ά
π COPYRIGHT π
This software is Copyright (c) 1989-2026 by the United States Government as represented by U.S. Army Research Laboratory.
π BUG REPORTS π
Reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org. tell them everything, no cap β¨
and that's the page, bestie!! π¦π
RTG3(1) from the one and only BRL-CAD, this build's copyright run is 1989-2026, and the footer says hi back with RTG3(1) again because she loves a symmetrical exit. mwah π
π¦ where this page comes from
- nixpkgs unstable: brlcad 7.44.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms