XeNTaX Forum Index
Forum MultiEx Commander Tools Tools Home
It is currently Sat Nov 18, 2017 10:38 pm

All times are UTC + 1 hour


Forum rules


Please click here to view the forum rules



Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Initial D Extreme Stage [PS3]
PostPosted: Thu Feb 25, 2016 8:24 pm 
Offline
advanced
User avatar

Joined: Sat Jun 27, 2015 1:20 pm
Posts: 49
Has thanked: 30 times
Have thanks: 43 times














You can make the ads go away by registering

Image

Hi guys, maybe you can help me get 3D models of cars and tracks from the game InitialD Extreme Stage?)
There is some success in extracting archives,
All textures are able to extract from the archives in the DDS format using file ripper
Image

And maybe unpack archives (possible container) using this BMS script:
Code:
# AFS archives (used on some Xbox games) (script 0.1.1a)
# script for QuickBMS http://quickbms.aluigi.org

idstring "AFS"
get DUMMY byte  # it's usually 0 but in some files (MULTSPQ2.AFS) it may be different
get FILES long
savepos INFO_OFF

math NAME_OFF = FILES
math NAME_OFF *= 8
math NAME_OFF += INFO_OFF
goto NAME_OFF
get NAME_OFF long
goto INFO_OFF

for i = 0 < FILES
    get OFFSET long
    get SIZE long

   if NAME_OFF == 0
      set NAME string ""
   else
      savepos INFO_OFF
      goto NAME_OFF
      getdstring NAME 32
      getdstring DUMMY 16
      savepos NAME_OFF
      goto INFO_OFF
   endif

    log NAME OFFSET SIZE
next i


I put the game files for the attempts to extract 3d models:
Cars archive: https://www.dropbox.com/s/xho8nnna9il7ph2/car.afs?dl=0
This presumably 3d models tuning parts that are not packed: https://www.dropbox.com/s/1mkq0ot48voomkz/BOOST_UP.efo?dl=0


Top
 Profile  
 
 Post subject: Re: Initial D Extreme Stage [PS3]
PostPosted: Thu Oct 13, 2016 7:39 pm 
Offline
advanced
User avatar

Joined: Sun Sep 06, 2015 1:40 am
Posts: 40
Has thanked: 125 times
Have thanks: 20 times
This is cool i have the game but never finished it, too hard for me :P Congrats for getting the textures though :)


Top
 Profile  
 
 Post subject: Re: Initial D Extreme Stage [PS3]
PostPosted: Thu Oct 13, 2016 8:58 pm 
Offline
M-M-M-Monster veteran
M-M-M-Monster veteran
User avatar

Joined: Fri Apr 20, 2012 9:24 am
Posts: 2154
Location: Nexus, searching for Jim Kirk
Has thanked: 425 times
Have thanks: 1099 times
efo-model:


Attachments:


You do not have the required permissions to view the files attached to this post. Register to gain access.


_________________
"you can't always get things served on a silver tray"
extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip

"We are Microsoft. You will be assimilated. Resistance is Futile."


Top
 Profile  
 
 Post subject: Re: Initial D Extreme Stage [PS3]
PostPosted: Fri Oct 14, 2016 9:55 pm 
Offline
advanced
User avatar

Joined: Sat Jun 27, 2015 1:20 pm
Posts: 49
Has thanked: 30 times
Have thanks: 43 times
It is excellent!
Aluigi is helped with a BMS script to extract the *afs :
Code:
# Initial D Extreme Stage
# script for QuickBMS http://quickbms.aluigi.org

math OFFSET_LIMIT = -1
for i = 0
    savepos TMP
    if TMP == OFFSET_LIMIT
        break
    endif
    get OFFSET long
    if i == 0
        math OFFSET_LIMIT = OFFSET
    endif
    get SIZE long
    get NAME string
    log NAME OFFSET SIZE
next i

How to get game resources: Extract *afs archive with QuickBMS Script (one post) or AFSExplorer Tool > Extract from container *efo with QuickBMS Script in this post.

I was able to learn that *efo may contain geometry or dds textures.
For extracting dds textures from texture.efo using X-Ripper.

Maybe someone has the skill to write a generic script for extracting 3d models?


Top
 Profile  
 
 Post subject: Re: Initial D Extreme Stage [PS3]
PostPosted: Tue Jun 27, 2017 2:31 pm 
Offline
ultra-n00b

Joined: Tue Jun 27, 2017 2:21 pm
Posts: 1
Has thanked: 0 time
Have thanks: 0 time
I find InitialD arcade stage(6) resource file. but filetype is different(xaf)
https://mega.nz/#!jBR0EAyD!d8XFF5_WTS6T ... d_NoFeIr8I
someone extract this?


Top
 Profile  
 
 Post subject: Re: Initial D Extreme Stage [PS3]
PostPosted: Sun Jul 02, 2017 12:39 pm 
Offline
M-M-M-Monster veteran
M-M-M-Monster veteran
User avatar

Joined: Fri Apr 20, 2012 9:24 am
Posts: 2154
Location: Nexus, searching for Jim Kirk
Has thanked: 425 times
Have thanks: 1099 times
offzip didn't reveal senseful data but you can search for "YABX" or "yabukita::Object" in car.xaf, which are present 400 times
There's an uncompressed block at 0x17F000 for example:
(sry for cutting his left arm mesh :D )

btw: cut/copied that 16 kB block into a separate file, so offset 0x17F000 -> 0x0000


Attachments:


You do not have the required permissions to view the files attached to this post. Register to gain access.


_________________
"you can't always get things served on a silver tray"
extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip

"We are Microsoft. You will be assimilated. Resistance is Futile."


Top
 Profile  
 
 Post subject: Re: Initial D Extreme Stage [PS3]
PostPosted: Sun Aug 06, 2017 7:22 pm 
Offline
veteran
User avatar

Joined: Thu Mar 10, 2011 8:03 am
Posts: 138
Location: Jakarta, Indonesia
Has thanked: 63 times
Have thanks: 41 times
I am interested in this. Any workaround to a method for extracting the .xaf file? I tried the game on my pc and it's suprisingly good. Would be great to have the track models too.


Top
 Profile  
 
 Post subject: Re: Initial D Extreme Stage [PS3]
PostPosted: Thu Nov 09, 2017 10:19 am 
Offline
advanced
User avatar

Joined: Sat Jun 27, 2015 1:20 pm
Posts: 49
Has thanked: 30 times
Have thanks: 43 times
Hi guys, I have not been here for a long time, there was a problem with my hardware iMac ))
I tried to write a script on Noesis, and I have some success, but the script contains a lot of mistakes ...
This script works with InitialD Extreme Stage/ InitialD Arcade Stage 6AA / InitialD Arcade Stage 7AAX and InitialD Arcade Stage 8 Infinity with *.efo containers that contain meshes and textures.

At the moment the script does not work correctly, it reads not the hex offset in the files but it looks for the content labels
I could not fully understand the structure. * .efo, who knows how to handle hex, I will be glad to any help and advice in search of the necessary displacements and decoding of the structure.

Currently, the script reads only files containing single models (not group models)

Code:
from inc_noesis import *
import noesis
import rapi

def registerNoesisTypes():
    handle = noesis.register("InitialD", ".efo")
    noesis.setHandlerTypeCheck(handle, noepyCheckType)
    noesis.setHandlerLoadModel(handle, noepyLoadModel)
    #noesis.logPopup()
    return 1

NOEPY_HEADER = "YABX"
   
def noepyCheckType(data):
   bs = NoeBitStream(data)
   if len(data) < 4:
      return 0
   if bs.readBytes(4).decode("ASCII").rstrip("\0") != NOEPY_HEADER:
      return 0
   return 1 


def noepyLoadModel(data, mdlList):
    ctx = rapi.rpgCreateContext()
    bs = NoeBitStream(data)
    fileName = rapi.getLocalFileName(rapi.getInputName()).rstrip(".efo")
    print("File Name: " + str(fileName))
       
        #Texture Name
    #bs.seek(0x3573, NOESEEK_ABS)
    #textureNamesize = bs.readUShort()
    #textureName = bs.readBytes(textureNamesize).decode("ASCII").rstrip("\0")
    #rapi.rpgSetName(textureName)
    #print("Texture Name: " + str(textureName))
    rapi.rpgSetName("bodyD16")   # Texture Name FIX IT
           
    # myString = bs.readBytes(len(data))
    # essd = myString.find(b"\x65\x73\x73\x64")
    # bs.seek(essd - 0x4, NOESEEK_ABS)
    # skipessd = bs.readUInt()
    # skip = bs.readBytes(essd)
   
    myString1 = bs.readBytes(len(data))
    myIndex1 = myString1.find(b"\x27\x06\x00\x00\x00\x01\x00\x00\x00\x1A\x27\x04")   ##FIX IT
   
    myString2 = bs.readBytes(len(data))
    myIndex2 = myString2.find(b"\x47\x65\x6F\x6D\x30")                                                 ##FIX IT
   
        #Face Counts     
    bs.seek(myIndex1, NOESEEK_ABS)       
    skip = bs.readBytes(23)
    #bs.seek(9E5, NOESEEK_ABS)
    FaceCount = bs.readUInt()
    FaceBuffer = bs.readBytes(FaceCount * 2)
    print("Face Counts: " + str(FaceCount))
           
    bs.seek(myIndex2, NOESEEK_ABS)       
    skip = bs.readBytes(24)
   
        #UV Vertex Stride
    VertexStride = bs.readUInt() 
    print("UV Vertex Stride :" + str(VertexStride ))
    bs.seek(myIndex2, NOESEEK_ABS)
    skip = bs.readBytes(8)
    size = bs.readUInt()
    skip = bs.readBytes(size)
    skip = bs.readBytes(10)
   
        #Vertex Counts
    VertexCount = bs.readUInt()
    print("Vertex Count :" + str(VertexCount))               
    VertexBuffer = bs.readBytes(VertexCount * VertexStride)
    if VertexStride == 12:
        rapi.rpgBindPositionBufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 12, 0) ## FIX IT
        rapi.rpgBindNormalBufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 12, 16)
        rapi.rpgBindUV1BufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 12, 20)
    elif VertexStride == 16:
        rapi.rpgBindPositionBufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 16, 0) ## FIX IT
        rapi.rpgBindNormalBufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 16, 16)
        rapi.rpgBindUV1BufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 16, 20)
    elif VertexStride == 20:
        rapi.rpgBindPositionBufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 20, 0) ## FIX IT
        rapi.rpgBindNormalBufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 20, 16)
        rapi.rpgBindUV1BufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 20, 28)
    elif VertexStride == 24:
        rapi.rpgBindPositionBufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 24, 0)
        rapi.rpgBindNormalBufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 24, 8)
        rapi.rpgBindUV1BufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 24, 16)   
    elif VertexStride == 28:
        rapi.rpgBindPositionBufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 28, 0) ## FIX IT
        rapi.rpgBindNormalBufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 28, 24)
        rapi.rpgBindUV1BufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 28, 36)         
    elif VertexStride == 32:
        rapi.rpgBindPositionBufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 32, 0)
        rapi.rpgBindNormalBufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 32, 12)
        rapi.rpgBindUV1BufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 32, 24)
    elif VertexStride == 36:
        rapi.rpgBindPositionBufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 36, 0)
        rapi.rpgBindNormalBufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 36, 16)
        rapi.rpgBindUV1BufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 36, 28)
    elif VertexStride == 40:
        rapi.rpgBindPositionBufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 40, 0)
        rapi.rpgBindNormalBufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 40, 20)
        rapi.rpgBindUV1BufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 40, 32)
    elif VertexStride == 44:
        rapi.rpgBindPositionBufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 44, 0)
        rapi.rpgBindNormalBufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 44, 24)
        rapi.rpgBindUV1BufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 44, 36)
    elif VertexStride == 56:
        rapi.rpgBindPositionBufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 56, 0)
        rapi.rpgBindNormalBufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 56, 12)
        rapi.rpgBindUV1BufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 56, 24)
    elif VertexStride == 60:
        rapi.rpgBindPositionBufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 60, 0)
        rapi.rpgBindNormalBufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 60, 16)
        rapi.rpgBindUV1BufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 60, 28)
    elif VertexStride == 64:
        rapi.rpgBindPositionBufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 64, 0)
        rapi.rpgBindNormalBufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 64, 20)
        rapi.rpgBindUV1BufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 64, 32)
    elif VertexStride == 68:
        rapi.rpgBindPositionBufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 68, 0)
        rapi.rpgBindNormalBufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 68, 24)
        rapi.rpgBindUV1BufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 68, 36)
    else:
        print("This mesh not yet supported")

    rapi.rpgCommitTriangles(FaceBuffer, noesis.RPGEODATA_USHORT, FaceCount, noesis.RPGEO_TRIANGLE_STRIP, 1) #SHORT for word indices
    #rapi.rpgSetOption(noesis.RPGOPT_TRIWINDBACKWARD, 1) #Flip Mesh
    mdl = rapi.rpgConstructModel()                                                         
    mdlList.append(mdl)
    rapi.rpgClearBufferBinds()
    return 1
   


Image Image

several primitive models for tests here:
https://www.dropbox.com/s/geejzobp9m6yw ... 6.zip?dl=0

example structure cube.efo
I was not able to find the offset at the beginning of the file to these blocks, I can not understand where they can be in * .efo (((
Image


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

All times are UTC + 1 hour


Who is online

Users browsing this forum: fryzz7, JohnMadden, lolbas, martyisnothere, Ohlamy and 5 guests


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:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group