MD3 support improvements: multiple animations, tags, configurable skins

MD3 animations example
MD3 animations, tags, skins example using Tremulous models
MD3 animations on a Tremulous model
MD3 animations example

As a fan of Tremulous, I’m happy to announce big improvements to our MD3 file format support.

Note that we still recommend glTF as the best 3D model format in general. MD3 is an older model format, with some known limitations (precalculated frames per second, no PBR, no runtime manipulation of rig…) but it is just so fun and easy to support that I couldn’t resist adding a few features 🙂

  1. New example examples/animations/md3_animations_tags shows using MD3 animations, tags and skins.

  2. Manual page dedicated to MD3 documents everything about our support.

  3. Multiple animations from MD3 file are supported in natural way.

    We read animation.cfg automatically when you load MD3 into TCastleScene.

    You can play MD3 animations using TCastleSceneCore.PlayAnimation or TCastleSceneCore.AutoAnimation, list animations using TCastleSceneCore.AnimationsList and so on. See manual about running animations from code.

    This also means you can set animations in CGE editor (TCastleSceneCore.AutoAnimation property is a combo-box there to choose animation).

    You can also play MD3 animations in view3dscene (open “Animations” panel).

  4. Optimized reading vertexes and triangles from MD3.

  5. Tags from MD3 are supported. Tags in MD3 are places where you can attach additional things to the model, e.g. a weapon to a character’s hand. This way the weapon will be animated naturally along with the character’s hand movement.

    We support them now in CGE, and you can use ExposeTransforms mechanism to attach anything to an MD3 tag (you can attach another MD3 model or anything else, any CGE TCastleTransform and TCastleScene).

  6. You can choose MD3 skin. While by default for xxx.md3 we load xxx_default.skin, but you can now change the skin, by adding an anchor like #skin:yyy to the URL. For example, loading head.md3#skin:light will load the skin from head_light.skin.

Have fun 🙂