Blender26 Ogre Exporter
-
- Gnoblar
- Posts: 2
- Joined: Thu Sep 25, 2014 1:01 am
Re: Blender26 Ogre Exporter
Hello everybody
i am a noob at blender and ogre, and i need some help with my mesh.
i have one mesh with one skeleton and animation, one material and one texture (that was create with UV Mapping editor). When i export my mesh everything is ok, but, when i use it on my application, the texture was not display.
The animation work fine in the application
I'm working on Debian, and i have ogre 1.9 and blender 2.66 the ogre exporter is 0.6 version
i'm sorry about my bad english.
i am a noob at blender and ogre, and i need some help with my mesh.
i have one mesh with one skeleton and animation, one material and one texture (that was create with UV Mapping editor). When i export my mesh everything is ok, but, when i use it on my application, the texture was not display.
The animation work fine in the application
I'm working on Debian, and i have ogre 1.9 and blender 2.66 the ogre exporter is 0.6 version
i'm sorry about my bad english.
You do not have the required permissions to view the files attached to this post.
-
- OGRE Team Member
- Posts: 4304
- Joined: Mon Feb 04, 2008 2:02 pm
- Location: Germany
- x 136
Re: Blender26 Ogre Exporter
Was there a material file created with the export? Did you tell Ogre where to find it via the resources.cfg? Was it loaded successfully (check Ogre.log)?
Ogre Admin [Admin, Dev, PR, Finance, Wiki, etc.] | BasicOgreFramework | AdvancedOgreFramework
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...
-
- Gnoblar
- Posts: 6
- Joined: Sun Nov 09, 2014 5:28 am
Re: Blender26 Ogre Exporter
Hi,
I tried with blender2orge, and i noticed the number of vertices between blender and exported orge is different. In blender, my object has 574 vertices, but after exporting to orge, the object has 600 vertices (viewed in Nimet Orge Viewer and observed from blender2orge mini report). Does blender2orge have mesh optimization that adds in extra vertices? I would like to keep track the actual vertices but now it's abit hay-wired after export. Is there any way to keep original number of vertices during export?
I tried with blender2orge, and i noticed the number of vertices between blender and exported orge is different. In blender, my object has 574 vertices, but after exporting to orge, the object has 600 vertices (viewed in Nimet Orge Viewer and observed from blender2orge mini report). Does blender2orge have mesh optimization that adds in extra vertices? I would like to keep track the actual vertices but now it's abit hay-wired after export. Is there any way to keep original number of vertices during export?
-
- OGRE Team Member
- Posts: 4304
- Joined: Mon Feb 04, 2008 2:02 pm
- Location: Germany
- x 136
Re: Blender26 Ogre Exporter
Did you check if that vertices count change happens while processing of the OgreXMLConverter? If it changes already prior to that, then it most likely will be related to the exporter or Blender. If the OgreXMLConverter is responsible for the change, than it might be some optimization there.
Ogre Admin [Admin, Dev, PR, Finance, Wiki, etc.] | BasicOgreFramework | AdvancedOgreFramework
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...
-
- Gremlin
- Posts: 169
- Joined: Sun Apr 29, 2012 1:03 am
- Location: Santa Monica, California
- x 19
Re: Blender26 Ogre Exporter
It is normal for the vertex count of exported geometry to be higher. The count reported in blender is based on the concept of a vertex being just an XYZ position in space, and not considering vertex attributes like normals, texture coordinates or vertex colors.
The vertex count reported by the exporter is based on the concept of a vertex like what the 3d hardware expects which includes vertex attributes.
For example, a flat shaded cube in blender will have 8 vertices. But when exported, each of those 8 vertices will be expanded into 3 ogre-vertices because each corner of the cube is shared by 3 faces with different normals. So the exported vertex count will be 24.
It works the same for texture coordinates and vertex colors also. If there is a seam in the UV-mapping, every blender-vertex along the seam will be expanded into 2 ogre-vertices because the texture coordinates differ (even if the normals are shared).
The vertex count reported by the exporter is based on the concept of a vertex like what the 3d hardware expects which includes vertex attributes.
For example, a flat shaded cube in blender will have 8 vertices. But when exported, each of those 8 vertices will be expanded into 3 ogre-vertices because each corner of the cube is shared by 3 faces with different normals. So the exported vertex count will be 24.
It works the same for texture coordinates and vertex colors also. If there is a seam in the UV-mapping, every blender-vertex along the seam will be expanded into 2 ogre-vertices because the texture coordinates differ (even if the normals are shared).
-
- Gnoblar
- Posts: 6
- Joined: Sun Nov 09, 2014 5:28 am
Re: Blender26 Ogre Exporter
Hi spacegaier,
I double checked the print out from Blender exporter, and yes, it exports addition vertices.
Hi lunkhound,
Is there any way we can keep track of the vertices including vertex number and ordering? It is needed for object instancing in glsl (by passing an instance id to each vertex according to the order of the mesh in Blender for location manipulation). Plus, I noticed some vertices are shared among each other too, which messes up the instancing method. Initially, I wanted to import the exported mesh.xml back to Blender to check the vertices, but Orge BlenderImport (http://www.ogre3d.org/tikiwiki/tiki-ind ... ort_Script) seems to be outdated and not working on latest Blender anymore.
I double checked the print out from Blender exporter, and yes, it exports addition vertices.
Hi lunkhound,
Is there any way we can keep track of the vertices including vertex number and ordering? It is needed for object instancing in glsl (by passing an instance id to each vertex according to the order of the mesh in Blender for location manipulation). Plus, I noticed some vertices are shared among each other too, which messes up the instancing method. Initially, I wanted to import the exported mesh.xml back to Blender to check the vertices, but Orge BlenderImport (http://www.ogre3d.org/tikiwiki/tiki-ind ... ort_Script) seems to be outdated and not working on latest Blender anymore.
-
- Gremlin
- Posts: 169
- Joined: Sun Apr 29, 2012 1:03 am
- Location: Santa Monica, California
- x 19
Re: Blender26 Ogre Exporter
I'm not sure exactly what you are trying to do, but I don't know of any way to determine the vertex numbering as it was in Blender without modifying the exporter. However, it should be pretty easy to modify the exporter code to output the data you want.kkl888 wrote:Hi lunkhound,
Is there any way we can keep track of the vertices including vertex number and ordering? It is needed for object instancing in glsl (by passing an instance id to each vertex according to the order of the mesh in Blender for location manipulation). Plus, I noticed some vertices are shared among each other too, which messes up the instancing method. Initially, I wanted to import the exported mesh.xml back to Blender to check the vertices, but Orge BlenderImport (http://www.ogre3d.org/tikiwiki/tiki-ind ... ort_Script) seems to be outdated and not working on latest Blender anymore.
-
- Gnoblar
- Posts: 6
- Joined: Sun Nov 09, 2014 5:28 am
Re: Blender26 Ogre Exporter
I think I could modify the exporter and see if it works. In which part of code should I look for?
-
- Gremlin
- Posts: 169
- Joined: Sun Apr 29, 2012 1:03 am
- Location: Santa Monica, California
- x 19
Re: Blender26 Ogre Exporter
Look for the function called "dot_mesh" somewhere about 5000 lines in. The ogre vertex index is tracked with a variable called "numverts" in that function, it looks like the blender vertex index is called "idx".
-
- Gnoblar
- Posts: 6
- Joined: Sun Nov 09, 2014 5:28 am
Re: Blender26 Ogre Exporter
Ok, i'll look into it and see if I can make the changes. Thanks alot for your help. Really appreciate it.
-
- Gnoblar
- Posts: 12
- Joined: Wed Dec 10, 2014 11:29 am
Re: Blender26 Ogre Exporter
I am having troubles converting a model from XNA to Ogre3D.
At my university we have an old program running using XNA and C#, and we want to reimplement everything in Ogre3D, therefore we need to bring the models from one format to the ogre mesh format, but this fails BADLY.
Here is the model in its original form: https://drive.google.com/file/d/0Bx9OKn ... sp=sharing
I am having Blender 2.72b and the newest Ogre Exporter.
The aim is to use this model for avateering with the kinect. As long as I am using sinbad everything is fine, but as soon as I open the sinbad.blend and export it or using the model provided, everything fails BADLY. The arms are twisting and screwing around.
Here is a screenshot from the OgreMeshViewer for the Sinbad Dance animation after I've exportet it.

The same happens to the model I provided above. As the model does not contain any animation, I've given you Sinbad, but for my model it looks nearly the same as soon as I am applying the kinect joint orienatations.
At my university we have an old program running using XNA and C#, and we want to reimplement everything in Ogre3D, therefore we need to bring the models from one format to the ogre mesh format, but this fails BADLY.
Here is the model in its original form: https://drive.google.com/file/d/0Bx9OKn ... sp=sharing
I am having Blender 2.72b and the newest Ogre Exporter.
The aim is to use this model for avateering with the kinect. As long as I am using sinbad everything is fine, but as soon as I open the sinbad.blend and export it or using the model provided, everything fails BADLY. The arms are twisting and screwing around.
Here is a screenshot from the OgreMeshViewer for the Sinbad Dance animation after I've exportet it.

The same happens to the model I provided above. As the model does not contain any animation, I've given you Sinbad, but for my model it looks nearly the same as soon as I am applying the kinect joint orienatations.
-
- Gnoblar
- Posts: 1
- Joined: Sun Feb 22, 2015 10:07 pm
Re: Blender26 Ogre Exporter
Does anyone have an updated link for the exporter? I have found all sorts of pages on the Ogre wiki about exporting from Blender to Ogre, but none of the tools linked seem to work at all in any way.
-
- Gnoblar
- Posts: 6
- Joined: Sun Nov 09, 2014 5:28 am
Re: Blender26 Ogre Exporter
Hi, is it possible if we can have swap axis option with "x-y-z" when export?
-
- Kobold
- Posts: 36
- Joined: Tue Nov 11, 2014 9:29 am
- x 2
Re: Blender26 Ogre Exporter
Hi everyone:
Is it possible to export armature animation with ik constraints?
I have to bake (with clear constraints toggled) before export, but it will delete constraints, i can't bake other animations unless i recreate the ik constraints.
This problem is killing me, any help would be greatly appreciated!!!!!!!!!!!!!!!!!!!!!!!!
Is it possible to export armature animation with ik constraints?
I have to bake (with clear constraints toggled) before export, but it will delete constraints, i can't bake other animations unless i recreate the ik constraints.
This problem is killing me, any help would be greatly appreciated!!!!!!!!!!!!!!!!!!!!!!!!
-
- Gnoblar
- Posts: 20
- Joined: Thu Aug 25, 2011 8:29 pm
- x 3
Re: Blender26 Ogre Exporter
Hi everyone.
Anyone still around??? 
I'm having difficulty with this new exporter for interiors to be lightmapped. I've played with all the options, no matter what I do I can't get the 2nd UV channel ("lightmap") to be tagged (marked as a lightmap channel ready to bake to) because it's using "shared vertex data". If I text-edit the XML to say usesharedvertices="false", it crashes the OgreXMLConverter.exe. The workaround is to save as "legacy mesh", bring it into 2.49b via 2.59, and export from there using a very old exporter, but we'd really like to just be using 1 version of Blender.
Any help with what we're doing wrong with this new exporter? Thanks for your time!


I'm having difficulty with this new exporter for interiors to be lightmapped. I've played with all the options, no matter what I do I can't get the 2nd UV channel ("lightmap") to be tagged (marked as a lightmap channel ready to bake to) because it's using "shared vertex data". If I text-edit the XML to say usesharedvertices="false", it crashes the OgreXMLConverter.exe. The workaround is to save as "legacy mesh", bring it into 2.49b via 2.59, and export from there using a very old exporter, but we'd really like to just be using 1 version of Blender.
Any help with what we're doing wrong with this new exporter? Thanks for your time!
-
- Gremlin
- Posts: 199
- Joined: Thu Jan 13, 2005 2:35 pm
- Location: Tampere, Finland
- x 15
Re: Blender26 Ogre Exporter
Where can I download the latest version of this exporter? The bitbucket link in the first post does not work.
-
- Kobold
- Posts: 25
- Joined: Wed Sep 10, 2014 5:18 pm
- x 1
Re: Blender26 Ogre Exporter
This seems to be latest versionhttps://bitbucket.org/iboshkov/blender2ogre with latest change at 2015-04-19
-
- Gremlin
- Posts: 199
- Joined: Thu Jan 13, 2005 2:35 pm
- Location: Tampere, Finland
- x 15
Re: Blender26 Ogre Exporter
Thanks. That one seems to work fine in blender 2.72 too.kracejic wrote:This seems to be latest versionhttps://bitbucket.org/iboshkov/blender2ogre with latest change at 2015-04-19
-
- Goblin
- Posts: 274
- Joined: Wed Feb 09, 2005 5:09 pm
- Location: catskill escarpment, new york, usa
- x 3
Re: Blender26 Ogre Exporter
fractile wrote:Thanks. That one seems to work fine in blender 2.72 too.kracejic wrote:This seems to be latest versionhttps://bitbucket.org/iboshkov/blender2ogre with latest change at 2015-04-19
fwiw, the exporter works well with 2.75 as well (exported to ogre 1.10 and using openspace3d to render), and i threw it an armature with spline ik constraints driven by yet another armature with a couple of physics simulations going on.
there are some normal mapping issues, but i think it's due to my lack of skill with xnormal.
-
- Gnoblar
- Posts: 6
- Joined: Sun Nov 09, 2014 5:28 am
Re: Blender26 Ogre Exporter
Hi how do we export 2 objects sharing the same skeleton into 1 mesh xml and 1 skeleton xml? I have 2 objects sharing the same skeleton in Blender, and when I export using Blender2Ogre 0.6.0, it exports 2 mesh xml and 2 skeleton xml. I checked from FAQ and it says group them by using "merge" name at the front. However, the exported merge xml file does not contains any skeleton link information. Am I missing something? How should we do in Blender so it exports 1 mesh xml and 1 skeleton xml with 2 objects sharing same armature object?
* The attachment is the sample of desired result (with 2 submeshes and 1 skeletonlink in 1 single mesh xml file).
* The attachment is the sample of desired result (with 2 submeshes and 1 skeletonlink in 1 single mesh xml file).
You do not have the required permissions to view the files attached to this post.
-
- Gnoblar
- Posts: 2
- Joined: Fri Oct 30, 2015 3:53 am
Re: Blender26 Ogre Exporter
Hi everyone.
Is it possible to run the io_export_ogreDotScene.py script from the command line ?
I'll appreciate he help.
Is it possible to run the io_export_ogreDotScene.py script from the command line ?

-
- Gnoblar
- Posts: 2
- Joined: Fri Oct 30, 2015 3:53 am
Re: Blender26 Ogre Exporter
I was able to make it run in the command line and convert a blender file sent as a parameter.
Let me know if you need it.
Let me know if you need it.
-
- Goblin
- Posts: 274
- Joined: Wed Feb 09, 2005 5:09 pm
- Location: catskill escarpment, new york, usa
- x 3
Re: Blender26 Ogre Exporter-problem with exporting spline ik
colleagues:
I have had good luck with the exporter, but have a problem with exporting a rig with spline ik. If the action of the deformation rig is in the same frame range as the action of the armature which drives the spline which drives the deformation rig, the exporter exports location and rotation information driven by the control rig, but not scaling of the deform rig bones.
I don't quite know how to bake the control rig deformations to the deformation rig in blender, if anyone has guidance, feel free to respond. (since the latter is all ogre cares about).
My post on blenderartists is here:
http://blenderartists.org/forum/showthr ... ost2981043
And to make things easier, here is the blend file, what I am trying to do is to get the scale transformations recorded as keyframes to the bones in the deformation rig controlled by the spline.
I have had good luck with the exporter, but have a problem with exporting a rig with spline ik. If the action of the deformation rig is in the same frame range as the action of the armature which drives the spline which drives the deformation rig, the exporter exports location and rotation information driven by the control rig, but not scaling of the deform rig bones.
I don't quite know how to bake the control rig deformations to the deformation rig in blender, if anyone has guidance, feel free to respond. (since the latter is all ogre cares about).
My post on blenderartists is here:
http://blenderartists.org/forum/showthr ... ost2981043
And to make things easier, here is the blend file, what I am trying to do is to get the scale transformations recorded as keyframes to the bones in the deformation rig controlled by the spline.
-
- Goblin
- Posts: 274
- Joined: Wed Feb 09, 2005 5:09 pm
- Location: catskill escarpment, new york, usa
- x 3
blender spline ik baking solved, but incorrect export to o3d
colleagues:
i solved the baking of a control rig transform to a deformation rig transform in blender. http://blenderartists.org/forum/showthr ... -spline-ik
however, while what i see in blender is as predicting, the exporter is not getting the weight values and/or bone transforms propertly exported into ogre, as the following screenshots show:
i solved the baking of a control rig transform to a deformation rig transform in blender. http://blenderartists.org/forum/showthr ... -spline-ik
however, while what i see in blender is as predicting, the exporter is not getting the weight values and/or bone transforms propertly exported into ogre, as the following screenshots show:
You do not have the required permissions to view the files attached to this post.
-
- OGRE Expert User
- Posts: 1148
- Joined: Sat Jul 06, 2013 10:59 pm
- Location: Chile
- x 169
Re: Blender26 Ogre Exporter
not sure about that specific problem, but every time I had a problem with skeletons, I make sure that the mesh and the skeleton has the scale and rotation applied (ctrl+A) and share the same position (origin in the same pos) (for that you can select the skeleton, Shift+S>cursor to selected, then select the mesh, ctrl+alt+shift+C>Origin to 3D Cursor. maybe it mess up the envelope, so maybe is the other way around (first mesh then skel), don't remember )