Blending animation

im tryng to animate a floor turret … the problem? the blending … anyone got a decent tutorial ?

If you mean blending multiple animations through the source engine in real time, you gotta do some modifications to the .qc.

I don’t have the means to give you any tutorials or examples right now unfortunately, but I can give you some help. I also highly suggest de-compiling other models that have achieved animation blending and inspecting their .qc’s. You’ll learn a lot.

Before you can blend sequences, you have to first register them as animations in the .qc, using the $animation command. Which has the same syntax as $sequence. Once all your animations are named and referenced, you can blend and mix them however you want.

For example, if you wanted a breathing animation that played all the time. You would create the animation of the person breathing, as well as an animation of him standing still. Then in the .qc you would register both as separate animations, and then you could subtract the idle animation from the breathing animation. What you’d be left with is just an animation that can be layered over any animation to give the appearance the character is breathing.

You can also reference animations within sequences, blend them, mix them, and give them affiliations with POSE PARAMETERS, which is what you’ll be wanting to do. Most likely you’d be wanting to associate your animations with aim_yaw and aim_pitch.

If you want a great example of this in action, de-compile a portal turret. It’s exactly how they achieved its aiming. It’s also the same method used to allow NPC’s to have proper looking walk animations in all 8 directions, only referencing a single sequence affiliated with the move_yaw pose parameter.

I know that’s all kind of confusing and complicated. Do some research.