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 🙂
- New example examples/animations/md3_animations_tags shows using MD3 animations, tags and skins.
-
Manual page dedicated to MD3 documents everything about our support.
-
Multiple animations from MD3 file are supported in natural way.
We read
animation.cfg
automatically when you load MD3 intoTCastleScene
.You can play MD3 animations using
TCastleSceneCore.PlayAnimation
orTCastleSceneCore.AutoAnimation
, list animations usingTCastleSceneCore.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).
-
Optimized reading vertexes and triangles from MD3.
-
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
andTCastleScene
). -
You can choose MD3 skin. While by default for
xxx.md3
we loadxxx_default.skin
, but you can now change the skin, by adding an anchor like#skin:yyy
to the URL. For example, loadinghead.md3#skin:light
will load the skin fromhead_light.skin
.
Have fun 🙂