AML Template Tutorial



Avatar Persona All

This is the final lesson! The culmination of all those other lessons squeezed into this final example. A completed persona to sink your teeth into to really have some fun and to produce a character with his or her own unique personality! In this lesson, you will learn about flying and landing characters. Walk around with performing actions as well as pick up boxes. My cold-fusion reactor heart is already pounding with excitement!

In this lesson, we will show you a complete sample on how you can fully control an actor by the Persona script. It covers random idle action, set different movement modes (walk, run and fly) and set terrain follow option to allow character walk on the ground or fly in the air. Another interesting topic is to target parts of the body for different motion while the lower body parts still performs walk motion. This project shows you a combined skill on using AMLEditor, and how you can interact with actor in a more advanced way.

Before you start this tutorial, please copy the fly motion files to C:\Program Files\Reallusion\iClone 3\Template\iClone Template\Motion\AML Templates\Fly.

Idle Commands


  1. When you have few sets of idle commands, set "OccurTimes" for them to appear randomly.
  2. How are the OccurTimes calculated? 100 * (Command OccurTimes) / (Total OccurTimes) % = (Idle Command Appearance Ratio). E.g. When AML has two idle commands and the first OccurTimes set to "10" and the second OccurTimes set to "40". Then the first commands appearance rate will be "100 * 10 / ( 10 + 40 ) = 20%".


  1. Add animation clips for these idle commands. Set each idle command with different animation clips. You can locate the idle motions from "C:\Program Files\Reallusion\iClone 3\Template\iClone Template\Motion". You can even set Loop for the selected clip. Once the clip is triggered it plays to the number of loops you set for this clip.



Move Command

In the Move Command list, we have divided the move commands into three modes: walk, run and fly. When you have set the modes for different behavior. Then you will be able to switch between the three modes using X and Z keys in Director Mode.

Since we are adding three behaviors in the Move Command. Then we need to create the following modes:

Walking Mode:

  1. Create StationaryLRTurn, ForwardLRTurn, BackwardLRTurn, LeftShift and RightShift in Mode 1.


  1. LeftShift and RightShift are the two move commands that we have not used before. When the left shift is set, the character moves horizontally to the left, whereas that left right turn, turns while you are walking to a distance. When the right shift is set, the character moves horizontally to the right. In iClone, you may control left shift and right shift by using the hot key Shift + A (left shift) and Shift + D (right shift).

Running Mode:

  1. Create StationaryLRTurn, ForwardLRTurn, BackwardLRTurn, LeftShift and RightShift in Mode 4.


Fly Mode:

Here is a mode that is really interesting. Fly mode! Import any motions that is your favorite and set as one of your mode.

  1. Create ForwardLRTurn, UpShift, DownShift and StationaryAllTurn in Mode 2.


During the fly mode, make sure both "TerrainSnap" and "TerrainFollow" are not checked. When you have any one of the attributes checked. Then the character cannot fly high. The character will stick onto the level of the X, Y, Z plain and cannot fly high up. So when you want the character to leave the ground level and fly and perform in the air. Then you have to uncheck both "TerrainSnap" and "TerrainFollow".

Controls in iClone

  1. In Director Mode, you can now control the character with WASD hot keys for move commands. You can then use X (Next Move Mode) and Z (Previous Move Mode) to switch between the behaviors for walking, running or flying. Now switch into flying mode. Move the character around with WASD keys and use Shift + E to fly up and Shift + Q to fly down.
  2. How do you land to the ground? When you are in high air, press X or Z to switch mode back to walk or run, press any movement key (WASD) and the corresponding terrain snap and terrain follow will resume to its the ground snap status.
  3. Have you noticed something, some of the characters that you are controlling is flying beneath the terrain. How can you set collision with terrain?! Place any terrain or plain in the scene and set collision to it. Now when you fly down in the range of the terrain the character will not flying underneath the terrain.


          Know more at about hotkey options.


Perform Command

In this section, we have added five perform clips. Add clips to each perform command. For each command, check each Lock Move, Operate and Perform. When this is checked, all the other command channels (move, operate, perform) will not interrupt when the selected command is proceeding. Assign hot key to each command, so you can use them in Director Mode.

  1. Add Perform Commands and assign hotkeys to each command. Lock all three commands to deny any interruption from other channel when the selected command is in progress.


  1. Add animation clips to each perform commands.


Please refer to the Avatar Perform Template Tutorial for more information about perform command.

Unlock to proceed into another motion (Desist Clip)

Add a Perform Command to create Desist Clip. When you use persist command and have played the perform command, the character always remains in the last frame status. Place a desist command to unlock the status of the last frame to continue on the other motions.

Later on in this tutorial we will guide you how to use Persist Command to lock certain body node. E.g. keep right hand holding the box while walking.


Blend Perform with Walking Motion (Priority Node)

In this section you can learn to use Priority node to blend perform motion with body movement, where you can have someone walking using WASD keys, and then press a perform hotkey to have certain parts of the body perform another motion. This is very useful when you want someone to walk and then pick up a book and then walk away again carrying the book tucked under their arm, instead of swinging wildly in their hand. Or you can have someone run, stop and wave hello to their friends on the way. Both of these cases can apply to priorities.

How does priority work? When you add an animation clip to a command you can set priority to body parts. Each of the priorities are defined by three levels: Normal, High and Ultra High. When I have punch that has ultra high and a walk motion that has normal- in this situation the punch will overwrite the walk motion's data and perform punch of the character.

From this table we can see that the character will have a Punch upper body and a Walking lower body.

  Move Command (Walk) Perform (Punch)
Upper Body Normal Ultra High
Lower Body Ultra High Normal

Here you can learn the trick on how you can have punch animation while the actor is walking.

  1. Select the animation clip you want to set the priority to. Click "Add New One".
  2. Select the body part (Upper Torso) from the "Priority Node" drop down list.
  3. Highlight "$.UpperTorso" in the priority list. Set this priority to "Ultra High".


Using Priority node to blend perform motion with body movement.

Character Punch while Walking

Have the character punch while in walking mode.


Operate Command

Make the iCloneBox an iProp and direct the character to pick it up and walk with it. Please refer to Grab and Drop Template Tutorial of how to create an Operate iProp in iClone.

Set Persist under Priority

In iClone, you can set a certain part of the body to pick an object and stay in the motion of holding. After you pick up the object you can still walk but your arm stays in the position of holding an item. How can that be possible? In the following tutorial you will know the techniques of picking and holding an object in hand.

Since this script is for the character to interact with the prop. This is where Operate Command comes into play. Like what we did for the Grab and Drop Template you can divide the motion into two sections. The first clip is where the arm is reaching to the target object once the character reaches into the action radius range. The second clip is the animation for when the arm is holding an item. Since we have the animation clip that is holding an item, we need to select the clip and apply priorities to the selected clip.

  1. Load Grab_And_Drop_iCloneBox from the zip file we have provide for you.
  2. Select the animation clip that is holding the box, Take_Target_Loop01. The clip in selection is the animation clip that is holding iClone3Box.
  3. In the steps below you will set the priorities to the right arm to ensure the character is using only her right arm to perform the Take command.
  4. With the Take_Target_Loop01 clip in selection. Select one of the empty priorities.


  1. Select the node from the Priority Node drop down list. Think about the movement when you pick up an object. Now imagine when you hold an object, which bone would be the highest hierarchy when the holding is in position. Shoulder would be the parent of all the upper arm, lower arm and hand.


  1. Select "RCollar" from the priority node drop down list.


  1. Check "Persist" and set the priority level to "Ultra High". Once you set persist to the select clip, you can then tell the animation clip if the priority will continue to hold the item. When persist is active, it continues to hold the item when the command is done. When you set the priority level to Ultra High, the motion of holding will not be interrupt by any other movements.


Character Walk with the Box and Swing the hand with the box

See! In the video below you can have the character walk and walk with the box still in hand.

Please refer to Grab and Drop Template Tutorial for more information about how to create picking and dropping tutorial. Now you have all the knowledge about each commands. You will now be able to create your own AML.