Animating Enemy Characters

I have a couple questions about animating enemies in a FPS game. I am animating in blender and porting it to Unity 3d.

  1. Do I animate movement or do I animate in place?

  2. How long should each attack sequence be?

  3. Should the attacks be short animations that we can be rotate through in the game or should they be longer encounter animations?

  4. Are there any tutorials on animating enemies for a game?

Sorry for the noob questions but I just started in this area of blender.

Here is a walk cycle / attack that I have been working on.

I’m quite the noob, and I havent worked with Unity since beginning with Blender quite some time ago but my thoughts would be…:

  1. Animate in place.

  2. Depends on speed of combat, but what you have looks ok, maybe a little faster would work too.

  3. Normally short animations.

  4. BlenderCookie shows some small animation methods, but nothing related to use in Unity.

  1. As said, in place - for export. Usually a game engine is based on some sort of unit system. You got coodrdinates and a scale factor. Thats why you often see techdemos of games or game mechanics with cubes. They are default cubes with a generic size of let´s say 1.
    You can define them as 1m or 1cm, whatever you need. If you stick with the set scale during work, you´ll have a smooth ride.
    You can, for instance say 1 BU = 1m for your modelling, and in the game engine the coder imports a cube you export but however sets it to be 1cm. Then all your models would be too small, but consistently and all he has to do is to set the model scale to 100 and all´s good again. Then proprotions fit and are consistent.
    That´s also where movement comes in. You think about speeds beforehand. Let´s say your dude in the video moves moderate, is 2m in size and does 1m steps. Then you animate the walkcycle WITH forward motion to have a nice look and feel. And for the export you remove the keys of the forward movement so it stays in place. All you got to do is to tell the coder it moves with 1m/step which for a walkcycle would be half the animation :wink: You also can´t move the MOB in the code linear, it has to move 1m, pause, move 1m, pause… step by step.

Hint: The body of your mob stays in place. It looks very unnatural. Add an up-down movement to the whole torso of your mob. raise it when he starts a step and lower it after it sets the foot on the ground again. Also tilt the shoulders left/right opposite to the steps, you use the weight of your arms to balance when on one foot. And also twist the torso. If you take a step with your right foot, you turn your torso to have your left shoulder back to balance for the foot being in front and you lean your shoulder to the left to balance for standing only on your left foot.
It does wonders to walking animations.

If you ignore those things, your game will look like crap. The kind of garbage where the mobs seem to slide over the floor and the animations look stiff and unnatural.

  1. Depends on the engine. I don´t use unity, but a good engine can scale the timeline of an animation anyways. As the engine could run with 200fps or 10fps the engine has to be able to either skip animation frames, or show them for several frames. Usually games are timebased, not program-cycle based.

  2. Again good engines can mix animations and create actions like blender can. You should be able to create short attacks and combine them in the engine to longer attack “combos” and you should also be able to mix animations like “walk” and “attack”. You don´t have to create every possible animation combination. If an engine can´t do that, it´s a crap gameengine IMO :wink: And again, I have no idea what Unity can do, but even CAL3d (character animation library (FOSS)) can mix animations.

  3. How to animate a (M)OB for a game mostly depends on the engine but generally I think my point 1) should help you a bit.

Just a few things to be aware of about measurements. 1.0 Blender Unit
can be any thing you want.
Metric was suggested. However seeing how your in the US
and Blender uses decimal system you might want to use standard units
of measurements. Why? Because it’s easier in my opinion (not a fan of Metric)
to use Blender Units set to 1.0 = 1 Inch. Then you set the Grid Divisions to 8
at a Scale of 1.

Then it’s really easy to make something that 4.125 or 4’ and 1/8" inches.
A simple search on Google will give you all the charts you could ever
want showing the Fraction to Decimal equivalents.

If you must use Metric then use Blender’s new built in system.
That you turn on in the Units section in Scene.

o.O
I guess then one´s either no fan of metric, or a pragmatist… :wink:

<sarcasm>Yes much easier.
If Blender now works with 1BU = 1 Inch and for your game engine 1GEU = 1 yard, all you have to do is to multiply all object sizes with 0.02777777777777777777 and it´s good again. Nothing better than periodical floating point multiplications… </sarcasm>

But doesn´t matter too much, the models in a game should not require a high precision, something else if you code scientific applications, and the scale conversion is best done static before loading the model into the graphics card, not dynamically during the use of the model.

In any case, inch, centimeter, snake lengths, or potatorows, no matter what, just make sure to have a common interface between game engine and modelling tool. Saves a lot of work lateron.

Thanks for the replies. Ill see what I come up with from here.

Where I live which is basically Canada in the US we round up so it would be 0.03.
That can be multiplied by 40 = 1.2 ,then just move the . over 1 place to the left which = 12.
12 BU is 12 inches or a foot. I don’t see the problem. What does 40 have to do with this you ask?
I don’t know. LOL!