Pages: [1]
  Print  
Author Topic: Are MDRs/MD4s enabled in OA 8.8?  (Read 23547 times)
.Luke
Nub


Cakes 2
Posts: 38



WWW
« on: July 06, 2012, 10:59:53 pm »

First-time poster here, but I've lurked for probably a year at this point. =P I've been playing Open Arena since I starting using Ubuntu Linux (5-6 years?) and really enjoy FPSs, so this game - given its humorous and gorey atmosphere - almost feels like the Mortal Kombat of Arena shooters to me! A huge thanks to all you devs and contributors for your efforts on the only open-source answer to QIII! ^_^ Anyway, figured I'd start off with a question I haven't found a direct answer for yet.

Recently, I was trying to see if I could slap some custom Elite Force models into my baseoa folder and have even more skins to shoot at. (I know the different art styles clash pretty badly in OA, but I just wanted to blast Kirk and all his friends into chunks of cartoony gibs, which is something I can't do while playing EF, lol.) Sadly, that didn't work right off the bat, and the only skin I could get working was the popular Darth Vader model after renaming the main folder in the PK3/ZIP file's root dir. Everything else just shows up in the bots section and spews out error messages instead of spawning.

So, after five minutes of searching, I realized that nearly all EF models (Besides the custom Vader model above.) use the MDR format, which is the finished implementation of iD's MD4 format, and in turn is also supported/working in the ioquake3 source. Whenever I finally have a general understanding of Blender, it sounds like an interesting format I'd find worth exploring. (Assuming a Blender exporter is made. I'm not quite sure if the old Milkshape exporter is still usable or could be "ported" over.)

Now onto the tl;dr question I have to ask : are MDRs/MD4s enabled in version 8.8? I have v8.5 from Ubuntu's Software Center with the 8.8 pk3 patch files tacked on, for a lot of odd reasons. Should I re-download the patch for the Linux binaries?

EDIT: Blegh, post was too long; shortened it. D:
« Last Edit: July 07, 2012, 03:01:45 am by .Luke » Logged

|
fromhell
Administrator
GET A LIFE!
**********

Cakes 31
Posts: 14485



WWW
« Reply #1 on: July 07, 2012, 04:56:56 pm »

MDR is enabled in 0.8.8 I think, but the real problem is that the engine doesn't actually substitute for a MDR at model loading routines. I'm trying to move to MDR too


Also another problem is detecting the EF models. EF uses models/player2/ and also for icons, they only use .jpg - cgame would need modifications to add support for players made for EF which would involve looking in player2, looking for jpg instead of tga for icons.             There's also an even worse case - ef players' sounds are in mp3 format, and it's nigh impossible to decode that patent free.


Just FYI my pipeline to produce MDR models is to Blender export 2 IQMs (lower and upper, with a couple bones as tags) and run that through Noesis to output an MDR by batch file. Currently LODs aren't supported by any of them.       My reason for MDR in this case though is to save memory and loading times
« Last Edit: July 07, 2012, 05:08:37 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
GrosBedo
Member


Cakes 20
Posts: 710


« Reply #2 on: July 07, 2012, 06:45:29 pm »

Firstly, Welcome to the OA community Smiley

So, after five minutes of searching, I realized that nearly all EF models (Besides the custom Vader model above.) use the MDR format, which is the finished implementation of iD's MD4 format, and in turn is also supported/working in the ioquake3 source.

Dunno if it is supported in OA 0.8.8 (but then you should also update your binaries, don't just add the new pk3), better try it first.

But if that doesn't work and you're sure that it does with ioquake3, you might then try a new OA binary that merges OA 0.8.8 with the very latest ioquake3 (updated just 3 hours ago):

http://openarena.ws/board/index.php?topic=4457.msg43801#msg43801

https://github.com/undeadzy/openarena_engine

You'll have to compile it by yourself but this should be pretty simple (this is only the engine, so you won't have to deal with models and stuffs).

If MD4 works with ioquake3, it should work with this merged build.
Logged
.Luke
Nub


Cakes 2
Posts: 38



WWW
« Reply #3 on: July 07, 2012, 09:34:44 pm »

Quote from: fromhell
MDR is enabled in 0.8.8 I think, but the real problem is that the engine doesn't actually substitute for a MDR at model loading routines. I'm trying to move to MDR too

Also another problem is detecting the EF models. EF uses models/player2/ and also for icons, they only use .jpg - cgame would need modifications to add support for players made for EF which would involve looking in player2, looking for jpg instead of tga for icons.

So that's why renaming the Vader pk3's models folder to "players" worked! And it provided tga files as well as jpg duplicates for icons and textures, so I didn't notice any loading problems in-game or in the menu; it's a wonder the author didn't pack-in a separate PK3 with a renamed root folder for compatibility with Quake III, as well the other for Elite Force. I would have a lot more batch conversions to do than I originally thought, but probably worth it. =P Either way, now I know why it's not as simple as plug 'n play with Elite Force models!

Quote from: fromhell
There's also an even worse case - ef players' sounds are in mp3 format, and it's nigh impossible to decode that patent free.

Ouch, I've long since forgotten that fact. (Used to mess around with custom EF skins a decade ago, but never got anywhere.) Even most of the EF customs I come across use the mp3 format too. Ah well, I can always batch convert the sounds over to WAV through Audacity with no transcoding, while also converting the jpeg textures/icons to TGA, and repack it all. Probably wouldn't take me half an hour to give both TOS packs that treatment, so it'd be worth it if it works. ^^

Quote from: fromhell
Just FYI my pipeline to produce MDR models is to Blender export 2 IQMs (lower and upper, with a couple bones as tags) and run that through Noesis to output an MDR by batch file. Currently LODs aren't supported by any of them. My reason for MDR in this case though is to save memory and loading times

I didn't know Noesis could be used to pack MDR files in that way! To think I've been looking everywhere else for a standalone utility to compress/decompress MDRs specifically. Why do I always over-think everything? punched

It's probably not too big a deal lacking LODs right now though, is it? (Considering the poly-count of most OA models are already a lot higher than EF's or QIII's.) Although having some extra optimization options for lower-end machines is always nice, alongside the other key benefits of MDR that you mentioned.

Quote from: GrosBedo
Dunno if it is supported in OA 0.8.8 (but then you should also update your binaries, don't just add the new pk3), better try it first.

Eh, the reason why I just had the patch file is kinda odd. I was trying to play online for a while, and most people on Ubuntu are still at 8.5 from the SC, so I just held onto the PK3 so I could have the benefit of new content and still joining servers at the time. Visually, I don't notice a difference between 8.5 with updated game-data versus running the 8.8 Windows build on WINE, (Works fine except that I can't lower visual settings for better performance. D: ) but yeah, I'm missing new native engine updates either way, and mostly just shoot at level 4 bots in the single-player tiers anyway.

Quote from: GrosBedo
But if that doesn't work and you're sure that it does with ioquake3, you might then try a new OA binary that merges OA 0.8.8 with the very latest ioquake3 (updated just 3 hours ago):

http://openarena.ws/board/index.php?topic=4457.msg43801#msg43801

https://github.com/undeadzy/openarena_engine

You'll have to compile it by yourself but this should be pretty simple (this is only the engine, so you won't have to deal with models and stuffs).

If MD4 works with ioquake3, it should work with this merged build.

I will definitely try to compile that! ^^ The Ubuntu community isn't going to update what's already on the Software Center anytime soon, so it'd be nice to have a much later build on my system in the meantime! I've done Linux driver compiles for wireless cards before, and compiled a few games from source as well, so it's nothing new to me. As long as there are instructions included, I can usually follow through with them, give or take a few syntax errors in the terminal before I get it right. punched

Thanks for the help, fromhell and GrosBedo! I'll try repacking one of the TOS characters with converted TGAs and WAVs, to see if resolving the format issue allows them to load properly in OA. If that's the case, I might be able to explore the MDR model format in the future alongside MD3. 8-D
« Last Edit: July 07, 2012, 10:29:46 pm by .Luke » Logged

|
hairball
Half-Nub


Cakes 2
Posts: 52


« Reply #4 on: July 08, 2012, 07:58:36 am »

I will definitely try to compile that! ^^ The Ubuntu community isn't going to update what's already on the Software Center anytime soon, so it'd be nice to have a much later build on my system in the meantime! I've done Linux driver compiles for wireless cards before, and compiled a few games from source as well, so it's nothing new to me. As long as there are instructions included, I can usually follow through with them, give or take a few syntax errors in the terminal before I get it right. punched
I was going to reply with instructions, but I updated README.md instead. Smiley

Update: Also, make sure you are actually using cl_renderer openarena1.  It's a cvar so unfortunately if it loads a different directory like ~/.openarena/CTF, it will use that q3config.cfg which may be opengl1.  It would be nice if there was a way of specifying "override all config files with this setting at runtime".

In the game, type "/cl_renderer" (without quotes) and it will tell you what renderer it is using.  It will also tell you in the buffer what renderer it loaded and from where.
« Last Edit: July 08, 2012, 08:12:02 am by hairball » Logged
.Luke
Nub


Cakes 2
Posts: 38



WWW
« Reply #5 on: July 09, 2012, 05:46:07 pm »

Okay, so just converting the jpgs to TGA doesn't do the trick in version 8.5 (All I get are extra blank character slots with no visible models.) or in the 8.8 Windows build! (Not even the blank slots.) I should probably try that with more characters, though, and without removing them from the pack file, because the model I tested this on had an MD3 head and lowers, but MDR uppers; odd.

And I was trying to compile the merged source GrosBedo posted a while ago, but I bumped into a minor problem. Just like the README.md pointed out, I would encounter compile errors half-way through the build without the right dependencies, which I did. punched I tried going for them after installing aptitude, but I'm a little unsure about something :

Code:
jonathan@ubuntu:~$ sudo aptitude build-dep ioquake3

*huge list of dev libraries to install*

The following packages will be REMOVED:
  amarok-help-en{u} freeglut3{u} libbabl-0.0-0{u} libenet1a{u}
  libgegl-0.0-0{u} libjpeg62{u} libplib1{u} libsdl-net1.2{u}
  linux-headers-3.2.0-23-generic{u} prboom{u} timidity{u}
  timidity-daemon{u}
0 packages upgraded, 61 newly installed, 12 to remove and 0 not upgraded.
Need to get 16.0 MB of archives. After unpacking 27.4 MB will be used.
Do you want to continue? [Y/n/?]

I'm not sure what the {u} is for after each item. Is it for unused libraries and resources? Because I've long since upgraded to the 3.2.0-26 kernel, don't have prboom installed anymore, and I don't remember keeping timidity either. My system's not gonna break a few programs or itself if I lose libjpeg62, among others, right? =P This is only thing keeping me from a successful compile, but I want to be safe, not sorry I clicked Yes to something potentially drastic on a whim!

Quote from: hairball
I was going to reply with instructions, but I updated README.md instead. Smiley

Update: Also, make sure you are actually using cl_renderer openarena1.  It's a cvar so unfortunately if it loads a different directory like ~/.openarena/CTF, it will use that q3config.cfg which may be opengl1.  It would be nice if there was a way of specifying "override all config files with this setting at runtime".

In the game, type "/cl_renderer" (without quotes) and it will tell you what renderer it is using.  It will also tell you in the buffer what renderer it loaded and from where.

Thanks for the tip, I'll check the renderer settings for both OA and Quake III (Running its pk3 files as a mod under OA; just recently bought a used retail copy! w00t!) when I can get the binary to compile all the way through. ^^
Logged

|
fromhell
Administrator
GET A LIFE!
**********

Cakes 31
Posts: 14485



WWW
« Reply #6 on: July 09, 2012, 06:18:39 pm »

cgame.qvm does this

1. Search for icon_* TGA, build player index out of matches of that
2. Load head.md3 (and no other format)
3. Load lower.md3


JPG>TGA won't be sufficient. Also renaming MDR to MD3 doesn't work as the model loader strictly goes by extension and not header.
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
.Luke
Nub


Cakes 2
Posts: 38



WWW
« Reply #7 on: July 10, 2012, 07:26:47 pm »

Wait, so I need to make a working reference to those textures in the PK3 archive with the game's terminal? Even after taking some time to Google it, I'm still a bit confused about qvm files in general, but finding more docs on it. Hopefully, I won't have to ask the more obvious questions once I've read up on it some more and followed the advice in your post. ^^

Quote from: fromhell
JPG>TGA won't be sufficient. Also renaming MDR to MD3 doesn't work as the model loader strictly goes by extension and not header.

Heh, I remember reading one of your earlier posts about MD4's mentioning it right after trying that myself. (One of the first things that popped up on Google!) I hoped changing it to MD4 instead of MDR would work, but I had a gut feeling it wouldn't be that simple. xD

Also, compiled and working! :D Went even smoother than compiling my wireless card drivers on Lucid Lynx.

The custom EF skins are acknowledged as loaded in the log, but still not showing up in the menus. While looking over the source files, I noticed there were libraries not just for MDRs, but JPG support as well. (Is it only enabled for texture flats?) And the comments above the MD4 code asked to remove comment dashes from the next line to enable MDR models, but none of the code is actually commented out. Clearly it must be working in the compilation, but still, that confused me at first. xD So, if JPG support is there, shouldn't the MDR characters work as-is, barring their MP3 sounds?
Logged

|
Pages: [1]
  Print  
 
Jump to: