Creating Game Data


Table of Contents

1. Introduction

MD3 is a 3D model format used by id Tech 3 engine and games based on it, like Quake 3 and Tremulous.

2. Demo

See examples/animations/md3_animations_tags for a demo of MD3 support using Tremulous data.

Tremulous creature animated MD3 in Castle Game Engine editor Tremulous animated MD3 in view3dscene Tremulous humans animated and using MD3 tags Tremulous humans and creatures

3. Features

We support almost everything useful from the MD3 file format:

  • Geometry, possibly textured.

  • Animations.

    We read optional animation.cfg file alongside the MD3 model that defines animations inside the MD3 file.

    CGE assumes that all animations from animation.cfg are suitable for the accompanying MD3 file, as long as the number of animation frames is sufficient. It is the developer’s responsibility to actually use only the animations that make sense for given MD3 model. Some games place multiple MD3 files in the same directory as one animation.cfg, and there are game-specific assumptions which animations make sense for which MD3 model. E.g. Tremulous human models have animations like BOTH_xxx (that make sense to play on both upper.md3 and lower.md3) and TORSO_xxx (that make sense to play only on upper.md3).

    Without the animation.cfg file, the MD3 will only contain one long animation called animation that plays all available frames. You can still use manual approach to play any subrange of this animation, see examples/animations/split_long_md3_animation_into_logical_pieces. See also the resulting demo.

  • Skins.

    We read optional "skin file" alongside the MD3 model that maps MD3 "shader" names to textures.

    By default we read the default skin, from file

    You can choose a different skin by appending anchor #skin:xxx to the URL. E.g. loading URL head.md3 will load skin from, but loading URL head.md3#skin:light will load skin from

  • Tags.

    Tags in MD3 are animated transformations that (by default) don’t show anything.

    They can be used together with our ExposeTransforms mechanism to attach things to them, e.g. you can attach a weapon model to a specific place in the character. This allows the weapon to realistically follow the movement of the character’s hands.

To improve this documentation just edit this page and create a pull request to cge-www repository.

Creating Game Data