RTHIDE(1)
π RTHIDE(1) β the BRL-CAD glow-up where your model gets a hidden-line sketch π
ok so bestie, welcome to rthide, one of the little icons of the BRL-CAD family β¨
π¦ NAME
rthide β ray-trace a model and write a hidden-line UNIX-Plot file. literally that's the whole vibe π
πΈ SYNOPSIS
rthide [options] model.g [objects...] > output.plot3
π DESCRIPTION
okay so here's the tea β rthide ray-traces the objects you list in the BRL-CAD database model.g and emits a hidden-line-removed UNIX-Plot file (peep plot3(5)) with bas-relief detail. it draws a boundary line wherever the region ID changes between neighboring rays, and additionally portrays abrupt changes in surface curvature and surface height. the way this works is genuinely iconic: pits, protrusions, and curvature changes all show up as relief β the result looks flat when you view it head-on but shows detail when you rotate it. π« the plot goes to standard output by default, or to a named file with -o.
if you don't list any objects, rthide uses the same automatic default-object selection described in rt(1). and if no single usable default can be resolved, it just aborts before rendering β no render, no drama, just abort π
the view is normally specified with -a (azimuth) and -e (elevation), and in that case the model is auto-sized and the grid is centered on its bounding box π― alternatively, -M reads a model-to-view matrix from standard input, as produced by an mged(1) saveview script β in that case the grid size is set with -s.
rthide is a member of the rt(1) family and shares its option set with librt(3). but listen π because it produces vector plot output rather than a shaded raster image, most raster-oriented options (lighting, framebuffer, hypersampling, and similar) have no useful effect. the options most relevant to rthide are described first below, and they ate π
β¨ OPTIONS β¨
-s #β number of rays (cells) to fire in each of X and Y, i.e. a square grid. default is512(a512x512grid). β-a degβ view azimuth in degrees. used with-e; enables auto-sizing. conflicts with-M. π§-e degβ view elevation in degrees. used with-a; enables auto-sizing. conflicts with-M. π§-A degβ shading angle in degrees. a boundary is shaded wherever the angle between adjacent surface normals exceeds this value. default is5.0; a large value such as89.0shades only steep rises and drops, suppressing curvature cross-hatching. lowkey the glow-up knob π-Mβ read a model-to-view (model2view) matrix from standard input instead of using-a/-e. conflicts with-aand-e. π«Ά-o output.plot3β write the plot to the named file instead of standard output.-g mmβ grid cell width in millimeters.-G mmβ grid cell height in millimeters. if unspecified, cell height equals cell width.-w #β image/grid width in cells (overrides the X dimension set by-s).-n #β image/grid height in cells (overrides the Y dimension set by-s).-V #[:#]β view aspect ratio, width/height (e.g.1.33or4:3). π-p degβ perspective angle in degrees (0 <= deg < 180;0means orthographic).-E #β distance from the eye to the model center (defaultsqrt(2)).-P #β maximum number of processor cores to use during prep (a negative value means all but that many). ray tracing itself is forced to a single CPU. yes bestie, one (1) CPU, that's the rule π-U #β set the librtuse_airflag:0discards air regions (default), non-zero retains them.-T #[/#]β ray-tracing tolerances,dist[/perp](default0.0005).-rβ report overlapping region names (on by default).-Rβ suppress overlap region-name reports.-c cmdβ execute anrtscript command before ray tracing (may be repeated). π-I fileβ read object names from a text file, one per line, in addition to those on the command line.-k x,y,z,nx,ny,nzβ apply a cutting plane, equivalent to subtracting a half-space from the scene. acceptsxdir,ydir,zdir,dist,x,y,z,nx,ny,nz, orx,y,zforms. πͺ-j xmin,ymin,xmax,ymaxβ ray-trace only the given sub-rectangle of the view.-u unitsβ display units;"model"uses the database's own units.-D #β starting frame number (for animation scripts read via-M).-K #β ending (kill-after) frame number.-x #β set librt debug flags to the given hexadecimal value.-X #β setrtprogram/optical debug flags (hexadecimal).-N #β set libnmg debug flags (hexadecimal).-! #β set libbu debug flags (hexadecimal).-v [#]β increase verbosity; repeat (e.g.-vvvv) or supply a hexadecimal level. π£οΈ
the following options are accepted because rthide shares the rt(1) command parser, but they have little or no effect on plot output: -w and -n aside, the raster-only controls -O, -F, -C, -W, -l, -m, -i, -t, -S, -H, -J, -z, -d, -b, -Q, -B, -q, and -+. π they're literally just along for the ride, iykyk.
π EXAMPLES π
πΈ Example 1. Bas-relief line drawing of a model
rthide -s512 -a35 -e25 -A89.0 moss.g all.g > moss.plot3
plot3-fb moss.plot3
ray-traces the all.g assembly in moss.g over a 512x512 grid from azimuth 35deg, elevation 25deg, suppressing curvature cross-hatching with a 89.0deg shading angle, then displays the resulting hidden-line plot on a framebuffer with plot3-fb(1). the plot can equally be rotated with plot3rot(1) or overlaid in mged(1) with the overlay command. obsessed. π«Ά
π¦ Example 2. Overlaying hidden-line work onto a shaded rt image
AZ=35; EL=25
rt -s512 -a$AZ -e$EL moss.g all.g
rthide -A89.9 -s512 -a$AZ -e$EL -o rthide.plot3 moss.g all.g
plot3-fb -o rthide.plot3
renders a shaded image with rt(1) into the framebuffer, traces the matching hidden-line plot with rthide using the same view and grid size, then overlays the line work onto the shaded image with plot3-fb(1) (-o keeps the existing framebuffer contents) for an "edge enhanced" result. β‘ this assumes FB_FILE points to a valid framebuffer β so, you know, check that first bestie π
π₯ SEE ALSO
brlcad(1), rt(1), rtedge(1), mged(1), plot3-fb(1), plot3rot(1), rtscale(1), librt(3), plot3(5) β go read them, they're all part of the family π
π AUTHOR
BRL-CAD Team β the main characters π
π 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 β don't be shy, they want to hear it π
ngl, plot3 output plus a big shading angle is a whole aesthetic, go try it β¨
πͺ½ sign-off time: this was RTHIDE(1) from BRL-CAD, straight out of the BRL-CAD manual set β mwah, take care of her π
πΈ
π¦ 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