dark_sylinc wrote:OgreXmlConverter was merged with OgreMeshUpgrader and renamed to OgreMeshTool.
It can convert between xml, v1 and v2 meshes as well as perform some operations (run with -h for help)
If it doesn't convert between v2 -> xml directly, it could be a bug, but that should be workaroundable by converting to v1 binary first, then xml (it's hard to get all possible flag combinations to work, specially the less used ones)
Thank dark_sylinc
So this is how I understand
+ OgreMeshTool has 2 features: upgrade mesh file & convert mesh file to xml.
+ If you drag-n-drop the mesh/skeleton file into OgreMeshTool, it will just upgrade the drop-file for you (overwrite the old file)
+ If you want it to generate xml, you have to use command line.
I think you mistake about (run with -h for help), I got error when I run that command (maybe I did something wrong).
Code: Select all
E:\Source\_build\OgreSDK\bin\debug>OgreMeshTool_d.exe -h
Invalid option -h
Couldn't identify extension of filename '-h'
Exception caught: Could not open '-h'
I think it's a mistake because just run 'OgreMeshTool_d.exe' and I got a bunch of help text
Code: Select all
E:\Source\_build\OgreSDK\bin\debug>OgreMeshTool_d.exe
OgreMeshTool Tindalos (2.1.0) unstable
Upgrades or downgrades .mesh file versions.
Provided for OGRE by Steve Streeting 2004-2015
Usage: OgreMeshTool [opts] sourcefile [destfile]
-i = Interactive mode, prompt for options. Implies -U
-autogen = Generate autoconfigured LOD. No more LOD options needed!. Impli
es -U
-l lodlevels = number of LOD levels
-d loddist = distance increment to reduce LOD
-p lodpercent = Percentage triangle reduction amount per LOD
-f lodnumtris = Fixed vertex reduction per LOD
-e = DON'T generate edge lists (for stencil shadows)
-t = Generate tangents (for normal mapping). Implies -U
-td [uvw|tangent]
= Tangent vertex semantic destination (default tangent)
-ts [3|4] = Tangent size (3 or 4 components, 4 includes parity, default 3)
-tm = Split tangent vertices at UV mirror points
-tr = Split tangent vertices where basis is rotated > 90 degrees
-r = DON'T reorganise buffers to recommended format
-o = DON'T optimise out redundant tracks & keyframes
-d3d = Convert to D3D colour formats
-gl = Convert to GL colour formats
-srcd3d = Interpret ambiguous colours as D3D style
-srcgl = Interpret ambiguous colours as GL style
-E endian = Set endian mode 'big' 'little' or 'native' (default)
-b = Recalculate bounding box (static meshes only)
-V version = Specify OGRE version format to write instead of latest
Options are: 2.1, 1.10, 1.8, 1.7, 1.4, 1.0
-v2 Force export the mesh as a v2 object. Keeps the original format oth
erwise.
-v1 Force export the mesh as a v1 object. Keeps the original format oth
erwise.
-O puqs = Optimize vertex buffers for shaders.
p converts POSITION to 16-bit floats
q converts normal tangent and bitangent (28-36 bytes) to QTangents
(8 bytes).
u converts UVs to 16-bit floats.
s make shadow mapping passes have their own optimized buffers. Over
rides existing ones if any.
S strips the buffers for shadow mapping (consumes less space and me
mory).
-U = Performs the opposite of -O puq: Converts 16-bit half to to float a
nd
converts QTangents to Normal + Tangent + Reflection. Needed by many
other options that have to read from position, normals or UVs.
'-o puq' can be used to optimize the buffers again right before sav
ing to disk.
sourcefile = name of file to convert
destfile = optional name of file to write to. If you don't
specify this OGRE overwrites the existing file.
Recommended params for modern DESKTOP (w/ normal mapping):
OgreMeshTool -e -t -ts 4 -O puqs sourcefile [destfile]
Recommended params for GLES2 (w/ normal mapping):
OgreMeshTool -e -t -ts 4 -O qs sourcefile [destfile]
Recommended params for modern DESKTOP (w/out normal mapping):
OgreMeshTool -e -O puqs sourcefile [destfile]
Recommended params for GLES2 (w/out normal mapping):
OgreMeshTool -e -O qs sourcefile [destfile]
But I can't find anything about xml in this help text