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);

Grab the Project Files

The best way to get our project files is to become a patron on Patreon. For $5 a month, you get access to all of the tutorial project files we've made available as well as other monthly projects, rigs, R&D, elements, early product previews, and BTS content not available anywhere else! You can also purchase just this project file on our Gumroad Store if you would rather do that.

Get access to all of our project files on Patreon or Get this single project file on Gumroad