Page 1 of 1

Initial D Special Stage .PAC 3D Files

Posted: Wed Oct 29, 2014 6:02 pm
by Argonaut
Extracted from an .AFS Archive, this is the standard model type for this game for cars/courses (.PAC) and I know it's been covered before with many other games but i've had no luck using the same tools on these. Can someone give me a hand? I'm sure this will be pretty quick compared to other things.

Sample course file (full size 2MB, not a large download, smallest one):

https://www.dropbox.com/s/elqkfwgnh8gzt ... Y.PAC?dl=0


And a sample car file (1MB):
https://www.dropbox.com/s/6gwyb6hk02cb2bt/FC3S.PAC?dl=0

Thanks!

Re: Initial D Special Stage .PAC 3D Files

Posted: Thu Nov 06, 2014 12:07 am
by barti
This QuickBMS script unpacks content from the PAC files:

Code: Select all

idstring "PAC\0"
get FILES long
get DUMMY long
get SSIZE long
getdstring FOLDERNAME 16

for i = 0 < FILES
    getdstring NAME 16
    get OFFSET long
    get SIZE   long
    get FOLDER long
    get DUMMY  long

    savepos TMP
    goto OFFSET
    getdstring SIGN 3
    if SIGN == "GIM"
	string NAME p= "%s.%s" NAME SIGN
    elif SIGN == "CMD"
        string NAME p= "%s.%s" NAME SIGN
    else
        string NAME += ".DAT"
    endif
    goto TMP

    log NAME OFFSET SIZE
next i
CMD files are models, and GIM files are textures. I can't find a program that can read them though.

Re: Initial D Special Stage .PAC 3D Files

Posted: Thu Nov 06, 2014 2:52 am
by chrrox
the cmd looks like a modified version of folklore's model format.

Re: Initial D Special Stage .PAC 3D Files

Posted: Fri Nov 07, 2014 1:30 am
by Argonaut
chrrox wrote:the cmd looks like a modified version of folklore's model format.
Cheers for both of your replies guys, didn't expect this to take off so quickly :) That script functions perfectly on the car Models but only creates .dats and .gims on the Course. All the dats feature the same header here: (It also produces correct file names IE lodxx and named objects, which is nice I guess)

Image

With a few pointers to a program which could read folklore's model format (to be used on these if the modifications aren't too extensive), I could get the car models and textures working just fine.

Here's a sample .dat LOD file just incase you can identify the file's header. Thanks for your input! :]

https://www.dropbox.com/s/mj4aybneigehx ... 1.DAT?dl=0

EDIT: In addition, Noesis won't read the produced .gim files for either car or course model. Hmm. :constipated:

Re: Initial D Special Stage .PAC 3D Files

Posted: Fri Nov 07, 2014 2:37 pm
by barti
The .dat file looks like it might be encrypted - "SMD" could be a garbled version of "CMD" and "KINA_NI˙T254_000" looks like it might be some kind of a model or material name.

Re: Initial D Special Stage .PAC 3D Files

Posted: Wed Apr 08, 2015 7:11 pm
by KarinFutoGT
So you can open the car models and textures? And how extract the .afs?
:keke:

Re: Initial D Special Stage .PAC 3D Files

Posted: Sun Sep 12, 2021 8:43 pm
by Neitancrost
Hi there. So, I was able to decompress these course files and I tried to create a Noesis script to read them, but I found 2 problems : faces seem to be stored as vif tags (something idk how to handle) and some submeshes have broken and inconsistent data (what seems to be vif tags in the middle of vertices content and some incomprehensible amounts of data).

Samples and script:
https://www.mediafire.com/file/s3xm6pjl ... t.rar/file
-crs00: it has a bunch of broken submeshes, for instance the meshes at 0x0310d0 and 0x03ad80
-crs44: it has no broken submeshes
-treeLrg_L01: simple file with 1 mesh

Note: I had better results with autogenerated Quads than auto tristrip. Also, I noticed that every submesh has a type of content that I couldn't find out what it is, like the one at 0x01b4 in treeLrg_L01.