Back

ASCII Clouds

315 points17 hourscaidan.dev
madethemcry8 hours ago

That is so beautiful. The underlying algorithm is perlin noise (see https://en.wikipedia.org/wiki/Perlin_noise) and it's over 40 years old!

It's such a fabulous tool as the generated images can be used for effects like glass/ice displacements, cheap water-like effects, but you can also generate terrains from it or just cool visual effects that benefit from random patterns. The core property to me is that it feels very organic/natural.

This was such a common tool in Flash AS3 back in the days to create stunning effects, games and such. I'm not active in building visual stuff like that anymore but I bet it's still very common in this field, because why not?

evilturnip5 hours ago

I think it's technically Simplex noise, but yes also developed by Perlin.

cess116 hours ago

P5JS makes it very easy to start playing around with.

https://p5js.org/reference/p5/noise/

oofoe6 hours ago

Or you could just start with ASCII... I was discussing how shaders work with a friend and wound up hacking together a sort of "shadertoy" that runs in Emacs last night. Scroll to end of file to see examples...

https://hg.sr.ht/~oofoe/shademacs/browse/sdf.el?rev=tip

  (shade 10 2 (lambda (x y) x))  ; Horizontal ramp.
  ;; @ # & % * = + : - · 
  ;; @ # & % * = + : - ·
block_dagger11 hours ago

Given the name, I expected more actual ASCII characters/options and selectable text. Visually appealing and fun to play with, however.

ksymph14 hours ago

This is cool... But I feel like having different color/brightness for each symbol kinda defeats the purpose of it being ASCII when the symbols only correspond to different intensities anyway.

intrasight3 hours ago

Yes, but it is "ascii art" and hence artistic freedom.

Bimos14 hours ago

Yeah, with all these colors, any single character should be enough.

xwiz4 hours ago
chriscjcj3 hours ago

Also thematically related (from 2011):

http://nkwiatek.com/experiments/ascii

kristopolous15 hours ago

I had a similar effect for a C program I wrote a long time ago (I think 2007?). Here's a video: https://www.youtube.com/watch?v=H4j-BkwMB20

and the code: https://github.com/kristopolous/ascsee

I just updated it so it compiles on modern systems.

I also found the original version if you like being an archaeologist: https://9ol.es/tmp/gol.c

otikik10 hours ago

This looks like a good way to model "satellite-view clouds" where you render "the full atmosphere". I don't think it would work well when modeling "ground-view clouds" however. I have been looking for a good (fast) algorithm for doing that, would appreciate it if people have pointers for that.

ku1ik12 hours ago

It has very little to do with ASCII but cool nonetheless.

lasgawe3 hours ago

This is beautiful, I saw a similar tool weeks ago: https://ascii.0xbalance.xyz

scaradim9 hours ago

cool. but if it's really about ASCII then I expect to have possibility to copy/paste a cloudy sky in my text editor ;-P

binaryturtle7 hours ago

It dies with lots of WebGL errors here, so I only see a white page. So that's definitely not ASCII in my book. Would be more fun to have an actual text based output indeed.

TyrunDemeg1015 hours ago

Very cool, found myself just staring at it for a few minutes! Thanks for sharing!

pj45337 hours ago

Super fun! I was exploring this type of thing as one of my first experiments with Claude Code early last year.

https://github.com/pj4533/asciidelic https://asciidelic.com

I should go back and add mobile support, maybe fullscreen support.

ZpJuUuNaQ59 hours ago

Nice. This looks similar to what I have implemented: https://www.npmjs.com/package/asciiground, but I intended it more as a library where a user could program their own patterns by extending the existing systems. Sadly, my GitHub account got flagged, so there is no way to access the repository or GitHub pages for the demo at the moment.

haritha-j8 hours ago

First time I came across this, why does a github account get flaggged?

dotancohen5 hours ago

GP might be Israeli. I'm tempting fate by posting this, but I know two Israelis whose Github accounts were flagged following the October 7th attacks, and both stated that they know others as well. I don't know what the mechanism of flagging involves, but there are targeted campaigns against some Github (and other social things) users. It's not just one report and then the repo goes down.

ZpJuUuNaQ58 hours ago

No idea. I submitted a reinstatement request, but I haven't received any response in the past 4 months.

matthew_hre15 hours ago

Spent longer than I'd like to admit trying to recreate the Balatro background effect...

plastic04111 hours ago

You can render only single characters. First you need to change the HTML "max" attribute of <input> to 1.1 in the "Glyph Thresholds". And set 0.0 for the desired characters and the characters above. Set 1.1 for the remaining characters.

For example, if you only want the dash, set the dot and dash to 0.0. Then set 1.1 for the plus, ring, and cross characters.

alexcz10 hours ago

Really like it, only thing some of the cells can be jittery and rapidly switch back and forth between two symbols, making for an unpleasant effect, maybe there is a way to smooth this?

ynac15 hours ago

Just throwing a HELL YES <with a kung fu punch> out there for this. Nice work. I've been trying to integrate a live ascii video feature for a while now and the subtle detail on this is really inspiring.

some1else12 hours ago

Similar Perlin-based effect with mouse reactivity & audio:

https://srdjan.pro

efilife8 hours ago

you should disclose that it's your portfolio

sandos6 hours ago

and if you ctrl+- like 7 times youre back to showing clear pixels. If you set cell size to 4, then 5 times is enough :)

firecall17 hours ago

Well thats pretty cool!

yanchep12 hours ago

Trippy!

  browsh https://caidan.dev/portfolio/ascii_clouds/
burnt-resistor13 hours ago

Neat. It'd be more "ASCII" if it used 8x16 pixel (but right extended to 9x16) characters in 80:133 width:height aspect ratio since 80x25 characters at 720x400 on 4:3 results in 80:133 pixels. An arbitrary sized canvas is cool so long as the aspect ratio is preserved.

The infamous MCGA/"VGA" mode 13h had pixels with an aspect ratio 6:5, while 320 x 240 Mode X was square (1:1).

I still remember the unchained offset calculation for the memory offset for pixel memory access before the era of U and V pipes and many optimizing compiler passes:

    unsigned short offset = (((y << 2) + y) << 6) + x;
    unsigned char far *ptr = (unsigned char far*)MK_FP(0xA000, offset);

    // IIRC: #define MK_FP(seg, off) ((void far *)((unsigned long)(seg) << 16 | (unsigned long)(off))) // far pointers != linear address
In real-mode (linear): 0xa0000 + (320 * y) + x
pixelpoet6 hours ago

Infamous means famous but for a bad reason, basically notorious. I've noticed a lot of people making this mistake recently, as well as people using ignorant to mean stupid. But I digress...

Many of us have that mode 13h stuff memorised too, including the 0x3c8 and 0x3c9 palette registers etc. And since 320x200 bytes is less than 65536 you don't need to do any segment stuff to access the full frame buffer.

casparvitch16 hours ago

Would love this as an audio visualizer

publicdebates6 hours ago

This is a genuine work of art. I don't care how impractical it is, it's utterly beautiful, and a joy to play with.

drob51810 hours ago

That’s pretty hypnotic. Very cool.

baalimago14 hours ago

Here I'm being ridiculous but I was a bit disappointed that it was a canvas rendering and not a mono-font text block

intrasight3 hours ago

Now I want this on a digital artframe in my livingroom.

NSPG91111 hours ago

i would kill to have something like this in wallpaper engine

onde2 hours ago

On macOS there is Plash to use webpages as wallpapers. Works great

fxn211 hours ago
lanyard-textile12 hours ago

Miasma!

arionmiles13 hours ago

Dope!

imvetri13 hours ago

What is this?

hairozen5 hours ago

very very cool!

heliumtera5 hours ago

Except it is not ascii

imdsm16 hours ago

that looks pretty good

Padriac16 hours ago

I don't understand.

keyle16 hours ago

I think it's just a technological show piece, basically built on top of open source libraries and a couple of algorithms.

imvetri13 hours ago

Lets let author explain. Our explanation might derail newbie readers

imvetri13 hours ago

Same here

r0075h3ll14 hours ago

nicee

tomiezhang14 hours ago

That is magic

functionmouse17 hours ago

What do you see in the clouds?