So I've finally gotten around to playing around with some files again, and I've decided that it would be fun to document the BMS mesh file format.
Now, as far as I can tell, it is a proprietary format. It seems that Joymax models their meshes in 3ds Max, then prepares them for use with an in-house program called SimpleViewer:
So far, I have been able to glean three things from the BMS files. Their geometric vertices, vertex normals, and faces. Using this information, it is possible to convert a mesh into a usable format, like so:
Now of course, this is the easy part. We can rip models from the game to play around with in a viewer, but it doesn't do us much good. It's all about being able to insert modified models back into the game. But to do this, the BMS format needs to be completely documented. And this is where you come in.
I am wondering whether anyone has been working on this very thing, or if anyone would like to help me work on it. If we can get BMS files out of the way, then BMT/BAN/BSR files aren't that far off. I am also looking to see if anyone's willing to code a simple (and open source) model converter off of documentation, as it isn't really my forte.
If you know anything about 3D rendering or binary file formats, or are willing to learn as you go, please let me know.
is this viewable in just simpleviewer? is it possible to change the initial meshes before we start to go 3d? if we could just change the image on them its a start right? im nt sure if this can be done yet.
is this viewable in just simpleviewer? is it possible to change the initial meshes before we start to go 3d? if we could just change the image on them its a start right? im nt sure if this can be done yet.
does anyone know?
As I said, SimpleViewer is an in-house deal, meaning that only Joymax has it. Right now I'm using the Wavefront OBJ format, which is pretty much ubiquitous, for my own purposes. My model viewer is MilkShape 3D. As for the "initial meshes", it sounds like you asking about changing the textures. That's been doable for ages, it's just a matter of editing DDJ files. Then again, that ignores the BMT files which I believe would play a role if the mesh was modified.
Bmt and other meshes and skeletons and other should work with same size texture(for example 1024*768) as the bmt contains information about what to pick from dds(ddj).
if you tell me how are the files different, then I could make program for it. Or at least partially info to figure out how it works.
No documentation yet, but here's some quickie code I wrote:
Spoiler!
Code:
#include <iostream> #include <fstream>
using namespace std;
int main(int argc, char* argv[]) { ifstream fp_in(argv[1], ios::binary); if(fp_in.is_open()) { int char_count; int vert_count; int bone_count; int face_count;
And here's another, more exciting render for the laymen:
I've also attached a compiled version of my converter (plz don't kill me mods ) for anyone that wants to give it a try. It takes two arguments, the first being the name of the BMS to convert and the second being the name of the output file (should be *.obj).
Attachments:
File comment: BMS to OBJ converter bms2obj.zip [5.47 KiB]
Downloaded 1229 times
I see that you seek in that file, but no idea(or to lazy) how are you converting values from the file. I am just looking at obj file format for wavefront and their example(your file) does not work in viewers I downloaded.
So what program can i view these in? And how does that converter work? I put it in the folder with my To BE Converted Files and it just crashes on startup. Any help?
_________________
CeLL wrote:
on the off topic, presenting the existance of a loader and or bot within your posts is bot support even if you dont bot... thats like if i put sbot in my sig or something.
Hmm?
Last edited by Glockshna on Wed Jul 15, 2009 9:48 pm, edited 1 time in total.
I see that you seek in that file, but no idea(or to lazy) how are you converting values from the file. I am just looking at obj file format for wavefront and their example(your file) does not work in viewers I downloaded.
It's all done using typecasting on chars that are read from the file. The file is essentially split into a vertex block, a bones block, and a faces block. Each block is preceded by an integer to tell you how many elements it contains. The vertex block contains geometric vertices, vertex normals, and texture vertices in that order. I haven't figured out the bones block yet. The faces block constructs faces out of vertex numbers (starting at 00), and each face takes three vertices.
I was kicking myself after I figured out the texture vertices. I will try to make my code a bit more readable and post the updated code later.
And now, for your viewing pleasure, a textured Roc head:
thats nice! by any chance do u know where you can find skills i dont mean like the media.pk2 edit of skills i mean... where the animations are. can u also view the character models and where the origin point is, im just thinking of the fire and ice buffs where the balls fly around u and the snow shield. im thinking that they come off a player at a certain radius. eg. the balls go around at a radius from the center point or maybe even (if the center point is in the head) moving Yaxis downwards then radius of, such and such
i maybe way out, but just something im thinking about
im just thinking of the fire and ice buffs where the balls fly around u
rofl "where the balls fly around u" xDD
To quote 40 year old virgin
Quote:
You like it when balls are in your face
lol.
But I've been wondering how long untill you did this I myself have only gotten as far as texturing. But I know where to find the ban/bms/bsr files. Maybe if I do dl the new update, I'll look into it. But pre occupied at the moment
Updated the code. It's still a mess, but now it handles texture coordinates and includes vertex normals with the faces. I've also attached the updated executable. Now you can omit the second argument and the output will be automatically thrown in output.obj.
Spoiler!
Code:
// // Programmer: Cruor <cruor@live.com> // Creation Date: Sun May 18 1:22:16 PST 2000 // Syntax: C++ // // Description: Utility program to convert between Joymax // BMS mesh files and Wavefront OBJ mesh files.
#include <iostream> #include <fstream> #define _FILEVER 110 using namespace std;
// global variables int charCount; int vertCount; int boneCount; int faceCount; char *meshGroup; float (*vertices)[3]; float (*normals)[3]; float (*textures)[2]; char (*bones)[255]; short (*faces)[3];
int main(int argc, char* argv[]) { if (argc > 4 || argc < 2) exitUsage(); char option = NULL; if (argv[1][0] == '/') { option = argv[1][1]; switch (option) { case '?': exitUsage(); default: exitUsage(); } }
if (option == NULL && argc > 1) convertMesh(argv[1], argv[2]);
return 0; }
////////////////////////////// // // exitUsage //
void exitUsage() { cout << "Converts Joymax BMS files to Wavefront OBJ files\n" "BMS2OBJ source [destination]\n" " source Specifies the BMS file to be converted.\n" " destination Specifies the OBJ file to be written.\n";
no because the skeleton is the same... for example if you wanted to make roc a camel and just changed the dds you would have a camel shaped like a bird :S you need to edit the skeleton too. it is much easier to design the thing in one go in 3d and export it back out that way which is what cruor is trying to achieve i think.
Joined: Jan 2008 Posts: 241 Location: Far to the south.
Skay at ya service,
I'm particularly interested in .ban files, it seems Joymax has their own program for those to. If anyone could find out how exactly the bodyparts are moved per millisecond, with that goddamn korean kabrabbel, or has a fitting program, that would open up a whole new world of editing.
Heck, with Cruor around we're gonna completely rewrite this game.
no because the skeleton is the same... for example if you wanted to make roc a camel and just changed the dds you would have a camel shaped like a bird :S you need to edit the skeleton too. it is much easier to design the thing in one go in 3d and export it back out that way which is what cruor is trying to achieve i think.
Well you cannot hit everything, but you can edit texture for face to have anyone there. And you can make camel have birds face. Wonder if you can think of something that is not possible to make.
you can put faces into the game because the face is the shape of... well.. a face :S so putting a face onto a face is not that complicated. say you wanted to have a fork in your hand instead of a glavie thou.... you would need a fork skeleton (in shape of a fork) a faces wrapped around it to make it look like a fork. this is where you need to edit it in 3d and then export it back. im not sure how thou sorry
you can put faces into the game because the face is the shape of... well.. a face :S so putting a face onto a face is not that complicated. say you wanted to have a fork in your hand instead of a glavie thou.... you would need a fork skeleton (in shape of a fork) a faces wrapped around it to make it look like a fork. this is where you need to edit it in 3d and then export it back. im not sure how thou sorry
Yes you are right need skeleton to make it work properly
you can put faces into the game because the face is the shape of... well.. a face :S so putting a face onto a face is not that complicated. say you wanted to have a fork in your hand instead of a glavie thou.... you would need a fork skeleton (in shape of a fork) a faces wrapped around it to make it look like a fork. this is where you need to edit it in 3d and then export it back. im not sure how thou sorry
Yes you are right need skeleton to make it work properly
Actually, changing weapons is cake, because they only have one bone.
Tea anyone?
I wrote an importer and exporter for MilkShape, but I want to clean them up a bit before I release them.
Users browsing this forum: No registered users and 14 guests
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum