dblF Posted September 3 Share Posted September 3 Hi everybody Me and my friend we're making a tool to edit/create new .DBL game archives for 25 to Life. Now we're trying to figure out the models and the issue I have is that the indices I'm reading never display the model properly. I'm exporting the model as an obj file and it doesn't look normal. I'm attaching the screenshot of what it looks like. First of all the triangles don't look right at all but what's even worse is that some edges are completely messed up. There is a py script out there that can view the models and they look just fine if you export them into OBJ through that script, but that's all it can do ----export the models. We're making a full on editor that can already work with textures and we're planning to make the tool that will cover the whole spectrum of the archives, so you will be able to make your own maps even. So when I make the OBJ file out of the data I have the indices are not the same as in the obj file that I get when I export the model through the aforementioned py script. I'll also attack 2 files and the source Chunk which is the chunk#3 stored in the .DBL archive. I have no experience in programming models whatsoever so I'm really at a dead end here. I'm certain that the indices I read are the right indices because I debugged the py script and the source indices it has on the input are exactly the same that I got. The issue is I don't relaly know what to do with em and my guess is they obviously have to be processed somehow because what I'm doing now doesn't work right. I'm also gonna provide the code that I came to that handles the vertex ordering. Both OBJ files are in the zip archive that I'm allso attacihing to this post. for( INT m = 0; m < pSomArray->meshes[i].somHeader[SOM_NUMSUBMESHES]; m++ ) { iAssignedVertexes += pSomArray->meshes[i].submeshes[m].meshData[MESH_STRTINDICE]; for( INT ind = 0; ind < pSomArray->meshes[i].submeshes[m].meshData[MESH_NUMINDICES]-2; ind++ ) { if( ind & 1 ) { sprintf( pLine, "f %i\\%i\\%i %i\\%i\\%i %i\\%i\\%i\n", iAssignedVertexes+pSomArray->meshes[i].submeshes[m].indices[ind], 1, 1, iAssignedVertexes+pSomArray->meshes[i].submeshes[m].indices[ind+2], 1, 1, iAssignedVertexes+pSomArray->meshes[i].submeshes[m].indices[ind+1], 1, 1 ); fputs( pLine, pOBJFile ); } else { sprintf( pLine, "f %i\\%i\\%i %i\\%i\\%i %i\\%i\\%i\n", iAssignedVertexes+pSomArray->meshes[i].submeshes[m].indices[ind], 1, 1, iAssignedVertexes+pSomArray->meshes[i].submeshes[m].indices[ind+1], 1, 1, iAssignedVertexes+pSomArray->meshes[i].submeshes[m].indices[ind+2], 1, 1 ); fputs( pLine, pOBJFile ); } } } } !ak74.zip MeshChunk.zip Link to comment Share on other sites More sharing options...
diegozmei Posted September 3 Share Posted September 3 Xentax And zenhax i'm sorry noesis script .DBL Files yes Durik256 fmt_DBL.py? Link to comment Share on other sites More sharing options...
Durik256 Posted September 4 Share Posted September 4 yep, I once made a plugin for dbl for this game, on xentax Link to comment Share on other sites More sharing options...
dblF Posted Wednesday at 12:03 PM Author Share Posted Wednesday at 12:03 PM yeah that one called fmt_DBL.py is what I have, I'm looking to order the vertexes properly if anybody knows how the indices are manipulated it'd be cool , just an explanation. The script feeds the indices into the noesis api , the indices its feeding are the raw indices that I'm getting also , but behind that I have no idea what's happening to them and that's exactly the most mportaint information Link to comment Share on other sites More sharing options...
dblF Posted Wednesday at 12:11 PM Author Share Posted Wednesday at 12:11 PM Tne there is the 3D Object Converter, when I export the AK74 through that program the vertex ordering is also different to both mine and that from the fmt_DBL.py script, yet it still looks fine 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