ZenHAX

Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Mon Jan 18, 2021 6:28 am

All times are UTC




Post new topic  Reply to topic  [ 8 posts ] 
Author Message
PostPosted: Sat Jan 02, 2021 3:50 am 
User avatar

Joined: Fri Jan 01, 2021 12:03 am
Posts: 5
Hello once again,

Im trying to View/export models inside the PS2 game, Trapt (Kagero II: Dark Illusion). These .smi files are locked behind 2 types of archives the "game.dat" which has "arc" which are a another form of archive having several files within them. Inside these .arc files a ".smi" file which contains the models within them and supposedly contain several meshes inside them.

Thanks to a friendly fellow on discord by the name of, DKDave, we have been able to identify many parts of the smi file such as, vertices', Normals, and UVs. Faces offset has yet to be found.

Below is his identification of the .SMI file of "c01f_a.smi"

There are quite a few meshes in that file.
There's a table at 0x1868 which contains the various offsets for each mesh.
Just as an example:

vertices at 0x2680 as Floats (stride = 16, some other meshes are 32) - number of entries is 684,
Normals at 0x5140 as Shorts (stride = 8),
UVs at 0x66a0 as Floats (stride = 8).

Faces are not stored that I can see


He went on to make a Noesis script to import them, but since faces offset has not been found, he did the idea of auto-generating triangle strips. This simplys deforms the model...

Image


Here is the link to script...
*Link Removed*

"...it draws all the meshes in the file. Some of it's guesswork ... I'm guessing either the faces are stored somewhere else or there's some weird formula to calculating them ... The UVs are also wrong..."

Like I said I in no way helped made this script all credit goes to, DKDave.

So any help on trying to make a script to view or export them to preferably OBJ will be highly appreciated.
Thanks.


Below I have attach the file i am trying to view, "c01f_a.smi". Along with other samples.


Attachments:
SAMPLES.zip [347.25 KiB]
Downloaded 25 times
MAIN FILE__c01f_a.zip [115.28 KiB]
Downloaded 27 times


Last edited by Biohazard4x on Tue Jan 05, 2021 6:25 am, edited 2 times in total.
Top
   
PostPosted: Sat Jan 02, 2021 5:50 am 
User avatar

Joined: Fri Jan 01, 2021 12:03 am
Posts: 5
I found more .smi models, way smaller in size of 5kb and smaller these have different offsets then describe then above though since these are smaller in size, so they will be easier to manage. Still trying to crack the code to properly open them!

Below I have Attached them...

Attachment:
dummy_models.zip [16.42 KiB]
Downloaded 28 times


Top
   
PostPosted: Sat Jan 02, 2021 8:37 pm 
User avatar

Joined: Fri Jan 01, 2021 12:03 am
Posts: 5
After more diving we have possibly found where faces offset is stored at in these models.
In this pic this is the unknown table we are having difficulty translating...

Image

it's just a case of how to interpret that table - each entry is 8 bytes, and the last byte of some entries is 0x80, which might indicate where to split the faces and start a new face.

Each mesh part always has this table, so it must be needed.


I've found where earlier in the model it points to this part of the model, specifically this unknown table.
In first model c01f_a at offset 1b68
this 3 byte array E0 66 03
convert to little endian and it points to this unknown table
same goes with the others file

dummy_model.smi - 0A30
cone.smi - 100


If anyone knows how to decipher this please let us know!


Top
   
PostPosted: Sun Jan 03, 2021 2:01 am 

Joined: Thu Aug 07, 2014 10:28 pm
Posts: 333
it looks like its auto generated strips with a draw flag.
look at my time splitters script for how to handle this.
https://forum.xentax.com/viewtopic.php?t=9994


Top
   
PostPosted: Sun Jan 03, 2021 1:07 pm 
User avatar

Joined: Mon Nov 23, 2020 6:01 pm
Posts: 17
Thanks, chrrox - useful info as always! So if the UInt64 value has bit 63 set, that and the previous 2 entries are not valid faces. There are some other flags in there that probably do something, as not everything is perfect yet.

But some objects look correct now, so at least it's making good progress:

Image

_________________
"You now stand on the cusp of two realities, about to leave all that you know behind. I have called many mortals here in ages past to call forth judgement and test the spirit in the hearts of men."


Top
   
PostPosted: Tue Jan 05, 2021 5:33 am 

Joined: Tue Sep 01, 2015 9:44 am
Posts: 90
The vertex position of the skinned model in this game needs to be multiplied by the corresponding bone matrix.
Thanks DKDave for the previous research. :)
The script is modified based on DKDave's version.
I added the parse of faces and skins, bones, and repaired vertex positions.

Edited:
Fixed material wrong.


Attachments:
fmt_trapt_ps2_smi.zip [2.24 KiB]
Downloaded 21 times
Top
   
PostPosted: Tue Jan 05, 2021 2:23 pm 
User avatar

Joined: Mon Nov 23, 2020 6:01 pm
Posts: 17
Thanks, Allen.

They don't make it easy, do they!!

_________________
"You now stand on the cusp of two realities, about to leave all that you know behind. I have called many mortals here in ages past to call forth judgement and test the spirit in the hearts of men."


Top
   
PostPosted: Wed Jan 06, 2021 1:12 am 

Joined: Tue Sep 01, 2015 9:44 am
Posts: 90
DKDave wrote:
Thanks, Allen.

They don't make it easy, do they!!


Indeed it is.
I think the hardest part is the position of the vertices of the two weights, which I couldn't figure out at first. At first I used boneMatrix1*pos1*weight1 + boneMatrix2*pos2*weight2 but always got the wrong position. Later, I carefully compared the data and found that the pos data of the local coordinates is the result of multiplying the weight, so I reversed the division, that is, (pos1/weight1) to get the correct local coordinates, and then multiply by boneMatrix1 to get the correct result.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 8 posts ] 

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Limited