Page 2 of 3

Posted: Tue Mar 20, 2012 3:26 am
by Imago
cool. the scrambled images in the anims may have something to do with the RLE compression used, as it only stores what changes from frame-to-frame in the binary mdl.

Posted: Tue Mar 20, 2012 3:28 am
by Your_Persona
Imago wrote:QUOTE (Imago @ Mar 19 2012, 09:26 PM) cool. the scrambled images in the anims may have something to do with the RLE compression used, as it only stores what changes from frame-to-frame in the binary mdl.
Ahh, some light!

I was wondering why the first image came back good, and all the others where jacked up.

Posted: Tue Mar 20, 2012 3:39 am
by Imago

Posted: Tue Mar 20, 2012 5:46 am
by Your_Persona
Imago wrote:QUOTE (Imago @ Mar 19 2012, 09:39 PM) check this out if going the distance.

http://www.gamedev.net/topic/593749-decomp...ng-rle-bitmaps/
Thanks for the help Imago! Your tip about the frames being RLE encoded was just what I needed.

It can now load frameImages properly*, I ended up porting the DecodeRLE code from allegiance, and was able to successfully load animradar.mdl.

:iluv:

* there is something still missing, but its pretty dang close! Some artifacts..

Posted: Wed Mar 21, 2012 12:52 am
by Adaven
Thanks, this should help me out a lot.

Posted: Sat Mar 24, 2012 4:09 am
by Adaven
After having to monkey around a bit (I really fail at visual studio), I finally managed to use mdld a few times.


What I've noticed
1. acs01.mdl in my artwork folder is 12kb
2. If I extract it to a text mdl and run through mdlc

Code: Select all

mdld.exe /file=acs01.mdl /out=acs01text.mdl
mdlc.exe -optimze acs01text.mdl acs01compiled.mdl
Then acs01compiled is 139kb. This is the same result I got from running xmunge/mdlc (via makegeo.bat) using the MS .x files. As Compellor pointed out in another thread, apparently the texture is getting embedded in the compiled .mdl along with the model instead of referencing acs01bmp.mdl.

Has anyone ever figured a way around this?

Otherwise, the re-compiled files don't show up in mdlView/mdlUtility2. Compellor said he couldn't get the .x ones to show up in mdledit either, so this may be more of an mdlc kink than this library. Although this could be for the same reason that YP had to patch efapp? I haven't tried with his changes.

Posted: Sun Mar 25, 2012 12:07 am
by Compellor
Adaven wrote:QUOTE (Adaven @ Mar 24 2012, 12:09 AM) After having to monkey around a bit (I really fail at visual studio), I finally managed to use mdld a few times.


What I've noticed
1. acs01.mdl in my artwork folder is 12kb
2. If I extract it to a text mdl and run through mdlc

Code: Select all

mdld.exe /file=acs01.mdl /out=acs01text.mdl
mdlc.exe -optimze acs01text.mdl acs01compiled.mdl
Then acs01compiled is 139kb. This is the same result I got from running xmunge/mdlc (via makegeo.bat) using the MS .x files. As Compellor pointed out in another thread, apparently the texture is getting embedded in the compiled .mdl along with the model instead of referencing acs01bmp.mdl.

Has anyone ever figured a way around this?

Otherwise, the re-compiled files don't show up in mdlView/mdlUtility2. Compellor said he couldn't get the .x ones to show up in mdledit either, so this may be more of an mdlc kink than this library. Although this could be for the same reason that YP had to patch efapp? I haven't tried with his changes.
You can compile a recent version of MDLC from the SVN and it won't do that.

Posted: Sun Mar 25, 2012 4:30 am
by Adaven
Compellor wrote:QUOTE (Compellor @ Mar 24 2012, 07:07 PM) You can compile a recent version of MDLC from the SVN and it won't do that.
I realized that after my post, same thing for mdledit. I gave it a go Friday night, but I was still having some troubles. I'll try a fresh start this week and see if that helps.

As a side note, is there reference for using mdledit or at least a keymap somewhere? I couldn't find anything on the wiki (I'll probably add something there soon and fill out as I learn more). I managed to sort of figure out how to move the camera around and such. However some keys seem to do random things, like turn everything purple, and I'd really like to know what that is supposed to mean.

Posted: Sun Mar 25, 2012 3:20 pm
by Compellor
Adaven wrote:QUOTE (Adaven @ Mar 25 2012, 12:30 AM) I realized that after my post, same thing for mdledit. I gave it a go Friday night, but I was still having some troubles. I'll try a fresh start this week and see if that helps.

As a side note, is there reference for using mdledit or at least a keymap somewhere? I couldn't find anything on the wiki (I'll probably add something there soon and fill out as I learn more). I managed to sort of figure out how to move the camera around and such. However some keys seem to do random things, like turn everything purple, and I'd really like to know what that is supposed to mean.
Does the esc menu list the commands? I can't remember much about MDLedit, and can't seem to get it to work on my present computer.

As to compiling MDLC, there was one or two things I think I needed downloaded in order for that to compile without important errors, I'm sure a dev could help you. OTOH, I could just upload it to ftp.
Here, try this.

Posted: Mon Mar 26, 2012 3:00 am
by Your_Persona
Your_Persona wrote:QUOTE (Your_Persona @ Mar 19 2012, 11:46 PM) Thanks for the help Imago! Your tip about the frames being RLE encoded was just what I needed.

* there is something still missing, but its pretty dang close! Some artifacts..

Fixed the * something missing problem, and uploaded the fix.

The RLE decode is now perfect. :)

Though I haven't yet added the RLE and animated images decoding stuff to the output to text-mdl for MDLd.exe