gayav27233 Posted December 17, 2023 Share Posted December 17, 2023 hi i need help, i dont see any tools or anything for this game and i need help with reverse engeneering this type of file, i am new to this and id like to learn how to do it Link to comment Share on other sites More sharing options...
Engineer Durik256 Posted December 17, 2023 Engineer Share Posted December 17, 2023 52 minutes ago, gayav27233 said: hi i need help, i dont see any tools or anything for this game and i need help with reverse engeneering this type of file, i am new to this and id like to learn how to do it at least send samples. *you can also try my plugin (from another game but with this format) on my github, maybe you'll be lucky fmt_3di.py Link to comment Share on other sites More sharing options...
gayav27233 Posted December 18, 2023 Author Share Posted December 18, 2023 26 minutes ago, Durik256 said: at least send samples. I tryed your plugin but it didnt work sadly here is a sample of the modelPizzaCar.rar Link to comment Share on other sites More sharing options...
DKDave Posted December 19, 2023 Share Posted December 19, 2023 The format is easy enough to read, but it seems as though the vertex data is somehow encrypted. None of the standard data types such as Float or Short seem to work that I can see. Link to comment Share on other sites More sharing options...
Engineer shak-otay Posted December 19, 2023 Engineer Share Posted December 19, 2023 (edited) Yeah, strange. When you use floats, it looks like so (may give an idea for further proceeding?): # 0x6730: verts= 524 v 189.028900 247.378510 250.835541 v 191.511719 48.459816 196.528717 v 124.951561 159.326569 20.908594 v -208.019928 -241.540237 -7.917188 v 0.000000 0.275180 0.500182 v 0.000000 0.100627 0.688449 v 0.000000 0.286596 0.692017 v 0.000000 0.096597 0.511619 v 543.696899 431.323822 473.642975 v 420.461731 288.379303 319.399811 v 303.708893 333.325592 223.977341 v 213.503510 137.268356 156.994919 v 0.000000 0.348053 0.463434 v 0.000000 0.343674 0.590774 v 0.000000 0.374261 0.554919 v 0.000000 0.343260 0.625845 I've commented out the v 0.000 lines. Still no mesh so the data has to be treated other than being floats, I guess. Edited December 19, 2023 by shak-otay Link to comment Share on other sites More sharing options...
DKDave Posted December 19, 2023 Share Posted December 19, 2023 Some progress ... In the first block of data at 0x680 there are 524 vertices. This data seems to be made up of blocks of 0x60 bytes each, maybe quads; the first 0x30 bytes of each block seem to be the coordinates for 4 vertices, and the next 0x30 bytes seem to be 4 entries for vertex colour and UVs. Although the face data seems to be triangles. So probably some manipulation required. Link to comment Share on other sites More sharing options...
Engineer roocker666 Posted December 20, 2023 Engineer Share Posted December 20, 2023 Look at 0xE270, it is a smaller mesh(?) There are 2 blocks of 0x30 bytes. I think DKDave is right but I don't see UVs in 2nd block, just vertex colors(FF FF FF 05) and 8 bytes (CD CD CD CD CD CD CD CD) So maybe vertices and UVs are in 1st block, I don't know... Link to comment Share on other sites More sharing options...
Engineer shak-otay Posted December 20, 2023 Engineer Share Posted December 20, 2023 Well, not sure, but has the shape of a car at least: 1 Link to comment Share on other sites More sharing options...
DKDave Posted December 20, 2023 Share Posted December 20, 2023 The vertices are also arranged in a non-standard way - in each block of 4 you have all the X coords first, then all the Y, then Z ... bit of a pain but starting to look like a car ... 1 Link to comment Share on other sites More sharing options...
Engineer shak-otay Posted December 22, 2023 Engineer Share Posted December 22, 2023 (edited) Since uvs are also available I tried to get the texture, too. But they seem to have an unknown compression (though named DXT1 in resource.bnk). Getting them from RAM looks a little bit ugly and I found one for a level only, not for the car: Edited December 22, 2023 by shak-otay Link to comment Share on other sites More sharing options...
DKDave Posted December 23, 2023 Share Posted December 23, 2023 Yeah, they're compressed, so I did this script to extract resource.bnk, and then the textures are standard DDS files. Not all submeshes have UVs, so just need to filter out the ones that have 0xcdcdcdcd instead of float values. beam_bnk.zip 1 Link to comment Share on other sites More sharing options...
DKDave Posted December 23, 2023 Share Posted December 23, 2023 And just a quick test with the texture, seems to work ok: 2 Link to comment Share on other sites More sharing options...
Engineer shak-otay Posted December 23, 2023 Engineer Share Posted December 23, 2023 (edited) Thanks for the script! @all: here's a police car. No wheels, so more a shuttle than a car (that's how the game is played): Makeobj_log-PoliceCar.zip Makeobj_log-CargoLkw.zip Edited December 23, 2023 by shak-otay Link to comment Share on other sites More sharing options...
gayav27233 Posted January 4 Author Share Posted January 4 On 12/23/2023 at 12:09 PM, shak-otay said: Thanks for the script! @all: here's a police car. No wheels, so more a shuttle than a car (that's how the game is played): Makeobj_log-PoliceCar.zip 12.47 kB · 2 downloads Makeobj_log-CargoLkw.zip 12.21 kB · 2 downloads wow thats awesome!!!. could u be so kind to share the script please? Link to comment Share on other sites More sharing options...
Engineer shak-otay Posted January 4 Engineer Share Posted January 4 I don't have a ready-to-use script. Just some code to fiddle around whose vertex output I combine manually with face indices produced by hex2obj. Excerpt (for getting vertices): cnt= 294 ; // 137 PizzaCar, Tunnellampe: 8; PoliceCar 147; CargoLkw 177; gangsta02: 127? auch für Lvl East? 216 for (k=0;k < cnt;k++) { // <<< 0x680, 147 Pizza_Car; Lampe 2E0, 5C0 log_Verts_skip16(dwStart, 4, 0); // dwStart += 48 ; // logged vertex block //fprintf( stream, "# %d skipAddr: %lx\n", k, dwStart) ; dwStart += 48 ; // skip 4 lines uv 0.0 .... for (i=0;i < 4;i++) { //fprintf( stream, "v 0.0 0.0 0.0\n") ; } } So done for each model individually. If you're a coder I could show you log_Verts_skip16() but if you were you probably wouldn't ask? Link to comment Share on other sites More sharing options...
gayav27233 Posted January 4 Author Share Posted January 4 1 hour ago, shak-otay said: I don't have a ready-to-use script. Just some code to fiddle around whose vertex output I combine manually with face indices produced by hex2obj. Excerpt (for getting vertices): cnt= 294 ; // 137 PizzaCar, Tunnellampe: 8; PoliceCar 147; CargoLkw 177; gangsta02: 127? auch für Lvl East? 216 for (k=0;k < cnt;k++) { // <<< 0x680, 147 Pizza_Car; Lampe 2E0, 5C0 log_Verts_skip16(dwStart, 4, 0); // dwStart += 48 ; // logged vertex block //fprintf( stream, "# %d skipAddr: %lx\n", k, dwStart) ; dwStart += 48 ; // skip 4 lines uv 0.0 .... for (i=0;i < 4;i++) { //fprintf( stream, "v 0.0 0.0 0.0\n") ; } } So done for each model individually. If you're a coder I could show you log_Verts_skip16() but if you were you probably wouldn't ask? oh yeah, i dont know rly anything about the coding, i just wanted to export models of cars and maps for my own animations or 3d printing Link to comment Share on other sites More sharing options...
gayav27233 Posted February 1 Author Share Posted February 1 On 12/23/2023 at 1:21 AM, DKDave said: And just a quick test with the texture, seems to work ok: i never asked, do you perhaps have the script for the models? also thank u for ur time Link to comment Share on other sites More sharing options...
Engineer shak-otay Posted February 1 Engineer Share Posted February 1 (edited) .. (misread it) Edited February 1 by shak-otay Link to comment Share on other sites More sharing options...
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