Jump to content

Reckless Racing (iOS) - VFS files


black_racer
Go to solution Solved by Durik256,

Recommended Posts

  • Engineer
  • Solution
8 hours ago, black_racer said:

Hello guys, please help to create QuickBMS script to uncompress and unpack this VFS format. 

 

Sample file: pak01.zip

my plugin for vfs work with your file

EDIT: and i made preview plugin for *.sggr fmt_sggr.py (*.pvr its image, use pvrTexTool)

bandicam-2024-09-11-21-54-53-822.gif1.png

 

Edited by Durik256
  • Like 1
Link to comment
Share on other sites

  • ikskoks changed the title to Reckless Racing (iOS) - VFS files

 

22 minutes ago, Durik256 said:

not quite sure about uvs, try ofs 17 for U and ofs 21 for V, (all as Short) 

sample for 4e153346.SGGR

1.png

Thank you, I’m not very familiar with Noesis and Python, but I’ll try to figure it out. I have another question: how can I split a model into segments, like by a specific material or texture?

 

In addition to the basic textures, the game has static shadow map, maybe this map in UV2? Or planar projector shadow in the map, created game engine?

shadowMap.png

Edited by black_racer
Link to comment
Share on other sites

On 9/13/2024 at 11:27 AM, testing4562145 said:

the engine is always the same for both polarbit games and pixelbite, but some of them have model files in .dat format that weren't renamed

Thanks, I'll see it.

 

Updated noesis script, added partial support UV`s, this does not work completely correctly, the UV size has to be set manually.

Thank you very much @Durik256 for your help

from inc_noesis import *

def registerNoesisTypes():
    handle = noesis.register("Reckless Racing", ".sggr")
    noesis.setHandlerTypeCheck(handle, noepyCheckType)
    noesis.setHandlerLoadModel(handle, noepyLoadModel)
    return 1

def noepyCheckType(data):
    if data[:4] != b'\x4D\x3C\x2B\x1A': 
        return 0
    return 1

def noepyLoadModel(data, mdlList):
    bs = NoeBitStream(data)
    ctx = rapi.rpgCreateContext()

    ofs_res = data.find(b'#RES')
    if ofs_res != -1:
        bs.seek(ofs_res + 44)
        unk, vnum, zero = bs.read('3I') 
        skip = 12 if unk == 4368 else 0
        vbuf = b''
        vbuf, uvbuf = b'', b''#bs.read(vnum*24)
        for x in range(vnum):
            bs.seek(2,1)
            vbuf += bs.read(2)
            bs.seek(2,1)
            vbuf += bs.read(2)
            bs.seek(2,1)
            vbuf += bs.read(2)
            bs.seek(5,1)#4
            uvbuf += bs.read(2)
            bs.seek(2,1)
            uvbuf += bs.read(2)
            bs.seek(1,1)#2
            bs.seek(skip,1)#12+
        rapi.rpgBindPositionBuffer(vbuf, noesis.RPGEODATA_SHORT, 6)
        rapi.rpgBindUV1Buffer(uvbuf, noesis.RPGEODATA_USHORT, 4)

        u0, inum, u1 = bs.read('3I')
        ibuf = bs.read(inum * 2)
        rapi.rpgCommitTriangles(ibuf, noesis.RPGEODATA_USHORT, inum, noesis.RPGEO_TRIANGLE)

    try:
        mdlList.append(rapi.rpgConstructModel())
    except:
        mdlList.append(NoeModel())

    return 1

 

Edited by black_racer
Link to comment
Share on other sites

2 hours ago, testing4562145 said:

i get unexpected ident error with the updated script

I edited and checked.

Now its works

There are several problems: 
 - With the type of meshes, it seems that in the example of street lights and electric lines, the script reads the Lod model. (The second screen example is a 3d ripper, but the UVs are also broken.)

- Also with read the size of the UVs

 

 

Screenshot_3.png

Screenshot_4.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...