Pages: [1]
  Print  
Author Topic: The MD4 format  (Read 15390 times)
fromhell
Administrator
GET A LIFE!
**********

Cakes 31
Posts: 14470



WWW
« 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 :/
Logged

asking when OA3 will be done won't get OA3 done.
Progress of OA3 currently occurs behind closed doors alone

I do not provide technical support either.

new code development on github
Graion Dilach
Member


Cakes 12
Posts: 403



« Reply #1 on: June 02, 2011, 10:50:17 am »

This means you are thinking about to use md4 instead of md3?
Logged

One shall remind what have he left behind... to actually realize that it's still cool.
fromhell
Administrator
GET A LIFE!
**********

Cakes 31
Posts: 14470



WWW
« Reply #2 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
Logged

asking when OA3 will be done won't get OA3 done.
Progress of OA3 currently occurs behind closed doors alone

I do not provide technical support either.

new code development on github
fromhell
Administrator
GET A LIFE!
**********

Cakes 31
Posts: 14470



WWW
« Reply #3 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.
Logged

asking when OA3 will be done won't get OA3 done.
Progress of OA3 currently occurs behind closed doors alone

I do not provide technical support either.

new code development on github
andrewj
Member


Cakes 23
Posts: 571



« Reply #4 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.
Logged
Coder
Nub


Cakes -14
Posts: 47


Coding(logical)


« Reply #5 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)
Logged
Coder
Nub


Cakes -14
Posts: 47


Coding(logical)


« Reply #6 on: June 05, 2011, 05:24:16 am »

MIGRATE TO THE CRX or IOQ2 ENGINE
Logged
fromhell
Administrator
GET A LIFE!
**********

Cakes 31
Posts: 14470



WWW
« Reply #7 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.
Logged

asking when OA3 will be done won't get OA3 done.
Progress of OA3 currently occurs behind closed doors alone

I do not provide technical support either.

new code development on github
andrewj
Member


Cakes 23
Posts: 571



« Reply #8 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.
Logged
andrewj
Member


Cakes 23
Posts: 571



« Reply #9 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
« Last Edit: June 05, 2011, 10:22:59 pm by andrewj » Logged
fromhell
Administrator
GET A LIFE!
**********

Cakes 31
Posts: 14470



WWW
« Reply #10 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
Logged

asking when OA3 will be done won't get OA3 done.
Progress of OA3 currently occurs behind closed doors alone

I do not provide technical support either.

new code development on github
fromhell
Administrator
GET A LIFE!
**********

Cakes 31
Posts: 14470



WWW
« Reply #11 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.
Logged

asking when OA3 will be done won't get OA3 done.
Progress of OA3 currently occurs behind closed doors alone

I do not provide technical support either.

new code development on github
sago007
Posts a lot
*

Cakes 61
Posts: 1639


Open Arena Developer


WWW
« Reply #12 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
Logged

There are nothing offending in my posts.
andrewj
Member


Cakes 23
Posts: 571



« Reply #13 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.
Logged
fromhell
Administrator
GET A LIFE!
**********

Cakes 31
Posts: 14470



WWW
« Reply #14 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
Logged

asking when OA3 will be done won't get OA3 done.
Progress of OA3 currently occurs behind closed doors alone

I do not provide technical support either.

new code development on github
fromhell
Administrator
GET A LIFE!
**********

Cakes 31
Posts: 14470



WWW
« Reply #15 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)


maybe I should just use freaking mdr.
« Last Edit: June 16, 2011, 03:38:01 am by fromhell » Logged

asking when OA3 will be done won't get OA3 done.
Progress of OA3 currently occurs behind closed doors alone

I do not provide technical support either.

new code development on github
andrewj
Member


Cakes 23
Posts: 571



« Reply #16 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.
Logged
fromhell
Administrator
GET A LIFE!
**********

Cakes 31
Posts: 14470



WWW
« Reply #17 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.
Logged

asking when OA3 will be done won't get OA3 done.
Progress of OA3 currently occurs behind closed doors alone

I do not provide technical support either.

new code development on github
andrewj
Member


Cakes 23
Posts: 571



« Reply #18 on: June 18, 2011, 02:59:51 am »

Here is a copy I had from August 2010, minus the mrfix skins
Logged
epicgoo
Member


Cakes 5
Posts: 204


« Reply #19 on: December 02, 2012, 06:53:50 pm »

[solved]
« Last Edit: December 16, 2012, 12:27:19 am by epicgoo » Logged
fromhell
Administrator
GET A LIFE!
**********

Cakes 31
Posts: 14470



WWW
« Reply #20 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.
Logged

asking when OA3 will be done won't get OA3 done.
Progress of OA3 currently occurs behind closed doors alone

I do not provide technical support either.

new code development on github
epicgoo
Member


Cakes 5
Posts: 204


« Reply #21 on: December 03, 2012, 06:59:25 am »

[solved]
« Last Edit: December 16, 2012, 12:27:07 am by epicgoo » Logged
Suicizer
Member
Member
*

Cakes 2
Posts: 398


WWW
« Reply #22 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?
Logged

I'm good at everything but can't do anything...
fromhell
Administrator
GET A LIFE!
**********

Cakes 31
Posts: 14470



WWW
« Reply #23 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?
« Last Edit: January 14, 2013, 03:10:21 pm by fromhell » Logged

asking when OA3 will be done won't get OA3 done.
Progress of OA3 currently occurs behind closed doors alone

I do not provide technical support either.

new code development on github
Pages: [1]
  Print  
 
Jump to: