3d-ascii-viewer
render 3D models as ASCII art in the terminal
TLDR
SYNOPSIS
3d-ascii-viewer [options] modelfile_
DESCRIPTION
3d-ascii-viewer renders 3D model files as ASCII art in the terminal. It converts 3D geometry into text-based representations using characters of varying density to simulate shading and depth.The tool supports common 3D formats including OBJ and STL files. Models are rendered using a simple rasterization approach where surface brightness determines which ASCII character is used. Darker areas use sparse characters like dots while brighter areas use dense characters like @ or #.For interactive exploration, the animate mode continuously rotates the model, creating a spinning effect in the terminal. The color mode adds ANSI color codes for enhanced visual output on terminals that support them.Output dimensions default to the terminal size but can be overridden for specific use cases like generating ASCII art for text files or documentation. The tool is useful for quick model inspection without launching a full 3D viewer.
PARAMETERS
-w, --width n
Set output width in characters.-h, --height n
Set output height in characters.--color
Enable colored ASCII output using ANSI codes.--rotate-x degrees
Rotate model around the X axis.--rotate-y degrees
Rotate model around the Y axis.--rotate-z degrees
Rotate model around the Z axis.--wireframe
Render as wireframe instead of solid.--charset chars
Custom characters for brightness levels (dark to light).--scale factor
Scale the model by the specified factor.--fps n
Frames per second for animation mode.--animate
Continuously rotate the model.--help
Display help information.
CAVEATS
Complex models with many polygons may render slowly or lose detail. Terminal font and aspect ratio affect the visual output. Color support depends on terminal capabilities. Very small output dimensions may produce unrecognizable results.
HISTORY
ASCII art renderers for 3D content emerged alongside the demoscene and terminal art communities. Various implementations exist across programming languages, with modern versions supporting standard 3D file formats. The technique builds on decades of ASCII art tradition dating back to early computing.
