Updated to version 2.1!
This is something that has been asked for in the past, but has never actually been made as far as I know. I decided not to ask, but to simply make it myself. So, I present to you the Quake to Ogre Mesh Converter. It can take a 3D model in MD2, MD3 or MD5 format and convert it to an equivalent Ogre mesh, including (a selection of) the original model's animations.
You can download the latest release package (source and Windows binary) from here:
https://bitbucket-archive.softwareherit ... 20v2.1.zip
Source code is available through Mercurial on Bitbucket:
https://bitbucket-archive.softwareherit ... oogre.html
The code has been developed on Windows XP/7 and Ubuntu, but it should compile on pretty much any platform that has a C++ compiler.
Some images to show what it can do:
Quake 2's Male model doing a Run animation and casting a nice stencil shadow:
The legs of Quake 3's Visor receiving some shadow from the stock Ogre head:
Various MD5 models:
Theoretically, the program could be expanded to allow conversions of complete Quake 3 player models (legs, torso and head) to a single mesh with the tag structure converted to a skeleton. It's a pretty complicated conversion though and not very useful in general, so it is unlikely that such a feature will ever be added.
The source code is available on Bitbucket and licensed under the MIT license, so feel free to copy, use, fork, branch and modify it anyway you want. Patch submissions are always appreciated and will be considered for inclusion.
Changelog
Changes for v2.1:
Moved the QuakeToOgre project to Bitbucket.
Inclusion of normals in morph animation keyframes is now an optional feature, controllable through the <includenormals> XML tag.
Small modifications to the layout of the mesh output files to ensure full compliance with Ogre's XML mesh document type definition (DTD).
A DTD declaration header is now automatically added at the start of each mesh and skeleton XML file.
Reorganized some files and made new DTD validation scripts for both Linux and Windows.
Updated the Visual Studio project files to VS .NET 2008.
Changes for v2.0.1:
Added a missing header include that broke compilation with gcc.
Changes for v2.0:
Support for MD5 models (id Tech 4 games), including conversion of skeletal animations.
MD5 models can be manipulated in a number of ways before conversion:
Submeshes can be given a name, making it easier to refer to them in Ogre.
Animations can be resampled to a different framerate. ('changefps' option)
The maximum number of bone weights per vertex can be adjusted. ('maxweights' option)
Root bone can be locked in place, which prevents an animated model from moving outside its bounding box. ('lockroot' option)
Mesh and base skeleton can be transformed so that a specific bone falls on the mesh's local origin, making it easier in Ogre to link bones of two separate models together. ('moveorigin' option)
Configuration XML specification has been overhauled, allowing for shorter and simpler configuration files.
Better documentation of both the configuration XML spec and the example configuration files.
Added MIT license headers to all original source files, in addition to the LICENSE file.
Lots of cleaning up and refactorings throughout the code.
Changes for v1.1:
Conversion will now output normals for each morph animation keyframe. OgreXMLConverter will ignore this by default, but if somebody decides to modify Ogre to support interpolation of normals for morph animation, then the normals will already be available to use.
Working directory is now changed to the config file's local directory before processing. Dragging and dropping config files onto the EXE should now work.
Updated Visual Studio project file to VS .NET 2005 SP1. Included Windows binary is also compiled with this version.
Added an example configuration file for MD2 models (q2exampleconfig.xml).
Fixed a minor bug where a garbage material name would be produced if none were given for an MD2 model.
Added an MIT license for all original source code.
Minor additions and revisions to the documentation.
TODO list/wish list:
Add a decent logging system.
Try and make the application more batch-processing friendly.
Output simple Ogre material files for each given material name.
Replace all the C-isms with proper C++ code.
Move this list to Bitbucket as well.
Old versions
See the downloads page on Bitbucket.