Mesh conversion on Os X

This is the location for all mods to collaborate. Anyone making or planning their own mod should post help requests, screen shots and news here.

Moderators: Omega, tillias, Mod Contributor

Post Reply
theblackdog
Just a tourist with a frag'd nav console
Just a tourist with a frag'd nav console
Posts: 3
Joined: Sat Apr 30, 2011 7:31 pm

Mesh conversion on Os X

Post 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?
pyramid
Expert Mercenary
Expert Mercenary
Posts: 988
Joined: Thu Jun 15, 2006 1:02 am
Location: Somewhere in the vastness of space
Contact:

Re: Mesh conversion on Os X

Post 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).
theblackdog
Just a tourist with a frag'd nav console
Just a tourist with a frag'd nav console
Posts: 3
Joined: Sat Apr 30, 2011 7:31 pm

Re: Mesh conversion on Os X

Post 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.
pyramid
Expert Mercenary
Expert Mercenary
Posts: 988
Joined: Thu Jun 15, 2006 1:02 am
Location: Somewhere in the vastness of space
Contact:

Re: Mesh conversion on Os X

Post 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.
bgaskey
Elite Venturer
Elite Venturer
Posts: 718
Joined: Wed Mar 07, 2007 9:05 pm
Location: Rimward of Eden

Re: Mesh conversion on Os X

Post 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.
theblackdog
Just a tourist with a frag'd nav console
Just a tourist with a frag'd nav console
Posts: 3
Joined: Sat Apr 30, 2011 7:31 pm

Re: Mesh conversion on Os X

Post 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.
pyramid
Expert Mercenary
Expert Mercenary
Posts: 988
Joined: Thu Jun 15, 2006 1:02 am
Location: Somewhere in the vastness of space
Contact:

Re: Mesh conversion on Os X

Post by pyramid »

Post Reply