04-21-2021, 05:57 PM
(04-21-2021, 12:15 PM)kotori ii Wrote:(04-21-2021, 10:03 AM)Joshex Wrote:well since there isnt a tool for it Im only using hex editor to edit models and uvs tho not much luck with models because as I told you before I cant add more vertex data or vertices it ll just result in crashing the game(04-18-2021, 12:37 PM)kotori ii Wrote: well since is a ps2 game is only commands as you know but I still I ll tell you everything I know so each vehicle has 3 or 4 meshes and they are all composed of sub meshes
the sub meshes are separated in blocks combined by array of three floats xyz respectively and contrary what I stated before they have face indices for each submesh or something like that also in the vertex data there are some 80s at the end of the each block Im guessing theyre used for creating vertices? not exactly sure tho uvs are located a little below but yeah also uploaded the file on dropbox if you are planning to use hex editor 0x58 is the pointer to the lod header which in this case 3D0A0 anyway the thing is I cant edit the models the way I want beucase of the mesh header which is getting in my way pretty sure it has calculated vertices for each mesh or something so uh I uploaded the file you can check it https://www.dropbox.com/s/2z5wk5go7qyo3l7/CAR1.BGV?dl=0
Thanks for sharing the file. this will allow someone to see exactly your issues and help you. I have looked at it now and I can confirm it is not a standard archive and is a proprietary binary format. from what I'm seeing in the hex editor nothing is in plain text.
what software are you using to view this file's content? I did some searching and found what looks to be your other threads on other forums about this subject. someone there gave a script to convert it to .3ds (https://drive.google.com/file/d/1I1amCL4...hJal3/view). they also said it's a zlib compressed archive. I'll just attempt to decompress it.. one sec.
Code:import zlib
myFile = open("C:\file location\CAR1.BGV", 'rb')
newFile = open("C:\file location\CAR1.gzip", 'wb')
dataDecompress = zlib.decompress(myFile.read())
newFile.write(dataDecompress)
newFile.close()
myFile.close()
this is some python I will be attempting to use to decompress it. the outcome is..
"zlib error: Error -3 while decompressing data: incorrect header check"
I can then assume this is not a zlib compressed archive.
Regardless I downloaded the script and will attempt to run it later if I can get the software to run the bms script or if theres a way to translate what they did there into python. let me at least open it and see if it is plain text and if I can translate it to python. plain text, yes. convert to python, possibly. but it'd mean learning hex editing in python lol. I guess I could look into that.
I guess if you had quickBMS this script should work. looks like the pointers for each file are listed under the top definitions in the first bend. if those are not right for you, you could change them to the right pointers (0x58 in example) and it should work. I suspect the number of files or meshes might be different in your file as well which would require adding or subtracting definitions for files. and copying bends of code and changing the name of the file it works on to the required definition name.
in example he does:
"log MEMORY_FILE1" through 7. you might need more or less. if you need more than 7 you'll have to add them. if you need less you'll have to delete the unnecessary log MEMORY_FILE# definition and any code bends that use it.
for extra bends, you should be able to copy and paste and merely change the definition name lets say the last bend uses the MEMORY_FILE7 definition. but your file has 12 sub meshes or whatever you'd copy the bends that deal with MEMORY_FILE7 paste them below it and change MEMORY_FILE7 to MEMORY_FILE8, 9, 10, 11 etc.
this was just my first idea with a quick glance at the files.
but yeah if you are using other software to open the BGV file, please let me know. if you have converted it to a .3ds and need that modified I can mess with it and modify it to your needs.
Ah, ok so we're getting somewhere. so this isn't so much about model extraction or acquisition, this is about Game Modding.
ok well. this could happen for a few reasons. most likely:
1: carefully designed scene budgets (your added vertexes are putting it over the maximum allowed memory for real-time graphics). (in this case I doubt it but meh, we'll leave it on the list.)
2: Shape Keys, Armatures, Lattices or form grabbing physics code, or region based division code; if the game not only uses the model file but that model file's contents have to match something else (most likely a rig for movement) that would definitely crash the game when it finds the 2 lists don't match. it'd be throwing an exception "key not found in list" or "extra keys found after expected end".
sometimes this ends in messed up graphics, but other times (such as with certain game engines in my experience *cough*UE4*cough*) even slight alterations to the scale of the existing model's vertexes will cause an exception on import. I recently did a mod for Hatred. and lets just say, if you changed anything from the default models they provide, it would give you an exception. even though they claim to support modding and have an import/export feature.
so it's likely the game itself or the game engine just does not like modding. now sometimes you can still mod these games, but you'd have to mod them live (rather than trying to import things or mod them offline then boot up). to mod live you'd need to find the mesh in live memory with cheat engine and attempt to modify it and save that modification for quick application next time you run it.