Live data from Hacker News

ASCII Google Streetview

tllabs.io

21–30 of 45 posts

Re: ASCII Google Streetview

#21
post #12

This is the dopest WebGL application, IMO. Totally loving this, including the green mode.

Totally agree.

This has the potential to be the first real-life gta-ish matrix racing game.

If you're lucky, your personal skin is already available as driver model.

If you zoom out, it gets quake-ish.

Re: ASCII Google Streetview

#23
What a nice way to find out that my rather old Thinkpad (on Debian testing) now has WebGL support - I only updated everything from time to time, and apparently stuff actually started working. Great!

Great hack, too. I really, really want that thing as a screensaver!

Re: ASCII Google Streetview

#25
post #9

What is your algorithm for shading here? It seems like brightness is partially provided by the density of the characters (eg, '8' vs '.', as in normal ascii art), but also partially by the color of the characters.

From reading the fragment shader code, it seems to

a) sample a 4x4 grid of 2x2 neighborhoods

b) quantize the color to 3 bits per channel (so 512 colors)

c) "hash" (not really hashing) the "key" computed from adding up all the pixel neighborhoods and index into a lookup table: http://tllabs.io/asciistreetview/fontHash.png

d) use the green channel from the hash table to index into the font: http://tllabs.io/asciistreetview/8x8.png

It could be a little smarter about using the shape of the neighborhood to figure out which character to use, but it seems the lookup table is solely based on brightness, or I'm missing some subtlety in the code. It seems overly complex for what it does, but not for what it could be doing.

Re: ASCII Google Streetview

#27
From my boy Hakim in May, 2011 - http://hakim.se/experiments/textify Not sure how the approach differs technically, but obviously a different stylistic feel per the translations.

And I'm glad I read the comments and played with the zoom. Drastically changes the effect ... very much like a video-game world with incredible detail.

Re: ASCII Google Streetview

#28
post #25
post #9

What is your algorithm for shading here? It seems like brightness is partially provided by the density of the characters (eg, '8' vs '.', as in normal ascii art), but also partially by the color of the characters.

From reading the fragment shader code, it seems to a) sample a 4x4 grid of 2x2 neighborhoods b) quantize the color to 3 bits per channel (so 512 colors) c) "hash" (not really hashing) the "key" computed from adding up all the pixel neighborhoods and index into a lookup table: http://tllabs.io/asciistreetview/fontHash.png d) use the green channel from the hash table to index into the font: http://tllabs.io/asciistreet…

This was just a quick shader port/hack from an openFrameworks library I was working on. You can see the LUT texture generation here (which is done on the fly in oF): https://github.com/TeehanLax/ofxAsciiArt/blob/master/src/ofx...

All of this is pulled from Sol's TextFX library. The character bitmap actually doesn't line up to Sol's table, so that's why you see weird characters popping up in places. The main goal was just to get image to text working on the GPU. I've typically done it on the CPU. Over time I hope the mess gets cleaned up.

Re: ASCII Google Streetview

#30
post #23

What a nice way to find out that my rather old Thinkpad (on Debian testing) now has WebGL support - I only updated everything from time to time, and apparently stuff actually started working . Great! Great hack, too. I really, really want that thing as a screensaver!

I Agree, this would be a most excellent screensaver. Very impressive stuff indeed. If it run in VT220 I'd be starting a new religion on your behalf.
Post reply on HN