RTSIL(1)

πŸ“¦ version 7.44.0, in nixpkgs unstable

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

  • -o file.bw β€” write the silhouette image to file.bw instead of standard output. πŸŽ€
  • -s # β€” set the square grid size to # rays on a side (default 512, i.e. a 512x512 image).
  • -w # β€” set the image width in pixels.
  • -n # β€” set the image height in scanlines.
  • -a deg β€” set the view azimuth in degrees and enable auto-sizing. Use it with -e; it conflicts with -M.
  • -e deg β€” 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.
  • -p deg β€” set the perspective angle in degrees (0 <= deg < 180; 0 is orthographic, which is the default).
  • -V #[:#] β€” set the view aspect ratio width/height (like 1.33 or 4:3).
  • -g mm β€” set the grid cell width in millimeters.
  • -G mm β€” set the grid cell height in millimeters.
  • -u units β€” set the display units; -u model uses 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, but rtsil always renders with a single CPU πŸ’€.
  • -x # β€” set librt debug flags as a hexadecimal bit vector (see raytrace.h).
  • -X # β€” set rt program/optical debug flags as a hexadecimal bit vector.
Heads up bestie: see rt(1) for the remaining shared options (e.g. -T tolerances and -c script 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 πŸ’œ

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