Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions sampleimage -> spacing of letters?

  • sampleimage -> spacing of letters?

    Posted by Jon Frickey on November 28, 2007 at 11:24 pm

    Hello!
    I’m looking for an effect similar to the expression that links the luminance of a video source to the ascii characters of a text layer, thus creating the typical ascii look.
    However I need something more “poetic”, less “technical”.

    I’d really like to link the luminance to the spacing between letters, making them overlap where the source is black and go very far apart where it’s white.

    Another option that I’ve tried is linking the letters’ size to the luminance (bigger, i.e. overlapping -> black; smaller, i.e. dissapearing -> white)

    Jon Frickey replied 18 years, 8 months ago 3 Members · 4 Replies
  • 4 Replies
  • Dan Ebberts

    November 29, 2007 at 3:08 am

    I’ve got an example that should help get you started. Start with a comp-sized layer named “target”, which is what you’ll be sampling. Add a text layer that consists of 12 rows of 16 X’s, like this:

    XXXXXXXXXXXXXXXX
    XXXXXXXXXXXXXXXX
    XXXXXXXXXXXXXXXX
    etc.

    Adjust the font size, tracking, and leading so that the text fills the comp window.

    Add a scale animator and set the scale amount to 200%.

    Add an expression selector and delete the range selector.

    Apply this expression to the Amount parameter of the expression selector:

    target = thisComp.layer(“target”);
    numCols = 16;
    numRows = 12;
    horizSpacing = thisComp.width/numCols;
    vertSpacing = thisComp.height/numRows;
    origin = [horizSpacing, vertSpacing]/2;
    col = (textIndex – 1) % numCols;
    row = Math.floor((textIndex – 1) / numCols);
    p = origin + [col * horizSpacing, row * vertSpacing]
    sample = target.sampleImage(p,[horizSpacing,vertSpacing]/2);
    linear(sample[0],0,1,-100,100)

    Sit back and wait while the frame renders. 🙂

    I think that’s everything. I have it set up to only use the red channel, but you can tinker with that.

    Dan

  • Jon Frickey

    November 29, 2007 at 6:06 pm

    Thanks Dan!
    It works nearly perfectly and with a little fiddling around it

  • Kevin Camp

    November 29, 2007 at 7:59 pm

    if you have particular, you might want to check out harry frank’s favorite particular things.

    one of them is creates particles in a halftone pattern based on another layer’s luminance… you may be able to adapt that technique to get particle letters to flay around, then rest in groups based on another layers luminance.

    Kevin Camp
    Designer – KCPQ, KMYQ & KRCW

  • Jon Frickey

    November 30, 2007 at 12:27 pm

    Don’t have Particular but I’ll get myself the tryout version and I’ll have a go with that.
    Thank you and thanks to Harry Frank

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