Join Chris Meyer for an in-depth discussion in this video Creating wiggly lines, part of After Effects Apprentice 16: Creating a Medical Opening Title.
- View Offline
In between movies, we went ahead and arranged our different Vital Signs layers throughout our 3D world to create some interest as the camera moves through this animation. You can see them peek in and out in between at those various layers. Again, the arrangement is up to you, if you want to see what we did, you can go down into the Intermediate Comps folder, open up 11_Wallpaper and you can explore what we did by typing "UU" to Us in quick succession to see everything that was changed including the transform values, but I'm going to continue on with our own final comp.
We have some text with some lab results in them. Another common element you might see in a medical situation such as this would be EKG or other sorts of vital sign traces. Similar to what you see on this display here in one of our extra videos. I'll go up to 1 View temporarily, so you can see that at a higher resolution. We can simulate that type of display using shape layers. Now you're not going to know immediately how to create every single element. There will be times when you need to do a little bit of research and development.
So go ahead and search your Comps folder and let's just make ourselves a brand new composition just to experiment with what might work for shape layers. I'm going to call this "Vital Signs Test." I need to make it pretty wide, our final render here is 960 half HD. Since I'm going to be panning past it, I have a feeling that I might want to say twice that resolution just to make sure I have enough pixels not to get too blurry as the camera moves around. So I'm just going to type in 2000 pixels as a starting number.
You can always change that later, but I don't think I need anything very tall. I certainly don't want our vital signs traces to be as tall as these individual videos. So I certainly don't want to be any taller and say 200 pixels. These are just guesstimates, you can go ahead and play around and change these numbers later. We're just trying out ideas here. When I press Enter, you can see we have a very long skinny composition. I'll tap the apostrophe key to turn off Safe Areas. Go down just one view for now, and if you need to, create as much room as you can for your comp panels so you can see what you're doing.
I just happen to be at a nice 50% view here, that's pretty good. Okay. What we want to do is draw a line through this composition, then we want to animate that line to create our fake Vital Signs displays. Shape layers are good not only at creating shapes but also in creating lines. I'm going to select my Pen tool, and I actually need the opposite of what I had before for my Fill And Stroke settings. I don't want to fill but I do want to stroke to draw along my line.
So I'm going to hold down Option on Mac, or Alt on Windows and click on the swatch until I see that red no slash go through it. That can often be faster than going into the Fill dialog and manually selecting No Fill. Then for Stroke options, again, I hold Option or Alt and click until I see a nice solid color for my stroke. Click on the swatch and change the color to taste, white is a good starting point, that's what we use for our text. And go ahead and set the Stroke Width to some moderate value, two, three, four pixels will be okay.
One might be a bit of a hair line. I'm going to use two for starting point and again, we could always edit this later. All right, we don't have any layers in this Comp yet, so I don't need to worry about deselecting layers. I'm going to place my Pen tool at the far left edge of my comp, click once, that's my first point. Go to the right edge, hold down the Shift key to make sure I'm drawing a straight like, click again and there is my Stroke Path. I'm going to go ahead and return to the Section tools, so I don't accidentally edit that line and here we have a white line.
Well, you could draw an EKG path or some other Vital Sign trace manually and in one of the idea corners, we will actually go through that procedure, but shape layers have shape operators, which allow you to distort outlines. Let's see if one of those will create a nice Vital Signs trace for us. For my Shape layer 1, I'm going to twirl it open until I get to its shape group. Select its shape group, Shape 1 and add shape operator.
There happens to be one called Wiggle Paths. It sounds like a perfect thing to create a randomized line rather than a straight line. I'll select that, I can see a little bit of deflection here, but let's go ahead and twirl that open, and start increasing the size until we start to see some random lines being drawn. I don't like the squared off corners, so I'm going to change the points to smooth, and I think I'd like a little bit more details, more wiggles to this. So I'll just crank up the Wiggle's parameter until I get -- well, the maximum, a lot of detail throughout this path.
Again, this very long composition is going to be in the background of our final comp, and we're only going to be seeing a small part of it at a time. If you were to press the spacebar to start a standard preview, you'll see the wiggle paths by default, wiggles, it's all set to the path. This is kind of fun and interesting but frankly, not a lot of Vital Signs displays look like this. Instead they tend to be a static path and only a portion of that path is drawn on or revealed over time. To do that with wiggle path, if you just set the wiggles per second down to the zero, you will now have a static path that does not animate.
Next trick is animating it on. You could use a mask to go ahead and reveal part of the line. That's not a bad idea because you could have a feathered mask to have a very soft-edged trace. However, there's also another shape operator that comes in handy for tricks like this. I'm going to twirl up wiggle paths for now, make sure my shape group is selected, make sure I can see my add operator. If you can, you always have one at the very top here right next to your Fill and Stroke swatches and say let's add Trim Paths.
That will allow me to reveal only a small portion of my path. I'm making sure it's in my shape group underneath Wiggle Paths. If necessary, you can drag shape operators around in the timeline panel to rearrange your order. I'm going to twirl open Trim Paths and start scrubbing the end until only a small portion of my Vital Signs display is revealed, like around there. To animate this little window down along our path, you can use the offset parameter.
This basically moves the start and end points simultaneously so you have a moving window without having to animate both the start and end individually. That's pretty cool. Okay, let's set that back to zero, you can manually set it to zero or here is a trick in After Effects. If you right-click on any parameter the menu that appears will have a Reset option, press Home to make sure my current time indicator is at the start of the comp, enable key-framing for offset, press End and set it to some number of rotations.
Let's say maybe four full cycles of the offset. I don't know if that's going to work for speed, but we can always edit this later. I'll enter that, press 0 in numeric keypad to do a quick RAM preview. This renders pretty quickly and that's a pretty cool speed. I could maybe stand at being a little slower but I have to see it in context with the camera move, before if I really know. Anyway, this is a good starting point.
The After Effects Apprentice series was created by Trish and Chris Meyer. These tutorials are designed for After Effects CS4 through CC, and can be used on their own or as a companion to the Meyer's book, After Effects Apprentice.
- Animating to music
- Arranging layers in 3D space
- Performing time stretches
- Working with 3D camera tracking
- Typesetting and animating text
- Adding effects like drop shadows and motion blur
- Creating and animating shape layers
- Building and delivering a broadcast package