# Tremulous animations played from MD3 file

**URL:** https://forum.castle-engine.io/t/tremulous-animations-played-from-md3-file/779
**Category:** News
**Created:** [March 26, 2023, 2:05pm UTC](https://forum.castle-engine.io/t/tremulous-animations-played-from-md3-file/779 "2023-03-26T14:05:04Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![michalis](https://forum.castle-engine.io/user_avatar/forum.castle-engine.io/michalis/32/3_2.png) [@michalis](https://forum.castle-engine.io/u/michalis)
#### Post date: [March 26, 2023, 2:05pm UTC](https://forum.castle-engine.io/t/tremulous-animations-played-from-md3-file/779/1 "2023-03-26T14:05:04Z")

</div>

| |
| |

New example [split\_long\_md3\_animation\_into\_logical\_pieces](https://github.com/castle-engine/castle-engine/tree/master/examples/animations/split_long_md3_animation_into_logical_pieces) shows how to play subanimations in MD3 files. In a broader context, it shows how to use `TCastleSceneCore.ForceAnimationPose` to manually “drive” the animation, picking the animation frames you want.

The MD3 format comes from _Quake 3_ and it’s used by various games sharing that game engine. In particular I’m a big fan of [Tremulous](https://tremulous.net/) so this example naturally shows _Tremulous_ cool low-poly aliens rendered and animated using _Castle Game Engine_ 🙂

The MD3 file itself doesn’t specify particular animations, it is essentially one long animation that in practice usually contains glued a number of “subanimations” in our terminology. The accompanying `animation.cfg` specifies the “subanimations”, where do they start and finish. The example code defined a ready class that loads `animation.cfg`, and allows to query and easily play “subanimations” specified there.

If you use MD3 files with accompanying `animation.cfg` files, you will find the class `TSceneSubAnimations` to be a ready-to-use component that allows you to deal with MD3 animations easily.

If you’re looking into more general “how can I manually control the animation” then look under the hood and see how is the `TCastleSceneCore.ForceAnimationPose` used there.

Here’s a quick demo:
