Tutorial: Introduction to animation

From DeleDWiki

Jump to: navigation, search



In this tutorial, you will learn how to operate the Animation system in DeleD. It's very easy to learn how to animate 3D objects in DeleD. It all comes down to 4 basic steps:

   * Create a 3D model
   * Create a skeleton for the model
   * Link the 3D model to the skeleton
   * Create one or more animations for the skeleton

And that's it! Sounds simple? It is! This tutorial will explain each of these 4 steps by creating a 3D lamp model, linking it to a skeleton and creating an animation for that skeleton. Let's get down to business!

Note: if you want to play with the original model used in this tutorial, download it here. A video showing you how to create the animated lamp is also available.

Setting up the screen

When working on animated objects, it can be practical to setup the screen in a particular manner. Have the Scene Inspector docked on the left side of the main window and have the Skeleton Animation Editor docked in the bottom panel. The rest of the available windows, like the Create/Edit window and the Object Inspector, can be docked on the right side of the screen. You should end up with:


The main reason for setting up the screen like this is to have the Scene Inspector visible at all times. The Scene Inspector lists the items in the scene. For each skeleton, it shows all joints and the animations. A skeleton can have any number of joints and animations.

Selecting a joint can be achieved by clicking on it in the Scene Inspector or by using SHIFT-leftclick in any view, just like you would select any 3D object in any view. Selecting an animation of a skeleton, however, can only be done by clicking on it in the Scene Inspector. Therefore, it is practical to have the Scene Inspector visible at all times when dealing with animated objects.

A visible Scene Inspector combined with a visible Create/Edit window allows you quickly add items to the scene while also being able to select them easily.

Creating the 3D model

Creating the 3D model is easy. Assuming you already know how to handle the various geometry tools DeleD has to offer, you can just go and create any 3D model you can imagine. Furthermore, you don't have to restrict yourself to just one object. You can create various 3D objects which can be animated as a whole. For example, you can create a robot model consisting out of a torso, 2 legs, 2 arms and a head, each of which can be seperate 3D objects. This allows you to quickly alter your animated object by, for example, putting another head on the robot's body.

For this tutorial, I created a simple 3D lamp. It consists out of 4 seperate objects, like this:

Image:Tut ia primitive1.jpg Image:Tut ia primitive2.jpg
Image:Tut ia primitive3.jpg Image:Tut ia primitive4.jpg

I used simple cylinders and tools like Extrude and Inset to come up with these objects. Combined, they look like a lamp model. Selected objects are painted using a black outline so you can see the 4 seperate objects clearly. In the 3D view, the 4 objects look like this (all objects are selected):

Image:Tut ia primitives.jpg

This is all I needed for this tutorial. As you can see, they are simple models indeed. I'm sure you can come up with a better lamp model than me. The important thing to remember is that you can use any number of objects to become 1 animated model.

Creating the skeleton

Most important: anything you do with skeletons, you do in Skeleton mode!

Skeletons are made out of joints and bones. Joints are things like elbows, knees and wrists. Anything in the skeleton that can be rotated. Bones connect joints with eachother. You can place and manipulate joints. Bones are created automatically. You cannot manipulate bones.

To create a skeleton, you place joints at the appropriate places. Creating joints is easy: select the Joint item from the Create/Edit window. Notice that DeleD switches to Skeleton mode automatically. All work on skeletons is done in Skeleton mode. Now, simply point and click in a 2D view to place a joint at that location. In my case, I placed one here in the Front view:

Image:Tut_ia_joint1.jpg Image:Tut_ia_joint13D.jpg

Note that the current version of DeleD renders its joints and bones a little different. The pictures in this tutorial were made using a testversion of DeleD.

Anyway, as you can see, joints look a lot like ordinary spheres. If this is the first joint you create, DeleD automatically creates a skeleton for you. It consist out of that one joint you just created. Check the Scene Inspector and you'll see a new skeleton listed under the Skeletons item. You can rename the skeleton by using the Object Inspector. I named it "Lamp". You can also select any joint and animation that is part of the skeleton using the Scene Inspector. Right-clicking joints or animations in the Scene Inspector shows a popup-menu which allows you to quickly show the Object Inspector and/or rename the selected item.

When placing a joint, it is automatically selected. Here, selected joints are rendered in red. You can use any color you like. Just change it in the Options window. Placing another joint is done by simply clicking in a 2D view again. There's no need to select the Joint item from the Create Item window again. If you place another joint somewhere, DeleD will automatically create a bone between the currently selected joint and the joint you just created. After that, the joint you just created will become the selected joint. Like this:

Image:Tut_ia_joint2.jpg Image:Tut_ia_joint23D.jpg

To finish this skeleton, I simply create one more joint.

Image:Tut_ia_joint3.jpg Image:Tut_ia_joint33D.jpg

And that's it. This is a fully functional skeleton.

Baseframe versus animation frames

What I just made is actually the baseframe of the skeleton. The baseframe is the standard pose of the skeleton. An animation consists of animation frames. Animation frames are actually just copies of the baseframe which you manipulate so the skeleton shows different poses.

  • You select the baseframe of a skeleton by clicking on the skeleton in the Scene Inspector.
  • You select animations of a skeleton by clicking on the animation in the Scene Inspector.
  • You select animation frames by first selecting an animation in the Scene Inspector and then selecting an animation frame in the Skeleton Animation Editor.

It is very important to understand the difference between the baseframe of a skeleton and the animation frames of animations of that skeleton.

Moving a joint of a skeleton

Looking at the finished skeleton, suppose you want to move a joint. That's easy. Have your skeleton selected (your baseframe!) and then select the joint by either clicking on it in the Scene Inspector or by SHIFT-leftclicking it in any view (either 2D or 3D). Then select the Move tool from the Geometry toolbox and move the joint in any 2D view.

Important: if you have the baseframe selected, moving a joint allows you to change the length of the bone(s) that use that joint. If you move a joint in an animation frame, the whole skeleton will move because you are not allowed to change the length of bones in animation frames (imagine having a human figure that suddenly shows one of its arms growing rapidly).

Assigning geometry to the skeleton

By this time, the scene consists out of 4 seperate 3D objects and 1 skeleton. We will now combine the 4 objects and the skeleton into 1 animated object by linking the 4 objects to the skeleton. After that, we will link individual vertices to joints of the skeleton.

Assign primitives to the skeleton

Make sure you have your skeleton selected. Now press the Assign button in the Geometry Toolbox and make sure you set it settings like this:

Image:Tut ia assignprimitives1.jpg

Now select each primitive you want to assign to the skeleton by using either SHIFT+CTRL+leftclick or SHIFT+drag. In our case, we select all 4 available primitives. Like this (all primitives are rendered using a black outline to indicate they have been selected):

Image:Tut ia assignprimitives2.jpg

Now press the OK button of the Assign tool. You will see that the colors of the primitives will change and that the vertices of those primitives are rendered too now. Like this:

Image:Tut ia assignprimitives3.jpg

The primitives are now assigned to the skeleton. Take a look at the Scene Inspector now. You'll notice that the primitives are not listed in the Primitives section anymore. This means you cannot alter their geometry anymore because they're now part of a skeleton. If you want to modify the geometry, you must unassign the primitive first, then alter its geometry and then assign it to the skeleton again.

Assign vertices to joints

The next step is to assign vertices of the primitives to joints of the skeleton. We do this by having 1 joint select (in our example, it's painted in red), then select all vertices we want to assign to that joint and then pressing OK. Like this:

First, we tell DeleD that we want to assign vertices by selecting the appropriate radiobuttons in the Assign window:

Image:Tut ia assignvertices1.jpg

Assuming you still have your skeleton (and 1 joint of it) selected, we can now select all vertices that we want to assign to the selected joint. You can use SHIFT+leftclick to select individual vertices, SHIFT+drag to select multiple vertices and SHIFT+CTRL+leftclick/drag to add vertices to your current selection of vertices. In short: just like you would normally select vertices when manipulating your 3D object.

Here I select all vertices I want to assign to the selected joint, like this:

Image:Tut ia assignvertices2.jpg

As you can see, all selected vertices are painted in orange. All non-selected vertices are painted in yellow. Now press the OK button of the Assign tool. Immediately, you can see the selected vertices changing color, indicating they are assigned to a joint. Like this:

Image:Tut ia assignvertices3.jpg

And that's it! You have succesfully assigned vertices to a joint. It's as easy as that. Do note that you can assign a vertex to 1 joint only. Vertex weighting is not available (yet). Now you can go and assign the vertices that haven't been assigned yet to other joints. To do that, you first need to select another joint while having the Assign tool still selected. You can do this by pressing the Joint radiobutton in the Assign window and then use SHIFT+leftclick. Or you can use ALT+leftclick to select a joint if you have the Primitives or Vertices radiobutton selected.

Tip: use ALT-leftclick to select joints while assigning geometry to your joints. It's the fastest way to select a joint because you can keep either the Primitives or Vertices radiobuttons selected. In short, select joints by using ALT+leftclick and primitives or vertices by using SHIFT+leftclick/drag.

So, to assign other relevant vertices to joints, repeat the following process until your done:

   * Select another joint by using ALT-leftclick
   * Select all vertices you want to assign to the selected joint
   * Press the OK button of the Assign tool

After assigning all relevant vertices to joints, the final skeleton looks like this:

Image:Tut ia assignvertices4.jpg

Notice that I did not assign all vertices because I do not need to animate the lower-part of the model. In most cases, however, you would assign all vertices to joints of the skeleton. I just wanted to show you that you don't have to, if you think it is not needed.

Also note that you can also assign primitives to the skeleton one by one, and assign the vertices of a primitive to a joint one primitive at a time too. An example of this can be found in the tutorials by Chronozphere; animating a Mech.

Animating the skeleton

By this time, we have created a 3D model that can be animated. We did this by first creating the geometry (1 or more primitives), then creating a skeleton (consisting of 1 or more joints, with bones in between the joints) and then assigning the geometry to the skeleton. We are now ready to animate this model.

First, we create a new animation for the model. An animation consists out of a number of frames. Each frame shows the model in a specific pose. Usually, an animation has many frames. DeleD uses 50 as default but you can specify how many you want. To create an animation, press the Animation item of the Item Creation window while having a skeleton selected. Specify the number of Frames Per Second (don't worry about this for now) and the Number Of Frames you want for this animation (leave it at 50), then press the Create button. Take a look at the Scene Inspector. It'll show the animation you just created being part of the skeleton. Like this:

Image:Tut ia animation1.jpg

You can create as many animations as you like. For example, if you want to make a robot walk, run, sit, shoot etc, you can create separate animations for all those particular movements. All in all, this means you can have as many skeletons as you want with each skeleton having as many animations as you like in one DeleD scene. You can only play one animation at a time though.

Select this new animation by clicking on it. This will activate the Skeleton Animation Editor, which is located at the bottom of your screen (we placed it there when we started this tutorial, remember?). It'll look like this:

Image:Tut ia animation2.jpg

The slidebar shows the 50 frames by rendering 50 vertical little black bars. The slider itself is placed at frame 1. You can select a different frame by simply moving the slider to it. The textbox right next to slidebar shows which frame is currently selected. Now it's time to introduce a new word: keyframes.

Keyframes: the secret to animating quickly

Remember that each frame in an animation shows the model in a specific pose, right? Does this mean you have to alter each individual frame (all 50 of 'em) until you get the results you want? No. That would take a lot of time indeed. Instead, we create keyframes. You can create a keyframe in two different ways:

   * By making a change to a frame by rotating or moving a joint. Moving a joint within an animation will move the entire skeleton!
   * Or you can use the Set Keyframe command in the Animation menu.

Now here's the secret to quickly animating a 3D model: all frames between keyframes are computed automatically. Meaning: you only have to change a few frames of your model. All other frames are automatically changed for you, showing the model moving from 1 pose (as defined by a keyframe) to another pose (as defined by the next keyframe). Let's see how this works now by creating an animation which shows the lamp in its original pose, then animating towards some other pose and then back to its original pose again.

First, we create a keyframe out of the first frame of the animation by using the Set Keyframe command found under the Animation menu. The first frame will now show a bold blue bar in the slidebar, indicating this is a keyframe. Like this:

Image:Tut ia animation3.jpg

Let's do the same for the last frame in our animation. First move the slider towards the last frame and then use the Set Keyframe tool again. You'll end up with this:

Image:Tut ia animation4.jpg

Now select frame 25 by moving the slider to it. Now we're going to make some changes to the frame by rotating joints. First, select the lower joint. Then select the Rotate tool and rotate the joint to a position you like. Repeat this proces for other joints if you want. You'll notice that this frame has become a keyframe too. Your Skeleton Animation Editor now looks like this:

Image:Tut ia animation5.jpg

And that's it, the animation is done. It consists out of 3 keyframes. If you move the slider now, you'll see the model being animated already because all frames between the keyframes have been automatically calculated. Go ahead, move the slider up and down to see what I mean. To view the final animation, go to the first frame and press the Play button on the right side of the Skeleton Animation Editor. Doubleclick on the LOOP panel in the bottom toolbar to toggle the continuous playing of the animation.

Hint: if you want to move a keyframe after you placed it, simply move the slider to it and use SHIFT+arrows to move the keyframe to the left or right.


In this tutorial, you have learned how to operate the animation system in DeleD. It all comes down to 4 steps:

   * Create a 3D model (we used 4 primitives to create a model of a simple lamp)
   * Create a skeleton for the model (in our case, 3 joints was all we needed)
   * Link the 3D model to the skeleton (first link primitives, then link vertices)
   * Create one or more animations for the skeleton (create keyframes and DeleD will do the rest)

That's all there is to it. A little practice will do the rest so have fun animating models in DeleD!

A note from the developers: The animation system is very basic. It can be used to animate all kinds of 3D models and is most useful for things like robots, elevators, doors, windows etc. Animating organics like humans, for example, can be difficult. In time, DeleD's animation system will be improved with, for example, weighted vertices, enhanced Animation Editor and other options.

Personal tools