Engineer Durik256 Posted May 31, 2024 Engineer Posted May 31, 2024 (edited) 8 hours ago, h3x3r said: I mean decompress and read decompressed buffer. I think noesis can do that right? code: Spoiler def CkeckType(data): if data[:4] != b'TPEK': return 0 if unpack_scx(data)[:4] != b'INVO': return 0 return 1 def unpack_scx(data): # your unpack code return unpack_data def LoadModel(data, mdlList): bs = NoeBitStream(unpack_scx(data)) # other code/ create model return 1 Edited May 31, 2024 by Durik256
Engineer h3x3r Posted May 31, 2024 Engineer Posted May 31, 2024 Well i did but it throw error. RuntimeError: Tried to set offset beyond buffer size. (2054986872 > 107774) def noepyCheckType(data): if data[:4] != b'TEPK': return 0 if unpack_scx(data)[:4] != b'INVO': return 0 return 1 def unpack_scx(data): bs = NoeBitStream(data) bs.read(4) Chunks = bs.readUInt() for i in range(Chunks): ChunkOffset = bs.readUInt() ChunkDecSize = bs.readUInt() ChunkComSize = bs.readUInt() EoT = bs.tell() bs.seek(ChunkOffset, NOESEEK_ABS) compData = bs.readBytes(ChunkComSize) data += rapi.decompInflate(compData, ChunkDecSize) bs.seek(EoT, NOESEEK_ABS) return unpack_data def noepyLoadModel(data, mdlList): bs = NoeBitStream(unpack_scx(data)) Should i also add handler for unpack_scx?
Engineer Durik256 Posted May 31, 2024 Engineer Posted May 31, 2024 (edited) 1 hour ago, h3x3r said: Well i did but it throw error. RuntimeError: Tried to set offset beyond buffer size. (2054986872 > 107774) Should i also add handler for unpack_scx? at a minimum you are returning a non-existent "unpack_data" and adding the unpacked data back into the data. Here's what I saw with a quick inspection. I'll quickly adapt my unpacker for this. it works: Spoiler #by Durik256 from inc_noesis import * def registerNoesisTypes(): handle = noesis.register("Ridge Racer Slipstream ", ".SCX") noesis.setHandlerTypeCheck(handle, noepyCheckType) noesis.setHandlerLoadModel(handle, noepyLoadModel) return 1 def noepyCheckType(data): if data[:4] != b'TEPK': return 0 if unpack_scx(data)[:4] != b'INVO': return 0 return 1 def unpack_scx(data): bs = NoeBitStream(data) export_data = b'' bs.seek(4) # TEPK num = bs.readUInt() print('num:',num) for x in range(num): offset, decSize, comSize = bs.read('3I') print(offset,decSize,comSize) cpos = bs.tell() bs.seek(offset) data = bs.read(comSize) export_data += rapi.decompInflate(data, decSize) bs.seek(cpos) return export_data def noepyLoadModel(data, mdlList): bs = NoeBitStream(unpack_scx(data)) return 1 Edited May 31, 2024 by Durik256 1
Engineer h3x3r Posted May 31, 2024 Engineer Posted May 31, 2024 (edited) Thank you. It works. EDiT: i just noticed i am wrong with template and script. I must rewrite it. There is change in table struct. 1 entry consist 2 int32 from which first is type and second offset. EDiT: Updated previous script. Now it should open any car file without unpacking. Scene files have diff struct so i don't want bother with it. Also checked textures but they are mess. I can preview most of them but some of them are still off. Most likely there is involved some PVR code. My best bet could be PVRTexTool... Also i would like to thanks durik for decompression code. Edited June 2, 2024 by h3x3r
FengoVolkov Posted June 2, 2024 Posted June 2, 2024 You can use aluigi's offzip to decompress them offzip -a -1 <input file> <output folder> -0 Every single one of the files are compressed. The SCN files, ie "0harbourline_765_CW.SCN" have the locations of each object as well. Which, are also needing to decompressed with offzip. It's just plain text once decompressed. I'm not sure what the FOG, PE, SP2, and SPL2, files are. They are also all plaintext, the .TEX files are also plaintext, but they contain each of track objects textures and what is supposed to be applied to them. One of the UVs is for the material, one of the UVs is for the diffuse. And, for what it's worth, I didn't actually thread existed, I had been using offzip and 3D Object Converter, which converted all of my SCX files to OBJ. That's all well and good, but I lose one of the UVs in doing that, so I can only apply the lightmap, but not the diffuse. Which kind of defeats the purpose. Plus the scale the models are converted to is COMPLETELY off, so the SCN location data becomes completely useless as well.
UndercoverBoy833 Posted June 4, 2024 Author Posted June 4, 2024 (edited) On 6/1/2024 at 4:07 AM, h3x3r said: Also checked textures but they are mess. I can preview most of them but some of them are still off. Most likely there is involved some PVR code. My best bet could be PVRTexTool... for some reason importing Ridge Racer Slipstream textures doesn't work for me. It gives me this error. and I'm using latest version of PVRTexTool EDIT: okay I figured out a solution from Fengo that it's a compressed pvr file, I have to use offzip to decompress it and open it in PVRTextool which now it works Edited June 4, 2024 by UndercoverBoy833
FengoVolkov Posted June 4, 2024 Posted June 4, 2024 I've attached some files pertaining to the scenes. I've got all of my Slipstream models decompressed for ease of use, I had used 3D Object Converter, cause nothing here worked, but 3D Object Converter does not support two UV maps. It seems that UV1 is for the lightmap, and UV2 is for the diffuse. So included with the *.SCX file is a *.TEX file, which is just plain text, and one *.SCN file which is also plain text, but it is one of the more important files, as all the track parts are imported to origin and the SCN has object transformation data and where the actual mesh files are supposed to be located. I had started to put the files together manually, but realised the UVs were only for the lightmaps, which would require me to manually redo the mapping for every single object, which is just.. not something I want to do, or think I have the skill to actually do, UV Mapping is a bit of an art, one that I am not.. great at. Quote vertices (float) normals (float) UV map 1 (float) UV map 2 (float) minimap meshes are 36 stride, cars is 32, courses is 40 Some additional details from a friend about the format. I've gone ahead and already decoded it with aluigi's offzip as I had mentioned previously. Hopefully this is helpful. SCN+More.zip
UndercoverBoy833 Posted June 7, 2024 Author Posted June 7, 2024 (edited) oh boy, time to rearrange every Ridge Racer Unbounded car model submeshes out from this mess, (I'm using Durik's noesis plugin of Unbounded .vhcl file). Textures .bmap is basically dds file with extra headers so deleting those headers should be able to open it in image editor. EDIT: at least I can rearrange it myself using the base it has so wish me luck. Edited June 7, 2024 by UndercoverBoy833
UndercoverBoy833 Posted June 24, 2024 Author Posted June 24, 2024 (edited) since I finally have dumped Critical Velocity which is a Japanese spin-off game of the Ridge Racer series for the PS2, thx to ikskoks's bms script posted here, is there anyone who can look into this car samples? .pac could be the model and .erp would be the texture oh btw I've already checked in xentax archived post regarding someone asked for Ridge Racer Driftopia game dumping but no one looked into it. car.7z Edited June 24, 2024 by UndercoverBoy833
UndercoverBoy833 Posted July 2, 2024 Author Posted July 2, 2024 more sample files on Critical Velocity Sprout carsprout sample car.7z
UndercoverBoy833 Posted August 19, 2024 Author Posted August 19, 2024 So I wanna bump my own topic after a while and about Ridge Racer Unbounded .vhcl. Since it is a bugbear asset, one plugin I knew was for Wreckfest, Fengo did modified the Wreckfest plugin to support Ridge Racer Unbounded model. So I think I wanna post his example of how it was done. Ridge Racer Slipstream model plugin works as intended (compressed version) but the model was too big in 3d workspace after I imported to blender. Would anyone tend to change it to size 1:1? 1
UndercoverBoy833 Posted October 26, 2024 Author Posted October 26, 2024 So I've tried using Wreckfest (bugbear) blender plugin for importing Ridge Racer Unbounded assets and it partially works but has missing body/chassis parts and no UVs. The example above is Fengo edited the plugin to import Ridge Unbounded fully tho it still doesn't have UVs. Preview of Ridge unbounded car model using Wreckfest plugin
BluBlu Posted November 11, 2024 Posted November 11, 2024 On 1/31/2024 at 6:22 AM, UndercoverBoy833 said: test import of RR7 maps/areas, probably because the addon script code for map ARCL format is unchanged Hi, I'm interested in importing maps from RR6/7, would it be possible to have this plugin? Thanks.
UndercoverBoy833 Posted December 21, 2024 Author Posted December 21, 2024 On 11/11/2024 at 7:36 AM, BluBlu said: Hi, I'm interested in importing maps from RR6/7, would it be possible to have this plugin? Thanks. this should do it https://github.com/GreenTrafficLight/Ridge-Racer-Blender-Addon
boyserOne Posted January 16 Posted January 16 sorry for the stupid question guys, i am trying to get texture from RR7 cars can someone please explain how you got the R7T from the TEX files? (tex file without an extension)
UndercoverBoy833 Posted January 16 Author Posted January 16 (edited) 3 hours ago, boyserOne said: sorry for the stupid question guys, i am trying to get texture from RR7 cars can someone please explain how you got the R7T from the TEX files? (tex file without an extension) You need quickbms in order to do that. QuickBMS script code by h3x3r: ############################ # Ridge Racer 7 tex unpack # ############################ endian big get baseFileName basename idstring "RPT" getdstring dummy 0xD savepos baseOffset get files uint32 for i = 0 < files get offset uint32 math offset + baseOffset savepos tmp goto offset getdstring dummy 0x8 get fileId uint32 getdstring dummy 0x18 get size uint32 math size + 40 string name p= "%s/%u.r7t" baseFileName fileId log name offset size goto tmp next i I also have the alternative code for QuickBMS script ############################ # Ridge Racer 7 tex unpack # ############################ endian big get baseFileName basename get Magic uint32 if Magic == 1380996096 # RPT getdstring dummy 0xC savepos baseOffset get files uint32 elif Magic == 1098015564 # ArcL get files uint32 getdstring dummy 0x8 savepos baseOffset elif Magic == 1346454347 # PACK get files uint32 endif for i = 0 < files if Magic != 1346454347 get offset uint32 math offset + baseOffset savepos tmp else get offset uint32 get fileNum uint32 get fileSize uint32 savepos tmp endif goto offset getdstring dummy 0x8 get fileId uint32 getdstring dummy 0x18 get size uint32 math size + 40 string name p= "%s/%u.r7t" baseFileName fileId log name offset size goto tmp next i so just use any one of them which works fully for you. Edited January 16 by UndercoverBoy833
UndercoverBoy833 Posted January 17 Author Posted January 17 so anyone had any luck on ripping Ridge Racer Unbounded models as the model format .vhcl was Bugbear asset? I knew the blender plugin of Wreckfest exists to import assets and supports the model, but not fully enough for Ridge Racer Unbounded formats as I've tested it a while ago. Same for Ridge Racer Driftopia archive which I'm curious how many cars were and what were look like. the reason I'm asking is so that I can port cars to other racing games as mods. I did tried use Ninja ripper for Unbounded models, however I couldn't get the result that I need for. I also did tried to import Critical Velocity model that's fine, but the parts in the 3d view are kinda a mess to see.
boyserOne Posted January 17 Posted January 17 4 hours ago, UndercoverBoy833 said: so anyone had any luck on ripping Ridge Racer Unbounded models as the model format .vhcl was Bugbear asset? I knew the blender plugin of Wreckfest exists to import assets and supports the model, but not fully enough for Ridge Racer Unbounded formats as I've tested it a while ago. Same for Ridge Racer Driftopia archive which I'm curious how many cars were and what were look like. the reason I'm asking is so that I can port cars to other racing games as mods. I did tried use Ninja ripper for Unbounded models, however I couldn't get the result that I need for. I also did tried to import Critical Velocity model that's fine, but the parts in the 3d view are kinda a mess to see. worked! thank you very much
UndercoverBoy833 Posted January 28 Author Posted January 28 On 1/17/2025 at 12:26 PM, UndercoverBoy833 said: so anyone had any luck on ripping Ridge Racer Unbounded models as the model format .vhcl was Bugbear asset? I knew the blender plugin of Wreckfest exists to import assets and supports the model, but not fully enough for Ridge Racer Unbounded formats as I've tested it a while ago. Same for Ridge Racer Driftopia archive which I'm curious how many cars were and what were look like. the reason I'm asking is so that I can port cars to other racing games as mods. I did tried use Ninja ripper for Unbounded models, however I couldn't get the result that I need for. I also did tried to import Critical Velocity model that's fine, but the parts in the 3d view are kinda a mess to see. On 1/17/2025 at 5:14 PM, boyserOne said: worked! thank you very much well you quote my wrong message when it should be this quoted solution below On 1/16/2025 at 10:33 PM, UndercoverBoy833 said: You need quickbms in order to do that. QuickBMS script code by h3x3r: ############################ # Ridge Racer 7 tex unpack # ############################ endian big get baseFileName basename idstring "RPT" getdstring dummy 0xD savepos baseOffset get files uint32 for i = 0 < files get offset uint32 math offset + baseOffset savepos tmp goto offset getdstring dummy 0x8 get fileId uint32 getdstring dummy 0x18 get size uint32 math size + 40 string name p= "%s/%u.r7t" baseFileName fileId log name offset size goto tmp next i I also have the alternative code for QuickBMS script ############################ # Ridge Racer 7 tex unpack # ############################ endian big get baseFileName basename get Magic uint32 if Magic == 1380996096 # RPT getdstring dummy 0xC savepos baseOffset get files uint32 elif Magic == 1098015564 # ArcL get files uint32 getdstring dummy 0x8 savepos baseOffset elif Magic == 1346454347 # PACK get files uint32 endif for i = 0 < files if Magic != 1346454347 get offset uint32 math offset + baseOffset savepos tmp else get offset uint32 get fileNum uint32 get fileSize uint32 savepos tmp endif goto offset getdstring dummy 0x8 get fileId uint32 getdstring dummy 0x18 get size uint32 math size + 40 string name p= "%s/%u.r7t" baseFileName fileId log name offset size goto tmp next i so just use any one of them which works fully for you. but I'm glad I helped you with this so your welcome
UndercoverBoy833 Posted Monday at 07:42 AM Author Posted Monday at 07:42 AM so for poking Ridge Racer Driftopia game files/archives I know there's a BBFSUnpacker tool source code for that by Nenkai https://github.com/Nenkai/BBFSUnpacker very old tool from 2021 that got public recently and you need Net 9.0 and Visual Studio to create and use that. Idk if it's supported for VSCode or Mono etc.
King Sexus Posted Monday at 08:59 PM Posted Monday at 08:59 PM 13 hours ago, UndercoverBoy833 said: so for poking Ridge Racer Driftopia game files/archives I know there's a BBFSUnpacker tool source code for that by Nenkai https://github.com/Nenkai/BBFSUnpacker very old tool from 2021 that got public recently and you need Net 9.0 and Visual Studio to create and use that. Idk if it's supported for VSCode or Mono etc. 1. Have you tried using this tool for driftopia? 2. What games do you intend on modding the unbounded cars into. I can help with some potential games for you to mod them in. 3. A friend from the Ridge Racer discord extracted all the RRU cars, the noesis plugin works but the cars will need their UVs fixed. Can you do that? 4. Any tools for RR3D?
UndercoverBoy833 Posted Tuesday at 04:09 AM Author Posted Tuesday at 04:09 AM 7 hours ago, King Sexus said: 1. Have you tried using this tool for driftopia? 2. What games do you intend on modding the unbounded cars into. I can help with some potential games for you to mod them in. 3. A friend from the Ridge Racer discord extracted all the RRU cars, the noesis plugin works but the cars will need their UVs fixed. Can you do that? 4. Any tools for RR3D? 1. This is a source code as I have stated and you have to create it using Visual Studio or any other compiler so no, I haven't created it nor tried the tool. 2. I dunno which games I will port/mod into. I just wanna see them whether the assets are the same as RR Unbounded or not. 3. I have no experience in coding so not possible. 4. I don't even know. So please don't ask me for that and don't expect me that I know everything, I truly don't.
UndercoverBoy833 Posted 17 hours ago Author Posted 17 hours ago On 6/24/2024 at 6:07 PM, UndercoverBoy833 said: since I finally have dumped Critical Velocity which is a Japanese spin-off game of the Ridge Racer series for the PS2, thx to ikskoks's bms script posted here, is there anyone who can look into this car samples? .pac could be the model and .erp would be the texture In case if you don't wanna look for separate topic for Critical Velocity PS2 model, here's the bms script (ikskoks) and noesis .gm2 model (roocker666) fmt_critical_velocity_gmd.py Critical_Velocity_PAC_script.7z
King Sexus Posted 8 hours ago Posted 8 hours ago 9 hours ago, UndercoverBoy833 said: In case if you don't wanna look for separate topic for Critical Velocity PS2 model, here's the bms script (ikskoks) and noesis .gm2 model (roocker666) fmt_critical_velocity_gmd.py 2.53 kB · 2 downloads Critical_Velocity_PAC_script.7z 459 B · 2 downloads Good to know. I did find a model for the Wolfseye GT (Black Ridge Racer Unbounded cover car). It's buried in an archive https://drive.google.com/file/d/1CAVOLwXrG5xFCjy3WbtrEZTYNkTIUVPN/view?usp=drive_link
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