You should only make gui for your programs and that way it would be cool(no one will use console aplication nowadays)
To files description - it would be cool if you make ss of it in XVI hexeditor and marked the parts and add what they do(if you like) and/or uknown parts. Its really hard to read program from someone else and try to figure out how it works.
To make fully working converter need to know complete file as well. Btw to bones: 3ds max is using same naming but in program interface, while here it is inside skeleton file.
cruor im confused how u made that teapot.... the part you cut out in the texture file was the end of the blade, well midway... so wouldnt the pot be technically floating? how did u make it?
You should only make gui for your programs and that way it would be cool(no one will use console aplication nowadays)
To files description - it would be cool if you make ss of it in XVI hexeditor and marked the parts and add what they do(if you like) and/or uknown parts. Its really hard to read program from someone else and try to figure out how it works.
I'll try and make a diagram later. As far as the GUI goes, I'm more focused on completing my spec and cleaning up my spaghetti code.
penfold1992 wrote:
cruor im confused how u made that teapot.... the part you cut out in the texture file was the end of the blade, well midway... so wouldnt the pot be technically floating? how did u make it?
thanks in advanced
The teapot mesh has texture coordinates that tell the game how the texture maps onto the teapot. The teapot could go anywhere in that texture, I just chose the spot where it fit the best without obstructing other textures.
Got some updated code. It's a fair bit more elegant, but I'm still not really happy with it. I plan on turning it into a library eventually. This time around, it's in C.
if (*(*mesh)->numvertices) printf("bmstool: Found %d vertices\n", *(*mesh)->numvertices); if (*(*mesh)->numtriangles) printf("bmstool: Found %d triangles\n", *(*mesh)->numtriangles); return 0; }
int writeobj(char *filename, bms *mesh) { int i = 0; FILE *file = fopen(strcat(strtok(filename, "."), ".obj"), "w"); if (file == NULL) { printf("bmstool: Failed to write %s\n", strcat(strtok(filename, "."), ".obj")); return -1; } for (i = 0; i < *mesh->numvertices; i++) fprintf(file, "v %f %f %f\n", mesh->vertex[i].position[0], mesh->vertex[i].position[1], mesh->vertex[i].position[2]); for (i = 0; i < *mesh->numvertices; i++) fprintf(file, "vn %f %f %f\n", mesh->vertex[i].normal[0], mesh->vertex[i].normal[1], mesh->vertex[i].normal[2]); for (i = 0; i < *mesh->numvertices; i++) fprintf(file, "vt %f %f\n", mesh->vertex[i].texture[0], 1-mesh->vertex[i].texture[1]); fprintf(file, "# %d vertices\n\ng %s\n", *mesh->numvertices, mesh->group); for (i = 0; i < *mesh->numtriangles; i++) fprintf(file, "f %d/%d/%d %d/%d/%d %d/%d/%d\n", mesh->triangle[i].index[0]+1, mesh->triangle[i].index[0]+1, mesh->triangle[i].index[0]+1, mesh->triangle[i].index[1]+1, mesh->triangle[i].index[1]+1, mesh->triangle[i].index[1]+1, mesh->triangle[i].index[2]+1, mesh->triangle[i].index[2]+1, mesh->triangle[i].index[2]+1); fprintf(file, "# %d faces\n", *mesh->numtriangles); printf("bmstool: Wrote %ld bytes to %s\n", ftell(file), strcat(strtok(filename, "."), ".obj")); fclose(file); return 0; }
I've attached the updated executable. Now it simply accepts a list of files as input, you can use a wildcard to convert all files in the directory.
Also, I've had a look at BSK files. I plan on figuring those out, then I'll probably move onto BMT and then back to BMS to finish up what is unknown. Then I'll have a look at BSR files. Also, I'll probably be moving on to the MS3D text format if I do any more command line converters, because Wavefront OBJs don't support skeletal animation.
So far, I have gotten the basic structure of the BSK joints. Each joint is as follows:
Code:
float[4] - a quaternion describing rotation relative to the parent float[3] - a translation vector relative to the parent float[4] - a quaternion describing rotation relative to the origin float[3] - a translation vector relative to the origin float[4] - a quaternion describing rotation, unknown purpose float[3] - a translation vector, unknown purpose
Attachments:
File comment: BMS converter bms.zip [3.6 KiB]
Downloaded 1472 times
Joined: Jan 2008 Posts: 241 Location: Far to the south.
Cruor wrote:
Also, I've had a look at BSK files. I plan on figuring those out, then I'll probably move onto BMT and then back to BMS to finish up what is unknown. Then I'll have a look at BSR files. Also, I'll probably be moving on to the MS3D text format if I do any more command line converters, because Wavefront OBJs don't support skeletal animation.
Meaning editing .ban is only a few steps away in MS3D format, can't help but hoping for a possibility to create entirely custom skills.
Didn't have any luck trying to open .ban files with existing programs, couldn't find a single one supporting JMX (JoyMaX?), JMXV (JoyMaXV?), BAN (B ANimation?).
However I noticed that SimpleViewer plays the animation of that penguin also, meaning it could possibly play .ban files given a link to a character? And that would mean the movements will be somehow translatable seeing SimpleViewer can open them, thus being able to give more info about those movements.
Bip01 L Thigh Bip01 L Calf Bip01 L Foot Bip01 L Toe0 Bip01 L Clavicle Bip01 L UpperArm Bip01 L Forearm Bip01 L Hand Bip01 L Finger0 Bip01 L Finger01 Bip01 L Finger1 Bip01 L Finger11 Bip01 L Finger2 Bip01 L Finger21 Bip01 L HandMid
Bip01 R Thigh Bip01 R Calf Bip01 R Foot Bip01 R Toe0 Bip01 R Clavicle Bip01 R UpperArm Bip01 R Forearm Bip01 R Hand Bip01 R Finger0 Bip01 R Finger01 Bip01 R Finger1 Bip01 R Finger11 Bip01 R Finger2 Bip01 R Finger21 Bip01 R HandMid
From there it should be possible to just flag those locations, place them at the right spot, and enjoy the magic. Seeing I know nothing of coding it's probably a little harder as I make it sound.
I do realize this is no useful information sofar, just trying to help.
Didn't have any luck trying to open .ban files with existing programs, couldn't find a single one supporting JMX (JoyMaX?), JMXV (JoyMaXV?), BAN (B ANimation?).
B stands for binary, no idea about the V. I've pretty much come to the conclusion that every format save DDJs is a proprietary format. I've actually been looking documentation for other formats and MilkShape's SDK to make sense of what's there. I didn't even know what a quaternion was when I started looking at the BSK format. I kept thinking, "Why are there four floats for three axes?"
Skayunor wrote:
However I noticed that SimpleViewer plays the animation of that penguin also, meaning it could possibly play .ban files given a link to a character? And that would mean the movements will be somehow translatable seeing SimpleViewer can open them, thus being able to give more info about those movements.
For sure. SimpleViewer probably converts all the files to the proper formats after they have been created in their respective programs. I'm interested in recreating SimpleViewer (or perhaps something more similar to WoW Model Viewer) when this is all said and done.
Bip01 L Thigh Bip01 L Calf Bip01 L Foot Bip01 L Toe0 Bip01 L Clavicle Bip01 L UpperArm Bip01 L Forearm Bip01 L Hand Bip01 L Finger0 Bip01 L Finger01 Bip01 L Finger1 Bip01 L Finger11 Bip01 L Finger2 Bip01 L Finger21 Bip01 L HandMid
Bip01 R Thigh Bip01 R Calf Bip01 R Foot Bip01 R Toe0 Bip01 R Clavicle Bip01 R UpperArm Bip01 R Forearm Bip01 R Hand Bip01 R Finger0 Bip01 R Finger01 Bip01 R Finger1 Bip01 R Finger11 Bip01 R Finger2 Bip01 R Finger21 Bip01 R HandMid
From there it should be possible to just flag those locations, place them at the right spot, and enjoy the magic. Seeing I know nothing of coding it's probably a little harder as I make it sound.
Well the locations are pretty standard, a lot are in common with standard UT skeletons. I haven't looked to see how the BSK files define their structure, but that should be simple after everything else. The way the BMS files are set up though, you have to have the full skeleton to give proper bone indices to vertices.
Skayunor wrote:
I do realize this is no useful information sofar, just trying to help.
Any help is nice. You seem to be pretty talented, but I saw you say you quit Silkroad in the other thread. If you are interested enough try figuring out the binaries, you've got my support. I'll probably be on MSN quite a bit after this week if you or anyone has questions pertaining to the formats. Just no one ask me about changing their horses to Uruchi. Plz.
As far as progress, still working on BSKs. I understand that the joints are defined by a position vector and a quaternion, but the quaternions are giving me trouble. They seem to be out of order or something.
Joined: Mar 2007 Posts: 31 Location: Bremen (Germany)
holy shit, thats nice. i always hoped for something like this and now my wishes come true^^
really good work cruor
Cruor wrote:
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";
fp_out.close(); } else cout << "Cannot open file for writing.\n";
fp_out.close(); }
Here's another render, for fun:
this program don't work for me, do i need windows-vista or any special files for it? the others work(bms.exe, milkshape-plugin), but i dount know how to get the textures at the models, do i have to convert the ddj-files into an other fileformat before?
EDIT: ok, finally i got it^^ thx for this nice programms
Joined: Mar 2007 Posts: 31 Location: Bremen (Germany)
penfold1992 wrote:
obeck do u mind stating what you need to view these images, they will be helpful to me thanks
which images, do you mean the textures?
i use the ddj-viewer to convert the ddj-files to dds-files, after this i use the program milkshape 3d and import the bms-files with the bms-plugin for cruor which i found on his project-site. after the importing i select the parts which i want to give the texture at "Groups" at the right site of the program, after this go to "Materials" click on new than at the upper <none> and open the texture-file(dds) for the selected parts. (the problem is, the filenames of the texture have to be not longer as 8 characters else it wont work)now click on 'Assign'. after you have given every part a texture you can export the model and open it up with a 3d-rendering program. i used a 3d-max 30day-trail-version.
Joined: Mar 2007 Posts: 31 Location: Bremen (Germany)
Cruor wrote:
JanChlpik wrote:
penfold1992 wrote:
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.
could you tell me if you have finished the exporter already, or how long do you think it could take until you have finished it? because i would like to make some models/items for sro. or could you send me the uncleaned version with a little howto/tutorial what i have too do/look for to make for example a sword and put it in the game. because when i try to edit my bsr-files the client crash. or do i have to exchange a existing item for a new item and let the bsr-file unmodified? and how to set bones, when i importing an existing model in milkshape it doesn't show he the bones.
Joined: Jun 2008 Posts: 29 Location: Heroes of Newerth
Not to be a necromancer or such, but has anyone found a solution to this yet? Nobody has some friends at Joymax that could tip us off on how to convert to *.bms?
Is this project dead? No news or anything about this. Its really a visionary project tho. Anyone have the plugins for the bms converter? Please send it to me, it would be really appreciated.
Mostly dead. I was able to get the skeleton loaded and the model fully rigged, but I got rid of all that stuff a long time ago. I've recently considered revisiting this problem, but I haven't gotten around to it yet. Rest assured though, if I end up posting any more code, it won't look like that garbage up above. I didn't understand pointers and dereferencing when that was written, haha.
Drew Benton did some awesome work with the navmesh files, and another guy was able to find out a bit more about the BMS format, regarding the collision data. I'd link to their thread, but I don't think that website is kosher on these forums. Drew's name is pushedx on those forums though, if you want to search around.
fanste wrote:
May it be possible, that you can reup the infos somewhere? Cuz the googlesite isn'T available anymore. Or did you remove it yourself?
Not sure what happened to the Google site, but if I do any more work on this I'll make sure to post specs.
I think Drew posted his works of navmesh in epvpers, or maybe in this forum. I can't remember which. But, as I remember, Drew stopped working on that because he's on something else.
Users browsing this forum: No registered users and 20 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