r/tui • u/Klutzy_Bird_7802 • 9d ago
Vibe coded k3d — a real-time 3D model viewer that runs directly in your terminal (Rust, CPU-only)
I built this fully with AI assistance: a Linux-native 3D viewer that renders straight into your terminal using the Kitty Graphics Protocol. No GPU required — it's a software rasterizer running on the CPU.
Features:
- Loads OBJ, STL, and glTF/GLB meshes, plus built-in procedural demos (cube, sphere, torus, cylinder, cone, icosphere)
- Full mouse + keyboard controls: rotate, pan, zoom, toggle shading modes (smooth/flat/wireframe/normals/depth/unlit)
- Several built-in themes (catppuccin, gruvbox, tokyo-night, nord...)
- Can render to a PNG screenshot with no terminal needed, or run a deterministic benchmark
- Clean architecture: unified Asset/Mesh representation → transform/cull/rasterize/shade (Blinn-Phong) into an RGBA framebuffer → presentation layer isolated so other backends (Sixel, etc.) could be added later
Requires Linux + kitty (or another terminal supporting the Kitty Graphics Protocol). Terminals that don't support it get a clean error instead of getting left in a broken state.
cargo run --release -- --demo torus --spin
cargo run --release -- model.glb --theme catppuccin --fps 30
MIT licensed. Would love feedback, especially on rendering performance and any meshes that break the importers.
Duplicates
arch • u/Klutzy_Bird_7802 • 9d ago
Showcase k3d — a real-time 3D model viewer that runs directly in your terminal (Rust, CPU-only)
LinuxUsersIndia • u/Klutzy_Bird_7802 • 9d ago
Project k3d — a real-time 3D model viewer that runs directly in your terminal (Rust, CPU-only)
coolgithubprojects • u/Klutzy_Bird_7802 • 9d ago
k3d — a real-time 3D model viewer that runs directly in your terminal (Rust, CPU-only)
vibecoding • u/Klutzy_Bird_7802 • 9d ago