So i posted on the After Effects forum, and thought maybe it would be more apropriate to post here.
I'm trying to create an effect where I can take a video and replace it with ASCII characters.
Kevin Camp came up with this expression which works great, but only renders a single character per text field:
asciiArray = [" ","a","b","c","d","e","f","g","h","i","j"]; // enter characters to range from light to dark values
numCharacters = 10; // enter the total number of ascii characters entered in the array above
imageMap = thisComp.layer("Source Image").sampleImage([position[0], position[1]], [1, 1]);
a = Math.round(linear(imageMap[0], 0, numCharacters));
asciiArray[a]
I tried putting this on a text field and duplicating it in a grid, problem is that it takes a couple thousand layers (all running expressions) to fill the screen area with a sufficient number of ASCII characters and After Effects crashes long before I have enough.
I also found this page:
http://www.creative-workflow-hacks.com/2007/08/27/more-fun-with-sampleimage...
which contains an expression that works for one line of text, so I have fewer layers (I only have to duplicate it per the number of lines), but the problem is it doesn't regulate the width of the text field, so the changing width of the characters change the location of subsequent characters.
I'm really stuck and I've been struggling with this problem for days. Does anyone know how I can achieve this effect?