Tutorial 210: Textured Shadows

Joe Clay | Sep 4, 2020

In this After Effects tutorial, we build a mask that can follow another layer. This technique is helpful in creating shadows out of images and textures. It's extra handy because you can set it all up with one texture layer and have everything in your scene use that single layer for its shadow. This technique can also be used anywhere else you need a mask to follow a layer.

If you use this technique on anything, hit us up @workbench_tv! And check out Path Visualizer!

Expression

Make sure to change the layer in offset/xOffset below as well as provide the proper offsets as show in the tutorial.

Tracking x-only
xOffset = thisComp.layer("01").transform.xPosition - 1295;
pts = thisProperty.points();
for(i = 0; i < pts.length; i++) {
    pts[i] += [xOffset, 0];
}
inTans = thisProperty.inTangents();
outTans = thisProperty.outTangents();
createPath(pts, inTans, outTans, true);
Tracking xy
offset = thisComp.layer("01").transform.position - [1588, 511];
pts = thisProperty.points();
for(i = 0; i < pts.length; i++) {
    pts[i] += offset;
}
inTans = thisProperty.inTangents();
outTans = thisProperty.outTangents();
createPath(pts, inTans, outTans, true);

Become a Patron

If you'd like to help support Workbench, check out our Patreon page. Thank you for even considering clicking this link to support what we're doing. We appreciate it. Patrons get all sorts of benefits, from R&D files, setups, and elements to early product releases.

Check out our Patreon Today

Grab the Project Files

Get the project file through our Gumroad Store. This project file contains the After Effects file shown in the tutorial as well as the textures and graphics used. There is also a legacy version saved to AE v15.

If you're buying project files, consider becoming a Patron. At the $5/mo. tier, you get access to project files as they come out and some tutorials also come with additional BTS content showing more of the builds.

Get the project on Gumroad

Tutorial 209: Font Weights

Joe Clay | Aug 27, 2020

This is a quick After Effects tutorial for you. I wanted to play around with the new After Effects text expression access and I thought it might be interesting to be able to finally animate font weight with it—rather than having to animate sourceText keyframes. It's like having a value brand variable-width font!

Hopefully this expression access is opened up more in the future. It'd be nice to be able to combine styles in the same text layer. But for now I don't see a way to do that, unless I'm missing something. This seems to be here mainly to help build mogrts for Premiere, which is sad as it's been something a lot of us have wanted in AE for a long time.

Anyway, if you use this technique on anything, hit us up @workbench_tv!

Expression

This expression was built with Texta in mind. You'll probably need to modify the weights array to work with your font. You could even get crazy by skipping around through weights and styles. Or if you feel industrious, you could add a second slider to switch through fonts with similar weights.

Variable Weight
weights = [
    'Thin',
    'Light',
    'Book',
    'Regular',
    'Medium',
    'Bold',
    'Heavy',
    'Black'
];
family = thisProperty.style.font;
family = family.split('-');
select = Math.floor(clamp(effect("Select")("Slider"), 0, weights.length - 1));;
createStyle().setFont(family[0] + '-' + weights[select]);

Become a Patron

If you'd like to help support Workbench, check out our Patreon page. Thank you for even considering clicking this link to support what we're doing. We appreciate it. Patrons get all sorts of benefits, from R&D files, setups, and elements to early product releases.

Check out our Patreon Today

Grab the Project Files

Get the project file through our Gumroad Store. This project file contains the After Effects file shown in the tutorial as well as the textures used. There is no legacy version, however, as this was made with the first version of AE to support this type of expression.

If you're buying project files, consider becoming a Patron. At the $5/mo. tier, you get access to project files as they come out and some tutorials also come with additional BTS content showing more of the builds.

Get the project on Gumroad

Tutorial 208: Glass Shift

Joe Clay | Jun 18, 2020

Useful tutorials don't always have to be flashy. In this one, we show you how a simple gradient can be combined with Posterize to make a displacement map that we can use to make some quick and dirty movement for our graphics.

This kind of setup can easily be applied to anything to add some movement. It's perfect for those types of projects where all you have to work with is a ton of stills.

For some inspiration, check out Roy Cranston's work on Behance.

We also mentioned our FREE Normalize Track script and Daniel Hashimoto's 3D Normalization in AE tutorial. This project uses assets from WB LUTs v1 as well as Corona—no not that Corona. And that's it. We hope you put it to good use when you need something quick.

Expressions

On the Matte layer we're using for displacement, these two expressions are applied to their respective properties inside of the gradient fill. This allows us to drag a slider, and change the width of the gradient. It's a linear gradient with one side pure black and the other side pure white.

Start Point
x = thisComp.layer("Controller").effect("Width")("Slider")/2;
[-x, 0];
End Point
x = thisComp.layer("Controller").effect("Width")("Slider")/2;
[x, 0];

The other two sliders are basically pickwhipped to the posterize and displacement effects we're using.

Become a Patron

If you'd like to help support Workbench, check out our Patreon page. Thank you for even considering clicking this link to support what we're doing. We appreciate it. Patrons get all sorts of benefits, from R&D files, setups, and elements to early product releases.

Check out our Patreon Today

Grab the Project Files

Get the project file through our Gumroad Store. This project file contains the After Effects file shown in the tutorial as well as a legacy version saved back to AE v15. It also includes the photo from Sam te Kiefte on Unsplash, as well as an element from our Corona pack, and our Workbench LUTs v1.

If you're buying project files, consider becoming a Patron. At the $5/mo. tier, you get access to project files as they come out and some tutorials also come with additional BTS content showing more of the builds.

Get the project on Gumroad

Tutorial 207: Particulates

Joe Clay | Apr 24, 2020

While Trapcode Particular and Stardust are both amazing particle systems in their own right, sometimes you need just a little bit of floaty bits to add to a scene. You could try to bend After Effects' aging built-in particle systems to your will, or you can do what we do—hack your own solution with text animators.

Over time we've come to find, through working with Mikey Borup and through Kyle Hamrick's wonderful Textperiments, that text animators are one of AE's most amazing secret powers. For example, AE's beta only recently got tapered strokes, but they've been hacked in text animators for years. Text animators are the closest thing AE has to Cinema 4D's Mograph system. And so we're going to continue our exploration of text animators to make some floaty particles. Check it out!

Become a Patron

If you'd like to help support Workbench, check out our Patreon page. Thank you for even considering clicking this link to support what we're doing. We appreciate it. Patrons get all sorts of benefits, from R&D files, setups, and elements to early product releases.

Check out our Patreon Today

Grab the Project Files

Get the project file through our Gumroad Store. This project file contains the After Effects file shown in the tutorial as well as a legacy version saved back to AE v14.

If you're buying project files, consider becoming a Patron. At the $5/mo. tier, you get access to project files as they come out and some tutorials also come with additional BTS content showing more of the builds.

Get the project on Gumroad

Tutorial 206: Styling Text

Joe Clay | Apr 6, 2020

In this tutorial, I'll show you how to use regular expressions—aka regex—to style text using the expression selector in text animators. This is particularly useful if you want to change a lot of things that can be broken down into patterns or if you have text you can't easily modify, like text coming from a CSV.

The basic idea is to look for a regex pattern, and then save a string with all of those matches replaced with a certain special character. After that, we do a simple check on that saved string and every spot we find that special character, we set our expression selector to 100.

This idea was sparked by Luis Martínez, who sent me a comment about his method. So make sure to go see how he did it! This tutorial uses his regex to remove the hidden control characters.

I also mentioned Zack Lovatt's ASH Syntax Highlighter in this tutorial, which I'd assume does what I did here as an experiment—but in a better and faster way. So check it out if you need that specific functionality.

I hope you enjoy this one. It has some specific, but really useful utility!

Expressions

Here are all of the example expressions used in the tutorial. These all go into the Amount property of an expression selector.

Yellow
var RE = /(yellow)/g;
    txt = text.sourceText.replace(RE, function($0) {
      return '~'.repeat($0.length);
    });
    if(txt.charAt(textIndex - 1) == '~') { 100; } else { 0; }
Control Characters
var charactersRE = /\r?\n|\r/g;
var controlRE = /[=\*/+-]/g;
txt = text.sourceText.replace(charactersRE,'');
txt = txt.replace(controlRE, '=');
if(txt.charAt(textIndex - 1) == '=') { 100; } else { 0; }
Functions
var charactersRE = /\r?\n|\r/g;
var digitsRE = /[.]{1}([a-z_]+?)[(]{1}/gi;
txt = text.sourceText.replace(charactersRE,'');
txt = txt.replace(digitsRE, function($0, $1) {
    return '_' + (new Array($1.length + 1).join('@')) + '_';
});
if(txt.charAt(textIndex - 1) == '@') { 100; } else { 0; }
Numbers
var charactersRE = /\r?\n|\r/g;
var digitsRE = /(-?)(\d+)/g;
txt = text.sourceText.replace(charactersRE,'');
txt = txt.replace(digitsRE, function($0, $1, $2) {
    return (new Array($1.length + 1).join('@')) + (new Array($2.length + 1).join('@'));
});
if(txt.charAt(textIndex - 1) == '@') { 100; } else { 0; }
Quotes
var charactersRE = /\r?\n|\r/g;
var quoteRE = /('|")(\w+)('|")/g;
txt = text.sourceText.replace(charactersRE,'');
txt = txt.replace(quoteRE, function($0, $1, $2, $3) {
    return '@' + (new Array($2.length + 1).join('@')) + '@';
});
if(txt.charAt(textIndex - 1) == '@') { 100; } else { 0; }

Become a Patron

If you'd like to help support Workbench, check out our Patreon page. Thank you for even considering clicking this link to support what we're doing. We appreciate it. Patrons get all sorts of benefits, from R&D files, setups, and elements to early product releases.

Check out our Patreon Today

Grab the Project Files

Get the project file through our Gumroad Store. This project file contains the After Effects file shown in the tutorial as well as all of the elements used to build it. It also includes a jsx file that contains a library of code that can be used to apply this effect. That was something experimental that we threw in to figure out how it works.

If you're buying project files, consider becoming a Patron. At the $5/mo. tier, you get access to project files as they come out and some tutorials also come with additional BTS content showing more of the builds.

Get the project on Gumroad

Tutorial 205: Animated Pipes

Severo Ojea | Apr 2, 2020

In this tutorial we take a look at creating an interesting loop. We'll make procedural pipes using splines, cloners, and CV Chamfer. This will allow us to create pipes, bend them, put bands around the joints, and move clones through the pipes. It's a simple but powerful setup.

You'll need to make sure you have CV Chamfer installed from Cineversity.

Grab the Project Files

Get the project file through our Gumroad Store. This project file contains everything shown in the tutorial. There are three Cinema files that should work in most recent versions of C4D. One file contains the setup for pipes and elements that move through them. The second file contains a larger setup with cloned sections and the final file contains the full setup.

If you're buying project files, consider becoming a Patron. At the $5/mo. tier, you get access to project files as they come out and some tutorials also come with additional BTS content showing more of the builds.

Get the project on Gumroad

Become a Patron

If you'd like to help support Workbench, check out our Patreon page. Thank you for even considering clicking this link to support what we're doing. We appreciate it. Patrons get all sorts of benefits, from R&D files, setups, and elements to early product releases.

Check out our Patreon Today

Tutorial 204: 3D Visualizer

Joe Clay | Feb 20, 2020

In this tutorial, we're taking audio and using it to drive a setup similar to the one we made in Tutorial 166: Free 3D Terrain. By adding some simple expressions to Wave World's Frequency and Amplitude parameters in each producer, we can make our own visualizer. It's like a plane of water that is affected by sound.

While this can be done in vanilla AE by following our other tutorials, Tutorial 70: Pump up the Jam and Tutorial 162: Beat-based Time Shifting, we definitely would recommend Trapcode Sound Keys for best results.

That allows us to easily split of frequency ranges and make a more unique visualizer that can pulse with different elements of your audio.

Expressions

These are the expressions for using Sound Keys. If you're using vanilla AE, you'll need to normalize your audio (find the highest peak in your audio graph and divide by that) and then multiply by your amp/freq variable. The first one obviously goes in a producer's Amplitude parameter and the second one goes into Frequency.

amp = thisComp.layer("Controller").effect("Amplitude Multiplier")("Slider");
thisComp.layer("SoundKeys").effect("Sound Keys")("Output 1") * amp;
freq = thisComp.layer("Controller").effect("Frequency Multiplier")("Slider");
thisComp.layer("SoundKeys").effect("Sound Keys")("Output 1") * freq;

This is an experimental adjustment to the Wave Speed parameter. I ended up turning it off.

speed = thisComp.layer("SoundKeys").effect("Sound Keys")("Output 1");
value - (speed * .2);

Become a Patron

If you'd like to help support Workbench, check out our Patreon page. Thank you for even considering clicking this link to support what we're doing. We appreciate it. Patrons get all sorts of benefits, from R&D files, setups, and elements to early product releases.

Check out our Patreon Today

Grab the Project Files

Get the project file through our Gumroad Store. This project file contains the After Effects file shown in the tutorial as well as all of the elements used to build it. Note: it does not contain the music as we cannot distribute it. This project file was built in AE 2020 but there's a legacy version that should work back to CC (15.X).

If you're buying project files, consider becoming a Patron. At the $5/mo. tier, you get access to project files as they come out and some tutorials also come with additional BTS content showing more of the builds.

Get the project on Gumroad

Tutorial 203: Quick Tips 08

Joe Clay | Feb 12, 2020

If you're curious about that Preserve Underlying Transparency thing, check this out. I think it might've also been in one of our quick tips before because it's useful to know about anyway.

And that's it. I hope you can find uses for these tips. They've all been helpful to me so I bet they'll help you. See you next time!

Become a Patron

If you'd like to help support Workbench, check out our Patreon page. Thank you for even considering clicking this link to support what we're doing. We appreciate it. Patrons get all sorts of benefits, from R&D files, setups, and elements to early product releases.

Check out our Patreon Today

Tutorial 202: Depth Matte

Joe Clay | Jan 13, 2020

Sev, Andrew Embury, and I were working on a project using Redshift. For some reason, depth passes from Redshift are true depth passes—i.e. there's no info for focus. The depth is basically colored solely based on distance to camera.

Unfortunately, that means that keeping something in focus inside of After Effects is rather tedious since you can't just select a single grey value and be set. Instead, you have to keyframe the entire sequence so that your focus point is maintained. If you could tell Frischluft or Camera Lens Blur to stick to a point, then you could at least track a spot to keep in focus. Unfortunately, the focus selectors aren't keyframeable. So instead, I built my own workaround, as you'll see in this tutorial.

Expression Code

Here's the code to grab color from the center point of a mask. Remember to set up a Layer Control! Note, from the tutorial, I've removed the hardcoded [1280,720] and replaced it with [thisComp.width/2, thisComp.height/2] so you don't have to deal with that. If you have more than one mask on your layer, you might need to pick a different one when you set up the pt variable.

function getPoint(msk) {
    pts = msk.points();
    x = y = 0;
    for(i = 0; i < pts.length; i++) {
        x += pts[i][0];
        y += pts[i][1];
    }
    x = x/4;
    y = y/4;
    return [x,y];
}

L = effect("Layer Control")("Layer");
pt = getPoint(mask("Mask 1").maskPath) + [thisComp.width/2, thisComp.height/2];
L.sampleImage(pt, [10,10], true);

Apply the next expression to a Slider Control. I made it a Master Property to get its data to the parent comp, but since you should bake this expression anyway, you can just bake the slider and copy it to the main comp if you want. The Master Property setup is nice because it's easy to test it before you bake it and if you need to change it, you just turn the expression back on and then bake it again. And as I mentioned in the tutorial, if you invert your matte in your blur plugin you might be able to remove the 255 - bit.

255 - (content("Rectangle 1").content("Fill 1").color[0] * 255);

Become a Patron

If you'd like to help support Workbench, check out our Patreon page. Thank you for even considering clicking this link to support what we're doing. We appreciate it. Patrons get all sorts of benefits, from R&D files, setups, and elements to early product releases.

Check out our Patreon Today

Tutorial 201: Ugly Sweater

Joe Clay | Dec 13, 2019

In this After Effects tutorial, we take a look at how to build an ugly sweater. We start off by drawing a single stitch, and then repeat that into a full grid. Vertically, we skip every other row because we're coloring these using a source comp that has Mosaic applied to it. However, our Mosaic covers those skipped sections. If we only had one layer of fabric, we'd see the edges.

So instead, we skip rows and then use another copy of our source comp with another Mosaic on it. It needs to match up with the alternated threads, so we move it up with an effect like Motion Tile or Offset so that we don't lose the edges of our source, then we apply Mosaic, and then we shift it back into place. Mosaic doesn't have a setting to shift its effect, so we shift the layer instead.

After that we continue to build our effect procedurally, using adjustment layers to build the background of the fabric from the foreground. We rough it up, and add some fuzz to it to make it more realistic. And then we call it a day.

Many people have created this effect, so look around and experiment to make your own. It's a fun exercise to recreate real-world objects and I'm glad I could share my process with you!

Become a Patron

If you'd like to help support Workbench, check out our Patreon page. Thank you for even considering clicking this link to support what we're doing. We appreciate it. Patrons get all sorts of benefits, from R&D files, setups, and elements to early product releases.

Check out our Patreon Today

Grab the Project Files

Get the project file through our Gumroad Store. This project file contains the After Effects file shown in the tutorial. There's also a few extra pieces in it that weren't demonstrated. It was built in AE 2020 but there's a legacy version that should work back to CC (15.X).

If you're buying project files, consider becoming a Patron. At the $5/mo. tier, you get access to project files as they come out and some tutorials also come with additional BTS content showing more of the builds.

Get the project on Gumroad
123456789101112131415161718192021