Important information: this site is currently scheduled to go offline indefinitely by end of the year.

Initial D Special Stage .PAC 3D Files

Post questions about game models here, or help out others!
Post Reply
User avatar
Argonaut
beginner
Posts: 22
Joined: Thu Sep 11, 2014 8:19 pm
Has thanked: 3 times
Been thanked: 10 times

Initial D Special Stage .PAC 3D Files

Post 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!
Moving Shadow- World Domination!
barti
veteran
Posts: 148
Joined: Sun Apr 01, 2012 12:44 pm
Has thanked: 51 times
Been thanked: 102 times

Re: Initial D Special Stage .PAC 3D Files

Post 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.
chrrox
Moderator
Posts: 2602
Joined: Sun May 18, 2008 3:01 pm
Has thanked: 57 times
Been thanked: 1422 times

Re: Initial D Special Stage .PAC 3D Files

Post by chrrox »

the cmd looks like a modified version of folklore's model format.
User avatar
Argonaut
beginner
Posts: 22
Joined: Thu Sep 11, 2014 8:19 pm
Has thanked: 3 times
Been thanked: 10 times

Re: Initial D Special Stage .PAC 3D Files

Post 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:
Moving Shadow- World Domination!
barti
veteran
Posts: 148
Joined: Sun Apr 01, 2012 12:44 pm
Has thanked: 51 times
Been thanked: 102 times

Re: Initial D Special Stage .PAC 3D Files

Post 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.
KarinFutoGT
advanced
Posts: 51
Joined: Fri Apr 06, 2012 6:04 pm
Location: SPAIN
Has thanked: 51 times
Been thanked: 6 times
Contact:

Re: Initial D Special Stage .PAC 3D Files

Post by KarinFutoGT »

So you can open the car models and textures? And how extract the .afs?
:keke:
Neitancrost
ultra-n00b
Posts: 4
Joined: Wed May 29, 2019 12:21 pm
Has thanked: 1 time
Been thanked: 2 times

Re: Initial D Special Stage .PAC 3D Files

Post 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.
Post Reply