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

Problems building or running the engine, queries about how to use features etc.
Post Reply
Slicky
Bronze Sponsor
Bronze Sponsor
Posts: 537
Joined: Mon Apr 14, 2003 11:48 pm
Location: Was LA now France
x 12

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

Post by Slicky » Wed Oct 24, 2018 1:43 pm

What am I doing wrong? I took the cube_d.mesh and tried another but have succeeded in getting zero xml files.

Image
0 x

Hrenli
Halfling
Posts: 67
Joined: Tue Jun 14, 2016 12:26 pm
x 11

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

Post by Hrenli » 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...
0 x

Slicky
Bronze Sponsor
Bronze Sponsor
Posts: 537
Joined: Mon Apr 14, 2003 11:48 pm
Location: Was LA now France
x 12

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

Post by Slicky » Wed Oct 24, 2018 2:18 pm

Ah ok. I didn't know that.
0 x

Hrenli
Halfling
Posts: 67
Joined: Tue Jun 14, 2016 12:26 pm
x 11

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

Post by Hrenli » Wed Oct 24, 2018 2:21 pm

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.
0 x

Hrenli
Halfling
Posts: 67
Joined: Tue Jun 14, 2016 12:26 pm
x 11

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

Post by Hrenli » Wed Oct 24, 2018 2:26 pm

And another note - it works if .mesh is in v1 format. It's only v2 which is behind the exception wall.
0 x

User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 3997
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 192
Contact:

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

Post by dark_sylinc » Thu Oct 25, 2018 5:15 am

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.
0 x

Slicky
Bronze Sponsor
Bronze Sponsor
Posts: 537
Joined: Mon Apr 14, 2003 11:48 pm
Location: Was LA now France
x 12

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

Post by Slicky » Thu Oct 25, 2018 9:12 am

Nice - thanks
0 x

Slicky
Bronze Sponsor
Bronze Sponsor
Posts: 537
Joined: Mon Apr 14, 2003 11:48 pm
Location: Was LA now France
x 12

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

Post by Slicky » Thu Oct 25, 2018 4:14 pm

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
0 x

User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 3997
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 192
Contact:

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

Post by dark_sylinc » Thu Oct 25, 2018 4:47 pm

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
0 x

Slicky
Bronze Sponsor
Bronze Sponsor
Posts: 537
Joined: Mon Apr 14, 2003 11:48 pm
Location: Was LA now France
x 12

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

Post by Slicky » Thu Oct 25, 2018 5:11 pm

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.
0 x

Post Reply