OpenArena Message Boards

OpenArena Contributions => Models => Topic started by: fromhell on June 02, 2011, 03:01:30 AM



Title: The MD4 format
Post by: fromhell on June 02, 2011, 03:01:30 AM
A pipeline's found

Blender->IQM+Noesis->MDR

Angelyss saves plenty of memory usage, going from 4619388 to 1438244 bytes (tested in elite force).

the format does support weights, and scale animations on bones too, and tags.

wish a md4 exporter existed for blender though :/


Title: Re: The MD4 format
Post by: Graion Dilach on June 02, 2011, 10:50:17 AM
This means you are thinking about to use md4 instead of md3?


Title: Re: The MD4 format
Post by: fromhell on June 04, 2011, 12:16:41 AM
yeah, once a md4 exporter appears. the bulk of a md4 is usually bones and animations. model geometry don't bloat

also, LODs for a MD4 are in the same file


Title: Re: The MD4 format
Post by: fromhell on June 04, 2011, 08:30:15 PM
i've compiled an openarena.x86.exe with RAVENMD4 enabled.

Turns out you can't get away with renaming a MD4 to MD3 expecting it to load. Nope! Guess that plan backfired for sure, unless something like the TGA loader is done for models (MD4 highest priority, followed by MD3) but done engine-side rather.

testmodel can actually load and display a md4, but not a md4 renamed to md3. In addition, the MD4 implementation of Thilo's MDR stuff do not support uncompressed models.

IQM's supposedly a more efficient model format than MD4 that's also smaller and brings better rendering performance as well as having working Blender exporters. Maybe that'll be used instead? Bone tags, though...


As for RTCW/WOLFET md4 does not work in that, and MDS/MDX is a far worse format, slow, and inefficient also with stupid strict limits.


Title: Re: The MD4 format
Post by: andrewj on June 05, 2011, 03:02:19 AM
The way I read the code, MDR models must have the "mdr" extension to work, but an MD4 model can have the "md3" extension (or vice versa) and it will work.

But... is this thread about id's MD4 or Raven's MDR format?
The define in the code is called RAVENMD4 which is confusing.


Title: Re: The MD4 format
Post by: Coder on June 05, 2011, 04:59:11 AM
1.never heard of md4
2.md2 is good...tons of programmes support it (i use it)
3.iqm has excelent quality but you have to save them in various different files:

sergei.iqm
run.iqm
choot.iqm
crouch.iqm

(something like that)


Title: Re: The MD4 format
Post by: Coder on June 05, 2011, 05:24:16 AM
MIGRATE TO THE CRX or IOQ2 ENGINE


Title: Re: The MD4 format
Post by: fromhell on June 05, 2011, 07:18:45 AM
no quake2 sucks, suggesting quake2 and md2 format is like... suggesting running on a railroad track while a train is moving on it

The way I read the code, MDR models must have the "mdr" extension to work, but an MD4 model can have the "md3" extension (or vice versa) and it will work.
MDR is MD4 is MDR is MD4. MDR is exactly the same! Just with an R.


Title: Re: The MD4 format
Post by: andrewj on June 05, 2011, 07:29:37 AM
Code:
static qboolean R_LoadMD3 (model_t *mod, int lod, void *buffer, const char *na
me );
static qboolean R_LoadMD4 (model_t *mod, void *buffer, const char *name );
#ifdef RAVENMD4
static qboolean R_LoadMDR (model_t *mod, void *buffer, int filesize, const char *name );
#endif

The R_LoadMD4() and R_LoadMDR() functions are different.

MD4_IDENT and MDR_IDENT are different.


Title: Re: The MD4 format
Post by: andrewj on June 05, 2011, 10:05:01 PM
More info here: http://icculus.org/pipermail/quake3/2005-September/000134.html

Summary: some of the "MD4" stuff in the quake3 code is unfinished unusable cruft, and Raven's MDR is the finished version.  Very confusing, dunno why the ioquake3 guys didn't nuke that cruft.

Adapting the code to allow ".md3" files to load as MDR would be easy, though it is not a very clean solution -- it would be better to simply modify cgame to call trap_RegisterModel() with names with no extension, and the engine can try different ones (with MDR taking priority).

P.S. http://svn.icculus.org/quake3/trunk/code/renderer/tr_model_iqm.c


Title: Re: The MD4 format
Post by: fromhell on June 05, 2011, 11:13:49 PM
WTF THEY EVEN STOLE MY MODEL FALLBACK IDEA!

diffapplying. I'm gonna try to iqm OA and see what benefits this has on older macheens


Title: Re: The MD4 format
Post by: fromhell on June 06, 2011, 05:53:04 AM
Iqm implementation in ioq3 is broken. It isn't even sanity checked.
i've tested a iqm exported from blender 2.49, it takes the whole engine down when it loads a iqm when you don't export bounding boxes. When you do, you see your...weirdly stretched IQM mesh, but when it goes to the next frame it crashes

It also takes many more vertices than a md3 for an unusual reason.


Title: Re: The MD4 format
Post by: sago007 on June 06, 2011, 08:25:05 AM
Summary: some of the "MD4" stuff in the quake3 code is unfinished unusable cruft, and Raven's MDR is the finished version.  Very confusing, dunno why the ioquake3 guys didn't nuke that cruft.
MD4 is implemented should be identical to Raven MDR as I read it:
https://github.com/ariya/ioquake3/blob/master/md4-readme.txt


Title: Re: The MD4 format
Post by: andrewj on June 06, 2011, 07:57:51 PM
I don't see any reference to Gongo's stuff in the svn logs for tr_model.c, so I'm assuming the following from md4-readme.txt still applies:

Quote
On a sidenote:
There is an independent implementation of the MD4 file format available
here:
http://gongo.quakedev.com/
At this time, ioquake3 has NO support for these models

As for IQM, shame it don't work properly yet, guess the code has some way to go.


Title: Re: The MD4 format
Post by: fromhell on June 13, 2011, 05:30:32 AM
i noticed on june 11 there's been some fixes to the iqm renderer

i should try them


Title: Re: The MD4 format
Post by: fromhell on June 16, 2011, 03:16:55 AM
ARGH!!!!!!!!!!!!!!!!! It only supports IQM version 2!

You know, the whole IQM thing is so we don't have to support a bazillion skeletal formats. It's now starting to shrug off its benefits by incompatible progression.

even worse, the 2.49 exporter isn't as maintained. I still use 2.49 for MD3s and animation, and 2.57 for fire only.


(ok even iqm2s suck on it, the crash is fixed but the model scale is still off by a LOT, the bone scales are even screwed up, and on animation, it just disappears)
(http://openarena.ws/crap/ioq3iqmsucks.jpg)

maybe I should just use freaking mdr.


Title: Re: The MD4 format
Post by: andrewj on June 16, 2011, 11:41:38 PM
Just an idea: use old V1 exporter and run the iqm upgrader on it.

This is crazy, Lee made "IQM version 2" which is incompatible with the original, and there isn't any mention whatsoever on his IQM page (or in the iqm kit's README) about this new and incompatible version [aside from the changelog].  Breaking a format is not a good way to ensure its popularity.


Title: Re: The MD4 format
Post by: fromhell on June 17, 2011, 07:54:13 AM
I overwritten both the archive and exporter scripts of the IQM v1 exporters though. dammmmmmmmmmmmmmmit this also affects my iqm->psk pipeline for ut2004, and lee doesn't offer older versions of the iqm kit available for download.


Title: Re: The MD4 format
Post by: andrewj on June 18, 2011, 02:59:51 AM
Here is a copy I had from August 2010, minus the mrfix skins


Title: Re: The MD4 format
Post by: epicgoo on December 02, 2012, 06:53:50 PM
[solved]


Title: Re: The MD4 format
Post by: fromhell on December 02, 2012, 08:33:03 PM
Why down with a model format that has internal LOD?

The bones are compressed and contain less data. It's by design. Try opening a MDR in Noesis and check out the skeleton.

Not like Q3 is going to ever have true skeletal transformation anyway.


Title: Re: The MD4 format
Post by: epicgoo on December 03, 2012, 06:59:25 AM
[solved]


Title: Re: The MD4 format
Post by: Suicizer on January 14, 2013, 10:02:37 AM

Not like Q3 is going to ever have true skeletal transformation anyway.

Aww so no ragdolls for OA?


Title: Re: The MD4 format
Post by: fromhell on January 14, 2013, 03:06:34 PM
There are several factors that make that unlikely

- The pieced model system would cause origins to be enforced, instead of a flying ragdoll it'd look like a dragging ragdoll
- The temporary entity system would need an incompatible improvement for simulated ragdoll, maintaining pvs with said simulated ragdoll (especially in network play when you don't see the ragdoll and you run into a room with a fresh dead player)
- It'll choke a Pentium II or maybe even III to death (6th generation computers are still a target). How much assembly is done in the Free physics libraries?