MD2 Viewer for 3D objets and animations in OF

Hi,

We have developed a viewer for 3D objects and animations MD2 DOOM formats under C++.

This format is fantastic! thanks to the same file we can load both the object and animation. And it works amazing but there is a thousand objects on screen without losing the timing of the animation at any time.

In addition, all the 3D software can export into this format easily.

We have developed a plugin that works perfectly for OF… is fantastic!! and I think may be of great help to many interactive developers. (sorry not ofx pluging…)

Take it: http://www.byjellyfish.com/files/OFmd2.zip

Test keys:
a //animate?
l //light?
p //only points?
n //standar?
w //wireframe?
t //not texture?
s //size -?
d //size +?
OF_KEY_RIGHT //rotate?
OF_KEY_LEFT //rotate 2?
OF_KEY_UP //light rotate

To make it run and Greetings!

hey nice!
the animation is really smooth.

I just made a few small changes to make it play nice with freeimage and work with mac file paths. Here it is as an OF 0061 example project.

[attachment=1:3afy236l]Screen shot 2010-10-07 at 15.17.16.png[/attachment:3afy236l]

Download it here:
[attachment=0:3afy236l]OFmd2XcodeExample.zip[/attachment:3afy236l]

![](http://forum.openframeworks.cc/uploads/default/917/Screen shot 2010-10-07 at 15.17.16.png)

OFmd2XcodeExample.zip

:shock: :shock:

Looks great, thank you!

TODO:
-Translate the comments (done)
-Get this thing working with ARToolkitPlus

Download-theo’s-example-with-english-comments-here

thanks very much
Does anyone have MD2 model maker suggestion?
I try Blender.orghttp://www.blender.org/
Exporting 3ds model to md2 model
but I got some warnings the 3ds i try to convert is too many vertice
after conveting the model is a little bit wired

![](http://forum.openframeworks.cc/uploads/default/921/2010-10-14 13h14_32.png)

![](http://forum.openframeworks.cc/uploads/default/923/2010-10-13 18h27_44.png)

[quote author=“superlukas”]Looks great, thank you!

TODO:
-Translate the comments (done)
-Get this thing working with ARToolkitPlus

Download-theo’s-example-with-english-comments-here[/quote]

I’m almost done with the first bullet :wink:

I had to modify the renderMD2() by removing the glLoadIdentity() in order to use the matrix produced by the ARtoolkit, and set the right scale and rotation.

[attachment=0:1g022zzw]md2AR.jpg[/attachment:1g022zzw]

Hello my oF friends;

I´m stock getting some md2 files I´m importing from 3DStudio Max. I´m using the Qtip plugin to do that. I have to set it up in special kind of way?
I´m seen that it always use .tga, it´s posible other format?

By other hand… have someone have success making an addon of it?

Thanks!

Hello folks,
Thanks for this great plugin! Finally it works like a charm for me. The problem I had was with the setup of the exporter plugin that I used. The people of Qtip helpme all the way with it. Now I´m happy for the smooth and velocity of it. I´m on my way of fulling a full virtual stank of animated fishes. So as soon as I have all the animations I will post one video showing who it works.

With the spirit of contribute I took the liberty of giving the structure of a ofx and add some functions in order to make it more easy to use (like the ofx3DModel Loader).

  • Like a setRotation function in order to pre-rotate the model in order to calibrate it in the right angle.
  • adding all in one line loadModel function and a simple draw()

But the rest it´s pretty much the same code of byJellyFish.com with Theo´s changes

The code is at: https://github.com/patriciogonzalezvivo/ofxMd2

Thanks and have a nice Chrismas

Update: Here is a video showing how nice and smoothly it´s the movement. (The animation are not mine, it´s from the 3d team I´m working with…)

http://vimeo.com/18642073

Hi , is this possible md2 animation in OF, i try to load many animated md2 models , but it still remains as static model. i read document , it says assimp supports only bone animation not vertex animation, and i downloaded your project from github what u have been posted in this forum ,it throws error, and lot of files are missing. please can u tell me that md2 animation wil work in OF? Awaiting for your response.

Thanks In Advance
Venkat

Hi , is this possible md2 animation in OF, i try to load many animated md2 models , but it still remains as static model. i read document , it says assimp supports only bone animation not vertex animation, and i downloaded your project from github what u have been posted in this forum ,it throws error, and lot of files are missing. please can u tell me that md2 animation wil work in OF? Awaiting for your response.

Thanks In Advance
Venkat