Why in the 2.0+, OgreXmlConverter is not exist anymore? Topic is solved

Discussion area about developing with Ogre-Next (2.1, 2.2 and beyond)


Post Reply
123iamking
Gremlin
Posts: 152
Joined: Sat Aug 12, 2017 4:16 pm
x 4

Why in the 2.0+, OgreXmlConverter is not exist anymore?

Post by 123iamking »

According to OgreXmlConverter's wiki page
This tool is automatically generated in folder bin\release as OgreXMLConverter.exe after you build Ogre.
However, in the 2.x, it is not exist anymore, but can still be downloaded at http://www.ogre3d.org/download/tools (near the bottom)
This tool is necessary to find out the detail of the '.skeleton' file. For example, how can I know what animation contains in the file 'Stickman.skeleton' ?
So I have a few questions:
1. how can I know what animation contains in the file 'Stickman.skeleton' (a sample of Ogre 2.1) ? I have tried OgreCommandLineTools for Windows (version 1.7.2, includes OgreXmlConverter) to convert the file 'Stickman.skeleton' and I get the error: (7:InternalErrorException): Invalid file: version incompatible, file reports (file OgreXMLConverter.log). :cry:
2. Why is it said in the wiki page the OgreXMLConverter can be download at at http://www.ogre3d.org/download/tools, but currently (9/24/2017), I don't see that tool there? :?
3. How were the file 'Stickman.skeleton' & 'Stickman.mesh' made? (a little derail question, but I can't help asking)
4. Why in the 2.0+, OgreXmlConverter is not exist anymore? Is it abandoned?
123iamking
Gremlin
Posts: 152
Joined: Sat Aug 12, 2017 4:16 pm
x 4

Re: Why in the 2.0+, OgreXmlConverter is not exist anymore?

Post by 123iamking »

1. how can I know what animation contains in the file 'Stickman.skeleton' (a sample of Ogre 2.1) ?
About this, I just found out a tool of dark_sylinc at his website - Ogre Meshy, this tool is also open source. To view animation, just switch to 'Animations' tab of the tool.
Hrenli
Halfling
Posts: 73
Joined: Tue Jun 14, 2016 12:26 pm
x 19

Re: Why in the 2.0+, OgreXmlConverter is not exist anymore?

Post by Hrenli »

In 2.0+ it is called OgreMeshTool.exe and part of the Ogre SDK itself. Some of the v2 mesh functionality is not supported though (f.e. you can't get an xml from v2 mesh).

As for the stickman mesh and skeleton files - I guess the mesh and animation were made in blender, exported to Ogre xml and converted to .mesh and .skeleton using the tool above (or OgreXmlConverter if it was done in v1).
123iamking
Gremlin
Posts: 152
Joined: Sat Aug 12, 2017 4:16 pm
x 4

Re: Why in the 2.0+, OgreXmlConverter is not exist anymore?

Post by 123iamking »

Hrenli wrote:In 2.0+ it is called OgreMeshTool.exe and part of the Ogre SDK itself. Some of the v2 mesh functionality is not supported though (f.e. you can't get an xml from v2 mesh).
Currently, according to the OgreMeshTool.exe file when it's run
OgreMeshTool.exe wrote:OgreMeshTool Tindalos (2.1.0) unstable
Upgrades or downgrades .mesh file versions.
Provided for OGRE by Steve Streeting 2004-2015
I thought it is used to upgrades or downgrades .mesh file versions only. So in the future, will it support Xml Converter? I understand that Ogre team just haven't written the Xml converter feature yet for v2 for now.
Hrenli wrote:As for the stickman mesh and skeleton files - I guess the mesh and animation were made in blender, exported to Ogre xml and converted to .mesh and .skeleton using the tool above (or OgreXmlConverter if it was done in v1).
But if it's mesh v2, how can you make a xml for it (you said can't get an xml from v2 mesh)? :D
User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5296
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1278
Contact:

Re: Why in the 2.0+, OgreXmlConverter is not exist anymore?

Post by dark_sylinc »

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)
123iamking
Gremlin
Posts: 152
Joined: Sat Aug 12, 2017 4:16 pm
x 4

Re: Why in the 2.0+, OgreXmlConverter is not exist anymore?

Post by 123iamking »

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 :(
User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5296
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1278
Contact:

Re: Why in the 2.0+, OgreXmlConverter is not exist anymore?

Post by dark_sylinc »

Updated the help string to better reflect what it does.
123iamking wrote:But I can't find anything about xml in this help text :(
Just run

Code: Select all

OgreMeshTool.exe sourcefile.mesh output.xml
If that doesn't work, then use v1 as intermediary:

Code: Select all

OgreMeshTool.exe -v1 sourcefile.mesh temp.mesh
OgreMeshTool.exe temp.mesh output.xml
123iamking
Gremlin
Posts: 152
Joined: Sat Aug 12, 2017 4:16 pm
x 4

Re: Why in the 2.0+, OgreXmlConverter is not exist anymore?

Post by 123iamking »

Thank you very much, dark_sylinc - It works, you're awesome :)

I have an idea: make a GUI with C# winform (C# winform is made very fast) for these tools (This C# winform just pass parameters for the exe tool of Ogre). This way, Ogre Tool will be much easier to use :)
Post Reply