Saturday, November 17, 2012

Saturday Morning Tips: Animation Setup in After Effects

At the time of this post (or at least what I intended) I am currently attending CTN, so I'm keeping it simple this post. I was asked a week ago how I animated straight ahead in After Effects.

In this post we'll cover how to block in After Effects - quick and easy:

There is a number of ways to approach animation in after effects - most of these ways are effective in their own right. However when you start making an ultra convoluted character and expect to animate it in After Effects like you would in Maya, Blender, Modo, etc - you hit a wall.

 Most techniques out there are fine for motion media types ,which is what After Effects does well. It's when you have 21 controls with about 3-10 attributes each, that is when you realize that you're not moving a square, but an army.

Also I'm not suggesting that you should have 21 controls on your character rig. If there is anything I've learned less IS more.

The setup is simple: for every attribute you need, the stopwatch must be toggled. You could use the auto key-frame, but I find it to be messy working with also I can't get to a default pose quicker.

When your done toggling: select these new keys, right click, and go down to toggle hold keyframe.


This will turn the linear keys into easy-in holds. Note: If there was a linear key before the easy-in 
hold it would tween to a slow stop. Anything after the easy-in hold will be a true hold, however this isn't anything to stress over.

After creating all these holds I usually tuck these keys one frame left of zero. This way I can quickly reference the default pose if I need to call it up.

After I have done this I block, and I make sure to alter everything on each pose - insuring order. You want to know that everything is keyed on frame x, frame y, and frame etc.

However it is wise to adjust the resolution before you start:
You'll need to manage both the work space's resolution and the preview's resolution.
Go to the resolution tab and go down to custom:


Here you can adjust for every x pixel horizontally and vertically, that pixel will be rendered as opposed to all of them. This will save on render and playback time as you fine tune your animation. When you feel like it is ready for the final cut be sure to boost it back to full res.

Those were a few quick tips to get started - I hope they were helpful.

Saturday, November 10, 2012

Saturday Morning Tutorials: 360 Head Part 3

A little belated, but it is still Saturday:

This is more or less the last part of my Tutorial on how to make an expressive rotatable head.
I'll go more in-depth on controls and animation process in the weeks ahead. Please refer to previous tuts concerning track mattes and hooking up expressions to controllers - In the interest of keeping these short I'm not repeating myself.


The parts are a face plate, nose, bangs, hair, and a buckle - some bit of hair that connects with the bangs in front and the hair at the back of the head. It is not necessary to color or texture the hair, maybe tint them differently to know which is which when adjusting, but the only thing that is important is their shape.

The pieces are simple, but must be designed with some care. However the process is not at all mysterious just expect to go in and out of After Effects until you achieve the desired effect. This is also true when it comes to displacement maps (we'll get to those later).

First be sure to duplicate your eye comps from the last tutorial.  Be sure to flip and rewire it, so it works like the original, but separate from it. You will then have both the left and right eye. 

Make a composition for the head and place all your parts inside. Select the parts pertaining to the face and pre-compose them. Example: (face, nose, eye_lt, eye_rt, and mouth) 

Simply arrange your face how you'd like it to be. After that it is time to go back to the head layer to apply FreeForm to the parts of the head.  Be sure to have your displacement maps in the same composition with its visibility turned off.  If you made your displacement map in the same comp within After Effects be sure to pre-compose it (explained further below).

Here's a short run down of FreeForm's attributes:








You can make domes, half-domes, and saddles easily enough with displacement maps. Don't try making a sphere with FreeForm. Now what in tarnation is a displacement map? You may be wondering - well they look generally like this:





There is only one rule: white advances, black recedes.
If you get tired of going back and forth from Photoshop like me you can make a map within after effects. Just be sure to pre-comp it so FreeForm can read it as a flat image. With this knowledge you can also make waving flags and turbulent surfaces.

Once you think you understand the above you get this:


Our last problem is how to overcome FreeForm layer stacking issue. FreeForm still obeys the layer stack of your composition. Unlike After Effects' default 3D layers that can obscure other layers no matter the layer order. Freeform does not recognize other layers with FreeForm on it. Now how do we solve this pesky layering problem within FreeForm?


Simply upload a small PNG file with nothing on it save for 100% glorious transparency.
Place it in the head composition and reference it in FreeForm's backside controls. There the ugly unwanted backside is gone!

If you happen to want a bit of the backside wrapping around the face just duplicate - the bangs for instance and put it behind the face.

The last step is inserting a few flat gradient layers. Make them into alpha mattes and the hair should blend seamlessly together. Doing this will also reduce how flat the character looks.

There isn't a real cut and dry step by step theory of getting this right - only through patience and perseverance can you get this working. These tips should guide you in the right direction.


Saturday, November 3, 2012

360 Head Tutorial Part 2: Eyes and Mouth

This is part 2 of my massive After Effects tutorial on how to create an expressive rotatable head.

In this part we'll discus the eyes and mouth.

It is important to keep everything organized while working in After Effects. Give your files and folders appropriate color tags to differentiate themselves from each-other. Also it would be wise to tag compositions based on the file majority's tag color within that comp.


When in the composition window you can find the tag color by typing it into the search bar.

Also by right clicking the tag color you can choose to select all layers of the same color.





The parts needed for a simple eye are as follows:


Now you don't really need two identical eyelids in hindsight you just need one of each piece. I just wanted to slap this thing together without any unnecessary adjustments. We only need to make one eye then we duplicate the composition, flip it, and change the code a bit so the clone functions the same way.

From right to left this is how our tutorial will go:


So first things first slam the pieces for the eye in its own composition titled "eye." Align the eyelids so that they are just above and below the eye shape proper. Like so:


Select those two eyelids and pre-compose them, ( CTRL + SHIFT + C ) title the new comp "eyelids."

Now duplicate the eye shape and place it above the eyelids. Place these two layers above everything else. Go under the Track Matte Tab on the eyelid layer and choose alpha matte.


An alpha matte functions the same as a Photoshop clipping mask only the layer stacking is reversed. This is also how we make the mouth so keep this in mind - It's important.

In effects and presets under distort there is a filter called "Bulge." Throw this filter on to the eyelid composition.


I've moved the lid in a little to show it distorting -  making it appear to wrap around the eye. It goes without saying to play around with the settings until you are satisfied.

The next step is to create a null object - I use these to help drive things. Place this new null object at the center of your pupil. Then toggle 3D layer on both the pupil and the null object.

 

Pull the null object away from the active camera view. Make the null a parent of the pupil - we're creating a pivot for the pupil. Play with the null's rotation to see if it looks like a ball rolling in a socket. Test until you get it right. 

Pupil rotation tests

Duplicate another eye shape and put it above the pupil to make another alpha matte.

Now for the eyebrow - to get it to be all smooshy I don't use puppet pins - I use the warp filter. Add two warp filters on to the eyebrow. Now why two of the same filter? This is because I want to control the two differently.

One warp style is arc and the other is bulge. Arc gives a generic vertical bend through the center. Bulge can offset the center of this bend and sharpen one end of the brow. The only reason I don't use arc's horizontal distortion is because it appears to twist the eyebrow.

See the example:

Eyebrow Examples

The thick highlight is going to be the input for the controls of the eyebrow. Now that takes care of basic setup - It is time to understand a few basic expressions that we can output from a controller.  Make a temporary controller - create a new null and zero out its position.  Pre-compose everything save for the eyebrow and your new null controller. Name the new comp "eye scale" and let's start hooking things up.

Add a slider from the expression controls to your null object. You'll need 7 sliders at most (just hit CTRL + D to duplicate) and rename them: Pupil Scale, Brow Bend, Brow Center, Brow Horizontal, Brow Vertical, Top Lid, and Bottom Lid.

Separate the layer palate like so:


This will make pick whipping a whole lot easier.

ALT + LMB on any animation stopwatch property on any layer will get you an expression prompt. This is how you will come to drive objects in separate compositions and link everything.

This is what it looks like:


Pick whipping an expression is just like regular parenting only across multiple compositions.
This is what the eye looks like all hooked up:

Expression Link Up Map
*To separate dimensions just right click position and select separate dimensions.

I've annotated this picture so you know what needs special attention. Otherwise it is happy pick whipping time! Despite the terrifying image this is easier to follow over me doing this step by step (also not nearly as dull).

A few noteworthy expressions need some explaination:

+ Original Value
 Say you got a layer with values already applied to an attribute? If you pick whip the value the controller gives you - it will override the attribute's value. To counter this type the original value at the end with an addition symbol in-between.

For example:
thisComp.layer("eyeCtrl").effect("Brow Horizontal")("Slider")+250
 This keeps the controller at default values - which is better than opening the rig starting at a number like 34.5. Most of this is to help the animator animate without getting confused.
*-1

This reverses the math. The expression tag essentially states, that I'm multiplying negative one. A common example is the eye. You have a division between the two-dimensional position values of the controller and the three-dimensional rotational values. Y rotation is not the same as Y position so controlling it is awkward.

To solve this I for one flipped the math (*-1), and secondly switched y positon with x's rotation. Forcing it to behave more like a position than a rotation.
Here's how it should look bear in mind the names in parenthesis are dependent on what you named your layers:
comp("eye_rt").layer("eyeCtrl").transform.xPosition*-1
This next expression is helpful in dealing with the pupil.
Scale Pupil is a slider under the effects attribute of the controller that I had you create.
Its default value is 0 there is a reset button above this value - it is REALLY helpful when animating.
This is how to keep Scale Pupil at 0 while keeping the layer pupil to stay at the default 100 scale value:
temp =comp("Eye Comp").layer("Eye Ctrl").effect("Pupil Scale")("Slider");
[temp + transform.scale[0], temp+ transform.scale[1], temp + transform.scale[2]]
The lower bit adds the original value with the new value from the controller.
Temp is essentially the incoming value from the controller. 
Transform.scale[0] is equal to the original scale value of x, [1] = y, and [2] = z.

That basically covers the eye. On to the mouth which will be shorter than the above.

Parts you'll need:


 Make a new composition and throw these bad boys into the mix. Most of what I already taught you should be apparent in the construction of the mouth. The smaller black open mouth shape is the alpha for the tongue, chompers and uvula's alpha mattes.

The closed mouth is just the same as the eyebrow with two warp filters. The same is true with the open mouth only the tongue, chompers, and uvula is static. 


The real mystery is how to replace layers. Toggling these layers visibility and easily key framing it in a single abrupt change. The secret is through the check box expression control. The great thing about this control is that it only has stepped key frames.


However the check box's value when activated is only 1. If I was to hook it in to a layers opacity and activate the box it will only give me 1 opacity. To make this useful tag this at the end of the expression:

*-100

There you can now use the check box for something useful.

This is how the layer stack looks when completed:


In our next tutorial we will begin the head. Till next Saturday! I know I didn't state that in the first post, but every Saturday I'll post a tutorial of some sort.

If there is any questions or requests feel free to leave a message.

Head Tutorial:
Nimbus Link: First Post
360 Head Tutorial Part 1: Design
360 Head Tutorial Part 2: Eyes and Mouth
360 Head Tutorial Part 3: The Head