charlieg wrote:You probably want to use UnitConverter, which is a frontend to mesher (right chuck?).
Wish it were that simple...
The problem with UC is that it hides the mesher crap successfully, but sometimes you need to see mesher crap out.
I've been using mesher 50 times a day for the past week or so, but it's full of bugs, so I wouldn't want it running under the hood of another program.
Essentially, to convert a bfxm to obj, you go
Then you can import obj into blender, modify it, and export to obj.
Then you convert that obj back to .bfxm by typing,
Now you need to edit the mesh headers, so you need to convert to readable xml format,
And you might get a number of xmesh files:
ship.xmesh is the top LOD of the first mesh
1_0.xmesh is the top LOD of the second mesh
0_1.xmesh is the second LOD of the first mesh
1_1.xmesh is the second LOD of the second mesh
Now you open the xmesh files with an editor and add or modify the textures, change
the blending and/or cull modes, and other stuff.
Here's an example for the Agricultural Station hull, which uses the highend_flat shader:
Code: Select all
<Mesh scale="1.000000" reverse="0" forcetexture="0" sharevert="0" polygonoffset="0.000000" blend="ONE ZERO" alphatest="0.000000" technique="highend_flat" texture="agri_hull.texture" texture1="agri_hull_spec.texture" texture3="agri_hull_glow.texture" texture4="agri_hull_norm.texture" >
<Material power="98.039215" cullface="1" reflect="0" lighting="1" usenormals="1">
<Ambient Red="0.000000" Green="0.000000" Blue="0.000000" Alpha="1.000000"/>
<Diffuse Red="0.200000" Green="0.200000" Blue="0.200000" Alpha="1.000000"/>
<Emissive Red="0.000000" Green="0.000000" Blue="0.000000" Alpha="1.000000"/>
<Specular Red="0.500000" Green="0.500000" Blue="0.500000" Alpha="1.000000"/>
</Material>
Here's an example for a transparent setup (Agri base glass domes, using the "fireglass" shader):
Code: Select all
<Mesh scale="1.000000" reverse="0" forcetexture="0" sharevert="0" polygonoffset="0.000000" blend="ONE INVSRCALPHA" alphatest="0.000000" technique="fireglass" >
<Material power="777.777" cullface="1" reflect="0" lighting="1" usenormals="1">
<Ambient Red="0.000000" Green="0.000000" Blue="0.000000" Alpha="1.000000"/>
<Diffuse Red="0.000000" Green="0.000000" Blue="0.000000" Alpha="0.100000"/>
<Emissive Red="0.000000" Green="0.000000" Blue="0.000000" Alpha="1.000000"/>
<Specular Red="1.000000" Green="1.000000" Blue="1.000000" Alpha="1.000000"/>
</Material>
You have to watch for spurious ="" things appearing in xmesh when you convert from bfxm to xmesh, usually next to polygonoffset. Looks like,
because they will cause mesher to crap out when you try to convert back.
Finally, you convert all your xmesh files back to bfxm:
Code: Select all
mesher ship.xmesh ship.bfxm xbc
mesher 1_0.xmesh ship.bfxm xba
mesher 0_1.xmesh ship.bfxm xba
mesher 1_1.xmesh ship.bfxm xba
Notice that the first line is xbc ("Convert") while the subsequent lines are xba ("Add").
Then cross your fingers REALLY hard, and boot the game.
It may happen that one or more of the meshes don't show up at all. What I do is I change
something in blender, divide a polygon, whatever, and export again; --do it all over.
HTH and good luck.