Martin said:
wow you have big plans but I think using the XML pareser won't be that easy.
In genreal I think the export is much more important than the import.
Is the binary format documented. Maybe the binary format is even easier to parse since you won't need the XML parser.
I made the experience that reading binary files is much easier than reading ASCII/XML files.
That's a possibility. I'm not as concerned about import as export at this point.
Martin said:
But if you are in real need I could add a intermediate custom function for you.
It would be great if I could get the key frame data for the camera and other geometry transforms, in any way!
Martin said:
Do you have some simple XML Ogre example files (with material)? I couldn't find any.
Here is a very short example of an Ogre mesh file:
----------
<mesh>
<submeshes>
<submesh material="Examples/CloudySky"
usesharedvertices="false" use32bitindexes="false"
operationtype="triangle_list">
<faces count="82">
<face v1="0" v2="1" v3="2" />
<face v1="3" v2="4" v3="5" />
<face v1="1" v2="0" v3="6" />
</faces>
<geometry vertexcount="58">
<vertexbuffer positions="true" normals="true"
texture_coord_dimensions_0="2" texture_coords="1">
<vertex>
<position x="5.61572" y="15.2486" z="5.66475" />
<normal x="0.278925" y="0.473199" z="0.835634" />
<texcoord u="2.10283" v="0.413862" />
</vertex>
<vertex>
<position x="6.1485" y="16.1399" z="4.58445" />
<normal x="0.420076" y="0.583175" z="0.695301" />
<texcoord u="2.20506" v="0.217455" />
</vertex>
<vertex>
<position x="4.08621" y="14.7806" z="6.42355" />
<normal x="0.433503" y="0.286322" z="0.854456" />
<texcoord u="1.79244" v="0.522846" />
</vertex>
<vertex>
<position x="9.99759" y="16.3372" z="1.38245" />
<normal x="0.698421" y="0.531478" z="0.479311" />
<texcoord u="2.97686" v="0.0968456" />
</vertex>
<vertex>
<position x="11.0235" y="16.7644" z="-0.382347" />
<normal x="0.814045" y="0.236502" z="0.530469" />
<texcoord u="3.17599" v="-0.0290602" />
</vertex>
<vertex>
<position x="9.53412" y="16.7757" z="1.01385" />
<normal x="0.412821" y="0.800843" z="0.433854" />
<texcoord u="2.87849" v="0.00490338" />
</vertex>
<vertex>
<position x="6.64199" y="15.3338" z="5.26825" />
<normal x="0.391826" y="0.504166" z="0.769603" />
<texcoord u="2.31191" v="0.386925" />
</vertex>
</vertexbuffer>
</geometry>
</submesh>
</submeshes>
</mesh>
----------
and here is a material file:
----------
material Examples/CloudySky
{
technique
{
pass
{
lighting off
depth_write off
texture_unit
{
texture clouds.jpg
scroll_anim 0.15 0
}
}
}
}
----------
As you can see the material format is not XML. I think this is historical. This material show simple material animation. It is a scrolling cloud texture.
All pretty simple!