[FF8] .x battle fields

  • Thread starter Thread starter Halfer
  • Start date Start date
Status
Not open for further replies.
Kaspar01, you we're right. I just ran a test on Norg's level and indeed. It did find this ground extension. Not only this. I think I'm ready to release this converter. It could be buggy and at first time weird, but it works. :) Give me a sec and I update this post.

Well, +1 for this software. :) My new extended search algorithm found these two objects and I didn't manually.
 
Last edited:
Kaspar01, you we're right. I just ran a test on Norg's level and indeed. It did find this ground extension. Not only this. I think I'm ready to release this converter. It could be buggy and at first time weird, but it works. :) Give me a sec and I update this post.

Well, +1 for this software. :) My new extended search algorithm found these two objects and I didn't manually.
Aha I knew it! :D

Can't wait to try it and give you a feedback :)
 
Here it is:

Final Fantasy VIII battle stage .X to OBJ converter - deprecated- see next page

gni6R2E.jpg


You'll need .NET Framework 4.5.1 !

Instructions inside!

Known bugs:
-Bad UV calculation for triangles
-Probably if you click resolve texture before opening any stage it will crash

TODO:
-Change rip triangle/quad button behaviour (disable if not any available)
-Limit those annoying MessageBox'es.
-Fix triangles UV calc.
-Auto texture size resolve after open
-Better MTL generation/ to make this faster
-Button for loop thru all models
-Throw away this message box in extended mode

BTW> 700 lines of code... (not counting designer code) Phew, I'm tired.
 
Last edited:
Fu***ng Awesome. (but i prefer selphie or rinoa XD)
Great work!

Edit.
I've tried it now...when i rip tris model, it's all ok,3ds max can import it and i can see it.
But when i try to export quads models, well in 3ds max i got an error:

29z3no8.jpg


If i try to change some option when i'm going to import it (for example , import as editable mesh) Bum! 3dsmax close instantly and i got the classic error when 3dsmax crash.

So......any idea? Because i can barely import 2/10 of a stage :P

Let me know.
 
Last edited:
I see. Post me which stage this is, offset of model and version of your 3DS Max. It's night in my country ATM, but I'll test it with 3DS Max tomorrow ASAP. I'm crafting OBJ from scratch, so there maybe is a problem that I missed. Thanks for report! :)

BTW> I personally didn't test exported meshes with 3DS Max, only with Milkshape and Mootools 3DBrowser.
 
I did some test too and I had same problem "invalid vertex index" when importing (had to open obj whith noesis and re-export again to fix that).

I'm using 3ds max 2014 anyway.


Norg.jpg


Known bugs:
-Bad UV calculation for triangles


Yeah.. probably there is something flipped somehow.. don't know if my screen can help to understand what's wrong but here's it  ;D
Triangles.jpg



TODO:
-Change rip triangle/quad button behaviour (disable if not any available)
-Limit those annoying MessageBox'es.
-Fix triangles UV calc.
-Auto texture size resolve after open
-Better MTL generation/ to make this faster
-Button for loop thru all models
-Throw away this message box in extended mode
An "extract all to one .obj" function which gives you one already merged .obj would be the best since some stage seems to have more than 20 fragments..and merging them one by one can be pain in the ass  :roll: (but if it takes too much time no problem  :wink: )


BTW> 700 lines of code... (not counting designer code) Phew, I'm tired.
Have some rest .. you really deserved it  ;D


P.S.

This is amazing.. thanks Maki.. you made my day..really  :)


Update:

There is something weird whith stage 30 and 31..
battle_stage30.jpg

battle_stage31.jpg

it looks like there is one or more missing piece..I'm sure there must be some "border" filling the gap between the flat combat ground and lava.
 
Last edited:
Yep. Checked that. 3DS Max hates meshes, that have too much vertex info. I'll tell you why this is happening:

There's Entry point for model.

At first it says how much vertex are there in this one segment.
Then there's X Y Z data for each vertex. After vertex data, so after 6*number of vertex there's 4 byte padding + MODULO from absolute position, but this is not important. After this there's count for triangles and count for quads. Not always triangle part of this model uses all of vertices. So in triangle part of model there's vertex data for both triangle+quad, but only data for triangle connection. That makes 3DS Max furious. Other softwares should get over it. Currently, I can't solve this problem, however... there's a small chance I'd like to write below.


I took a closer look how does a OBJ file with many objects stitched together look like... You won't believe. It's just one model after another. O_O It's like copying one model data to another's and it works! I though I wouldn't be able to figure a way to do this because of every model needs to use it's own vertex, vt and face info, and today I've just seen this. So a magical button for one way convert to ready, stitched model is just a matter of time.

Still can't find a problem with triangle VT. I didn't test this in 3DS Max yet. I'll do like I did with quads. I'll manually repair the texture, and see what result should I get from my file. This worked for quads, should work for triangles.

I did make some major changes. Made it faster now to rip models. No need to generate MTL, click on resolve texture or etc. Just select model and RIP. That's all.

I'll post the software updated to TOOLS category here. I'll edit this one to post a link for this.

However, I just found a logic bug. It caused in some rare cases to throw away an exception.

EDIT: Or wait a sec. I'll add that one model option

UPDATE: Nope. It didn't work. ;/
 
Last edited:
Thanks for explanation!

Indeed that 3ds max error is not a big deal (it can be solved using noesis in 2 secs)

I'm more worried about "missing pieces".

The "magical button" news sounds great!!!  :-D


P.S.

I don't know if anyone already made a check but.. any chance that some stage are "hidden" in ff8.exe file? (so many stuff hidden there.. it would not surprise me  :P )
 
Ye. But I failed. Need more time.
Not a problem! that button would just make the process faster (I'd like it but I can live 1 or 2 day whithout it I guess :D )

The new version already speed up the process and that's already nice..I'm gonna test it in the next hours!


Update: I tested the new version and I don't know what you changed but I don't get anymore the error on 3ds max!
 
Last edited:
EDIT:
Sorry i didn't see the others post (Kaspar's problem, it's the same) XD so it's almost useless this post :P I have to try your update.

Anyway here my info:

- Net framework 4.5.1
- 3dsmax Ver. 2015 x64
- Stage a0stg100.x (Edea's room)
- Search model (strict) 9216 for example    (Vertices offset 0x2406 - Triangles // - Quads 0x248C)
And when i try to import it from the menù (and not with a drag and drop) , i got that error.
Meanwhile with a classic and fast drag and drop, nothing happens & nothing import.

Here the main file and the obj (9216) extracted (without any mtl, doesn't matter in this moment)
Link -> www.mediafire.com/download/l4t6rrm8ab7av9w/Model.rar

Oh and sometimes when i try to extract some quads model (in the same file you can try the 9720)  i got an error from the program, here the log:


Le informazioni su come richiamare il debug JIT (Just-In-Time) anziché questa finestra
sono riportate in fondo al messaggio.

************** Testo dell'eccezione **************
System.FormatException: Formato della stringa di input non corretto.
   in System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
   in System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
   in System.Byte.Parse(String s, NumberStyles style, NumberFormatInfo info)
   in FF8_StageModel_ToObj.Form1.button5_Click(Object sender, EventArgs e)
   in System.Windows.Forms.Control.OnClick(EventArgs e)
   in System.Windows.Forms.Button.OnClick(EventArgs e)
   in System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   in System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   in System.Windows.Forms.Control.WndProc(Message& m)
   in System.Windows.Forms.ButtonBase.WndProc(Message& m)
   in System.Windows.Forms.Button.WndProc(Message& m)
   in System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   in System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   in System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Assembly caricati **************
mscorlib
    Versione assembly: 4.0.0.0
    Versione Win32: 4.0.30319.18444 built by: FX451RTMGDR
    Base di codice: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
Final Fantasy VIII Battle stage model to OBJ
    Versione assembly: 0.8.0.0
    Versione Win32: 0.8.0.0
    Base di codice: file:///C:/Users/Administrator/Desktop/FF8%20.X%20to%20OBJ.exe
----------------------------------------
System.Windows.Forms
    Versione assembly: 4.0.0.0
    Versione Win32: 4.0.30319.18408 built by: FX451RTMGREL
    Base di codice: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Versione assembly: 4.0.0.0
    Versione Win32: 4.0.30319.18408 built by: FX451RTMGREL
    Base di codice: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System
    Versione assembly: 4.0.0.0
    Versione Win32: 4.0.30319.34238 built by: FX452RTMGDR
    Base di codice: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
mscorlib.resources
    Versione assembly: 4.0.0.0
    Versione Win32: 4.0.30319.18408 built by: FX451RTMGREL
    Base di codice: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/mscorlib.resources/v4.0_4.0.0.0_it_b77a5c561934e089/mscorlib.resources.dll
----------------------------------------
System.Windows.Forms.resources
    Versione assembly: 4.0.0.0
    Versione Win32: 4.0.30319.18408 built by: FX451RTMGREL
    Base di codice: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms.resources/v4.0_4.0.0.0_it_b77a5c561934e089/System.Windows.Forms.resources.dll
----------------------------------------

************** Debug JIT **************
Per abilitare il debug JIT, è necessario impostare il valore
jitDebugging nella sezione system.windows.forms del file di configurazione
dell'applicazione o del computer (machine.config).
L'applicazione inoltre deve essere compilata con il debug
abilitato.

Ad esempio:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

Quando il debug JIT è abilitato, tutte le eccezioni non gestite
vengono inviate al debugger JIT registrato nel computer,
anziché essere gestite da questa finestra di dialogo.

Sorry for some parts on the log in italian languages :P (I'm italian :P)
 
Last edited:
Yep, a problem you posted was fixed in 0.95, available to download in topic in TOOLS. This error was appearing when TPage resolving was trying to use UV translation bigger than the texture itself. I just had to break the loop one index earlier. Clearly my bad. :P

Keep me updated with any other bugs you'll encounter. Thanks. :)

Kaspar01, really? Well, I wasn't expecting that. I corrected only that loop that added one bad face indice due to breaking loop after doing instructions instead of checking condition before calculating. :P
 
Kaspar01, really? Well, I wasn't expecting that. I corrected only that loop that added one bad face indice due to breaking loop after doing instructions instead of checking condition before calculating. :P
Yep! I already tested it on many stages but never got that error again :)

The triangles uv problem is weird.. it looks like each triangle take the right piece of texture but it's shown "reversed"..

Maybe I'm wrong but it looks like the UV "positions" of each triangle are correct but they're not correctly assigned to their own vertex..
 
Last edited:
if I am not mistaken that is the bridge in dollet connecting to the communication mountain.
You're probably right.

I made that list before MakiPL released the tool just looking at the first clut of the corresponding TIM texture so.. there are probably many errors (when you find at leas a "?" it's because I was not sure about it :) )

Thanks for your correction! later I'll edit the list.
 
You're probably right.

I made that list before MakiPL released the tool just looking at the first clut of the corresponding TIM texture so.. there are probably many errors (when you find at leas a "?" it's because I was not sure about it :) )

Thanks for your correction! later I'll edit the list.
Is there a way to rip just the TIM the .x file is calling?  This would be very handy for texture modders.
 
Last edited:
Is there a way to rip just the TIM the .x file is calling?  This would be very handy for texture modders.
Use TIM Viewer.
TIM texture is the last segment in .x file and is starting with header 01 00 00 00 09
Changing image data after header, CLUT and core info should work.
 
Use TIM Viewer.
TIM texture is the last segment in .x file and is starting with header 01 00 00 00 09
Changing image data after header, CLUT and core info should work.
These days I'm manually fixing some textures extracted from tim files to create proper material in 3ds max (whith alpha map) but it's not always an easy task to guess the right color palette for each texture piece..so I wonder... there is any info about how the game "knows" which one is the right one?
How does it pick the right colors from the tim file?
I tried to read something about .tim format but it looks like those info are not contained in the texture files..(this would be an explanation about why there is actually no tool able to extract the correct and complete texture automatically).

The problem is that for battle stage the "palette sections" have different dimensions and they apparently do not follow any logic order..(unlike world map textures which are placed on a square grid whith subsequential order).

I'm not asking to work on it..I just wonder if anyone already looked at this stuff :)
 
Last edited:
These days I'm manually fixing some textures extracted from tim files to create proper material in 3ds max (with alpha map) so I wonder... there is any info about how the game "knows" which one is the right one?
How does it pick the right colours from the tim file?
There are two PSOne GPU related instructions: 12's byte and 15's first byte digit (quad) [and that's probably this]. Changing those produced for example inverted colours. However, FFVIII engine uses texture colourization, so it's real-time colourized - 21's, 22's and 23's byte (it's generally used to imitate the fake lightning in VIII).
I found no way to use it though. (colourization) :C
Even if I could manage, to get values for pallete used (CLUT, not colourization) I still couldn't make any use of it. For generic .OBJ uses I'd have to colourize the texture itself, and it's out of my reach. Sorry. :C

I'm started to work on producing one .OBJ file. This would need, to convert quads to triangles by myself. Should not be a big deal. Mixing quads and triangle objects messes up texture coords and face indices of the others. Triangulating quads and stitching all should work, probably.

Candy for you:
4fpHdPJ.jpg
 
Status
Not open for further replies.
Back
Top