Page 1 of 1

[2.1] Can't export a mesh to xml using OgreMeshTool

Posted: Wed Oct 24, 2018 1:43 pm
by Slicky
What am I doing wrong? I took the cube_d.mesh and tried another but have succeeded in getting zero xml files.

Image

Re: [2.1] Can't export a mesh to xml using OgreMeshTool

Posted: Wed Oct 24, 2018 2:14 pm
by Hrenli
It's not you, it's the state of OgreMeshTool. mesh->xml conversion was broken for ages, supposedly fixed (viewtopic.php?f=2&t=91656&hilit=ogremeshtool) but AFAIK still broken...

Re: [2.1] Can't export a mesh to xml using OgreMeshTool

Posted: Wed Oct 24, 2018 2:18 pm
by Slicky
Ah ok. I didn't know that.

Re: [2.1] Can't export a mesh to xml using OgreMeshTool

Posted: Wed Oct 24, 2018 2:21 pm
by Hrenli
There is still a chance I am wrong on that though and there might be a way to export an xml from a v2 mesh using existing tools. Would be nice to hear our gurus on the subject.

But I suspect that people are mostly interested in xml->mesh workflow therefore the reverse is not needed/overlooked.

Re: [2.1] Can't export a mesh to xml using OgreMeshTool

Posted: Wed Oct 24, 2018 2:26 pm
by Hrenli
And another note - it works if .mesh is in v1 format. It's only v2 which is behind the exception wall.

Re: [2.1] Can't export a mesh to xml using OgreMeshTool

Posted: Thu Oct 25, 2018 5:15 am
by dark_sylinc
Fixed. Thanks for the report.
Hrenli wrote:
Wed Oct 24, 2018 2:14 pm
It's not you, it's the state of OgreMeshTool. mesh->xml conversion was broken for ages, supposedly fixed (viewtopic.php?f=2&t=91656&hilit=ogremeshtool) but AFAIK still broken...
I totally forgot about it.

Re: [2.1] Can't export a mesh to xml using OgreMeshTool

Posted: Thu Oct 25, 2018 9:12 am
by Slicky
Nice - thanks

Re: [2.1] Can't export a mesh to xml using OgreMeshTool

Posted: Thu Oct 25, 2018 4:14 pm
by Slicky
I updated to latest and rebuilt. The mesh tool no longer complains but there is no .xml file exported.

Code: Select all

./ogremeshtool Cube_d.mesh cube_d.xml

Re: [2.1] Can't export a mesh to xml using OgreMeshTool

Posted: Thu Oct 25, 2018 4:47 pm
by dark_sylinc
I cannot reproduce. The following command (built in Debug):

Code: Select all

./OgreMeshTool_d Cube_d.mesh x.xml
Generates the following:

Code: Select all

<mesh>
<submeshes>
<submesh material="DebugCube" usesharedvertices="false" use32bitindexes="false" operationtype="triangle_list">
<faces count="12">
<face v1="0" v2="1" v3="2"/>
<face v1="0" v2="2" v3="3"/>
<face v1="4" v2="5" v3="7"/>
<face v1="5" v2="6" v3="7"/>
<face v1="8" v2="9" v3="11"/>
<face v1="9" v2="10" v3="11"/>
<face v1="12" v2="13" v3="15"/>
<face v1="13" v2="14" v3="15"/>
<face v1="16" v2="17" v3="18"/>
<face v1="16" v2="18" v3="19"/>
<face v1="20" v2="21" v3="23"/>
<face v1="21" v2="22" v3="23"/>
</faces>
<geometry vertexcount="24">
<vertexbuffer positions="true" normals="true" texture_coord_dimensions_0="float2" texture_coords="1">
<vertex>
<position x="1" y="1" z="-1"/>
<normal x="3.24667e-41" y="1.51204e-40" z="0"/>
<texcoord u="0" v="1"/>
</vertex>
<vertex>
<position x="1" y="-1" z="-1"/>
<normal x="3.24667e-41" y="1.51204e-40" z="1"/>
<texcoord u="1" v="1"/>
</vertex>
<vertex>
<position x="-1" y="-1" z="-1"/>
<normal x="3.24667e-41" y="1.51204e-40" z="1"/>
<texcoord u="1" v="0"/>
</vertex>
<vertex>
<position x="-1" y="1" z="-1"/>
<normal x="3.24667e-41" y="1.51204e-40" z="0"/>
<texcoord u="0" v="0"/>
</vertex>
<vertex>
<position x="1" y="0.999999" z="1"/>
<normal x="-2.01953" y="1.99414" z="0"/>
<texcoord u="0" v="1"/>
</vertex>
<vertex>
<position x="-1" y="1" z="1"/>
<normal x="-2.01953" y="1.99414" z="1"/>
<texcoord u="1" v="1"/>
</vertex>
<vertex>
<position x="-1" y="-1" z="1"/>
<normal x="-2.01953" y="1.99414" z="1"/>
<texcoord u="1" v="0"/>
</vertex>
<vertex>
<position x="0.999999" y="-1" z="1"/>
<normal x="-2.01953" y="1.99414" z="0"/>
<texcoord u="0" v="0"/>
</vertex>
<vertex>
<position x="1" y="1" z="-1"/>
<normal x="3.24667e-41" y="1.81551e+16" z="0"/>
<texcoord u="0" v="1"/>
</vertex>
<vertex>
<position x="1" y="0.999999" z="1"/>
<normal x="3.24667e-41" y="1.81551e+16" z="1"/>
<texcoord u="1" v="1"/>
</vertex>
<vertex>
<position x="0.999999" y="-1" z="1"/>
<normal x="3.24667e-41" y="1.81551e+16" z="1"/>
<texcoord u="1" v="0"/>
</vertex>
<vertex>
<position x="1" y="-1" z="-1"/>
<normal x="3.24667e-41" y="1.81551e+16" z="0"/>
<texcoord u="0" v="0"/>
</vertex>
<vertex>
<position x="1" y="-1" z="-1"/>
<normal x="-2.01953" y="1.99805" z="0"/>
<texcoord u="0" v="1"/>
</vertex>
<vertex>
<position x="0.999999" y="-1" z="1"/>
<normal x="-2.01953" y="1.99805" z="1"/>
<texcoord u="1" v="1"/>
</vertex>
<vertex>
<position x="-1" y="-1" z="1"/>
<normal x="-2.01953" y="1.99805" z="1"/>
<texcoord u="1" v="0"/>
</vertex>
<vertex>
<position x="-1" y="-1" z="-1"/>
<normal x="-2.01953" y="1.99805" z="0"/>
<texcoord u="0" v="0"/>
</vertex>
<vertex>
<position x="-1" y="-1" z="-1"/>
<normal x="1.81551e+16" y="1.24302e-40" z="0"/>
<texcoord u="0" v="1"/>
</vertex>
<vertex>
<position x="-1" y="-1" z="1"/>
<normal x="1.81551e+16" y="1.24302e-40" z="1"/>
<texcoord u="1" v="1"/>
</vertex>
<vertex>
<position x="-1" y="1" z="1"/>
<normal x="1.81551e+16" y="1.24302e-40" z="1"/>
<texcoord u="1" v="0"/>
</vertex>
<vertex>
<position x="-1" y="1" z="-1"/>
<normal x="1.81551e+16" y="1.24302e-40" z="0"/>
<texcoord u="0" v="0"/>
</vertex>
<vertex>
<position x="1" y="0.999999" z="1"/>
<normal x="-2.02734" y="1.99414" z="0"/>
<texcoord u="0" v="1"/>
</vertex>
<vertex>
<position x="1" y="1" z="-1"/>
<normal x="-2.02734" y="1.99414" z="1"/>
<texcoord u="1" v="1"/>
</vertex>
<vertex>
<position x="-1" y="1" z="-1"/>
<normal x="-2.02734" y="1.99414" z="1"/>
<texcoord u="1" v="0"/>
</vertex>
<vertex>
<position x="-1" y="1" z="1"/>
<normal x="-2.02734" y="1.99414" z="0"/>
<texcoord u="0" v="0"/>
</vertex>
</vertexbuffer>
</geometry>
</submesh>
</submeshes>
</mesh>
Perhaps your Cube_d.mesh got overwritten while you were experimenting? Try grabbing it again from the DebugPack.zip file

Re: [2.1] Can't export a mesh to xml using OgreMeshTool

Posted: Thu Oct 25, 2018 5:11 pm
by Slicky
Sorry my mistake. After rebuilding Ogre I failed to copy the new rendersystem_null.dll since I normally don't look for it. I had copied the other newer Ogre dll's.

It works now.