Blender26 Ogre Exporter

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.
wakamole
Gnoblar
Posts: 2
Joined: Thu Sep 25, 2014 1:01 am

Re: Blender26 Ogre Exporter

Post by wakamole » Mon Oct 27, 2014 11:05 pm

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.
example.zip
this is my Blender file
(214.4 KiB) Downloaded 143 times
0 x

User avatar
spacegaier
OGRE Team Member
OGRE Team Member
Posts: 4291
Joined: Mon Feb 04, 2008 2:02 pm
Location: Germany
Contact:

Re: Blender26 Ogre Exporter

Post by spacegaier » Fri Nov 07, 2014 6:15 pm

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

kkl888
Gnoblar
Posts: 6
Joined: Sun Nov 09, 2014 5:28 am

Re: Blender26 Ogre Exporter

Post by kkl888 » Sun Nov 09, 2014 6:26 am

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

User avatar
spacegaier
OGRE Team Member
OGRE Team Member
Posts: 4291
Joined: Mon Feb 04, 2008 2:02 pm
Location: Germany
Contact:

Re: Blender26 Ogre Exporter

Post by spacegaier » Sun Nov 09, 2014 9:05 pm

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

User avatar
lunkhound
Gremlin
Posts: 169
Joined: Sun Apr 29, 2012 1:03 am
Location: Santa Monica, California

Re: Blender26 Ogre Exporter

Post by lunkhound » Sun Nov 09, 2014 9:56 pm

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

kkl888
Gnoblar
Posts: 6
Joined: Sun Nov 09, 2014 5:28 am

Re: Blender26 Ogre Exporter

Post by kkl888 » Mon Nov 10, 2014 3:31 am

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

User avatar
lunkhound
Gremlin
Posts: 169
Joined: Sun Apr 29, 2012 1:03 am
Location: Santa Monica, California

Re: Blender26 Ogre Exporter

Post by lunkhound » Mon Nov 10, 2014 6:51 pm

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

kkl888
Gnoblar
Posts: 6
Joined: Sun Nov 09, 2014 5:28 am

Re: Blender26 Ogre Exporter

Post by kkl888 » Tue Nov 11, 2014 2:20 am

I think I could modify the exporter and see if it works. In which part of code should I look for?
0 x

User avatar
lunkhound
Gremlin
Posts: 169
Joined: Sun Apr 29, 2012 1:03 am
Location: Santa Monica, California

Re: Blender26 Ogre Exporter

Post by lunkhound » Tue Nov 11, 2014 5:16 am

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

kkl888
Gnoblar
Posts: 6
Joined: Sun Nov 09, 2014 5:28 am

Re: Blender26 Ogre Exporter

Post by kkl888 » Wed Nov 12, 2014 2:00 am

Ok, i'll look into it and see if I can make the changes. Thanks alot for your help. Really appreciate it.
0 x

Elenthidir
Gnoblar
Posts: 12
Joined: Wed Dec 10, 2014 11:29 am

Re: Blender26 Ogre Exporter

Post by Elenthidir » Tue Feb 03, 2015 1:39 pm

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.

Image

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

JontomXire
Gnoblar
Posts: 1
Joined: Sun Feb 22, 2015 10:07 pm

Re: Blender26 Ogre Exporter

Post by JontomXire » Tue Feb 24, 2015 7:46 pm

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

kkl888
Gnoblar
Posts: 6
Joined: Sun Nov 09, 2014 5:28 am

Re: Blender26 Ogre Exporter

Post by kkl888 » Sun Mar 29, 2015 4:52 am

Hi, is it possible if we can have swap axis option with "x-y-z" when export?
0 x

peanutandchestnut
Kobold
Posts: 35
Joined: Tue Nov 11, 2014 9:29 am

Re: Blender26 Ogre Exporter

Post by peanutandchestnut » Sat Apr 25, 2015 3:02 pm

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

LDAsh
Gnoblar
Posts: 16
Joined: Thu Aug 25, 2011 8:29 pm

Re: Blender26 Ogre Exporter

Post by LDAsh » Fri May 08, 2015 7:48 pm

Hi everyone. :) Anyone still around??? :P

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

User avatar
fractile
Gremlin
Posts: 195
Joined: Thu Jan 13, 2005 2:35 pm
Location: Tampere, Finland
Contact:

Re: Blender26 Ogre Exporter

Post by fractile » Sat Aug 08, 2015 12:59 pm

Where can I download the latest version of this exporter? The bitbucket link in the first post does not work.
0 x

kracejic
Kobold
Posts: 25
Joined: Wed Sep 10, 2014 5:18 pm

Re: Blender26 Ogre Exporter

Post by kracejic » Sat Aug 08, 2015 1:38 pm

This seems to be latest versionhttps://bitbucket.org/iboshkov/blender2ogre with latest change at 2015-04-19
0 x

User avatar
fractile
Gremlin
Posts: 195
Joined: Thu Jan 13, 2005 2:35 pm
Location: Tampere, Finland
Contact:

Re: Blender26 Ogre Exporter

Post by fractile » Sat Aug 08, 2015 4:33 pm

kracejic wrote:This seems to be latest versionhttps://bitbucket.org/iboshkov/blender2ogre with latest change at 2015-04-19
Thanks. That one seems to work fine in blender 2.72 too.
0 x

User avatar
hebdemnobad
Goblin
Posts: 274
Joined: Wed Feb 09, 2005 5:09 pm
Location: catskill escarpment, new york, usa
Contact:

Re: Blender26 Ogre Exporter

Post by hebdemnobad » Mon Sep 21, 2015 5:45 pm

fractile wrote:
kracejic wrote:This seems to be latest versionhttps://bitbucket.org/iboshkov/blender2ogre with latest change at 2015-04-19
Thanks. That one seems to work fine in blender 2.72 too.

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

kkl888
Gnoblar
Posts: 6
Joined: Sun Nov 09, 2014 5:28 am

Re: Blender26 Ogre Exporter

Post by kkl888 » Wed Oct 07, 2015 3:51 pm

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).
Attachments
ninja.mesh.zip
(34.42 KiB) Downloaded 90 times
0 x

Kmilo9999
Gnoblar
Posts: 2
Joined: Fri Oct 30, 2015 3:53 am

Re: Blender26 Ogre Exporter

Post by Kmilo9999 » Fri Oct 30, 2015 3:56 am

Hi everyone.

Is it possible to run the io_export_ogreDotScene.py script from the command line ?

:) I'll appreciate he help.
0 x

Kmilo9999
Gnoblar
Posts: 2
Joined: Fri Oct 30, 2015 3:53 am

Re: Blender26 Ogre Exporter

Post by Kmilo9999 » Sun Nov 01, 2015 5:23 am

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

User avatar
hebdemnobad
Goblin
Posts: 274
Joined: Wed Feb 09, 2005 5:09 pm
Location: catskill escarpment, new york, usa
Contact:

Re: Blender26 Ogre Exporter-problem with exporting spline ik

Post by hebdemnobad » Mon Dec 14, 2015 7:36 pm

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

User avatar
hebdemnobad
Goblin
Posts: 274
Joined: Wed Feb 09, 2005 5:09 pm
Location: catskill escarpment, new york, usa
Contact:

blender spline ik baking solved, but incorrect export to o3d

Post by hebdemnobad » Mon Dec 14, 2015 11:08 pm

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:
incorrectogre.jpg
skinningproblemblenderogreblenderok.jpg
0 x

xrgo
OGRE Expert User
OGRE Expert User
Posts: 818
Joined: Sat Jul 06, 2013 10:59 pm
Location: Chile

Re: Blender26 Ogre Exporter

Post by xrgo » Tue Dec 15, 2015 12:05 am

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

Post Reply