PDA

View Full Version : Animated Models with OpenGL



lud2k
01-28-2006, 04:50 AM
Hello,

I'm searching for a way to load and draw animated models into OpenGL.

I've tried MilkShape 3D which is working perfectly but all the Libs and Tutorials and Viewers i've founds doesn't work properly (maybe because of changes into .md3d file format, i don't know).
I've tried PortaLib, MsViewer (from milkshape) and i get the same problem..

(see on screenshot)
http://lud2k.hd.free.fr/Images/problem.jpg
(the hands and the foots of the character don't move whereas in milkshape it's working fine :-( )

Is there any 3D file format whose working perfectly and that got source code or lib showing how to load and draw them ?
Milkshape can export in a lots of different format so I suppose that it may have one which would be easy to open, draw and animate.
For exemple, any lis or tutorial on how to open a .X (Direct X) animated model ?

Thanks,
Ludovic.

Ehsan Kamrani
01-28-2006, 07:23 AM
http://cal3d.sourceforge.net/

With Cal3d you can animate the objects. But you should use from OpenGL to draw the objects. However if your models don't animate-They have no skeleton- you can load ms3d objects. if you want to get correct results with milkshape 3d, you should import the 3DS model into MilkShape3D and then save the file as ms3d.
Loading the ms3d files is so simple. NeHe has a good tutorial about the Model Loading: NeHe.gamedev.net
Regards
-Ehsan-

lud2k
01-28-2006, 07:52 AM
I already tried all tutorials for ms3d files i think.. Nehe tutorial is for static objects only unfortunatly. That's why i search for another file format that is easy to open and draw..

Cal3D seems very complicated beacuse there's no documentation and files are for vc++ and i'm using devc++.


However if your models don't animate-They have no skeleton- you can load ms3d objectsMy character is moving but not totally.. the harm, the shoulder are moving perfect but the hand of my character doesn't move at all (when draw with Portalib and MsViewer) ! In Milkshape the animation works fine..

I wanted to find a way to load .X (DirectX) files because with this little application
http://www.toymaker.info/Games/html/load_x_simply.html the animation works perfect !
So if anybody know a lib to load and display .X in Opengl...

Thanks,
Ludovic

Andrew Waller
01-30-2006, 01:27 PM
hey check out nehe's tutorials.

He imports a milkshape model in lesson 32.

http://nehe.gamedev.net

hope that helps

Ehsan Kamrani
02-01-2006, 01:58 AM
If you want to animate the ms3d models, you should do something i did in my project before. To animate the wings of my bee, i loaded 2 wing model called leftwing.ms3d and rightwing.ms3d . Then i used from the OpenGL transformation -glTranslate, glRotate- to animate the wings. Also i loaded another model called beeBody.ms3d.
However to animate the complicated movements it's not a good choise. I prefer to use Cal3D.
I have no idea about the .X files
-Ehsan-