duduf.com

Duik Tools: DuDuF IK Tools for After Effects
Home --- Introduction --- Download --- Install --- Tutorials --- Help --- F.A.Q. --- About DuDuf --- Shop

I - Install

II - Principle of inverse kinematics

III - Controllers, names of the layers, preparations...

IV - IK

V - IK Goal

VI - IK and puppets
___VI / A - Preparing a puppet
___VI / B - Bones
___VI / C - IK

VII - Animation tools
___VII / A - Wiggle
___VII / B - Wheel
___VII / C - Morpher

___VII / D - Lens
___VII / E - Distance Link
___VII / F - Spring

VIII - Cameras
___VIII / A - Control Cam
___VIII / B - 3D Camera

IX - Miscellaneous
___IX / A - Zero
___IX / B - Rename
___IX / C - Links

Appendix: FAQ and Tricks

Screenshots are from the French version of Duik, but duik is available in English!

I - Install

1- Once you have downloaded the Zip-folder, quit After Effects if it is running, open Windows Explorer, go to the folder containing the scripts for After Effects (windows : "c:\Program Files\Adobe\Adobe After Effects\Support Files\Scripts" - mac : "Applications/Adobe After Effects/Scripts/") and paste in the contents of the Zip-folder (while keeping all the subfolders, you must have a file "Duik.jsx" in a "ScriptUI Panels" folder and a folder called "Duik "in the Scripts folder)

2- Duik is now available on the very bottom of the "Window" menu in After Effects CS3 or CS4 or CS5.

^Back to the list^

II - Principle of inverse kinematics

Inverse kinematics (aka IK) is a process allowing to specify the positions and rotations of the joints of a model in order to obtain a pose.
E.g. with an arm: rather than to animate the rotations of the arm, the forearm, and the hand one after the other, (which is called FK, "Forward Kinematics"), thanks to an IK all you have to do is to animate the position of the hand for the computer to calculate the rotations of the arm and forearm.

The IK means much comfort and many possibilities for the animation designer:
- The animation is applied to only one item instead of each part of the limb.
- Much more intuitive, real-time positioning of the limb.
- The IK allows you to place the end on one specific point (the hand on a knob, the foot on a step, etc.) where it will stay, even if the root is being moved (it is possible to move the shoulders without moving the hand, or to move the hips without moving the foot).

Animating a walk or a run is thus much easier.
Therefore, it is possible to change an already existing animation (to move the hips during an already animated walk... Imagine how difficult it is without IK...).

Technically, the IK requires "parts" in each limb that are related by a parent relationship from the end to the root. On the arm for example: the hand is connected to the forearm, which is connected to the arm, which may be connected to a shoulder (not necessarily, like we will see). The pivots must be well positioned about the joints.
A controller will also be required (a null object in After Effects) at the end, that will be used to specify the position of the limb and to animate it.

For those who want to know: mathematically (and so regarding computing), there are two ways to calculate the position of a limb for a limb of 2 joints max. (e.g. shoulder and elbow): using trigonometry, which implies that you have to indicate in which direction the limb will bend (or else, for each position of the end, there will be two possible positions for the limb); or using nonlinear programming, which is also the method used for limbs with more joints and which is not possible using expressions in After Effects.

Therefore, Duik allows you to create IKs on limbs of one or two joints (e.g. a single shoulder or a shoulder with an elbow).

You can download here an example of an humanoid that can be animated using IKs . (Project After Effects CS3)
Do not forget to test not only the controllers' moves, but also their rotations!

Here is a Video Tutorial by Famos which shows you how to create IKs!


^Back to the list^

III - Controllers, names of the layers, preparations...

On After Effects, to animate in a simple way, it is very handy to create null objects to which you connect the layers that have to move. These objects are called controllers
Controllers are handy to animate without IK, but with IK they become just essential.
The "controller" button of Duik is used to create controllers quickly and easily.
All you have to do is to select a layer for the controller and to click on the button.

Be careful, if you want Duik and the IK to work properly, avoid having two layers with identical names in the composition!

The easiest way to prepare an animation is to place all limbs in the right way, and then their anchor points. Then link the limbs with each other, and finally create the controllers at the places you will need them (in case you are using IK, create them at the roots and at the ends of the limbs: feet and hips, hands and shoulders, etc.)
Finish with creating the IK.

You can download here an example of an humanoid that can be animated using IKs . (Project After Effects CS3)
Don't forget to test not only the controllers' moves, but also their rotations!

^Back to the list^

IV - IK

Applying IK with Duik has been greatly simplified with version 8.

duik

Duik can apply IK on a limb of one, two or three layers, with one or two joints. These layers have to be linked from the end to the root (from hand to shoulder, from foot to hips), layer by layer, and a controller has to be.
In order to apply an IK, you have to select the layers, one by one, beginning by the end, finishing by the root, then you have to select the controller, and finally click on the button "Create an IK".
Since version 11, creation of IK's works with 3D Layers too (the only condition is that ALL layers, including the controller, are 3D).

___N.B. : When you apply IK on two or three layers, an option is created in the controller's effects, which allows you to choose the direction you want the limb to bend in. You can animate this effect (thus it is possible to bend an arm in both directions during one animation).

___N.B. : To apply IK with 3D Layers, you have to mention if the layers face the "Front" view (default view when there is no camera) or the "Right" view.

___N.B. : An effect on the controller allows you to adjust the direction of the IK on 3D Layers.

You can download here an example of an humanoid that can be animated using IKs . (Project After Effects CS3)
Don't forget to test not only the controllers' moves, but also their rotations!

^Back to the list^

V - IK Goal

The IK Goal has to be applied on one layer. This layer will not be influenced by the rotation of its parent (applied on a hand, whatever position the arm is in, the hand keeps its original orientation).
When you apply an IK in "2+1" mode with Duik, you can switch the end automatically in "Goal" mode. The IK Goal button executes the same operation, but unlike the application of a "2+1" IK, the IK Goal button doesn't link the layer's rotation to a controller's rotation.

To delete an IK Goal, you just have to delete the layer created by the script.

^Back to the list^

VI - IK and puppet

Once you are familiar with IK, you discover very quickly all the possibilities this technique offers.
Then you can associate this technique to another very useful After Effects tool: the puppet, which is used to distort layers starting from control points called "pins" in After Effects.

___N.B.: the point here is not to explain how the puppet tool works; for more information about this tool, please see the Help of After Effects.

Duik offers tools which allow to use IK easily on puppets' pins using bones, which you can create using Duik.

^Back to the list^

___VI / A - Preparing a puppet

Before modifying a layer to create a puppet and add IKs, you definitely need to ensure that this layer has not been applied a transformation like position, rotation, orientation or scale. If it has, you only need to precompose it (Ctrl + Shift + C) by selecting the second option "transfer attributes..." before any operation.

___N.B.: if you press the "U" key twice in a row, it opens all the properties of the layer which have been modified, and thus you can know quickly whether you need to precompose the layer or not.

Once the layer is ready, start with positioning your pivot at the right place.
Then you can position the pins of the puppet. Do not hesitate to control now and then the way the layer is distorted when you move the pins, in order to prepare a clean animation and distortion.
The pins are generally positioned at the pivot points of the joints and at the ends (e.g. one point at the ankle and one more at the end of the foot in order to bend the foot).
Everyone should see what suits him best according to the animation he wants to realise!

___N.B.: Positioning the pins and managing the distortion mesh quite corresponds to skinning in 3D-animation, except that the rigging is done after the skinning in this After Effects method!

^Back to the list^

___VI / B - Bones

duik

Duik innovates and offers objects to control the puppets' pins. This way you cannot only link the pins, but you can also apply an IK system on them!

These objects that will control the pins are called Bones. To create them, you just need to select every corner of the puppet that you want to animate and then to click on the "Bone" button. A bone is then created just under the pin and carries its name.

___N.B.: To select the pins more rapidly and more easily, do not forget to select the layer and to press "U"!

If you had not renamed the pins, at least think of renaming the bones! Very often there are a lot of them and you can easily get lost...

You can find here an example for preparing a leg using IK and puppet (After Effects CS3 project).

^Back to the list^

___VI / C - IK

Once the bones are created, the method to follow is similar to the one concerning "classical IK without puppet" described above. Now you need to create controllers (at least one at the end of the limb you want to animate (hand, foot...) and at the root (shoulder, hip...) if necessary. Finally, you need to create the links (hand child of forearm, which itself is child of arm, which itself can be linked to a shoulder controller or to another object, etc.).

You only need to create the IKs using the method described above ( here ), by positioning them on the bones and with the controller at the end of the limb...

___N.B.: The rotation of the puppets' pins is not taken into account by After Effects. However, if you want to rotate the foot, since the controller is usually positioned on the ankle, all you have to do is to add a puppet pin and its bone on the toes, and to link this bone to the controller. The controller's rotation will then rotate the foot (only, of course, if it is positioned the right way on the ankle). A coming version of Duik will use this process to have the "IK Goal" option even on the puppet.

You can find here an example for preparing a leg using IK and puppet (After Effects CS3 project).

^Back to the list^

VII - Animation Tools

Duik now includes a number of tools making the animations designer's work and the creation of expressions that are often used in After Effects easier. Here is a description.

duik animation

^Back to the list^

___VII / A - Wiggle

With the wiggle tool, you understand it from its name, you can add a wiggle expression to a layer's properties, may it be a 3D layer or not.

___N.B.: With the wiggle expression (often called "noise" in 3D softwares), you can create a trembling effect, or a flashing effect, or even a floating effect at low frequencies. It is often used to simulate a hand-held camera, but it can also be very useful for a flashing bulb, a shaking fist, a floating ship, etc...

wiggle

You just need to select the layer on which you want to apply the wiggle, to click on "wiggle", and the above window will pop up.
You just need to choose the properties and the axes on which you want to apply the wiggle.

Once the wiggle has been created, controllers are created in the layer's effects, which allows you to manage and animate its amplitude and frequency. (same as the effect "Separate X Y Z position" in After Effects)

___N.B.: Ticking "all axes" is NOT the same as ticking the three boxes X, Y, and Z. Actually, "all axes" creates only ONE controller for all axes, whereas ticking all three boxes creates one controller for each axis and thus allows a different wiggle on each axis.

== WARNING == on version 3 of Duik, we know about the following bug: the X and Y axes are inverted for the position (only for the position). This bug is not serious and does not occur when using the box "all axes". It has been corrected from version 4 on.

To cancel the effect, you only need to delete the expression in the property on which the wiggle has been applied, and to delete the controllers in the layer's effects.

^Back to the list^

___VII / B - Wheel

The tool "Wheel" has been created to facilitate the animation of wheels... It automates their rotation according to their movement: the animation designer only needs to animate the position of a vehicle, the wheels will automatically rotate.

See example project here (After Effects CS3 project).

You just have to select the layer of the wheel (after positioning the pivot on the very centre of the wheel) and then to click on the "Wheel" button. The following window is displayed:

wheel

It is necessary to know the wheel's radius, in pixels, in order to animate it the right way. If you do not know the wheel's radius, Duik can calculate it! You just need to position the pivot of an object (null, solid, or any other) on the edge of the wheel. Then select the layer for the wheel, then the layer used for the measurement, and click on the "measure" button.
Then apply by clicking on OK!

___N.B.: The layer can still be animated with a rotation: on top of it, you can animate the automatic rotation, for example to make the wheel spin.

___N.B.: A too big radius will make the wheel rotate too slowly, and a too small radius will make it rotate too fast.

___N.B.: Once you have the measure, the layer you used to calculate it is useless. If you created a null object only for the measurement, it can now be deleted. The radius' value is saved after the first application, and thus you don't have to measure again to apply the effect on other wheels with the same diameter!

To cancel the effect, you can delete the expression in the layer's rotation.

^Back to the list^

___VII / C - Morpher

It can be very complicated to animate some effects in After Effects, like masks, or for example the centre of a radial blur, even more when you have to work with curves to improve the animation. Duik's "Morpher" tool has been created to make these animations easier.

If you use "Morpher" on an effect you can add a controller to the layer, which allows you to redo the interpolations very easily between the keyframes of this effect.

Each keyframe on the morpher defines the effect's status as it is on the frame which the user specified on the morpher.

Thus there are two ways to use the morpher, which are explained below in two examples.

___Example 1: The user created a mask on a layer. He drew three different shapes of the mask on the first 3 frames of the composition (without minding the animation). Thus there are 3 keyframes on the effect "mask path" on the first 3 frames of the composition.
The user then applies the morpher effect, and by animating the morpher he can choose when the mask will have shape 1, 2 or 3.
The animation curves for the morpher are value curves (on the opposite to animation curves for mask paths), so it is very easy now to animate the interpolation between the different poses. The user can even add an expression in the animation of the morpher, e.g. a wiggle, what was much more complicated in a mask path.

___Example 2: The user created a mask on a layer. Then he creates an animation on this mask, but he wants to animate the interpolations between the poses of this mask more easily. He applies the morpher effect. He positions a keyframe on the morpher for each keyframe of the mask path, which is the number of the frame on which each keyframe is positioned.
The animation curves for the morpher are value curves (on the opposite to animation curves for mask paths), so it is very easy now to animate the interpolation between the different poses. The user can even add an expression in the animation of the morpher, e.g. a wiggle, what was much more complicated in a mask path.

To cancel the effect, you just need to delete the cursor effect and the expression in the effect that received the morpher.

^Back to the list^

___VII / D - Lens

Many effects can be used to simulate a "lens flare", but it is much more interesting to create your own lens flare, with your own layers. The "Lens" button allows you to automate the animation of position of several layers, depending on the position of the light, exactly like on all lens flare effects (See the generation effects in After Effects). Duik also adds a control function for the intensity and the size of the lens flare, which enables to replace totally any other equivalent effect and to customize and create from A to Z your own lens flares.

To apply the effect, you need to already have layers for the lens flare in the composition. Select the one of the centre, the one which will indicate the position of the origin of the light (it can be a null object...) then all others (it is important to select the centre first). Then click on the "Lens" button and the effect will be applied on the layers. First, the layers will be automatically distributed in a line which goes from the origin of the light to the opposite side.

You can use several controllers to customize and animate the lens flare:
- On each of the layers, a "distance to centre" controller can be used to position them where you wish to. A positive value will put them on the side opposite to the origin of the light, 0 being exactly the origin of the light, and 100 the furthest possible point. A negative value will put the layers on the other side of the origin of the light, from 0 without any limit for the value.
- On the centre layer, a controller can be used to set and animate the light's intensity, and the other is used to set and animate the size of the flares.

___N.B.: This tool was created to generate lens flares. Therefore it is called "Lens", but it is also possible and very convenient to use it to animate a camera's movement in a multiplan set!

^Back to the list^

___VII / E - Distance Link

Distance link is used to link a value (property, transformation, effect) of a layer to its distance from another layer. E.g. you can link the blur amount on a layer to its distance from a camera (thus creating a depth of field) or you can link the rotation of a layer to its distance from an element of the background (thus creating an automated wheels)...

To apply the distance link, you need to select the value to be controlled, then the layer from which the distance is measured. Then click on the "distance link" button.
Two effects are added :
"Min distance" is used to set the minimal distance at which the controlled value will be reached.
"Max distance" is used to set the max distance at which the controlled value will be reached.
"Falloff" is used to set how the value varies out of min and max distance. Higher the falloff is, quicker the value varies. A positive falloff is used to raise the controlled value when the layers goes further from min and max values, a negative value is used to lower the value.

To cancel the effect, you just need to delete the expression of the controlled value and the three cursors added on the layer.

^Back to the list^

___VII / F - Spring

Spring is used to automate delays and bounces when an animation stops, like a spring does. When the animation - position, rotation, scale, or any effect - comes to a stop, there are automatically oscillations, which attenuate to finally stop.

To apply the spring, you need to select the property to animate, then click on the "Spring" button. Two effects are added on the layer :
"Elasticity" to control the frequency and amplitude of oscillations - their speed. Higher is the value, quicker will be the oscillations.
"Attenuation" how long will the oscillations last. Lower is the value, longer will last the oscillations. If the value is 0, the oscillations won't stop. If it is a negative value, the oscillations will increase in size.

To cancel the effect, you have to delete the expression of the controlled property and the two sliders added on the layer.ss

^Back to the list^

VIII - Cameras

There couldn't be a good animation without a good camera! Duik offers tools to animate cameras more easily, for traditional cameras or even for a 3D rendering.

^Back to the list^

___VIII / A - Control Cam

The "Control Cam" tool can be used to facilitate the animation of cameras. It creates three controllers; one controls the position of the target, the second one controls the position of the camera and the third one controls both at once.

Thus the first two controllers are used to handle the camera as if it was on a stand and would always stare at the target, and the third controller is used to handle the camera as if it was a hand-held camera, regarding the position and the rotation.

To create those controllers, you just need to select the camera and to click on the button.

To cancel the effect, you just need to delete the expressions in the camera and the 3 null objects used as controllers.

^Back to the list^

___VIII / B - 3D Camera

The "3D Camera" tool is used to transform a classic camera into a double camera for a 3D rendering, and it adds controllers to animate it easily.

That way, if you select one camera and then click on the button, two more cameras (left and right) are created in the composition, with two controllers, "position" et "target".

The two new cameras are used for the rendering of the left and right frames (After Effects calculates the rendering of the composition using the camera which is located above in the pile of layers. You only need to render the composition with the left camera, then the right one above.)

The original camera shows the "central" frame, which is used as reference.

The "position" controller controls the position of the cameras, the "target" controller defines the target point. The left and the right cameras converge toward this point.

The distance between the left and the right cameras is set using a slider in the effects of the position controller. This distance is in pixels; a positive number will position the cameras on the right side (right side on the right, left side on the left) and a negative number will invert the cameras. A zero value will put both at the same place.

The cameras' convergence can be set by changing the angle effect on the target controller. A negative angle makes the cameras diverge from the target point, a positive angle makes the cameras converge a little more. A zero value will make the cameras converge exactly on the target point.

^Back to the list^

IX - Miscellaneous

___IX / A - Zero

When you use expressions to link layers, there is always the same problem : coordinates of a layer (position and rotation) change depending on the composition where it is and his parent too. Links between those properties can become complex.

"Zero" function solves this problem. When a layer is selected and you apply a "Zero", a new object is created in the composition, at the exact coordinates of the layer. The layer is then parented to the zero, and the zero is parented to the former parent of the layer.
Résult : coordinates (position and rotation of the layer) are now 0. Links with expressions between layers which have a "Zero" object are now very simple!
Other advantage : animators can recover the original state of the layers by setting their coordinates to 0.

___N.B. : to change the parent of a layer which is parented to a "zero" object, you must change the parent of the "zero" object, not the parent of the layer.

^Back to the list^

___IX / B - Rename

When using numerous expressions, IK's, animation tools, and a lot of layers, it is important that layers have all different names to avoid bugs and to be more comfortable. But it can be a long process to rename a lot of layers.

"Rename" tool has been created to gain very much time when renaming layers :
It can add a prefix or suffix to the name, change the name, and number all selected layers in a click !

___N.B. : if the checkbox "name" is not selected, the former name is kept, and the wanted suffix/prefix/number is simply added.
^Back to the list^

___IX / C - Links

"Links" tool shows all links between layers in a composition, as a simple tree view.

You can double click to select a layer.

You can directly relink the layers with the tool: first, select the layer you want to relink, then click "Link to...", select the new parent, and finally click "OK".

^Back to the list^

fr