You are on page 1of 10

Gamebryo animations for static objects

Hello and wellcome. In this tutorial I will be explaining the basics of making custom animations
using 3dsMax, exporting it to Nif format and also setting up animated Nif models
the way Skyrim engine handles it. Simply saying, the goal of this tutorial is to make a fast
walkthrough the totality of things to know in order to be able to make usable animated mesh,
whether you are a newbie or an experienced modeller.
Tools to have:
3dsMax with export/import plugins
NifScope

As an example we are going to animate dwermer crank. It will have very simple rotating animation
to move it from postion closed to position opened. Lets go.
Creation of the custom animation merits to have it's own tutorial, so I'll be very brief here and focus
on exporting and Nif configuration.
So, what we have here

a model linked to a bone named CrankBone01

50 frames animation line


And two keys for inital
and final postion of the crank.
That will do it

This how export dialogue should


look like

Go
Bone we created
Controller assigned to it. It is actually what makes animation work
at this point. You should be able to see it when play button pressed.

Transform interpolator, is where all motion data is stored.

3d shape of our crank. Atteched here as a children of


CrankBone01

Even if animation works fine here, unfortunately we can't


use it like this. We have absolutely no control of it. In game
it will play once on load and stop. So what we are going to do
is to set up controller manager and animation sequences to fix that.
Lest go step by step.

What we are going to do fist is to:

1.convert Scene Root NiNode to FadeNode. For some reason I ignore


exporter is unable to export animation using FadeNode.
So righ click on it , Block/Convert/Bethesda/BSFadeNode

2. To set up animation properly we are going to need


NiControllerManager
NiMultiTargetTransformController
NiControllerSequence
NiDefaultAVObjectPalette
To add this elements we can copy/paste already existing ones.
But in this tutorial for better understanding of the fundamentals
we are going to insert new by right click on SceneRoot, Block/Insert
Now it should look prett y much lik e this. Don't worry if your block
order differs from what y ou see here. Spells/Sanitize/Reorder Blocks
wil organize all t hat .

For now let’s take a closer look on each one


of this elements.
Starting from ControllerManager as it will be a parent of
everything else. On the left how it looks with defalt values
and on the right is how it supposed to be once we fill up all data fields.

Controller to pass on. Must have some. Manager itself handles no transforms
In this case refers to NiMultiTargetTransformController we created.
Flags - activates/deactivates the controller and deterimines loop mode.
Should be 76 here.
Frequency - determines animation speed
Phase - seems to to be not used. Always 0
Start/stop time - is says for itself. <float_max>, <float_min> , let
the Controller sequence to decide.

Controller sequences to add here. 2 for this model.


We'll do "Open" first, leaving an empty line. Will return to this later.

Object Pallete is list of objects supposed to be animated.


Here refers to NiDefaultAVObjectPalette we created previously.

And don't forget of the Target. In most cases it must point to the root node
As I said previosly TransformController is what makes animation work.
Here, we are going to configure MultiTargetController that will replace
NiTransfromController we have exported.
Why? Because in case of having many animated nodes each one
will need it’s own NiTransformController. Much better to have one
that regroups all of them.
In opposite to simple NiTransformController it contains
no iterpolator, neither transform data.
Controller sequence will take care of that.
All we have to do here is to list all nodes(bones)
that are going to be animated

Nothing here

Pretty much the same data as in controller manager.

List of the nodes to handle for this controller.


NiDefaultAVObjectPalette is a list of the object used by
Controller manager. All animated objects must be listed here.
Simply saying ControllerManager will ignore everything not listed
here and as consequence TransformController too.

Attention! Name string must be exactly the same as name of the object.
CrankBone01 in this case.
Controller sequence is probably the most important
and confusing part of all this. Hang on.

Animation sequence name. You can name it as you want but keep in mind
that some names are reserved and triggered automatically such as
“ Open” , ”Close”, “Idle” for example. Game will not recognize unique names and
animation will have to be triggered manually via script or I don’t know what.

Number of nodes animated in this sequence

Interpolator. Where transform data stored for this block,


NiTransformInterpolator we exported, remeber?

I have no Idea, always 1.

Our NiMultiTargetTransformController here.

Node's name that is going to be animated here


using selected Interpolator. Be precise

NiMultiTargetTransformController is still NiTransformController type.


Must mention it in this line.

Swithc to CYCLE_LOOP for idle type animation

This time must be pecise values. In doubt, see NiTransformController we exported

And of corse, manager. Won't go far without it

Target, again. But this time only it's name string.


Almost there. There is still a few thing to do.

Delete this Controller. no longer needed.


ControllerManager will l take care of everything now.

Assign our brand new NiControllerManager to Root Node. Animation sequence "Open" should appear.
And you should be able to see the resul of you work
Hey something is missing. There should be "Close" animation.
Luck ily we don’t have t o mess with all that horrible dat a tables again.
Just duplicate Open sequence, change name to “Close” and add it to manager sequences list.
All we have to do is to give it another interpolator with inversed transfom data.

And at last it must have BSXFlags with Havok, Collision and Animation enabled to work properly in game.
Also a Collision, if we want to be able to interact with it. But that has nothing to do in this tutorial.
Concernign animation, that's it

Thank you for attention. Hope it was helpfull.

You might also like