RTSIL(1)
β¨ RTSIL(1) β¨
okay so bestie, welcome to the rtsil page β it's part of the BRL-CAD manual, section 1, and honestly it's giving "quiet overachiever" energy π
πΈ NAME πΈ
rtsil β ray trace a model and produce a binary silhouette image π
π¦ SYNOPSIS π¦
rtsil [options] model.g [objects...]
π DESCRIPTION π
So rtsil uses librt(3) to ray trace the objects you list in the database model.g, and what it hands you back is a "Simple Intersection Lightmap" (SIL) β which is literally just a binary hit/miss silhouette of your geometry. One ray per pixel, and the ray stops at the very first surface it smacks into (that's one-hit mode, babe). No shading, no lighting, no material evaluation. None. Zero. It's not doing all that π
If you don't list any objects, rtsil does the same automatic default-object selection thing described over in rt(1). And if it can't resolve a single usable default? It just aborts before rendering. No vibe, no render, periodt.
The result is an 8-bit bw(5) image (one byte per pixel, lowkey simple like that) where a pixel that intersected geometry gets the value 1 and a pixel that missed all geometry gets the value 255. This high-contrast matte is the cheap way to isolate the projected outline of whatever object set you picked β iconic behavior honestly π
The view gets selected with the -a (azimuth) and -e (elevation) options, or with -M you can read a model-to-view matrix from standard input (super convenient when it's being driven by an mged(1) saveview script π§). By default the image goes to standard output; use -o to write it to a named file instead. And because rtsil emits scanlines in order, it always runs on a single CPU no matter what -P says β the way that it just refuses to parallelize π. Most of the camera, grid, and debugging options that rt(1) accepts are honored here too; go peep that manual page for the complete list, iykyk.
β¨ OPTIONS β¨
-ofile.bw β write the silhouette image to file.bw instead of standard output. π-s# β set the square grid size to # rays on a side (default512, i.e. a 512x512 image).-w# β set the image width in pixels.-n# β set the image height in scanlines.-adeg β set the view azimuth in degrees and enable auto-sizing. Use it with-e; it conflicts with-M.-edeg β set the view elevation in degrees and enable auto-sizing. Use it with-a; it conflicts with-M.-Mβ read a model-to-view transformation matrix (plus an optional animation script) from standard input instead of using-a/-e.-pdeg β set the perspective angle in degrees (0 <= deg < 180;0is orthographic, which is the default).-V#[:#] β set the view aspect ratio width/height (like1.33or4:3).-gmm β set the grid cell width in millimeters.-Gmm β set the grid cell height in millimeters.-uunits β set the display units;-u modeluses the database's local units.-iβ use incremental (progressive-style) rendering.-tβ render top-to-bottom (the default is bottom-up, just so you know π).-P# β requested processor count. Accepted for compatibility, butrtsilalways renders with a single CPU π.-x# β setlibrtdebug flags as a hexadecimal bit vector (seeraytrace.h).-X# β setrtprogram/optical debug flags as a hexadecimal bit vector.
Heads up bestie: seert(1)for the remaining shared options (e.g.-Ttolerances and-cscript commands). π«Ά
π₯ EXAMPLES π₯
Example 1. Silhouette matte from a three-quarter view
rtsil -a 35 -e 25 -s 1024 model.g all > sil.bw
Ray traces the group all in model.g from azimuth 35, elevation 25 degrees on a 1024x1024 grid, and writes a bw(5) silhouette to sil.bw, where the object reads 1 and the background reads 255. Clean. Simple. Slay. β¨
Example 2. Using the silhouette as a compositing mask
rtsil -M -o mask.bw model.g component < component.rt
bw-fb mask.bw
Reuses the camera from an mged(1) saveview script (the matrix is read from standard input via -M) so the matte of component matches a view you set up interactively β then displays it on a framebuffer with bw-fb(1). The resulting binary mask can be fed to tools like bwmod(1) or pixmatte(1) to key the object into a composited image. It's giving "workflow" and we're obsessed π¦
π SEE ALSO π
brlcad(1), mged(1), rt(1), rtedge(1), rthide(1), bw-fb(1), bw(5), librt(3)
π AUTHOR π
BRL-CAD Team π
π 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. Like, please actually tell them, don't just suffer in silence π
and that's the page, bestie π β brought to you by BRL-CAD (this is the RTSIL(1) page, fr fr), copyright 1989-2026, US Government as represented by the U.S. Army Research Laboratory. go render something cute π
β¨
π¦ 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