ATI-Rage Edition geometry
Moderator: Skyfaller
- Skyfaller
- Clan 1st MechWarrior
- Posts: 1017
- Joined: Sat Apr 12, 2008 2:58 am
- Location: Germany
- Contact:
Re: ATI-Rage Edition geometry
Which editor do you use?
The 3D enhanced versions store additional data compared to the DOS versions, but they share the rest. In both cases, vertices are defined by 3 DWords, and there are records for accessing polygons of up to four vertices and another for larger ones. Both formats have a 32-byte header, followed by the points. The records for the vertices are 40 bytes long for the 3D enh. versions, and only 16 bytes for the DOS versions.
The polygons reference the vertices by WORD numbers. The number of polygons is in the first WORD, then follow the indices into the point array defined before, also WORDs. The polygons are stored in records. In DOS, these records are 12 or 18 bytes long, for the 3D enh. versions, they are 40 or 46 bytes long. The actual polygon data in the polygon records starts at offset 2 (DOS) or 30 (3D enh.) versions.
As you can see, there is a lot of extra data in the 3D enhanced versions. I don't know how these versions render. If they render in 16-bit color, it would be worthwhile to store polygon normals for lighting. They also probably reference a CEL texture by number and store some kind of texture coordinates.
The 3D enhanced versions store additional data compared to the DOS versions, but they share the rest. In both cases, vertices are defined by 3 DWords, and there are records for accessing polygons of up to four vertices and another for larger ones. Both formats have a 32-byte header, followed by the points. The records for the vertices are 40 bytes long for the 3D enh. versions, and only 16 bytes for the DOS versions.
The polygons reference the vertices by WORD numbers. The number of polygons is in the first WORD, then follow the indices into the point array defined before, also WORDs. The polygons are stored in records. In DOS, these records are 12 or 18 bytes long, for the 3D enh. versions, they are 40 or 46 bytes long. The actual polygon data in the polygon records starts at offset 2 (DOS) or 30 (3D enh.) versions.
As you can see, there is a lot of extra data in the 3D enhanced versions. I don't know how these versions render. If they render in 16-bit color, it would be worthwhile to store polygon normals for lighting. They also probably reference a CEL texture by number and store some kind of texture coordinates.
- Col.Kell
- House Steiner Archon
- Posts: 868
- Joined: Sat Sep 27, 2008 7:44 am
- Location: An Isolated Tennessee Valley.
Re: ATI-Rage Edition geometry
I use a hex editor called "HexEdit 3.2", it is FAR more powerful and has greater capabilities than "XVI32". Version 3.3 has come out, I think I'll need to download that soon... you can get the newest version at www.hexedit.com
I can tell you Skyfaller that there ARE a pair of characters in each WTB file that refrence the .XEL/texture that is assigned to that limb\part. I HAVE pulled this off before, but saddly, I forgot to record the discovery in my notes.
I did, in my experements, discover how to change in-game music (forgive me if I've said this before). Near the top of the SCN1.BWD files, you should see above the CAMO assignments, this word that says "TRACK##". Just two characters before TRACK##, you should see a lone digit, that digit controls what track is played, change it to whatever to get a different track. The track numbers you enter will be different from what the actual ones are, so do some testing!
What I was asking was what do I do to make the PRJ properly display the 3D WTBs.
But can you do a favor for me now Skyfaller? Can you "fix" a few sample 3D enhanced WTBs so I can experement with them? That would be great.
I can tell you Skyfaller that there ARE a pair of characters in each WTB file that refrence the .XEL/texture that is assigned to that limb\part. I HAVE pulled this off before, but saddly, I forgot to record the discovery in my notes.
I did, in my experements, discover how to change in-game music (forgive me if I've said this before). Near the top of the SCN1.BWD files, you should see above the CAMO assignments, this word that says "TRACK##". Just two characters before TRACK##, you should see a lone digit, that digit controls what track is played, change it to whatever to get a different track. The track numbers you enter will be different from what the actual ones are, so do some testing!
What I was asking was what do I do to make the PRJ properly display the 3D WTBs.
But can you do a favor for me now Skyfaller? Can you "fix" a few sample 3D enhanced WTBs so I can experement with them? That would be great.
MechWarrior 2: 31stCC
- Col.Kell
- House Steiner Archon
- Posts: 868
- Joined: Sat Sep 27, 2008 7:44 am
- Location: An Isolated Tennessee Valley.
Re: ATI-Rage Edition geometry
btw Skyfaller, Acording to the Mercs NIAS readme, MW2 uses uncompressed 8-bit Bitmaps for it's bitmap textures.
MechWarrior 2: 31stCC
- Col.Kell
- House Steiner Archon
- Posts: 868
- Joined: Sat Sep 27, 2008 7:44 am
- Location: An Isolated Tennessee Valley.
Re: ATI-Rage Edition geometry
Is there a way to alter the algorithm in the ATI PRJ or any other 3D enhanced version so that it can be compatible for regular gameplay without the need of any of these graphics cards and stuff?What do you want to know about the algorithm? If you can read C++, it's located in MechWarriorIIPRJ.cpp, MechWarriorIIPRJ::loadMesh. The new version differs from the old mostly in a few constants.
MechWarrior 2: 31stCC
- Skyfaller
- Clan 1st MechWarrior
- Posts: 1017
- Joined: Sat Apr 12, 2008 2:58 am
- Location: Germany
- Contact:
Re: ATI-Rage Edition geometry
I don't know, give it a try and report it here. It is possible that you could feed a 3D enhanced MW2.PRJ to a DOS version, perhaps with slight changes. Ultimately, if I succeeded in writing a MechSim, that code would support the ATI edition, too.
- Skyfaller
- Clan 1st MechWarrior
- Posts: 1017
- Joined: Sat Apr 12, 2008 2:58 am
- Location: Germany
- Contact:
Re: ATI-Rage Edition geometry
This is what the mechs look like when importing from the 3DFX version. They look much better than the simple ones in the DOS version. See for yourself, guess which is which.
- Attachments
-
- 3dfx vs dos.png (51.85 KiB) Viewed 9160 times
- Col.Kell
- House Steiner Archon
- Posts: 868
- Joined: Sat Sep 27, 2008 7:44 am
- Location: An Isolated Tennessee Valley.
Re: ATI-Rage Edition geometry
I am awe struck. What I would give just to see those mechs in the game... *kell's mind wanders*
But ignoring file replacement size, what is it that is preventing the ATi PRJ from running in place of an ordinary PRJ?
Excelent work, Sky!
But ignoring file replacement size, what is it that is preventing the ATi PRJ from running in place of an ordinary PRJ?
Excelent work, Sky!
MechWarrior 2: 31stCC
- Skyfaller
- Clan 1st MechWarrior
- Posts: 1017
- Joined: Sat Apr 12, 2008 2:58 am
- Location: Germany
- Contact:
Re: ATI-Rage Edition geometry
The problem is that the 3D enhanced versions use a different format that DOS cannot understand. While it would be possible to convert that format, I don't know texturing works in MW2.Col.Kell wrote:But ignoring file replacement size, what is it that is preventing the ATi PRJ from running in place of an ordinary PRJ?
Thanks.Col.Kell wrote:Excelent work, Sky!
- Col.Kell
- House Steiner Archon
- Posts: 868
- Joined: Sat Sep 27, 2008 7:44 am
- Location: An Isolated Tennessee Valley.
Re: ATI-Rage Edition geometry
I have done a little bit of research, and I can confirm that the .XEL files you would see on certain mechs for textures, the file tags do not appear in the .WTB files. I tested this with the XELs "mistwl", and "mistwr", which are the missle pod textures that go on the Timberwolf.While it would be possible to convert that format, I don't know texturing works in MW2.
I thought there were tags in the WTB files when I imported Mercs mechs into 31cc.
My only thought is that they may be declared in the file "MW2_MAP.BWD", which seems to make declarations on the XEL files, and is always included in scenarios. But still, that may not be what calls out texturing.
MechWarrior 2: 31stCC
- Skyfaller
- Clan 1st MechWarrior
- Posts: 1017
- Joined: Sat Apr 12, 2008 2:58 am
- Location: Germany
- Contact:
Re: ATI-Rage Edition geometry
MechVM still requires some clean-up, but I think it's time to deal with textures soon. I agree that the BWD's must somehow figure into the mix of defining MW2 textures, because where else would the insignia's be selected?