Realtime raytracing + ASCII rendering
EDIT: Just to let you know, there’s a vastly updated version of this available!
This was on the old incarnation of Coldcity and was quite popular, so here it is again - sick and twisted realtime raytracing on the console
Read on for binary and full source.

It was late, I was bored; so I married a heavily stripped-down version of aRT, my raytracer to a little text-mode rendering library I knocked up.
The equivalent video resolution when “rendering” to the console is 80 x 25 - which is handy as aRT, written for clarity and experimentation not speed, was able to do realtime speeds without any performance optimizations.
The result - “tart” (text-mode aRT). It runs on Win 2000/XP/Vista on the command line, and does about 24fps on my development machine.
Included in the download is the final version and full source code (VC++ 6, should be easily updatable to recent versions). Also included is full source and a demo of the ASCII rendering lib, which can take a bitmap, convert it to console characters and draw it (using the WriteConsoleOutput() system call for performance). It can do other pretty stuff besides raytracing:

renders as:


renders as:

Enjoy, and please feel free to use the text-mode rendering lib for anything you wish.
Download (44Kb Zip file)







eeee, commenting on my own post again. Just to say I’m working on this again. I’m using a stripped version of the latest version of my raytracer to do far more complex realtime raytracing. I’m putting 1200 triangles out at 100fps at the moment so tests look good! I’ll post updates here.
Comment by Iain — Aug 31 2K07 @ 9:41 pm
[...] This is an updated version of my sick and twisted realtime ASCII raytracer. [...]
Pingback by c o l d c i t y » More ASCII raytracing fun — Sep 22 2K07 @ 4:30 pm