Skip to main content
GameDev.net gamedev.net
🔒 Locked

load md2/md3 files

Started by IFooBar May 24, 2002 at 5:26 PM 4 replies 500+ views
Original Post
IFooBar
IFooBar
how do u load md2 or md3 files into a directX engine? then how would you go about animating them, and making them blow to bits thanks
[size=2]aliak.net
siaspete
siaspete
The first step is finding out what those file formats contain. You can use google for this.

Then you can write a file loader to load one of them.

Then you can set up DirectX correctly to render it (see the docs).

Then you can use your World transform matrix to make them fly about. You may also want to research into particle systems to make fountains of gibs or whatever! ;-)


Helpful links:
How To Ask Questions The Smart Way | Google can help with your question | Search MSDN for help with standard C or Windows functions
IFooBar
IFooBar
?? im confused ecen more now
[size=2]aliak.net
Martee
Martee
Which part confuses you?

DirectX does not have built-in support for .MD2 and .MD3 files. If you want to use one into a DirectX application, you must write the code to load and display them yourself. To do this, you will need to find a document describing the file format.
ReactOS - an Open-source operating system compatible with Windows NT apps and drivers
krumms
krumms
Hey hey,

http://www.ugrad.cs.jhu.edu/~dansch/md2/

Here''s the URL to the MD2 format. It''s kinda hard to follow at first, so you''ll need to think a bit about how it all goes together. At the moment I''m using a vertex buffer per animation frame and a single per-model index buffer since animation frames are guaranteed to be the same number of vertices - whether or not this is an okay way to go about things, I don''t know: all other MD2 loading/rendering implementations in DirectX 8.x that I''ve seen don''t use an index buffer. This means taking up a bit more memory but less complicated loading code - in my mind anyway

Hope this helps - I suck, so don''t take my word as gospel

Tom L
refrain_from_stupidity( &me );
IFooBar
IFooBar
thanks for the url...helped
[size=2]aliak.net

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.