MD3 Mesh Format Loader
-
- Posts: 92
- Joined: Sat Nov 29, 2003 8:30 pm
- Contact:
MD3 Mesh Format Loader
Strangely enough, it works And with animation, too!
http://aitolikon.sourceforge.net/Shot-10-12-2003-01.jpg
I think the "missing" triangles in the feet are due to bad vertex indices, anyway I tried loading different models with multiple surfaces and they work perfectly.
Now I just have to add automatic loading for skins and to understand how exactly does "animation.cfg" work.
After that, I'll try to make a class to load an entire model from a pk3 archive (Q3 models are tipically split in three parts) and then add specific MD3 features such as tags...
Uh, of course as soon as I think it's "mature", I'll post the code or even send it to Niko if he wishes to consider adding it as a feature for new versions.
http://aitolikon.sourceforge.net/Shot-10-12-2003-01.jpg
I think the "missing" triangles in the feet are due to bad vertex indices, anyway I tried loading different models with multiple surfaces and they work perfectly.
Now I just have to add automatic loading for skins and to understand how exactly does "animation.cfg" work.
After that, I'll try to make a class to load an entire model from a pk3 archive (Q3 models are tipically split in three parts) and then add specific MD3 features such as tags...
Uh, of course as soon as I think it's "mature", I'll post the code or even send it to Niko if he wishes to consider adding it as a feature for new versions.
-
- Posts: 92
- Joined: Sat Nov 29, 2003 8:30 pm
- Contact:
"Release"
For who can't wait or who wants to test it, here is my first effort to extend Irrlicht by adding md3 models support.
CMD3MeshFileLoader-111203.zip
(Instructions inside the archive).
CMD3MeshFileLoader-111203.zip
(Instructions inside the archive).
-
- Posts: 92
- Joined: Sat Nov 29, 2003 8:30 pm
- Contact:
New release
Now with tags loading/handling and uses precalculated bounding boxes.
CMD3MeshFileLoader-121203.zip
As I said, I'm trying to implement a customizable class for loading a complete model from a pk3 file. It's going well, but I'm not familiar with tags, thus seems that I can't properly align meshes. If someone can help, here is my code (and dev-c++ project for a quick look at it):
CMD3Model.zip
Glad to give my modest contribute, happy coding
CMD3MeshFileLoader-121203.zip
As I said, I'm trying to implement a customizable class for loading a complete model from a pk3 file. It's going well, but I'm not familiar with tags, thus seems that I can't properly align meshes. If someone can help, here is my code (and dev-c++ project for a quick look at it):
CMD3Model.zip
Glad to give my modest contribute, happy coding
-
- Posts: 92
- Joined: Sat Nov 29, 2003 8:30 pm
- Contact:
-
- Posts: 92
- Joined: Sat Nov 29, 2003 8:30 pm
- Contact:
We're almost there!!!
New "release".
Now md3 tags are fully implemented, meshed are aligned properly and animation looks perfect too (but everything will need testing, of course).
Attaching a mesh to a tag is simple and reflects attaching meshes to ms3d joints:
Your weapon scene node can be any type of object. You can model your weapon with anim8or, export them to .3ds and attach them to a pre-esistent md3 model!
Also, my class for giving a simple interface to load and handle complete models has grown. Here is a promising screenshot of my sample application:
(This model is "md3-tommi.pk3" and can be downloaded from Polycount website)
Here are the files:
MD3 Mesh File Loader
MD3 Model Class with sample app and win binaries
What's next? Easy interface for one-time animation loops (by linking together md3 animations).
Uh, and still there's a problem: too many obj files. I had to create a dllwrap.bat batch script to replace the list of .o files with a shorter *.o in order to avoid the "The input line is too long" issue... but maybe someone will find a simpler way to integrate this in the engine.
Now md3 tags are fully implemented, meshed are aligned properly and animation looks perfect too (but everything will need testing, of course).
Attaching a mesh to a tag is simple and reflects attaching meshes to ms3d joints:
Code: Select all
ISceneNode* tag_weapon = yourMD3AnimatedMeshSceneNode->getMD3Tag ("tag_weapon");
if (tag_weapon) tag_weapon->addChild (weaponSceneNode);
Also, my class for giving a simple interface to load and handle complete models has grown. Here is a promising screenshot of my sample application:
(This model is "md3-tommi.pk3" and can be downloaded from Polycount website)
Here are the files:
MD3 Mesh File Loader
MD3 Model Class with sample app and win binaries
What's next? Easy interface for one-time animation loops (by linking together md3 animations).
Uh, and still there's a problem: too many obj files. I had to create a dllwrap.bat batch script to replace the list of .o files with a shorter *.o in order to avoid the "The input line is too long" issue... but maybe someone will find a simpler way to integrate this in the engine.
-
- Posts: 92
- Joined: Sat Nov 29, 2003 8:30 pm
- Contact:
-
- Posts: 92
- Joined: Sat Nov 29, 2003 8:30 pm
- Contact:
Wow, thank you for the announcement, Niko!
Yes, having the code in the sourceforge page would be great and will let users find it easily.
Even if it's still unperfect (problems with some models which have multiple surfaces) I think it's already pretty enough for people who would like to start a project and use their own md3 models.
Yes, having the code in the sourceforge page would be great and will let users find it easily.
Even if it's still unperfect (problems with some models which have multiple surfaces) I think it's already pretty enough for people who would like to start a project and use their own md3 models.
-
- Posts: 92
- Joined: Sat Nov 29, 2003 8:30 pm
- Contact:
News
There was a bug in the code to generate the transformation matrix for the tags. Fixed it
I'm moving the downloads to my project's homepage:
http://aitolikon.sourceforge.net/downloads.html
Niko, if you want to link them, they're on that page (so you won't need to care about updates )
*I almost forgot: I put a pre-compiled irrlicht.dll, irrlicht.a and irrlicht.def in the CMD3MeshFileLoader download, for people who don't want to recompile the engine. Also, instructions are more detailed.
I'm moving the downloads to my project's homepage:
http://aitolikon.sourceforge.net/downloads.html
Niko, if you want to link them, they're on that page (so you won't need to care about updates )
*I almost forgot: I put a pre-compiled irrlicht.dll, irrlicht.a and irrlicht.def in the CMD3MeshFileLoader download, for people who don't want to recompile the engine. Also, instructions are more detailed.