Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressionism: goodold ASCII

  • Expressionism: goodold ASCII

    Posted by Caspar Stracke on May 4, 2012 at 4:25 pm

    Hello everyone –
    I am digging up a tread from 2007 on creating ASCII art in AE.
    https://forums.creativecow.net/thread/227/8827

    This is the first time trying out a custom written expression, copying code (that I have to admit, I don’t understand at all) into the alt-click opened text layer.
    Nothing works.The thread refers to *very* old AE versions.
    Has anything possibly changed? From AE 4 to AE CS5 re expressions?

    ASCII and even retro-ASCII art seems so outdated that I only found broken links and references from 5+ years ago.

    Anybody?

    Much thanks!!

    C.S.

    Caspar Stracke replied 14 years, 2 months ago 2 Members · 3 Replies
  • 3 Replies
  • Kevin Camp

    May 4, 2012 at 5:22 pm

    i’m not sure which of the expressions you are using from that thread, but the one from dan ebberts had a missing backslash of the third-from-the-bottom line.

    sometimes ‘special’ characters get stripped from posts, i’ll see if i can’t get it to post here:


    density = " .'`,^:" + '";~-_+<>i!lI?/|()1{}[]rcvunxzjftLCJUYXZO0Qoahkbdpqwm*WMB8&%$#@';
    target = thisComp.layer("target");
    cols = 80;
    rows = 60;
    w = thisComp.width/cols;
    h = thisComp.height/rows;

    s = ""

    for (var i = 0; i < rows; i++){
    for(var j = 0; j < cols; j++){
    center = [w/2 + j*w, h/2 + i*h];
    sample = target.sampleImage(center,[(w-1)/2,(h-1)/2]);
    s += density[Math.round(linear(sample[0],0,1,0,density.length - 1))];
    }
    s += "\r";
    }
    s

    Kevin Camp
    Senior Designer
    KCPQ, KMYQ & KRCW

  • Kevin Camp

    May 4, 2012 at 5:29 pm

    yep, that seemed to do it.

    also note, the image (layer) in the comp that you want to base the ascii art on should be named ‘target’, or replace the text in quotes from this line:

    target = thisComp.layer(“target“);

    to have the name of the layer that you are using as an image map.

    Kevin Camp
    Senior Designer
    KCPQ, KMYQ & KRCW

  • Caspar Stracke

    May 14, 2012 at 4:41 pm

    Dear Kevin,

    *very* belated thanks (I am in the woods …off the internet 🙂

    After finally identifying the missing backslash.
    Very ironic: the backslash from this ASCII expression got in fact killed by ASCII…
    So I got something going. But veeery render-intensive…
    Where’s that easy plug-in I used to have in OS 9 days 🙂

    cheers,

    Caspar

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy