[Projekt] Extracting Ace Combat

Hier könnt ihr euch selbst, eure Homepage, euren Entwicklerstammtisch, Termine oder eure Projekte vorstellen.
Forumsregeln
Bitte Präfixe benutzen. Das Präfix "[Projekt]" bewirkt die Aufnahme von Bildern aus den Beiträgen des Themenerstellers in den Showroom. Alle Bilder aus dem Thema Showroom erscheinen ebenfalls im Showroom auf der Frontpage. Es werden nur Bilder berücksichtigt, die entweder mit dem attachement- oder dem img-BBCode im Beitrag angezeigt werden.

Die Bildersammelfunktion muss manuell ausgeführt werden, die URL dazu und weitere Details zum Showroom sind hier zu finden.

This forum is primarily intended for German-language video game developers. Please don't post promotional information targeted at end users.
Benutzeravatar
Krishty
Establishment
Beiträge: 8229
Registriert: 26.02.2009, 11:18
Benutzertext: state is the enemy
Kontaktdaten:

Re: [Projekt] Extracting Ace Combat

Beitrag von Krishty »

Thank you! I really just want to live up to Ace Combat’s standards. It’s just so well done in many aspects …

————

Going back to Ace Combat 2’s planes.

This is the Model Display, a showcase for all planes in the game (forward to 3:30):
[youtube]mOrEJdt-E7A[/youtube]

Looking at the extracted AC2 data, we can see that directories 179–225 contain the exact background images we see in the video:
2018-12-21 1 directories.png

Besides the backgrounds, there are several sub-folders, one for each version of the model. They all contain two binary files and a plane texture:
2018-12-21 2 model directory.png

The first binary file is pretty small. It starts with the plane’s name (up to seven characters plus terminating zero) and further text to be displayed. Pretty useful to me!
2018-12-21 3 name.png

The second file is more complex:
2018-12-21 4 binary.png

But with the correct formatting, we can see that it basically contains two sections. The first section looks like vertex coordinates (just like in the terrain models!); the second section looks like triangle/quad data (but a little shorter than in the terrain):
2018-12-21 5 structured.png
2018-12-21 5 structured.png (7.04 KiB) 15604 mal betrachtet

Looking closely, the first three bytes are never identical and they are equidistributed between zero and the length of the first section – it’s cleary vertex indices. This gives us a first glance at the file:
2018-12-21 6 first try.png
You need lots of fantasy to see an A-4 here. I guess the vertex coordinates are okay, but the triangle indices are wrong. I’ll try and work it out …
seziert Ace Combat, Driver, und S.T.A.L.K.E.R.   —   rendert Sterne
Benutzeravatar
Krishty
Establishment
Beiträge: 8229
Registriert: 26.02.2009, 11:18
Benutzertext: state is the enemy
Kontaktdaten:

Re: [Projekt] Extracting Ace Combat

Beitrag von Krishty »

Okay, I got it – the model header is 8 bytes, not 16. My bad. Geometry is fine now …
2018-12-21 7 polys okay.png
… and here’s all models in one view:
2018-12-21 8 many polys.png

Pretty sweet for 20 minutes of work!

Looks like the polygons are Gouraud-shaded. That’ll need some polishing of my exporter to work. Textures would be nice as well …
seziert Ace Combat, Driver, und S.T.A.L.K.E.R.   —   rendert Sterne
Benutzeravatar
Krishty
Establishment
Beiträge: 8229
Registriert: 26.02.2009, 11:18
Benutzertext: state is the enemy
Kontaktdaten:

Re: [Projekt] Extracting Ace Combat

Beitrag von Krishty »

We can take another shortcut by comparing the triangle structures to those from the terrain. They are spookily similar. This gives us the following layout:

  // A texture coordinate, relative to a specific texture page.
  struct UVInPage {
    UInt1B u;
    UInt1B v;
  };

  // The location and layout of a texture in the frame buffer.
  struct DrawAttribute_Texture {
    UInt2B_LE data; // according to “Nocash PSX Specifications” › “GPU” › “GPU Rendering Attributes” › “Texpage Attribute”
  };

  // The location of a color palette in the frame buffer.
  struct DrawAttribute_Palette {
    UInt2B_LE data; // according to “Nocash PSX Specifications” › “GPU” › “GPU Rendering Attributes” › “Clut Attribute”
  };

  struct ModelDisplayTriangle {
    UInt1B                indices[3];
    UInt1B                zero0;
    RGBC_8888             commandAndColors[3]; // draw command in alpha channel
    UVInPage              uv_a;
    DrawAttribute_Palette palette;
    UVInPage              uv_b;
    DrawAttribute_Texture unk_texPage;
    UVInPage              uv_c;
    UInt2B_LE             zero2;
  };


Visualizing:
2018-12-21 9 textured.png
The canopy is broken, and so are some parts of the model’s underside. That’s because I got the quad structure wrong. More to follow.
seziert Ace Combat, Driver, und S.T.A.L.K.E.R.   —   rendert Sterne
Benutzeravatar
Krishty
Establishment
Beiträge: 8229
Registriert: 26.02.2009, 11:18
Benutzertext: state is the enemy
Kontaktdaten:

Re: [Projekt] Extracting Ace Combat

Beitrag von Krishty »

The problem was not in the quads but in the special layout of color palettes in the VRAM. This finally fixes texture problems in some levels as well! I need to extend my PSX VRAM tutorial for that.

Enjoy the fully-textured, Gouraud-shaded ADF-01:
2018-12-21 10 ADF-01 okay.png
So much to see here. I’d love to stop and take more snapshots, but there’s so many other formats waiting to be extracted …
seziert Ace Combat, Driver, und S.T.A.L.K.E.R.   —   rendert Sterne
Benutzeravatar
Krishty
Establishment
Beiträge: 8229
Registriert: 26.02.2009, 11:18
Benutzertext: state is the enemy
Kontaktdaten:

Re: [Projekt] Extracting Ace Combat

Beitrag von Krishty »

I proudly present the unfinished alpha version of the XFA-27 (without canards, with fixed wings, and with different intakes):
2018-12-21 XFA-27 1 beta.png
2018-12-21 XFA-27 2 beta.png

2018-12-21 XFA-27 3 beta.png

For reference, this is the final version:
2018-12-21 XFA-27 1 final.png

In directories 54–77, Ace Combat 2 contains models of all playable planes (three LODs plus one texture, in the same Model Display format I described earlier). These seem to be leftovers from the development phase – they have some texture errors and are not used in the final game. The XFA-27 is in the final folder.

Unfortunately, the texture coordinates are completely fubar. There is, however, an unused texture file that suggests a gray-blue paint scheme:
2018-12-21 XFA-27 4 beta.png
2018-12-21 XFA-27 4 beta.png (2.62 KiB) 15450 mal betrachtet


This is quite a surprise :) I guess it’ll take a few days for me to document everything, take snapshots, and update my galleries.
seziert Ace Combat, Driver, und S.T.A.L.K.E.R.   —   rendert Sterne
joeydee
Establishment
Beiträge: 1039
Registriert: 23.04.2003, 15:29
Kontaktdaten:

Re: [Projekt] Extracting Ace Combat

Beitrag von joeydee »

Gerade entdeckt, vom XFA-27 hat kürzlich jemand einen Modellbausatz vorgestellt: http://www.phoxim.de/forum/index.php?to ... #msg275959
Damit schließt sich der Kreis zu meinem Modellbauhobby in beide Richtungen: den Link zu deiner STL-Viewer-Seite habe ich dort bei den 3D-Druckern auch schon vorgestellt.
Ich dachte ich mach mal noch was ganz anderes außer Proggen, aber die beiden Hobbys verschmelzen immer mehr LOL
Benutzeravatar
Krishty
Establishment
Beiträge: 8229
Registriert: 26.02.2009, 11:18
Benutzertext: state is the enemy
Kontaktdaten:

Re: [Projekt] Extracting Ace Combat

Beitrag von Krishty »

Tatsache! Den Bausatz habe ich schonmal auf Twitter gesehen, aber ich hätte mir nie vorstellen können, über jemanden von ZFX davon zu hören :D Es ist echt eine kleine Welt. Und vielen Dank für den Link auf meinen Viewer!
seziert Ace Combat, Driver, und S.T.A.L.K.E.R.   —   rendert Sterne
Benutzeravatar
DragonSpikeXIII
Beiträge: 4
Registriert: 10.06.2017, 02:26

Re: [Projekt] Extracting Ace Combat

Beitrag von DragonSpikeXIII »

Krishty, eine frage von RythusOmega: weißt du wenn wir die Alpha/Beta versionen des Expo City und Megafloat können spielen? Gibt es innerhalb des Missionen, jede Spur?
Benutzeravatar
Krishty
Establishment
Beiträge: 8229
Registriert: 26.02.2009, 11:18
Benutzertext: state is the enemy
Kontaktdaten:

Re: [Projekt] Extracting Ace Combat

Beitrag von Krishty »

Question to or from Rythus?

I’m not currently modding the game to make the levels playable, and I doubt that it is possible without huge effort. The geometry and texture format is different from the final version (that’s, for example, the reason for color problems in this image). If we cannot identify old beta code in the final game engine, a conversion of the data is necessary.

I do work on a port to my flight simulator, but this will take a very long time as well.
seziert Ace Combat, Driver, und S.T.A.L.K.E.R.   —   rendert Sterne
Benutzeravatar
Krishty
Establishment
Beiträge: 8229
Registriert: 26.02.2009, 11:18
Benutzertext: state is the enemy
Kontaktdaten:

Re: [Projekt] Extracting Ace Combat

Beitrag von Krishty »

RythusOmega hat einige Modelle aus Ace Combat 7 extrahiert (allerdings aus dem RAM, nicht aus dem on-Disk-Format).

Das ist interessant, weil AC7 auf der Unreal Engine aufbaut. Der Content ist zum einen verschlüsselt (AES?) und die UE nutzt anti-Debugging-Technik, damit man die Assets nicht einfach via PIX & Co. aus dem Speicher extrahiert.

Das wäre hier natürlich besonders interessant zu wissen, welche Technik das ist – vielleicht schaue ich’s mir irgendwann an, wenn ich mal ganz viel Zeit habe.
seziert Ace Combat, Driver, und S.T.A.L.K.E.R.   —   rendert Sterne
Benutzeravatar
Krishty
Establishment
Beiträge: 8229
Registriert: 26.02.2009, 11:18
Benutzertext: state is the enemy
Kontaktdaten:

Re: [Projekt] Extracting Ace Combat

Beitrag von Krishty »

Another fix to the levels and models on my website: They seemed overly dark all the time, and I couldn’t figure out exactly why. It probably has to do with the PSX gamma ramp, which is known to be very steep (giving PSX games their unique dark look).

In order to solve this once and for all, I’d probably have to look at the source code of emulators, but I don’t have time for that. Instead, I applied a gamma value of 0.5 like suggested on http://problemkaputt.de/psx-spx.htm#gpuvideomemoryvram :
RGB Intensity Notes
The Playstations RGB values aren't linear to normal RGB values (as used on PCs). The min/max values are of course the same, but the medium values differ:

Code: Alles auswählen

Intensity        PC      PSX
Minimum          0       0
Medium (circa)   16      8
Maximum          31      31
Ie. on the PSX, the intensity increases steeply from 0 to 15, and less steeply from 16 to 31.
This indeed looks much better.

By the way, I moved the website to http://krishty.com/acecombat_en a while ago to seperate my hacking stuff from my 3D tools.
seziert Ace Combat, Driver, und S.T.A.L.K.E.R.   —   rendert Sterne
Benutzeravatar
Krishty
Establishment
Beiträge: 8229
Registriert: 26.02.2009, 11:18
Benutzertext: state is the enemy
Kontaktdaten:

Re: [Projekt] Extracting Ace Combat

Beitrag von Krishty »

A few days ago, this video was quite popular. It shows a player breaking out of a canyon mission – which normally fails as soon as the player exceeds a certain altitude. He finds mysterious geometry in the no man’s land:



As tl;dr, DragonSpike commented correctly: This geometry is used for the mirroring on the water surface.

But there is an exctracted version of the level on my website, so let’s look at the details!

This is an overview of the level:
gotp_overview.png
We see the actual canyon in the center, the mirroring on the right, and the cutscene’s landscape on the left. This is consistent with the player flying towards East to find the hidden geometry.

Here’s both canyons combined via Gimp:
gotp_mirroring.png
You can see the mirroing nicely here. Also notice the distortion in the mirrored texture maps.

Here’s the cutscene terrain. According to our overview map, it should be reachable by flying West. However, nothing is there. Just a few textured quads.
gotp_sequ.png
One very strange thing is the underside of the level, which is not normally accessable:
gotp_underside.png
I have no idea what these colors mean. They could be leftover data from the level editor, because the Geofront tunnel mission has similar quads. We’ll probably never find out.
seziert Ace Combat, Driver, und S.T.A.L.K.E.R.   —   rendert Sterne
Benutzeravatar
Krishty
Establishment
Beiträge: 8229
Registriert: 26.02.2009, 11:18
Benutzertext: state is the enemy
Kontaktdaten:

Re: [Projekt] Extracting Ace Combat

Beitrag von Krishty »

death_the_dogs HD-Panoramaaufnahmen und Übersichts-Renderings aus Ace Combat 4, 5, und Zero.

Er hat dafür die Spiele im PlayStation-2-Emulator PCSX2 geladen, mit einer Cheat Engine herumgespielt, zahllose Screenshots gemacht, und diese mit Photoshop zusammengefügt.
seziert Ace Combat, Driver, und S.T.A.L.K.E.R.   —   rendert Sterne
argonbolt
Beiträge: 3
Registriert: 07.08.2019, 22:00
Echter Name: Dave

Re: [Projekt] Extracting Ace Combat

Beitrag von argonbolt »

Hello, first off thanks for all the work Krishty in regards to code diving and extracting everything.
I am some one who has made a series of videos reviewing the series. While searching for images i came across your project and was very impressed by some of the renders.
I and some other AC fans i know were wondering, would it be possible for you to create some renders of Port Edwards and St Ark from Ace Combat 2? Your renders of the AC3 maps are fantastic and very cool to see the whole level in full without render distance limitations.
Once again thanks a ton for your dive into the files for AC3 and AC2, as a newer AC fan discovering these games, i was always blown away by how little their many qualities were discussed relative to the newer titles.
Benutzeravatar
Krishty
Establishment
Beiträge: 8229
Registriert: 26.02.2009, 11:18
Benutzertext: state is the enemy
Kontaktdaten:

Re: [Projekt] Extracting Ace Combat

Beitrag von Krishty »

Cool, I like your videos!

Yes, I have extracted copies of Port Edwards and Saint Ark here. Do you prefer Saint Ark at day or at night, or both? Please mind that I have yet to decode some model positions, so a few parts of the cities will be missing – most notably some bridges …
seziert Ace Combat, Driver, und S.T.A.L.K.E.R.   —   rendert Sterne
argonbolt
Beiträge: 3
Registriert: 07.08.2019, 22:00
Echter Name: Dave

Re: [Projekt] Extracting Ace Combat

Beitrag von argonbolt »

I think both St Ark day and St Ark night would look very cool, personally i dont mind elements missing at all as just having the larger view is amazing, im a big fan of the late 90's painted pixel texture look. To this day i think Port Edwards remains my favorite AC night mission for certain. And once again thanks for the efforts!
Benutzeravatar
Krishty
Establishment
Beiträge: 8229
Registriert: 26.02.2009, 11:18
Benutzertext: state is the enemy
Kontaktdaten:

Re: [Projekt] Extracting Ace Combat

Beitrag von Krishty »

Check these out:

Bild

Bild

Bild

Bild

Bild

Bild

Bild

Bild

I would have liked to give you the files and software directly so you can record the cities yourself, but the atmosphere settings are not fully implemented so I had to hard-code stuff for individual levels and it’s just a pain to use. I’ll release a better version later.

I’ll upload the snapshots to my website next weekend, no time for that right now. Feel free to use them for whatever you like.

A note to your Ace Combat 2 video: You mention the clunky controls without rolling, but you can easily change that in the options by switching to expert controls. I don’t recall anyone seriously playing the game with novice controls :)

Your videos really deserve to have more views …

seziert Ace Combat, Driver, und S.T.A.L.K.E.R.   —   rendert Sterne
argonbolt
Beiträge: 3
Registriert: 07.08.2019, 22:00
Echter Name: Dave

Re: [Projekt] Extracting Ace Combat

Beitrag von argonbolt »

Wow! Those look great! Thanks for the renders.
Yeah sorry about AC2, i only recently played it in the last year, so only after finishing my upload of i think 5 did i realize "Oh there is expert controls" duhhhhh, i felt very dumb to not notice.
In general i have very much been amazed by how detailed and interesting the PS1 games in the series are, it is a shame they are so often overshadowed.
Benutzeravatar
Krishty
Establishment
Beiträge: 8229
Registriert: 26.02.2009, 11:18
Benutzertext: state is the enemy
Kontaktdaten:

Re: [Projekt] Extracting Ace Combat

Beitrag von Krishty »

Krishty hat geschrieben: 06.07.2019, 19:06death_the_dogs HD-Panoramaaufnahmen und Übersichts-Renderings aus Ace Combat 4, 5, und Zero.

Er hat dafür die Spiele im PlayStation-2-Emulator PCSX2 geladen, mit einer Cheat Engine herumgespielt, zahllose Screenshots gemacht, und diese mit Photoshop zusammengefügt.
Oh, it’s even better than that – he recorded videos all along!

Here’s him increasing range of sight and weather speed (watch the clouds rush away):


Here’s an unused mission Sitting Duck:


A shooting range for ground target tests:


… and so much more: https://www.youtube.com/channel/UCizg3E ... ZVw/videos
seziert Ace Combat, Driver, und S.T.A.L.K.E.R.   —   rendert Sterne
Benutzeravatar
Krishty
Establishment
Beiträge: 8229
Registriert: 26.02.2009, 11:18
Benutzertext: state is the enemy
Kontaktdaten:

Re: [Projekt] Extracting Ace Combat

Beitrag von Krishty »

Ostrich used my extracted Ace Combat 2 models for his remake of the Death Rave 2000 paint scheme in Ace Combat 7, and the result is spectacular:

Bild

Before & After:
Bild

20 Years of graphics development there :)

Download
seziert Ace Combat, Driver, und S.T.A.L.K.E.R.   —   rendert Sterne
Benutzeravatar
Krishty
Establishment
Beiträge: 8229
Registriert: 26.02.2009, 11:18
Benutzertext: state is the enemy
Kontaktdaten:

Re: [Projekt] Extracting Ace Combat

Beitrag von Krishty »

I’ve added Argonbolt’s snapshots to my gallery.

One interesting detail I had skipped: Port Edward’s airport is an ugly mess. It looks like they added in a hurry just to serve for a landing mission or something like that. Just a flat black polygon for ground and not at all integrated with the rest of the city.

Bild
seziert Ace Combat, Driver, und S.T.A.L.K.E.R.   —   rendert Sterne
Benutzeravatar
Krishty
Establishment
Beiträge: 8229
Registriert: 26.02.2009, 11:18
Benutzertext: state is the enemy
Kontaktdaten:

Re: [Projekt] Extracting Ace Combat

Beitrag von Krishty »

Thanks a lot for the shout-out, Argonbolt!

seziert Ace Combat, Driver, und S.T.A.L.K.E.R.   —   rendert Sterne
Benutzeravatar
Krishty
Establishment
Beiträge: 8229
Registriert: 26.02.2009, 11:18
Benutzertext: state is the enemy
Kontaktdaten:

Re: [Projekt] Extracting Ace Combat

Beitrag von Krishty »

Thank you for the support, Ostrich! I’ve been following your work closely for some time, and I’m glad I’ve been able to contribute!

Bild
seziert Ace Combat, Driver, und S.T.A.L.K.E.R.   —   rendert Sterne
Benutzeravatar
Krishty
Establishment
Beiträge: 8229
Registriert: 26.02.2009, 11:18
Benutzertext: state is the enemy
Kontaktdaten:

Re: [Projekt] Extracting Ace Combat

Beitrag von Krishty »

So … Ace Combat 3 version 1.0 vs 1.1.

For the big picture, you can read DragonSpikeXIII’s post on ROMhacking.net:
http://www.romhacking.net/forum/index.php?topic=17658.msg367238#msg367238 hat geschrieben:All right, here's a recap of the dealio with 1.0/1.1 that me and other curious users dealt with here a couple of years ago.

First things first, don't let the naming scheme cofuse you, 1.0 is the PlayStation the Best reprint from 2000 and 1.1 is the original print from May 27, 1999. Testers from a known PS1 image archival group, whose name I forgot, made a mistake and mislabeled them, and added a bit of confusion on top.

Second thing is the original print, "1.1," is the more recent build, believe it or not. Usually reprints, no matter which region, are either identical to the original release or updated with fixes and additions, bit with AC3E it's the opposite. If you mount "1.0" on your computer you'll see the files were burned on May 20th, 1999, which happens to be the release date for China. "1.1" files were burned on disc on May 27th, 1999.l, the Japanese release date.

Third, the only real difference that I could find is that there's an additional file in one of the game's folders inside the BPB, a compressed container that houses all subtitles and graphics and maybe models used by the game (this project's bread and butter). The file itself is nothing special from the little that I can remember. And this, I think, is the main reason that our translation patches don't support the "1.0" reprint, this one file changes the index (which I think is the file that ends in .BPH) by one so every file after that gets moved up by one, and our AC3 Toolkit doesn't like that.

Anyway, since we already support the original and more up-to-date version of the game, I've ceased pursuing support for the reprint, as well as the Chinese release, for that matter. We dodged a bullet here, because when EsperKnight began working on the Toolkit he found "1.1" and based his work on that version thinking that it was a bugfixed re-release, little did we know back then that it was the original, and that that one was the more recent version.

So if you want to play the game with our fan-trans, secure a "1.1" copy. You can find checksums for it on our RHDN page (translation number 2307). Checksums for the next translation release will also be present on the ReadMe file after someone requested it when I released version 2.0 of our fan-trans.
Alright – what’s most interesting from my perspective (data mining) is the additional file he mentions. What’s up with that?!

First off, I lost my copy of the 1.0 version. And that’s really bad because I can’t find it online any more. It seems the only location to download it was emuparadise, but they stopped providing downloads some time ago. Luckily, there’s a workaround.

The files on these discs do have a time stamp of 1999-05-20 02:00 UTC, a week before the Japanese release date. Perfect!

So I used my tools to extract both versions and diffed the results.

Indeed, 114/3/12.dat is present only in the earlier build. I haven’t extracted this range of files yet – they seem associated with the UI, not with levels or planes – so I cannot say anything specific.

The mission A Canopy of Stars is different. I can’t say for sure because, again, I haven’t decoded the affected file yet. It could be different enemy placement. All other missions and planes are identical.

A Japanese character has been replaced in one of the texts. Okay.

But what’s more interesting is, there are hundreds of different TIM texture files. And they are not visually different – just the data is. What the heck is going on?!

Remember that Ace Combat 2 was patched in Japan? The patched version provided better translation, but it also removed a few strings from Namco’s build environment which were left in uninitialized memory in the briefing files of the first Ravine mission.
https://zfx.info/viewtopic.php?f=10&t=4110&start=30#p55161 hat geschrieben:a string table in 1.0 being padded with “04EAS.PLY P:\UNIX\PX201\BRIEFING\WO” instead of zeroes in 1.1
You would think that the developers learned from this, but … nope. All the texture files that were changed between 1.0 and 1.1 had uninitialized colors in their palette entries. There is a common pattern in the uninitialized memory:

9\H-I386~1\BIN;Z:\PUBLIC
L\PERL\5~1.005\BIN\MSWIN
SR\SRC\BIN;Z:\PUBLIC\;C:
1.005\BIN\MSWIN3~1;C:\PE
OUND;\USR\SRC\BIN;Z:\PUBLIC;C:��ERL\5~1.005\BIN\MSWIN3~1;C:\PE
USR\SRC\BIN;Z:\PUBLIC;C:

Solving the puzzle, we can be pretty sure Namco’s build process had the following in its environment:

OUND;\USR\SRC\BIN;Z:\PUBLIC;C:\PERL\5~1.005\BIN\MSWIN3~1;C:\PE

\H-I386~1\BIN;Z:\PUBLIC��������L\PERL\5~1.005\BIN\MSWIN

Perl and Windows 3.1 and Unix systems :)

Funny thing, they couldn’t replace *all* of the occurences. A few textures contain the string in their uninitialized palette colors even in 1.1, just with an additional backslash after Z:\PUBLIC.

You should initialize your memory, really. Especially if the result is to be pressed onto a million disks and your employer is strict about data leaks.

Other paths from debug functions in the executable:
sim:\usr\src\t_dp%4d.tim
sim:\usr\src\display.tim
sim:\usr\makepack\pta\tim\��.tim
seziert Ace Combat, Driver, und S.T.A.L.K.E.R.   —   rendert Sterne
Benutzeravatar
Krishty
Establishment
Beiträge: 8229
Registriert: 26.02.2009, 11:18
Benutzertext: state is the enemy
Kontaktdaten:

Re: [Projekt] Extracting Ace Combat

Beitrag von Krishty »

I’m afraid I’m a little too late for the party (almost two years, actually) … but I just found out that Runway 25 Productions imported some of the extracted Ace Combat 3 models in Cinema4D and recorded them in amazing 360° VR footage:



This is the first time I see the levels from a first-person view. Just brilliant!

Arkbird, SOLG, R-352:

seziert Ace Combat, Driver, und S.T.A.L.K.E.R.   —   rendert Sterne
joggel

Re: [Projekt] Extracting Ace Combat

Beitrag von joggel »

Cool videos :)
Benutzeravatar
Krishty
Establishment
Beiträge: 8229
Registriert: 26.02.2009, 11:18
Benutzertext: state is the enemy
Kontaktdaten:

Re: [Projekt] Extracting Ace Combat

Beitrag von Krishty »

DragonSpikeXIII, I know you’re monitoring this thread, so I’m writing it here: Thanks a lot for linking me, and I’m so excited about your progress with AC3!


Concerning my datamining, I’m still working on Ace Combat 2’s player modes. Thanks to Rythus, I’m on the right track; however, it’ll take me some more time to understand the model format in its entirety (with textures and so on).

Bild


Finally, Argonbolt’s Ace Combat 7 review has arrived. While the videos are long and I don’t agree with every argument, I found them very worthwile. They point out exactly how you should plan the world you create, the logical/economical/philosophical ties you need to consider, the ground rules of storytelling – which should be especially important to developers like us here on ZFX. And I had some good laughs as well.









I also noticed that Argonebowled’s criticism from his fandom video lead to actual changes in the Acepedia’s handling of Ace Combat 2. A good reminder that you can improve things when your criticism is well-thought, well-pointed, and when you don’t give up to the mob. (Not trying to be negative about Acepedia here. It’s great actually, but I’m just not really involved apart from the flaws Argon pointed out.)

I hope for his latest videos to have similar influence on Ace Combat 8 :)
seziert Ace Combat, Driver, und S.T.A.L.K.E.R.   —   rendert Sterne
Benutzeravatar
Krishty
Establishment
Beiträge: 8229
Registriert: 26.02.2009, 11:18
Benutzertext: state is the enemy
Kontaktdaten:

Re: [Projekt] Extracting Ace Combat

Beitrag von Krishty »

Let’s have another look at Ace Combat 2’s planes.

Files 30–53 in the game’s main directory are small packages. They contain:
  • a header
     
  • up to 15 individual meshes, each representing a movable part of a plane (body, rudders, exhaust, etc.)
    • the format is very similar to static meshes and enemies
  • something I have yet to figure out
     
  • the texture in TIM format.
If we extract the meshes and stuff them into a file, they look like this:

Bild

For one thing, control surfaces (wings, elevators, …) have their own coordinate space and don’t align with the rest of the plane. This makes sense because they’re animated during the game. By giving them their own coordinate space, they can be animated solely via rotation.

But the most obvious thing is the missing polygons at the nose. I gotta have made a mistake there! Checking the other planes …

Bild

This cannot be right – the Eurofighter has no nose at all, and the F-14 at the bottom-left is pretty much invisible from below!

At this point, I realized something. If you look from behind and from slightly above, the planes look fine:

Bild

It’s not a bug, it’s an optimization! You only ever see the back and top of your plane, so why bother processing polygons at its nose and underside! They have just been deleted from the model to save CPU time.

Ace Combat 2’s player models have no underside and no noses.

On some occasions, you see your plane in its entirety (during short cutscenes when completing a mission). These are using a different model. But that’s for a different time …

Here’s the data structures:

Code: Alles auswählen

namespace Namco::AceCombat2 {


	// DAT Header. Points to data blocks with 2048-B alignment (in accordance with CD-ROM sectors).
	struct DAT_Directory {
		UInt4B_LE version;
		UInt4B_LE numberOfBlocks;
		CDPointer pointers[]; // always sorted
	};


	struct DAT_BlockHeader {
		UInt4B_LE size;
		UInt4B_LE numberOfOffsets;
		UInt4B_LE offsets[];
	};


	// A point in 3D space.
	//  • integer-based because the PlayStation has no floating-point support
	//  • padded to four bytes because the PlayStation’s CPU is 32-bit-based
	struct Vertex {
		SInt2B_LE x;
		SInt2B_LE y;
		SInt2B_LE z;
		PAD_2B;
	};


	// A 3D normal vector.
	//  • integer-based because the PlayStation has no floating-point support
	//    – usually normalized to 4096
	//  • padded to four bytes because the PlayStation’s CPU is 32-bit-based
	struct Normal {
		SInt2B_LE x;
		SInt2B_LE y;
		SInt2B_LE z;
		PAD_2B;
	};


	// Playable planes in Ace Combat 2 (not wingmen or enemies).
	//  • planes are structured into movable parts – body, rudder, …
	//  • each part is processed as a distinct mesh
	//  • in contrast to static/dynamic objects, planes have their textures embedded in their respective files
	namespace Planes {


		// Header of a playable plane.
		struct Header {
			// Planes have their textures embedded in TIM format at the file end.
			UInt4B_LE offsetOfTim;
			UInt2B_LE unknown[14];
			UInt2B_LE always0x044C[3];
			UInt2B_LE unknown2[2];
			// Each offset in this list points to the start of a part – except for zeros, which denote unused parts.
			UInt2B_LE partOffsets[15];
			UInt2B_LE unknown3[46];
		};


		// Header of a movable part section in a playable plane.
		struct PartHeader {
			UInt1B    numberOfTriangles;
			UInt1B    numberOfQuads;
			UInt2B_LE unknown2;
			UInt1B    numberOfVertices;
			UInt1B    numberOfNormals;
			UInt2B_LE unknown4;
			UInt2B_LE unknown5;
			UInt2B_LE offsetOfTriangles; // relative to part
			Vertex    vertices[];
			// Then: Normal normals[];
		};


		// A triangle in a part of a playable object.
		//  • textured
		//  • lit via normal vectors
		//  • Gouraud-shaded
		struct PartTriangle {
			UInt1B                           indices[3];
			PAD_1B;
			UInt1B                           normalIndices[3];
			PAD_1B;
			Sony::PSX::UVInPage              uv0;
			Sony::PSX::DrawAttribute_Palette palette;
			Sony::PSX::UVInPage              uv1;
			Sony::PSX::DrawAttribute_Texture texture;
			Sony::PSX::UVInPage              uv2;
			UInt2B_LE                        always512; // TODO
		};


		// A quad in a part of a playable object.
		//  • textured
		//  • lit via normal vectors
		//  • Gouraud-shaded
		struct PartQuad {
			UInt1B                           indices[4];
			UInt1B                           normalIndices[4];
			Sony::PSX::UVInPage              uv0;
			Sony::PSX::DrawAttribute_Palette palette;
			Sony::PSX::UVInPage              uv1;
			Sony::PSX::DrawAttribute_Texture texture;
			Sony::PSX::UVInPage              uv2;
			UInt2B_LE                        always512; // TODO
			Sony::PSX::UVInPage              uv3;
			PAD_2B;
		};


	} // Planes


} // Namco::AceCombat2
seziert Ace Combat, Driver, und S.T.A.L.K.E.R.   —   rendert Sterne
scheichs
Establishment
Beiträge: 845
Registriert: 28.07.2010, 20:18

Re: [Projekt] Extracting Ace Combat

Beitrag von scheichs »

Once again very interesting stuff on how clever developers used the HW back in the days. Thank you for sharing with us!
Benutzeravatar
Krishty
Establishment
Beiträge: 8229
Registriert: 26.02.2009, 11:18
Benutzertext: state is the enemy
Kontaktdaten:

Re: [Projekt] Extracting Ace Combat

Beitrag von Krishty »

For all PSX reverse engineers out there: I finished my Windows Explorer thumbnail extension. It helped me a lot extract Ace Combat’s files, and I hope it helps others as well: https://papas-best.com/timthumbnails_en

Bild

Huge thanks to weissvulf from the ROMhacking forums for providing me with some test files!
seziert Ace Combat, Driver, und S.T.A.L.K.E.R.   —   rendert Sterne
Antworten