Initial D Special Stage .PAC 3D Files

Skeletons, animations, shaders, texturing, converting, fixing and anything else related to read game models
Argonaut
Posts: 46
Joined: Sat Sep 27, 2014 10:24 pm

Initial D Special Stage .PAC 3D Files

Post by Argonaut »

Posted this on Xentax aswell, might aswell see if anyone here could solve this aswell. :)
------------------------------------------------------
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!
TGE
Posts: 38
Joined: Sat Dec 20, 2014 5:14 pm

Re: Initial D Special Stage .PAC 3D Files

Post by TGE »

The models use PS2 VIF tags
Argonaut
Posts: 46
Joined: Sat Sep 27, 2014 10:24 pm

Re: Initial D Special Stage .PAC 3D Files

Post by Argonaut »

TGE wrote:The models use PS2 VIF tags


And how could I use these to extract the models? Bit clueless but point me somewhere and I will go..
TGE
Posts: 38
Joined: Sat Dec 20, 2014 5:14 pm

Re: Initial D Special Stage .PAC 3D Files

Post by TGE »

Basically the models are built up kinda like this:

starting from 0x1B4 in FC3S_Fspoile00.CMD
XX YY ZZ WW
XX being some ID
YY being some flag
ZZ being the amount of data
WW being the type of data

types of data I've seen are:
0x6C = vector4
xyz float + vif compressed tristrip
0x20 = some info
0x68 = vector3
xyz float, I'm assuming normals
0x74 = vector2
texture uv float

I also wrote a script to extract the pac files

Code: Select all

#PAC_InitialD.BMS
#Initial D Special Stage .PAC
#Script by TGE
endian little
idstring "PAC\0"
get FILES long
get UNK long #null?
get UNK long
getdstring PACNAME 0x10
for i = 0 < FILES
   getdstring NAME 0x10
   get OFFSET long
   get SIZE long
   get FILETYPE long
   get CMPFLAG long
   IF FILETYPE == 1
      string NAME += .GIM
   EndIF
   IF FILETYPE == 3
      string NAME += .CMD
   EndIF
   log NAME OFFSET SIZE
next i