Makin’ YouTube Comments in Adobe After Effects

In this tutorial, I’m going to show how you can take the text of Youtube comment and create a precomp to match the look. I’ll show how to use an expression to control the widget of the text box and how you can use Adobe’s Essential Graphics to make this precomp resuable. This looks way better than simply taking a screengrab, as you can resize it.

Project download: https://bit.ly/3b8Agvt

Note:
I did spot a slight error, in that I forget in the recording to parent the Thumbs Up layer to the Null object. Do as I say in the audio, not as I do in the video 😉

Expression Used
AllText = text.sourceText.replace(/(\r\n|\n|\r)/gm,"|");
AllTextLength = AllText.length;
textArray = AllText.split('');

txt = "";
word = "";
boxwidth = 40;
count = 0;
for (var i=0; i < AllTextLength; i++) {
 word = word+textArray[i];
 if (textArray[i] == ' ') {
  txt = txt+word;
  word = "";
 }
 count++;

 if (count >= boxwidth) {
  count = 0;
  txt = txt+"\n";
 }
    if (i == AllTextLength-1 ) {
  txt = txt+word;
 }

    if (textArray[i] == '|') {
  txt = txt+word+"\n";
  word = '';
  count = 0;
 }

}
txt.split('|').join('');

Published by ShiveringCactus

Tutorials and videos, mainly After Effects, but with some 3D and puppetry stuff too.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: