LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

3d-ascii-viewer

Render 3D models as ASCII art in the terminal

TLDR

View an OBJ model as ASCII art in the terminal
$ 3d-ascii-viewer [path/to/model.obj]
copy
View an STL model
$ 3d-ascii-viewer [path/to/model.stl]
copy
Enable color using materials referenced in the OBJ's MTL file
$ 3d-ascii-viewer --color [model.obj]
copy
Show help and list all supported options
$ 3d-ascii-viewer --help
copy

SYNOPSIS

3d-ascii-viewer [options] modelfile_

DESCRIPTION

3d-ascii-viewer (by autopawn) is a minimal viewer that renders 3D models as animated ASCII art directly in the terminal, using ncurses and no graphics library. It continuously rotates the model, with characters of varying density representing surface shading and depth.The viewer supports Wavefront `.obj` and `.stl` files. For OBJ files, an accompanying `.mtl` material file can be used together with --color to tint each face by its diffuse material color.Because output is text in a standard terminal, the viewer is useful over SSH, in tmux panes, or in any environment where a full 3D GUI is not available.

PARAMETERS

modelfile_

Path to a Wavefront `.obj` or `.stl` model file.
--color
Use the diffuse color of each material referenced in the companion MTL file. Requires a terminal supporting color redefinition and enough ncurses color pairs.
--help
Print usage information and exit.

INSTALL

sudo apt install 3d-ascii-viewer
copy

CAVEATS

Requires the ncurses developer libraries to build (`libncurses-dev` on Debian-based systems). Complex, high-polygon models may render slowly or lose detail. The visual result depends strongly on the terminal's font, aspect ratio, and color capabilities; very small windows may produce unrecognizable output. The --color mode needs a terminal that supports redefining colors and enough color pairs.

HISTORY

3d-ascii-viewer is an open-source experiment by `autopawn` demonstrating real-time 3D rasterization to ASCII characters without any graphics libraries. It continues a long tradition of terminal 3D renderers from the demoscene and ASCII-art communities.

SEE ALSO

blender(1), openscad(1), meshlab(1), figlet(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid