Tutorial 101: 2D-3D Parallax

Joe Clay | Dec 15, 2017

This week we look at a useful way to map a precomp's frames to its position on screen. This allows us to fake a 3D rotation as things move across screen. You basically animate shape layers to the extreme positions, add our expression, and you're done. You can also do this with 3D layers. Just rotate them a little bit and bring them in. In this example I animated the trees by putting a null in the middle of them, parenting a camera to that null, and then rotating the null 60° over 180 frames. Then, back in After Effects, you can either parent these layers to a null and animate the null's position or just animate their position directly.

Layer Dolly

//Remap time to rotate house as they dolly by
s = this.source.name;
end = comp(s).duration;
x = this.toWorld(this.anchorPoint)[0];
linear(x,2052,-152,0,end);

This was changed from the version in the video where the duration of the layer was hard coded into the expression. This will grab the duration of the layer from its source precomp. That should allow the precomps to be at a different frame rate from the main comp if that is desired.

If you have any questions, ask them. If not, see you next week!

Become a Patron

If you'd like to help support Workbench, check out our Patreon page. 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!

Check out our Patreon Today

Tutorial 100: Rollin' Rig

Joe Clay | Dec 8, 2017

We've hit 100—100 tutorials and 10K subscribers! What a way to end the year! But before that, Santa's got to come to town. He's upgraded his ride a little bit.

This week's tutorial looks at a useful way to set up a rolling car rig, but we also look into calculating the angles between wheels so we can add some additional movement to the car's suspension. Relevant expressions are below. But if you want the ultimate in rolling, be sure to go grab Roll it! from Tomas Sinkunas (aka renderTom) from aescripts!

Angle Calculation Expression (be sure to change the layer name for p2)

p1 = transform.position;
p2 = thisComp.layer("Layer Name").transform.position;
angle = Math.atan2(p1[1] - p2[1], p1[0] - p2[0]);
radiansToDegrees(angle);

Delay Expression (adjust to fit your values)

a = thisComp.layer("Body Axis").transform.rotation.valueAtTime(time-1);
if(a<-180) { a += 360; }
ease(a,-2,2,-5,5);

Become a Patron

If you'd like to help support Workbench, check out our Patreon page. 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!

Check out our Patreon Today

Tutorial 99: Glitchier Glitch Text

Joe Clay | Dec 1, 2017

This week, we add another glitch text tutorial. The big takeaway here is to use CC Image Wipe along with a good matte to overlay middle grey on top of another matte to make a displacement map. Since middle grey means there will be no displacement, everything that was displaced by brighter and darker values in the original matte will begin to return to their original positions as the grey overlay animates in. We also use compositing masks to mask other displacement.

Our mattes come from JSplacement which you need to grab if you haven't already and, if you can, send Grigori a tip because it's awesome! We also use a matte we made in Tutorial 93: Slit-Scan Displacement. And you can spice it up with a little bit of Tutorial 75: Breakout.

Also, we're almost to 100 tutorials and 10K subs! Thank you to all of our supporters! We've had a great ride so far, and we're hoping to build on that further in 2018. Most of all, we're grateful that you guys watch, keep up with us, and share our tutorials. It's amazing! We're going to think of some sort of giveaway or something to celebrate. That'll be a separate video in the next few weeks, so keep an eye out!

See you all next week!

Become a Patron

If you'd like to help support Workbench, check out our Patreon page. 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!

Check out our Patreon Today

Tutorial 98: Flocking

Joe Clay | Nov 24, 2017

After talking with Paul Conigliaro (aka @conigs) about how Tutorial 95: Fluid Motion was similar to flocking, I decided to go a little bit more in depth on the subject because it's a pretty interesting subject—and one I've been interested in since Processing first came out and I discovered the amazing work of Robert Hodgin (aka Flight 404 back in the day). Sadly, it no longer looks like his blog is up, but it used to have a bunch of great stuff on it. I might have to archive.org that one.

Anyway, being able to create a decently complex flocking system in After Effects with pretty minimal effort was surprising. It can get way more complex of course. I'm going to take a little time—when I can find some—to see how I can add the complexity of movement without bogging the code down. I think I can improve upon this, and I hope you will attempt it too!

Grab the Project Files

Feel free to download the project file that you can use in your own projects!

Become a Patron

If you'd like to help support Workbench, check out our Patreon page. 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!

Check out our Patreon Today

Tutorial 97: Improved Single-Layer Track Mattes

Joe Clay | Nov 17, 2017

I received a comment on an old tutorial and realized there is a way to improve upon it now that we have access to mask path points in expressions. The expression below looks at our first position key and uses that to calculate an offset so that the mask that we apply this to stays put. Take note, if you need to tie it to a different key or a differently named mask, you'll need to modify the expression.

If you're a patron with access to my Quiver expressions, it should already be saved in there for you if you want to download a txt file to use with Quiver.

Lock Mask Expression

p = transform.position;
s = transform.scale/100;
offset = p.key(1).value - p.value;
offset = [offset[0] / s[0], offset[1] / s[1]];
pts = mask("Mask 1").maskPath.points();
for(i = 0; i < pts.length; i++)  {
    pts[i] = pts[i] + offset;
}
createPath(pts);

Become a Patron

If you'd like to help support Workbench, check out our Patreon page. 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!

Check out our Patreon Today

Tutorial 96: Mask Vertex Expressions plus Grading

Joe Clay | Nov 10, 2017

This video was sponsored by VideoBlocks. And because of that we have some nice footage to work with. And we're using that footage to take a quick look at a feature I've been dying to have in AE since at least 2005—mask vertex expression access! It's finally here in CC 2018!

I've needed this so many times, from locking other layers to masks to generating connecting lines on the fly without having to resort to scripts or a bunch of Beam effects. Here, we're using it to draw triangles on our footage. But combined with After Effects facial tracker and some setup, you can make polygonal faces that move with real footage, or whatever you can think up. I have some other ideas in the works, but I'm going to need some time to experiment. Until then, take this technique and run wild! Also, if you watched the grading section, I'm sorry I said "little bit" about a bajillion times. I'll keep it down next time. I just didn't realize I was doing it.

Here's some code for you to use. You're going to need to mix and match this code to get what you're after.

Get Points from Mask and Make a Triangle

Don't forget to add a Layer control and a Slider control called 'Offset.'

l = effect("Layer Control")("Layer");
offset = Math.floor(effect("Offset")("Slider"));
numPts = this.parent.mask("Mask 1").maskPath.points().length;

p = new Array();
p.push(toComp(l.mask("Mask 1").maskPath.points()[(offset+1) % numPts]));
p.push(toComp(l.mask("Mask 1").maskPath.points()[(offset+2) % numPts]));
p.push(toComp(l.mask("Mask 1").maskPath.points()[(offset+3) % numPts]));

createPath(p);

Get Points from Face Tracking and Make a Triangle

Don't forget to add a Layer control, Checkbox control called 'Random' and a Slider control called 'Offset.'

l = effect("Layer Control")("Layer");
r = effect("Random")("Checkbox").value;
offset = Math.floor(effect("Offset")("Slider"));

pts = new Array();
pts.push(l.effect("Face Track Points")("Left Eyebrow Inner").value);
pts.push(l.effect("Face Track Points")("Left Eyebrow Middle").value);
pts.push(l.effect("Face Track Points")("Left Eyebrow Outer").value);
pts.push(l.effect("Face Track Points")("Left Eye Inner").value);
pts.push(l.effect("Face Track Points")("Left Pupil").value);
pts.push(l.effect("Face Track Points")("Left Eye Outer").value);
pts.push(l.effect("Face Track Points")("Right Eyebrow Inner").value);
pts.push(l.effect("Face Track Points")("Right Eyebrow Middle").value);
pts.push(l.effect("Face Track Points")("Right Eyebrow Outer").value);
pts.push(l.effect("Face Track Points")("Right Eye Inner").value);
pts.push(l.effect("Face Track Points")("Right Pupil").value);
pts.push(l.effect("Face Track Points")("Right Eye Outer").value);
pts.push(l.effect("Face Track Points")("Nose Bridge").value);
pts.push(l.effect("Face Track Points")("Nose Tip").value);
pts.push(l.effect("Face Track Points")("Left Nostril").value);
pts.push(l.effect("Face Track Points")("Right Nostril").value);
pts.push(l.effect("Face Track Points")("Mouth Left").value);
pts.push(l.effect("Face Track Points")("Mouth Top").value);
pts.push(l.effect("Face Track Points")("Mouth Right").value);
pts.push(l.effect("Face Track Points")("Mouth Bottom").value);
pts.push(l.effect("Face Track Points")("Left Cheek Top").value);
pts.push(l.effect("Face Track Points")("Left Cheek Middle").value);
pts.push(l.effect("Face Track Points")("Right Cheek Top").value);
pts.push(l.effect("Face Track Points")("Right Cheek Middle").value);
pts.push(l.effect("Face Track Points")("Chin").value);

numPts = pts.length;

p = new Array();
if(r > 0) {
    seedRandom(offset,true);
    p.push(toComp(pts[Math.floor(random(0,numPts))]));
    seedRandom(offset+1,true);
    p.push(toComp(pts[Math.floor(random(0,numPts))]));
    seedRandom(offset+2,true);
    p.push(toComp(pts[Math.floor(random(0,numPts))]));
} else {
    p.push(toComp(pts[(offset) % numPts]));
    p.push(toComp(pts[(offset+1) % numPts]));
    p.push(toComp(pts[(offset+2) % numPts]));
}
createPath(p);

Become a Patron

If you'd like to help support Workbench, check out our Patreon page. 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!

Check out our Patreon Today

Tutorial 95: Fluid Motion

Joe Clay | Nov 3, 2017

In this week's tutorial we take a look back at two of our first few tutorials—Tutorial 02: Radial Delay and Tutorial 03: Blobs—in order to simulate what's going on in a shot on Dribbble by Alexander Pyatkov for Motion Design School called Telegram Logo Animation.

This concept can be done in other ways—you could probably do it with Time Displacement for example—but since we can add additional code this example can be pretty powerful. For example, you can have different sized circles and use their size to assign a mass, and thus have some move more slowly due to inertia. Or you could code in a movable point to determine where the delay comes from. There's a lot that can be done. As most of our tutorials go, this is just showing the idea of a technique—using delays to simulate a fluid motion.

If you want to get closer to the example, you might want to use this as a reference for animating shape paths, or for drawing frames. There's a lot of possibilities to using delays with blobbed objects in this fashion, so download the project file below and send @workbench_tv some gifs!

Here's the code used in the project if you want to build your own. Add Linear Delay to the position property on all of your component layers.

//Linear Delay
delay = -thisComp.layer("Controller").effect("Delay")("Slider"); //in seconds
x = Math.pow(value[0],2);
y = Math.pow(value[1],2);
d = Math.sqrt(x+y);
t = time + linear(d,0,2203,0,delay);
value+(thisComp.layer("Controller").transform.position.valueAtTime(t)-[960,540]);

Add Inertial Bounce 2 to the controller's movement so that everything bounces back into place.

//Inertial Bounce 2
amp = .1;
freq = 2.0;
decay = 2.0;
n = 0;
if (numKeys > 0){
n = nearestKey(time).index;
if (key(n).time > time){
n--;
}}
if (n == 0){ t = 0;
}else{
t = time - key(n).time;
}
if (n > 0){
v = velocityAtTime(key(n).time - thisComp.frameDuration/10);
value + v*amp*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t);
}else{value}

Grab the Project Files

Feel free to download the project file that you can use in your own projects!

Become a Patron

If you'd like to help support Workbench, check out our Patreon page. 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!

Check out our Patreon Today

Tutorial 94: Quick Tips 06

Joe Clay | Oct 27, 2017

Here's another collection of Quick Tips for you guys. The time for each tip is as follows:

And that's it. I hope some of these help speed up your workflow! Also go grab Overlord from Battle Axe! And check out John Colombo and Devil Cube! Thanks dudes!

Become a Patron

If you'd like to help support Workbench, check out our Patreon page. 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!

Check out our Patreon Today

Tutorial 93: Slit-Scan Displacement

Joe Clay | Oct 20, 2017

I guess I should've mentioned that slit-scan photography is where the name for this came from. Special cameras expose time across the frame so you can easily discern things like a photo-finish for example. For some reason this is more explained on Wikipedia in Strip Photography than in the Slit-Scan Photography article.

By building on that basic premise, we can make an interesting matte that we can use for other purposes like displacement, or with something like CC Image wipe for reveals. Take it for a test spin with the project below, and see what you can come up with. If you come up with something interesting, hit up @workbench_tv!

Also, I put an angle control on the first matte, so you can set it to any direction. Have fun!

Grab the Project Files

Feel free to download the project file that you can use in your own projects!

Become a Patron

If you'd like to help support Workbench, check out our Patreon page. 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!

Check out our Patreon Today

Tutorial 92: Stacking Text Animators

Joe Clay | Oct 13, 2017

If you're like me, you probably feel like you've animated text every which way by now. I always feel like finding a new way to animate text that looks good and doesn't feel cheesy or forced is one of the most challenging aspects of working on a project and it's often the part I dread the most. It's great when you've figured it out, but I usually procrastinate on my way to getting there.

Unless you're going to split apart text and animate each piece, it's often difficult to get things to work well with animators. In a previous tutorial, Tutorial 26: Text Animations Simplified, we looked at building elements in separate animators to make the task easier. This tutorial expands on that by building those parts into presets that can be quickly combined into more complex text animations. And it's even easier if you add in expression controls like we did way back in Tutorial 05: Sliders and Presets.

This can help to speed up your workflow and hopefully remove a barrier between you and more creative work. I didn't note it in the tutorial, but I also find it great to use animators to move text rather than using position keyframes. That way you can change text and layouts quickly when a client asks for a change.

If you're a patron that gets presets, you'll have access to the presets I built in this tutorial, as well as additional ones I'm going to build into my own library in the coming weeks. We're glad to finally be bringing more presets to you guys. We've basically been building out a campaign for arenas across the country, which means we haven't had much chance to make anything new as we've been resizing and retiming things to fit various LED boards for a bit now, haha.

Become a Patron

If you'd like to help support Workbench, check out our Patreon page. 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!

Check out our Patreon Today

 12345678910111213141516171819202122