Call for Help: Creating WTB's

Binary formats and related hacking.

Moderator: Skyfaller

User avatar
Skyfaller
Clan 2nd MechWarrior
Clan 2nd MechWarrior
Posts: 991
Joined: Sat Apr 12, 2008 2:58 am
Location: Germany
Contact:

Re: Call for Help: Creating WTB's

Post by Skyfaller » Thu Jun 25, 2009 1:16 pm

I've got a working prototype. Thanks quota4stupid! MW2 accepts the WTB with the correct checksum. I have added a little demo package which can be used to replace Mad Dog's torso with the wedge-shaped Shadowcat torso from the first post. It still looks ugly, so I won't post pics, but it works.
Last edited by Skyfaller on Sat Jun 27, 2009 11:59 am, edited 1 time in total.
Reason: Removed download, please use the updated version below
Download MechVM

If you have problems with MechVM, please attach the files MechVM.cfg and install-report.txt from the folder where MechVM installed your game.

User avatar
quota4stupid
House Steiner Private First Class
House Steiner Private First Class
Posts: 81
Joined: Mon Dec 29, 2008 7:40 am
Location: Australia

Re: Call for Help: Creating WTB's

Post by quota4stupid » Thu Jun 25, 2009 8:08 pm

Skyfaller wrote:I've got a working prototype. Thanks quota4stupid! MW2 accepts the WTB with the correct checksum. I have added a little demo package which can be used to replace Mad Dog's torso with the wedge-shaped Shadowcat torso from the first post. It still looks ugly, so I won't post pics, but it works.
Good work friend :-)

User avatar
Col.Kell
House Steiner Archon
House Steiner Archon
Posts: 868
Joined: Sat Sep 27, 2008 7:44 am
Location: An Isolated Tennessee Valley.

Re: Call for Help: Creating WTB's

Post by Col.Kell » Fri Jun 26, 2009 7:44 am

Skyfaller wrote:It still looks ugly, so I won't post pics, but it works.
Who cares??? A custom-working WTB will be a beutiful thing :D nice job
MechWarrior 2: 31stCC
Image

User avatar
Skyfaller
Clan 2nd MechWarrior
Clan 2nd MechWarrior
Posts: 991
Joined: Sat Apr 12, 2008 2:58 am
Location: Germany
Contact:

Re: Call for Help: Creating WTB's

Post by Skyfaller » Fri Jun 26, 2009 8:10 am

Please look at this as a prototype only. I have plans to add the possibility of using a single texture for each WTB.
Download MechVM

If you have problems with MechVM, please attach the files MechVM.cfg and install-report.txt from the folder where MechVM installed your game.

User avatar
Skyfaller
Clan 2nd MechWarrior
Clan 2nd MechWarrior
Posts: 991
Joined: Sat Apr 12, 2008 2:58 am
Location: Germany
Contact:

Re: Call for Help: Creating WTB's

Post by Skyfaller » Sat Jun 27, 2009 10:27 am

It works a little better now - I was able to add support for multiple textures. Here's what must be done to create new MW2 mech geometry:


- Create a 3D object with UV coordinates
- Export all polygons of a single body part that use the same texture as an OBJ file
- Use PRJPP's obj2wtb command to convert each OBJ to a WTB
- Use PRJPP's wtbjoin command to create a single WTB from several WTB's with different textures
- Create a new BWD or modify an existing one to use the WTB files

As you can see, minor some problems remain, but I think these can be dealt with. Use the attached package to replace Mad Dog with Shadowcat (highest LOD only). You may want to back up your files first ...
Attachments
mw2_000.png
MW2: Shadowcat
mw2_000.png (23.81 KiB) Viewed 4700 times
Last edited by Skyfaller on Sun Jun 28, 2009 1:31 pm, edited 2 times in total.
Reason: Updated sample files, because the first version unneccessarily required libmmd.dll, which many users may not have
Download MechVM

If you have problems with MechVM, please attach the files MechVM.cfg and install-report.txt from the folder where MechVM installed your game.

User avatar
Col.Kell
House Steiner Archon
House Steiner Archon
Posts: 868
Joined: Sat Sep 27, 2008 7:44 am
Location: An Isolated Tennessee Valley.

Re: Call for Help: Creating WTB's

Post by Col.Kell » Sat Jun 27, 2009 10:47 am

:o :mrgreen: WHOA!!! Doesn't look like much, but WE ARE REALY GETTING SOMEWHERE!!! I got to try the new WTB out on my Ghast mech (it was all black and had all kinds of gaps). I am very excited about new shapes.
My only thought is will we always be replacing PRJ file WTBs to get the new shapes to work? I would hope to see some day that the WTBs could be external-prj selected, like BWD files.
You may want to back up your files first ...
:oops:
MechWarrior 2: 31stCC
Image

User avatar
Skyfaller
Clan 2nd MechWarrior
Clan 2nd MechWarrior
Posts: 991
Joined: Sat Apr 12, 2008 2:58 am
Location: Germany
Contact:

Re: Call for Help: Creating WTB's

Post by Skyfaller » Sat Jun 27, 2009 11:00 am

Col.Kell wrote:will we always be replacing PRJ file WTBs to get the new shapes to work? I would hope to see some day that the WTBs could be external-prj selected, like BWD files.
I do not know. You were discussing this in a thread somewhere with quota, quiaff? There was some problem with invoking external BWDs, and FEFF did not work? I do not remember trying, but userstar.bwd is invoked externally, so I think it has to be possible. Or where do I err?
Col.Kell wrote:
You may want to back up your files first ...
:oops:
If you forgot to make backups, you can still copy your MW2.PRJ from CD. The patch does not alter anything else, I think ... that's why I suggested to make backups ...
Download MechVM

If you have problems with MechVM, please attach the files MechVM.cfg and install-report.txt from the folder where MechVM installed your game.

User avatar
quota4stupid
House Steiner Private First Class
House Steiner Private First Class
Posts: 81
Joined: Mon Dec 29, 2008 7:40 am
Location: Australia

Re: Call for Help: Creating WTB's

Post by quota4stupid » Sat Jun 27, 2009 3:09 pm

Skyfaller wrote: I do not know. You were discussing this in a thread somewhere with quota, quiaff? There was some problem with invoking external BWDs, and FEFF did not work? I do not remember trying, but userstar.bwd is invoked externally, so I think it has to be possible. Or where do I err?
In my not so humble, and not yet fully proven opinion, the sim only allows certain files to be located outside of the PRJ (ie: MEK, mission related BWD files like USERSTAR, *SCN1, etc, but not other BWD files like the ones used to define gamepieces). I suspect that WTB geometry files probably fall into the basket of "wont look outside the PRJ".

I believe you could add the files to the PRJ (I've a pretty good idea of how to do this, but I am yet to test it out), but there are certain potential problems to consider with this (ie: I remember somebody else mentioning that the sim only used the ID value to lookup files in the PRJ, not the name - so, say you patch the PRJ to add some files, but you've already run a previous patch that adds files to the same directory, then the files from the second patch wont have the expected ID values - unless the patch acts to add the files if the ID doesn't exist, and replace it if it does - again, this is just untested theory, but I think it's worth considering). Experimentation pending... I'll add it to the list of other things I still need to test ;-)

Btw, nice work Skyfaller - it looks freaking awesome mate :-)

User avatar
Skyfaller
Clan 2nd MechWarrior
Clan 2nd MechWarrior
Posts: 991
Joined: Sat Apr 12, 2008 2:58 am
Location: Germany
Contact:

Re: Call for Help: Creating WTB's

Post by Skyfaller » Sun Jun 28, 2009 1:29 pm

I have updated the Shadowcat: corrected the arms and added a windscreen, and added a special config 45t config that can be selected when choosing the Mad Dog in the Mech lab. However, it still needs work, mostly to make it compatible with the Mad Dog.

I wouldn't miss some of the lower level of detail for some of the mechs. Most mechs have 5 levels of detail, and I need want the highest. Following that logic, we could add four new mechs for every mech already in the game, improve graphics and reduce the need for CPU grabbing :D
quota4stupid wrote:Btw, nice work Skyfaller - it looks freaking awesome mate :-)
Without your work on the WTB headers, it might not have happened.
Attachments
mw2_001.png
Shadowcat with more corrections
mw2_001.png (22.3 KiB) Viewed 4688 times
MW2-31stCC-Shadowcat-v3.zip
Updated Shadowcat
(33.99 KiB) Downloaded 236 times
Download MechVM

If you have problems with MechVM, please attach the files MechVM.cfg and install-report.txt from the folder where MechVM installed your game.

User avatar
Sir MMPD Radick
Clan Nova Captain
Clan Nova Captain
Posts: 1614
Joined: Tue Jan 22, 2008 10:07 am

Re: Call for Help: Creating WTB's

Post by Sir MMPD Radick » Sun Jun 28, 2009 2:08 pm

not bad! great job
James 3:5-10: My Reminder
And the tongue is a fire, a world of iniquity: so is the tongue among our members, that it defileth the whole body. Out of the same mouth proceedeth blessing and cursing. My brethren, these things ought not so to be.

Post Reply