Archived

This topic is now archived and is closed to further replies.

.md2 vs. .md3?

This topic is 5623 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

.md2 is older and stores certain information which isn''t particularly useful for hardware acceleration. .md3 is more flexible in that it contains tags and various other stuff. Both support vertex animation and compress the model data from the usual float storage.

The only way you''ll see the exact differences is to get hold of each spec and compare them yourself.

Share this post


Link to post
Share on other sites
what info does md2 contain thats not useful to hardware? it contains "opengl commands" (really just hardware accelerated setup of the model) triangle strips and fans for the model.

see the formats specs to see whcih you would rather use.

.md2 holds the vertices, nomrals, texture coordinates, and animation info. animation frames are defined by the app reading them (thus the app reading names them, not the modeller). there is no varible frame count for different animations. texture is in the directory not in the md2 file.

.md3 has multiple files for legs, torso, weapon, etc. it has boned animation for connecting the different pieces. animation for a piece is handled like md2 (ie vertx animation). animations can have different frame counts and are controlled by a cfg file.

md2 is a better one to start off with since it MUCH easier to write a loader and animation system for it (ie not counting ripping code from a tutorial).

Share this post


Link to post
Share on other sites
bs mate
md3 loader is easy as anything, but so is md2
its just the animation which can be a bit of a bitch because the MD3's store more information than is needed byt you, this is because quake3 used the md3s for more than just player models (torches, decals - eg. the skeleton in q3dm5) if you want code to load the model data and render them (no anims) i can quickly put something together for ya, just send me an e-mail

silvermace007@hotmail.com

[edited by - silvermace on July 24, 2002 2:19:24 AM]

Share this post


Link to post
Share on other sites
with md3 you have to deal with bones and hierchly animation chains with bones. multiple files that create a single model. shaders, and other more complex stuff. sure you could not use all that stuff in models you create, but most ppl choose a format so they can try and use content thats made already (with permission) for testing.

i mean silvermace, if md3s were so easy to load then you would not need to offer code. md2s can be loaded purly from the file spec. including handling animations easily.

to me loading models and not handling animations is only half the job. md3s are more complicated than md2s. sure you can find code to laod the files and its easy to use, but thats for about anything. i am talking about actually sitting there and learning. reading the file format spec and implementing the loader without some tutorial with step by step code you can cut and paste.

Share this post


Link to post
Share on other sites
Seems like .md2 is the way to go, the only thing in md3 (so far as I've understood) that I could possibly have use for is the separate torso/leg animation.

But what about the bones animation? what is the pros/cons using bones instead of vertex animation? The only thing I could see is the possibility to use the same animation on several different models with same bone setup.

Also, since the sourcecode of q2 is officially publiced, can I use it freely in my project? Even if I decided to go commersial? (something that's not likely)

-Luctus

[edited by - Luctus on July 24, 2002 6:51:32 AM]

Share this post


Link to post
Share on other sites
quote:
Original post by Luctus
Also, since the sourcecode of q2 is officially publiced, can I use it freely in my project? Even if I decided to go commersial? (something that''s not likely)



Quake 2 source is released under the GPL. You can''t release a project yourself without it also being released under the GPL. ID software offers a non-GPL version of the Quake 2 source, but that cost $10,000 US dollars last time I checked.

Check out http://www.gnu.org/licenses/licenses.html for what the GPL means to your project.

Share this post


Link to post
Share on other sites
quote:
Original post by CheeseGrater
[quote]Original post by Luctus
Also, since the sourcecode of q2 is officially publiced, can I use it freely in my project? Even if I decided to go commersial? (something that's not likely)


Quake 2 source is released under the GPL. You can't release a project yourself without it also being released under the GPL. ID software offers a non-GPL version of the Quake 2 source, but that cost $10,000 US dollars last time I checked.

Check out http://www.gnu.org/licenses/licenses.html for what the GPL means to your project.




There is no protection over the file format, you're free to use it as long as the backend code is your own.

eb.



[edited by - eagleboy on July 24, 2002 10:51:46 AM]

Share this post


Link to post
Share on other sites
quote:
Original post by eagleboy
There is no protection over the file format, you''re free to use it as long as the backend code is your own.



Correct, but not a question anyone was asking.

Share this post


Link to post
Share on other sites
quote:
Original post by CheeseGrater
Correct, but not a question anyone was asking.

quote:
Original post by Luctus
Also, since the sourcecode of q2 is officially publiced, can I use it freely in my project?


By "it", I meant the md2 format

-Luctus

[edited by - Luctus on July 24, 2002 11:14:41 AM]

Share this post


Link to post
Share on other sites
quote:

what info does md2 contain thats not useful to hardware? it contains "opengl commands" (really just hardware accelerated setup of the model) triangle strips and fans for the model.



.md2 also contains triangle data which duplicates what can be obtained from the gl command list, which was optimization for software rendering I think. Whether the latest tools actually write this info or not I can''t say but there are certainly structures for it, I think of .md3 as cleaner from a hardware pushing perspective, even if it does contain more info.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
quote:
Original post by Luctus
But what about the bones animation? what is the pros/cons using bones instead of vertex animation? The only thing I could see is the possibility to use the same animation on several different models with same bone setup.

-Luctus



Forward and inverse Kinematics. Animation Blending.

Share this post


Link to post
Share on other sites
Luctus anyone who speaks englaish and understands grammer realizees that your sentence
"Also, since the sourcecode of q2 is officially publiced, can I use it freely in my project? "

"it" refers to the last subject of a sentence. in this case, that would be "sourcecode of q2". dont use it, and you wont have problems with that.

JuNC, the indexed triangle list renders fast on hardware as well. it was meant for models in which the triangle strips and fans may add overhead (ie due to model complexity its difficult to create the strips/fans that are efficent). if i am not mistaken md3s contain this indexed triangle list as well. also normals are stored with the triangle list as well. furthermore only the gl commands point to indicies of the triangle list anyway. so the only thing duplicated is the skin mappings. since you would need to look at the original vertex list so you could see the normals (they may be smoothed in a special way so certain groups stay faceted).

the indexed triangle list is not a waste since its mapping texture coordinates as well. its also important to point out that some modellers may not create a decent set of triangle fans/strips. you can also apply LOD if you want using subdivision techniques and the indexed triangle list.

md3 is not any cleaner from a hardware perspective, just adds more features.

boned animation is great, it allows better looking animation and blending of frames that cant be done well dynamically using other techniques. it also allows savings in ram since you only store the bone movement not the actual vertices positions. it also allows swapping of animated bones and models provided the skeletons are setup the same (ie same number of bones and reletive positions). though you could use boned animation to create md2 models, you just dont have access to the bone data at runtime. also boned animation allows things like breaking a seection of the mesh off (ie a bone group) and then stil be able to animate the rest of the mesh correctly. for instance you could shoot a hat off or an arm. it also allows spiffy procedural animation for things like pony tails. some of the benefits though are at content creation time which means you can use bones with either format.

another neat trick with boned animated models is through them around like rag dolls and use physics to control bone movement (ie trespasser, hitman and upcoming ut 2003).

the realize with md3 only the connections between torso, legs, head, and other md3 pieces are animated using bones. ie so that legs/torso/etc stay together properly. the actual animation for the pieces is standard vertex animation.

Share this post


Link to post
Share on other sites
quote:
Original post by a person
speaks englaish and understands grammer realizees that your


No, but he might be able to speak English and understand grammar.



Share this post


Link to post
Share on other sites
Guest Anonymous Poster
quote:
Original post by munkie
[quote]Original post by a person
speaks englaish and understands grammer realizees that your


No, but he might be able to speak English and understand grammar.




look up the word "sarcasm" in your favorite english dictionary.

Share this post


Link to post
Share on other sites
quote:
Original post by Anonymous Poster
look up the word "sarcasm" in your favorite english dictionary.


...Uh. What?

Obviously, the intent of my post was to be sarcastic..what purpose would looking up a definition serve. Drinkin'' too much Jack Daniels?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
munkie, you missed the point... "a person" was the one
who was being sarcastic in the first place, by spelling
"englaish" and "grammer".

Share this post


Link to post
Share on other sites