from modeller to GL
Hi,
I want to use the code from OpenGL game programming to get 3d models into my program. It uses the MD2 file system.
I tried to make a box(as a test)in 3ds Studio Max and exported it as a 3ds file so I could import it into Milkshape. I then exported it again, this time as a MD2 file. But I got an error message saying I didn''t have a skeleton and therefore nothing was saved.
I notice that with MD2 the models are usually humonoid life forms. Is it limited to that or can it be for example a space ship.
Could someone tell me step by step how I create a box or some simple shape in 3ds and get it into the MD2 file format???
One last question. I also notice that the MD2 models have animations in them. I is possible to have a model without animation.
Thx in advance,
Nick
That fileformat was meant for animated "players" (or whatever)... Milkshape wants that skeleton, because the md2-loader will want it too. For static objects, try a different format?
You can create just one frame animation and then you could load it in your game without animations.
To import a MD2 or even MD3 without animation there are good tutorials here:
and if you want to import a MD2 or MD3 with animations there are good tutorials here:
I think that the best thing is to import different formats and then re-export them in a your unique private format, so it will be easier to load objects without loosing time in importing the objects every time you run the game.
[edited by - BioLich on September 22, 2003 7:38:59 AM]
To import a MD2 or even MD3 without animation there are good tutorials here:
GameTutorials - OpenGL page 4)
and if you want to import a MD2 or MD3 with animations there are good tutorials here:
GameTutorials - OpenGL page 5)
I think that the best thing is to import different formats and then re-export them in a your unique private format, so it will be easier to load objects without loosing time in importing the objects every time you run the game.
[edited by - BioLich on September 22, 2003 7:38:59 AM]
________________________________________________________www.wizardofoz.tk
September 22, 2003 03:07 PM
I believe that md2 and md3 files are meant to only have "humanoid" models as you have mentioned. The way md3 files work is they have 3 pieces...the upper, lower, and head models. When you export from Milkshape into a md3 format, you need to create a control file that links together the 3 models together, and animation sequences are automatically calculated....
Obviously, this is not what you are looking for. If your just trying to get a simple model into your program without any animations or extrenous information, then look at using other file formats. I know http:\\nehe.gamedev.net has a model loader for 3ds files and www.gametutorials.com have model loaders for .3ds, .ase, .obj file formats. This is probably the best way to go here.
If your trying to get animation into your models, then this is a bit harder. Milkshape is the premier choice for animation, though i''ll be darned if i can find sourcode for the animations. The project i am currently working on does load the Milkshape Ascii files correctly, and i almost have the code done for the animations, but can''t get the rotations down correctly... (plz see my post on rotation help. once i get the code to work right, i might just post the code as a tutorial on nehe and gametutorials!) But for right now, i don''t think you''ll find animation code that easily. (supposidly rsn.gamedev.net has the animation code, but it refuses to run on my computer without access violations. Compiling the code gives compiling errors )
So anyway just look at the 3ds loaders on these two websites, that is probably your best choice
Obviously, this is not what you are looking for. If your just trying to get a simple model into your program without any animations or extrenous information, then look at using other file formats. I know http:\\nehe.gamedev.net has a model loader for 3ds files and www.gametutorials.com have model loaders for .3ds, .ase, .obj file formats. This is probably the best way to go here.
If your trying to get animation into your models, then this is a bit harder. Milkshape is the premier choice for animation, though i''ll be darned if i can find sourcode for the animations. The project i am currently working on does load the Milkshape Ascii files correctly, and i almost have the code done for the animations, but can''t get the rotations down correctly... (plz see my post on rotation help. once i get the code to work right, i might just post the code as a tutorial on nehe and gametutorials!) But for right now, i don''t think you''ll find animation code that easily. (supposidly rsn.gamedev.net has the animation code, but it refuses to run on my computer without access violations. Compiling the code gives compiling errors )
So anyway just look at the 3ds loaders on these two websites, that is probably your best choice
I apologize, for some reason it posted me as an "Anonymous Poster" because it cleared my PW field...anyway, that was my post above :-)
thx for the replies, ive been messing around with getting models into gl for ages now and thought i had the answer with MD2. But I really want to start with static objects,however, later I want animated objects.
What gets me is, a lot of objects are static and a lot are animated. For example if you want a scene of a forest. Trees move(although they don''t really move in most games) and a rock doesn''t. How would you get around this, use 2 file formats? seems a bit like overkill.
I desperately wanna get some objects into GL so I can make some scenes that look nice. So any tutorials are always welcome.
One other thing. In the book OpenGL game programming the example has a monster with a gun. The gun is a seperate object which doesn''t move so I would think it was possible? Does anyone know the example and care to elaborate?
Thx
Nick
What gets me is, a lot of objects are static and a lot are animated. For example if you want a scene of a forest. Trees move(although they don''t really move in most games) and a rock doesn''t. How would you get around this, use 2 file formats? seems a bit like overkill.
I desperately wanna get some objects into GL so I can make some scenes that look nice. So any tutorials are always welcome.
One other thing. In the book OpenGL game programming the example has a monster with a gun. The gun is a seperate object which doesn''t move so I would think it was possible? Does anyone know the example and care to elaborate?
Thx
Nick
September 23, 2003 01:59 AM
well, md2 can be in any form - humanoid or not. also, it can contain only one frame, hence no animation.
if you dont believe me, look at q2 pickup weapons - for me they dont look humanoidish or apear to have any animation.
if you dont believe me, look at q2 pickup weapons - for me they dont look humanoidish or apear to have any animation.
So back to the original question.
How do I make an object in Milkshape with a texture and export it as an MD2 file???? Is the texture converted in Milkshape to pcx format???? plus because it has to "have animation(with one frame) how do i add a non functional skeletal system.
How do I make an object in Milkshape with a texture and export it as an MD2 file???? Is the texture converted in Milkshape to pcx format???? plus because it has to "have animation(with one frame) how do i add a non functional skeletal system.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement