[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: 6826
Registriert: 26.02.2009, 12:18
Benutzertext: state is the enemy
Kontaktdaten:

Re: [Projekt] Extracting Ace Combat

Beitrag von Krishty » 21.12.2018, 21:16

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) 1640 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: 6826
Registriert: 26.02.2009, 12:18
Benutzertext: state is the enemy
Kontaktdaten:

Re: [Projekt] Extracting Ace Combat

Beitrag von Krishty » 21.12.2018, 21:35

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: 6826
Registriert: 26.02.2009, 12:18
Benutzertext: state is the enemy
Kontaktdaten:

Re: [Projekt] Extracting Ace Combat

Beitrag von Krishty » 21.12.2018, 21:59

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: 6826
Registriert: 26.02.2009, 12:18
Benutzertext: state is the enemy
Kontaktdaten:

Re: [Projekt] Extracting Ace Combat

Beitrag von Krishty » 21.12.2018, 22:56

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: 6826
Registriert: 26.02.2009, 12:18
Benutzertext: state is the enemy
Kontaktdaten:

Re: [Projekt] Extracting Ace Combat

Beitrag von Krishty » 22.12.2018, 14:39

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) 1486 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: 637
Registriert: 23.04.2003, 15:29
Kontaktdaten:

Re: [Projekt] Extracting Ace Combat

Beitrag von joeydee » 07.01.2019, 11:24

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: 6826
Registriert: 26.02.2009, 12:18
Benutzertext: state is the enemy
Kontaktdaten:

Re: [Projekt] Extracting Ace Combat

Beitrag von Krishty » 07.01.2019, 14:07

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 » 01.03.2019, 22:49

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: 6826
Registriert: 26.02.2009, 12:18
Benutzertext: state is the enemy
Kontaktdaten:

Re: [Projekt] Extracting Ace Combat

Beitrag von Krishty » 02.03.2019, 00:17

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: 6826
Registriert: 26.02.2009, 12:18
Benutzertext: state is the enemy
Kontaktdaten:

Re: [Projekt] Extracting Ace Combat

Beitrag von Krishty » 07.03.2019, 23:51

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: 6826
Registriert: 26.02.2009, 12:18
Benutzertext: state is the enemy
Kontaktdaten:

Re: [Projekt] Extracting Ace Combat

Beitrag von Krishty » 08.03.2019, 13:37

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: 6826
Registriert: 26.02.2009, 12:18
Benutzertext: state is the enemy
Kontaktdaten:

Re: [Projekt] Extracting Ace Combat

Beitrag von Krishty » 10.03.2019, 00:16

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

Antworten