Jump to content

beambreakers .3di


gayav27233

Recommended Posts

  • Engineer
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

  • Engineer

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 by shak-otay
Link to comment
Share on other sites

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

  • Engineer

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:

 

BeamBreakers_Level.png

Edited by shak-otay
Link to comment
Share on other sites

  • 2 weeks later...
  • Engineer

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

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

  • 4 weeks later...

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...