This page shows how to animate an individual parameter by automatically adding
the correct interpolator and associated nodes. Multiple parameters can be animated
by repeating this procedure. If you wanted to add these nodes manually to understand
the issues more fully, this is described here.
We start the mjbWorld program and load a suitable model to animate, in this
case the model from the human
hand animation but it could be any model.

We then select the node which contains the parameter to be animated, in this
case 'littlefinger'.

If, for example, we want to animate the 'rotation' parameter we click on the
square box next to 'rotation' as shown above.
When we click on this we get the following dialog box which gives information
about the parameter, in this case a 'SFRotation' parameter, but other types
such as 'SFVec3f', 'SFColor', etc. can also be animated.

We click on 'Animate' which brings up a further dialog:

This dialog allows us to specify information about the nodes generated as follows:
- 'Timer Name' - This is the name of the TimeSensor node that will generate
the events. It can be left with its default name of 'mainTimer' or changed,
if a TimeSensor with this name already exists it will be used instead of generating
a new one. If we are animating several parameters we can use the same TimeSensor
provided that all the animations have the same time period, if not we can
use a different TimeSensor.
- 'Interpolator Name' - The default name for the interpolator is the same
as the name of the node containing the parameter but with 'interp_' appended
to the front. Again the name of an existing interpolator can be used, however
this is only appropriate if the existing parameter and this parameter are
of the same type and move exactly in sequence and by the same amount.
- 'This Name' - This is the name of the node containing the parameter being
animated, in this case 'littlefinger'. Changing this will cause the node to
be renamed which may have effects on other aspects of the model. If the node
did not originally have a name it will get a default value something like
'tg_0_1' in this case it is best to give it a more meaningful name.
- 'Steps in animation' - This will set the array size in the interpolator,
in other words, the number of steps in the animation. The default is 8 but
any value above say 4 would be OK, a higher number will give a smoother animation.
When we are happy with the values set we can press OK to generate the nodes
specified.

As you can see in the screenshot above this will generate upto four nodes:
- TimeSensor
- Interpolator
- a route from TimeSensor to Interpolator
- a route from Interpolator to node/parameter being animated.
To animate the movement click on the 'edit' button next to 'keyValue', this
will display a table as shown:

The default values in the diagram shows all values have x=0, y=0 and z =1,
this means that the rotation will be around the z axis, edit the values to change
the rotation. For other interpolators such as vector3d or color use appropriate
values.
Click on the green 'play' button to see the animation.
|
metadata block
|
|
|
| see also: |
|
| Correspondence about this page |
|
|
Book Shop - Further reading.
Where I can, I have put links to Amazon for books that are relevant to
the subject, click on the appropriate country flag to get more details
of the book or to buy it from them.
|
The Art of 3-D Computer Animation and Effects. This is a nice glossy colour book,
it is for those starting out using 3D graphics programs rather than those who
write them.
|
|
Commercial Software Shop
Where I can, I have put links to Amazon for commercial software, not
directly related to this site, but related to the subject being discussed,
click on the appropriate country flag to get more details of the software
or to buy it from them.
|
The Official Blender Game Kit: Interactive for 3D Artists
|
|
Can you help?
Please send me any improvements to
here. I would appreciate ideas to make the pages more useful including
error correction, ideas for new pages, improvements to wording. It helps
if you quote the full URL of the page.
|
|
|
progam
I am working on a project which uses these principles, if you would like
to help me with this you are welcome to join in, here:
|
http://sourceforge.net/projects/mjbworld/
|
This site may have errors. Don't use for critical systems.
Copyright (c) 1998-2008 Martin John Baker - All rights reserved.