Page 1 of 4
ModelTool for OBJ to BZW conversion
Posted: Thu Jan 20, 2005 10:01 pm
This is the OBJ converter, built for windows.
It will convert OBJ files that have normals and texture coordinates into bzw maps.
It will convert materials.
It will break objects up into one bzflag mesh object per texture per OBJ group. ( so you can do an entire level in one OJB if you do wish )..
It does work on linux, you just have to get source and build your own.
No it's not documented.
The commandline is
or just drag an obj onto it and it'll convert it.
It will make a new file with the same name just with a BZW extenstion ( replacing any file with the same name that is allready there ).
Best of luck with it.
Posted: Sun Jan 30, 2005 4:41 am
Posted: Tue Feb 01, 2005 9:28 pm
so i can convert Blender files into BZW objects with this?
Posted: Tue Feb 01, 2005 10:59 pm
you can export from blender to obj, then convert to bzw yes.
They are working on the direct blender module now.
Posted: Wed Feb 02, 2005 10:46 pm
Here's a comparison between an object before and after the transformation. The .obj file was 48KB, and the .bzw file was 53KB. I only used 4 objects in the design though. The pictures- before and after.
Posted: Wed Feb 02, 2005 10:48 pm
heeey thas Anim8or - How did you export??
Posted: Wed Feb 02, 2005 10:49 pm
Lance I got the Anim8or link from you.
I went Object > Export > then saved it as a Wavefront(*.obj) file.
Posted: Wed Feb 02, 2005 10:51 pm
wow...i thought a tried that already...So the BZW will accept stuff like 3d arches made in there?
Posted: Wed Feb 02, 2005 11:05 pm
Awsome tool!! Didnt take the time to re-align this, but it made the surface of the bzw object smooth
Posted: Wed Feb 02, 2005 11:20 pm
In bzflag the Z axis is "up", in some editors "Y" is up ( I know in milkshape it is ).
The converter can correct this for you, just add -flipyz as a paramater, and i'll do the 90degree rotation that is needed.
good to see it's being used
Posted: Thu Feb 03, 2005 1:17 am
ah thank you
I will use this program a lot
Posted: Fri Feb 04, 2005 10:32 am
Where is the source? Can't find it in CVS.
On my Windows XP, it does not generate any file, anywhere
Posted: Fri Feb 04, 2005 5:17 pm
the source is in the bzflag source tree, under tools/modeltool/
what are you providing for input?
it should go modeltool "some file/you have/somewhere/thingy.obj"
it needs to end in obj, as it the tool is made to do more then one format, so it keys off the extenstion ( tho it only does obj at the momoent ).
if that dosn't work, please post your obj file so I can see it. There are some features of the OBJ format the tool will not work with.
Posted: Fri Feb 04, 2005 5:39 pm
Umm.. is there a converter for Linux users, or will there ever be?
Posted: Fri Feb 04, 2005 5:45 pm
I'm having some trouble with the anim8or program. I created this 3d 'thing' in it, thne saved it as a *.obj file. When I tried to convert it into a *.bzw file it wouldn't work. It gave me this error:
no valid meshes written from C:\Documents and Settings\Owner\Desktop\test.obj
Anybody know what i've done wrong?
Posted: Fri Feb 04, 2005 5:48 pm
Have you tried compiling it under linux?
Posted: Fri Feb 04, 2005 9:32 pm
Anim8tor--Good program to make sure it's compatible with--it's free and a lot easier than Blender for the uninitiated (as in "me").
Posted: Fri Feb 04, 2005 9:55 pm
the tool should build on any OS from the sources. I just posted a windows binary here because most windows users don't have a compiler.
Brlcad made the makefiles for *nix so the app should be good on them all, I think even the mac.
Brad2901 post your obj file. There are some things that an OBJ can have that the converter can't convert ( like surfaces, triangle strips and fans ). So maybe your little modeler is doing something like that. The OBJ file is text so if you post it we can see what the deal is.
Posted: Fri Feb 04, 2005 10:10 pm
Ok, I am probably gonna get yelled at, but can I have a link to the source, please?
Posted: Fri Feb 04, 2005 10:31 pm
They're part of the main bzflag source distribution, in the tools directory.
Posted: Fri Feb 04, 2005 11:02 pm
Posted: Fri Feb 04, 2005 11:18 pm
It would really help if you had a Wavefront OBJ file.
That file is an Anim8or .an8 file. Use object->export
to get a proper OBJ file.
You could also save "test.pdf" from Anim8or, but
I guarantee that Acrobat Reader would choke on it.
Posted: Fri Feb 04, 2005 11:35 pm
How long did it take you (JeffM) to make this?
Posted: Fri Feb 04, 2005 11:40 pm
Thanks for the help, works perfectly now.
Posted: Sat Feb 05, 2005 2:07 am
I was bored at work and had a couple hours, so I made the first version in that time. Trepan and some others have made some fixes and changes to it since then, but it's a simple app, so not long.