Page 1 of 1

Mesh conversion on Os X

Posted: Sat Apr 30, 2011 7:41 pm
by theblackdog
Sooo....
After downloading 0.5.0 and playing around with the units and weapons lists for a while I decided to try creating a new ship. I made a mesh in blender and exported it as an .obj file.

My problem is that there don't seem to be any way to convert .obj files to .bfxm on a Mac. I downloaded unitconverter but that didn't really help, since it called mesher.exe which only runs on Windows.

Does anybody know what options there are for converting between .obj and .bfxm on Macs?

Re: Mesh conversion on Os X

Posted: Sun May 01, 2011 10:42 pm
by pyramid
You can use UnitConverter on linux, win and *not tested* osx. Just point in the config tab to the executable address (path+executable, e.g. /usr/bin/mesher).

Re: Mesh conversion on Os X

Posted: Mon May 02, 2011 5:37 am
by theblackdog
@Pyramid:
That was what I tried. The problem is that mesher is an .exe and doesn't seem to run on os x. Here's what appears in the terminal window when I try to convert my mesh from .obj to .bfxm:

saveAndConvert
Save MTL file(s)
Backup file /Users/hubbgold/meshes/vostok2.mtl
file /Users/hubbgold/meshes/vostok2.mtl saved
Converting OBJ file(s) to BFXM
Directory = /Users/hubbgold/meshes
Command = /Users/hubbgold/UnitConverter/mesher vostok2.obj vostok2.bfxm obc
dyld: Library not loaded: /usr/local/lib/libvorbisfile.3.dylib
Referenced from: /Users/hubbgold/UnitConverter/mesher
Reason: image not found
Model converted to vostok2.bfxm
dyld: Library not loaded: /usr/local/lib/libvorbisfile.3.dylib
Referenced from: /Users/hubbgold/UnitConverter/mesher
Reason: image not found
Model converted to vostok2.xmesh

And no .bfxm or .xmesh files appear in my working directory.

Re: Mesh conversion on Os X

Posted: Mon May 02, 2011 11:09 am
by pyramid
I suppose the windows binary would not work on mac.

I don't see any mesher binary in the mac section of svn. You'll probably need to compile mesher on your system.
The source is in vegastrike/objconv/and the recent builds compile as mesher_tool (on Linux).

You may then test it by running "mesher -h" and see if it gives you some legible output.
If so, try a manual conversion from the command line: "mesher obc vostok2.obj vostok2.bfxm".

After testing manually, adjust the path in your UC config tab.

Re: Mesh conversion on Os X

Posted: Mon May 02, 2011 5:09 pm
by bgaskey
I have compiled mesher before on macosx without problems. Also, a mesher binary built for os x was included in the past several release packages, i believe. I don't think the mesher code has changed any since then, so using should still work.

Re: Mesh conversion on Os X

Posted: Mon May 02, 2011 6:46 pm
by theblackdog
Thanks guys. I did try the mesher binary that came with the Mac version of 0.5.0, but it failed in the same way as the one I downloaded seperately. (With one difference: converting a .bfxm model to an .obj model produced an mtl file, but no obj file). One more question: Is mesher part of the trunk portion of the subversion? I was planning on getting the whole thing anyway.

Re: Mesh conversion on Os X

Posted: Mon May 02, 2011 7:44 pm
by pyramid