Nice! Now add colors and we can finally play Doom on the command line. More seriously, using colors (not trivial probably, as it adds another dimension), and some select Unicode characters, this could produce really fancy renderings in consoles!
ASCII characters are not pixels: a deep dive into ASCII rendering
31–40 of 158 posts
Re: ASCII characters are not pixels: a deep dive into ASCII rendering
#32I think there's a small problem with intermediate values in this code snippet:
const maxValue = Math.max(...samplingVector)
samplingVector = samplingVector.map((value) => {
value = x / maxValue; // Normalize
value = Math.pow(x, exponent);
value = x * maxValue; // Denormalize
return value;
})
Replace x by value.Re: ASCII characters are not pixels: a deep dive into ASCII rendering
#33There is already a C library that does realtime ascii rendering using décision trees: GitHub: https://github.com/symisc/ascii_art/blob/master/README.md Docs: https://pixlab.io/art
Re: ASCII characters are not pixels: a deep dive into ASCII rendering
#34Re: ASCII characters are not pixels: a deep dive into ASCII rendering
#35Great breakdown and visuals. Most ASCII filters do not account for glyph shape. It reminds me of how chafa uses an 8x8 bitmap for each glyph: https://github.com/hpjansson/chafa/blob/master/chafa/interna... There's a lot of nitty gritty concerns I haven't dug into: how to make it fast, how to handle colorspaces, or like the author mentions, how to exaggerate contrast for certain scenes. But I think 99% of the time, it…
and damn that article is so cool, what a rabbithole.
Re: ASCII characters are not pixels: a deep dive into ASCII rendering
#36Re: ASCII characters are not pixels: a deep dive into ASCII rendering
#37> It may seem odd or arbitrary to use circles instead of just splitting the cell into two rectangles, but using circles will give us more flexibility later on.
I still don’t really understand why the inner part of the rectangle can’t just be split in a 2x3 grid. Did I miss the explanation?
Re: ASCII characters are not pixels: a deep dive into ASCII rendering
#38Nice! Now add colors and we can finally play Doom on the command line. More seriously, using colors (not trivial probably, as it adds another dimension), and some select Unicode characters, this could produce really fancy renderings in consoles!
Re: ASCII characters are not pixels: a deep dive into ASCII rendering
#39Very cool effect! > It may seem odd or arbitrary to use circles instead of just splitting the cell into two rectangles, but using circles will give us more flexibility later on. I still don’t really understand why the inner part of the rectangle can’t just be split in a 2x3 grid. Did I miss the explanation?
Re: ASCII characters are not pixels: a deep dive into ASCII rendering
#40Not to take away from this truly amazing write-up (wow), but there's at least one generator that uses shape:
https://meatfighter.com/ascii-silhouettify/
See particularly the image right above where it says "Note how the algorithm selects the largest characters that fit within the outlines of each colored region."
There's also a description at the bottom of how its algorithm works, if anyone wants to compare.