Miscellaneous Forums > Scripting and Reverse Engineering
[FF7]Jet Coaster 3D model
ergonomy_joe:
Nobody talks about the jet coaster minigame :'(
why ?
So i decided to make a post about it.
You can get a lot of information from my decompilation project:
https://github.com/ergonomy-joe/ff7-coaster
(but you need to understand programming then)
Most of the game's assets comes from the file "xbin.bin". This is actually some kind of archive containing 15 streams of data.
(I decided to call them stream, not sure if this is a good idea or not. Anyway ...)
"xbinadr.bin" contains 16 32-bit values that are the start offsets of these streams inside "xbin.bin".
Actually, it would be so if "xbin.bin" was loaded at address 0x800F0000 so some subtractions are needed here.
Anyway, here is a quick overview of each stream's purpose:
0 - BGM in AKAO format (not used in the windows version)
1 - 3D models information
2 - precomputed visibility list: add track element
3 - precomputed visibility list: remove track element
4 - array of SVECTOR: main track
5 - 2 offsets in [4]: left track & right track
6 - 2 lenghts for [4]: left track & right track
7 - array of SVECTOR: maybe camera rotation
8 - precomputed visibility list: add Triangle
9 - precomputed visibility list: remove Triangle
10 - array of Triangles (3 SVECTOR and 3 CVECTOR)
11 - array of SVECTOR: other objects pathes
12 - offsets in [11]
13 - lenghts for [11]
14 - array of game objects information
15 - array of chars: # of objects to add along the main track
16 - points to the end of file
by using the data (part of it) from streams 4, 5, 6 and 1, 10, 14, I created a 3d model file.
I'm trying to post it here.
It shows the main track and the static scenery.
Some objects are missing, the Welcome Post for instance. That is because they are added to the world at runtime.
I use the wavefront obj format because it's the easiest I know of.
I'm also using "3dviewer.net" for viewing because... well it works.
(Try the "Dark Mode" and the "Show Edges" option, it looks very cool)
There is a slight problem though: wavefront only allows one color (material) per triangle while our original data uses a Gouraud model with one color per vertex.
Well, better luck next time.
This is the simplest "sub-program" from FF7, but there is nonetheless a lot to talk about.
Notably concerning the way the track may have been designed, or the precomputed visibility (or is it offline culling ? predefined occlusion ? ... ?).
I may also have questions for people who know about 3D modeling during the 90s.
Until then, have fun.
PS: Well, I could not find how to include my model file here. It is a 3MB text file, 500KB when compressed. Any idea how I could post it here ?
[update]
I could upload an image here:
[update 2]
I found out that OBJ format allows for vertex coloring; but we loose the transparency then. Here is another view:
ergonomy_joe:
I uploaded my "Wavefront OBJ" file to the project github.
Here:
https://github.com/ergonomy-joe/ff7-coaster/blob/master/tools/coaster.obj
You can enjoy it through this URL:
https://3dviewer.net/#model=https://github.com/ergonomy-joe/ff7-coaster/blob/master/tools/coaster.obj
The track is not really a model. The original data is two sets of vertices that represent the respectively the left and right border of the track. The engine uses the "offline" (or is it precomputed ? or whatever) visibiliy data to build a list of visible vertices and build quads with it. The texture "rail.tex" is applied to thoses.
In my model, I just draw lines between the vertices of each pair.
At runtime, the camera position is computed directly from these vertices too.
(function C_005EA194 from C_005E98E0.cpp for those who dare)
ergonomy_joe:
Well, it's me again.
For the past few days I have been trying to import some of the data from xbin.bin to 3D Studio Max version 1.1; I guess this was the version that was around at the time of the development of FF7, and also, it is the only I could find. :-[
The problem was, this version doesn't include the SDK, which is necessary to build customs importer for instance. Fortunately, there is the source code for an old unreleased game called Golgotha (from Crack Dot Com) which has all the includes files. I had to recreated dummies lib files to please the linker and voila !
I also lack a proper documentation for the SDK. All the books I could find from the era are just about modeling (3D I mean ;) ) and nothing about plugins development.
So far, I could import the main static models (but without colors) and create a LinearShape from the left part of the Track. Using 3D Studio Max's UI I then created a camera and I animated it by assigning it to the track's LinearShape. It worked ... a little, but I really lack information here.
Does someone have a good documentation for the SDK from that version ?
Also, does someone knows if it 3DS has the feature to generate visibiliy information (let's say, a list of the visible triangles) for each frame of animation ?
Kaiseran:
This is so interesting,
Can this program edit the battle model file LZS of FF7 PS1 version, because
I'm trying to change Cloud's hair to black for make him looks like Zack?
If yes can you do it?
myst6re:
Really good work!
Navigation
[0] Message Index
[#] Next page
Go to full version