black_racer Posted 13 hours ago Posted 13 hours ago Hello guys, I need help to the correct read UV`s and Textures, from the Reckless Racing game. Earlier, durik256 helped me read the mesh format and some UV data from the *.sggr format, but to this day I haven’t been able to figure out the UV scaling and materials. Here’s the link to the discussion: https://reshax.com/topic/1067-reckless-racing-ios-vfs-files/ Below is the Noesis script for reading the mesh data. Script have two problems: - Sometimes the script reads the LOD versions of the mesh models. - It also doesn’t read the UV scale, and the mesh isn’t split by materials. I’m asking for your help in updating this script. 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 1
Engineers shak-otay Posted 13 hours ago Engineers Posted 13 hours ago Hello, you really should put more effort in your request. People who could help don't have all the time in the world, to unpack a vfs, search for the sggr in question, which samples have the "lod problem", etc, etc. WHY not simply upload the samples in question plus a description what EXACTLY you've done so far to get uvs. Your post here is not very insightful, imho. 1
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now