[go: up one dir, main page]

Menu

Commit [r9889]  Maximize  Restore  History

Rewrote obj->bfxm procedure.

It now handles propperly blender exported files. Issues fixed:
a) Blender .mtl files do not specify textures, rather, usemat %s is used in the .obj file (weird).
b) Blender does not group different materials together, causing really inefficient bfxm files to be generated. Now, whatever the input is, equal materials are grouped together into equal bfxm records.
c) Blender does a loussy job of optimizing vertex sharing between primitives. Added automatic vertex merger... one that doesn't trash smoothing groups
d) Due to c, now smoothing groups are preserved (big quality improvement)
e) Added MAP_KE command to .mtl parsing... made sense. I'm not sure it's standard, but this allows us to, using a text editor, have .obj and .mtl files that support all the features of bfxm. Except LODs, I guess. I would work on that, if it weren't because of the Ogre port which makes it a little... abstract (pointless).
f) Propperly handled mtllib commands. Now, the .mtl file doesn't need to have the same name as the .obj file. Rather, the "mtllib" command in the .obj file is used.
g) I think (I just think) that blender-exported files produced huge bfxms unnecesarily, due to the vertex buffer not being cleaned up after each record. Now they don't, because only used vertices are sent to the bfxm.

Caveats:
a) No strips or fans generated. I was going to create an automatic tri-strip, quad-strip and tri-fan generator, but again the Ogre port makes the issue abstract.
b) Forgot about points. Supposedly, a line of "f a/b/c" would define a point in space... I guess. That's not handled.

klaussfreire 2005-10-11

changed /trunk/data4.x/bin/mesher.exe
changed /trunk/vegastrike/objconv/mesher/converter.cpp
changed /trunk/vegastrike/objconv/mesher/from_obj.cpp
changed /trunk/vegastrike/objconv/mesher/from_obj.h
changed /trunk/vegastrike/objconv/mesher/to_BFXM.h
/trunk/data4.x/bin/mesher.exe
Binary file was changed.