OpenArena Message Boards

OpenArena Contributions => Models => Topic started by: Nubstrike on July 04, 2011, 03:18:03 AM



Title: MD5 Support - would it be useful?
Post by: Nubstrike on July 04, 2011, 03:18:03 AM
Greetings, fellow nerds.

I've been coding a mod for Q3/OA for a bit, and i'm now in the process of introducing MD5 support. The progress has been good so far, if anything goes fine, it will be complete in a few days.
(screenies of MD5 loaded in the mod (http://www.moddb.com/mods/project-rdx/news/md5-support-in-progress))

I will release the code once finished. Would you have any use for it if I also refit the code for 0.8.5?

Notes:
-The current implementation combines up to three animations for each model (that would be legs anim, upper anim, and head anim).
-The animation files (.md5anim) are loaded by an additional entry in the animations.cfg file, expected if a .md5mesh load has been successful.
-It is supposed to load one single model for lower and upper character, possibly even the head.
-The effect of looking up or down (not yet implemented) works by deforming a bone with a particular name (e.g. you're looking down by 60°, the "head" bone is deformed by 60° down and the "lower torso" bone is deformed by 15°)


Title: Re: MD5 Support - would it be useful?
Post by: fromhell on July 04, 2011, 12:15:19 PM
No

MD5 does not store normals information, this means it'll look VERY BAD in game by having terrible shading.


so, not useful at all.

A better format would be MDR (Raven MD4 with no bone hierarchy) and IQM (once the implementations stop sucking)


Title: Re: MD5 Support - would it be useful?
Post by: Nubstrike on July 04, 2011, 02:11:15 PM
You mean vertex normals?

If that's the case, they're calculated and stored on loading.

(By the way, I didn't code all of the loader myself. I borrowed md5mesh loader and some math functions from XReal - I kept the files separated to avoid credit issues.)

EDIT: I stand corrected, the normals calculated in loading time were not enough. I solved the problem calculating them in rendering instead. It's more resource-intensive and all, but on the upside you can have one model per player instead of 3 parts.

Maybe it would even be possible to calculate them on loading and then simply deform them, as a sort of compromise. Maybe.

Anyway, all things considered I guess you'll still want to stick with MD3 lol