Blender26 Ogre Exporter

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.
Post Reply
Pacha
Halfling
Posts: 63
Joined: Tue Dec 04, 2012 12:59 am

Re: Blender26 Ogre Exporter

Post by Pacha » Sat Jul 20, 2013 10:59 pm

Hi guys, I am having a weird error while exporting, this happens to almost all my .blend files (maybe some incompatibility?):
bpy_prop_collection[index]: index 0 out of range, size 0
Does somebody knows how to fix it? I looked up in Google and on this forum and found nothing. I am using blender 2.64 and the latest version of the plug-in.

Thanks.
0 x

Nu11u5
Gnoblar
Posts: 8
Joined: Sun Jul 21, 2013 12:28 am

Re: Blender26 Ogre Exporter

Post by Nu11u5 » Sun Jul 21, 2013 4:08 am

I just started using Blender and Blender2Ogre.

I'm trying to use a 'merge' object group to get all of my submeshes into one .mesh file. That part works fine, however I am losing the armature in the process. I found that if I set the submeshes as children to the armature, then it will get exported, but only attached to the individual .mesh files for each submesh that are now exported again in addition to the merged mesh. I can't find any way to get Blender2Ogre to export the armature with the merged .mesh file.

I am having to do this because the program I am making models for (Torchlight2) can only load single .mesh files for objects, and these meshes have to have named submeshes that the game uses to modify the models. And obviously without an armature, they can't be animated.

I tried using OgreMeshMagick directly, but it gave me the error "Some meshes have a skeleton, but others have none, cannot merge." even though all .mesh files have a .skeleton file that will import in any program, and MeshMagick has no problem recognizing the .skeleton files when I process each .mesh file individually (but no point in merging a file with nothing).
0 x

Pacha
Halfling
Posts: 63
Joined: Tue Dec 04, 2012 12:59 am

Re: Blender26 Ogre Exporter

Post by Pacha » Sun Jul 21, 2013 5:37 am

Pacha wrote:Hi guys, I am having a weird error while exporting, this happens to almost all my .blend files (maybe some incompatibility?):
bpy_prop_collection[index]: index 0 out of range, size 0
Does somebody knows how to fix it? I looked up in Google and on this forum and found nothing. I am using blender 2.64 and the latest version of the plug-in.

Thanks.
Well, solved this. I upgraded to Blender 2.64 and the latest plugin. Now I have this issue: http://linode.ogre3d.org/forums/viewtop ... =2&t=78503

Could somebody help me, please?
Pacha wrote:I made some animations in blender, I could export them perfectly fine without animating them and they looked as they should look. Then I made some animations, exported them and they look like this:

Image

Does somebody know what might be the cause of this? Maybe some options I didn't check or something. I am using Blender 2.65 and this exporter: https://code.google.com/p/blender2ogre/downloads/list (version 0.5.9). Maybe a bug in the exporter?
0 x

xelfe
Gnoblar
Posts: 10
Joined: Wed Aug 14, 2013 5:24 am

Re: Blender26 Ogre Exporter

Post by xelfe » Fri Aug 16, 2013 9:09 pm

Nobody already have problem with export mesh and material ? For me, each time, I get my models texture like if it's a normal map. Did I miss something ?
0 x

xelfe
Gnoblar
Posts: 10
Joined: Wed Aug 14, 2013 5:24 am

Re: Blender26 Ogre Exporter

Post by xelfe » Thu Aug 22, 2013 6:41 pm

Ok I have found my problem. I have to use shader script. There's any one that work out of the box with blender2ogre ? Something that do some basic like diffuse, specular, normal map like http://www.ogre3d.org/tikiwiki/tiki-ind ... e=Cookbook. I'm trying to figure out how to make something like that to work with blender2ogre. Also, why a cg that work with tundra dont work in a sample ogre app ?
0 x

ximun64
Gnoblar
Posts: 3
Joined: Tue Aug 27, 2013 10:15 am

Re: Blender26 Ogre Exporter

Post by ximun64 » Tue Aug 27, 2013 10:43 am

Hi everyone !

I'm ximun64 and I create a video game with Blender and Ogre3D since 2 years now, http://www.darkcat.fr/.
So I use Blender2Ogre to export my mesh, it's great add-ons, but i have a problem.
I want export a mesh that have 4 texture, 1 normal map, 1 diffuse map (scale 40,40) blended with other diffuse map (scale 1) and 1 ao map.
So, how I can export my model with all texture ?

First, I used Blender options, in the panel texture, I could change scale of my texture but I couldn't see my normal map in Ogre meshy.
So after, I used Shaders with Tundra and I had my normal map in Tundra render but I couldn't change scale of other texture.
And after, I wanted do like this video but I didn't have options in node editor. http://www.youtube.com/watch?v=xYJOzWg1sJA

This material of mesh is complex but I want know, is it possible to export this material to Ogre like in Blender ? And if yes, how ?

http://img4.hostingpics.net/pics/373815ile.jpg

I use Blender 2.61 ( I can't change for my video game, my blends must be compatible ), Blender2Ogre 0.5.5 and Ogre meshy 1.4

Thanks for help and sorry for my english :)
0 x

snikrs
Gnoblar
Posts: 3
Joined: Wed Sep 04, 2013 11:21 am

Re: Blender26 Ogre Exporter

Post by snikrs » Thu Sep 05, 2013 9:11 am

Hi,
I downloaded test model and created simple rig, one animation and than exported. Everything was ok.
Then I tried with blenders rigify rig and try to export (with options only deformable bones and only animated bones enabled) and received error -see picture. Mesh and texture are exported, skeleton and animation are not.
Do I have to do something else?
I have tried with Flick model 0.1.4 and also received error. I use blender 2.66 and last blender-to-ogre exporter.
Attachments
error_list.jpg
error_list.jpg (116.42 KiB) Viewed 7646 times
0 x

Vader
Gnoblar
Posts: 2
Joined: Sun Sep 08, 2013 6:41 pm

Re: Blender26 Ogre Exporter

Post by Vader » Sun Sep 08, 2013 6:46 pm

snikrs wrote: Do I have to do something else?
Had the same problem. You should try to save the export script at an other location. I saved it on the desktop and now it works. :)
0 x

snikrs
Gnoblar
Posts: 3
Joined: Wed Sep 04, 2013 11:21 am

Re: Blender26 Ogre Exporter

Post by snikrs » Mon Sep 09, 2013 1:37 pm

Doesn't work for me :( I have deleted .py from /scripts/addons and installed script from desktop. Result on export stays the same.
0 x

Vader
Gnoblar
Posts: 2
Joined: Sun Sep 08, 2013 6:41 pm

Re: Blender26 Ogre Exporter

Post by Vader » Mon Sep 09, 2013 3:20 pm

Is the file path in blender user preferences the same as before? Maybe download the zip archive of blender, extract it to the desktop and manually copy the script to the scripts/addons folder.
0 x

snikrs
Gnoblar
Posts: 3
Joined: Wed Sep 04, 2013 11:21 am

Re: Blender26 Ogre Exporter

Post by snikrs » Tue Sep 10, 2013 9:54 am

File path shows on new location. I have tried with new blender with main folder on desktop, without success. I think this must have something with "only deformable bones" option on export, because the error apperas only when I enable this.
0 x

User avatar
Thyrion
Goblin
Posts: 224
Joined: Wed Jul 31, 2013 1:58 pm
Location: germany

Re: Blender26 Ogre Exporter

Post by Thyrion » Sun Oct 06, 2013 4:41 pm

have the same problem as snikrs ...
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 » Wed Oct 23, 2013 11:09 pm

There was a recent change to the exporter to prepend a "./" string onto the skeletonlink string for meshes. Actually on Windows the string is ".\", and for other OSes "./".
Some discussion here:

https://bitbucket.org/MindCalamity/blen ... ent-497851

It seems this change is for users of the NeoAxis engine. I think this may cause breakage for other users of Ogre. I can't say for sure though.
0 x

maxthemacke
Gnoblar
Posts: 2
Joined: Mon Oct 21, 2013 11:29 am

Re: Blender26 Ogre Exporter

Post by maxthemacke » Thu Oct 24, 2013 10:15 pm

Hi everyone,

i kind of new to blender and ogre ;-) and all the 3d modelling things. I am searching for hours now to find a solution for my problems. I'm trying to export a textured model from blender to use it in ogre. In Blender it looks fine but it doesnt export the material correct. I use Blender 2.68 and blender2ogre version 0.6.0. I get the correct mesh but i cant find any reference to the texture jpg file. the material file always looks like this:

material _missing_material_
{
receive_shadows off
technique
{
pass
{
ambient 0.1 0.1 0.1 1.0
diffuse 0.8 0.0 0.0 1.0
specular 0.5 0.5 0.5 1.0 12.5
emissive 0.3 0.3 0.3 1.0
}
}
}

// test genrated by blender2ogre 0.6.0

material test
{
receive_shadows on

technique
{
pass test
{
ambient 0.800000011920929 0.800000011920929 0.800000011920929 1.0
diffuse 0.6400000190734865 0.6400000190734865 0.6400000190734865 1.0
specular 0.5 0.5 0.5 1.0 12.5
emissive 0.0 0.0 0.0 1.0

alpha_to_coverage off
colour_write on
cull_hardware clockwise
depth_check on
depth_func less_equal
depth_write on
illumination_stage
light_clip_planes off
light_scissor off
lighting on
normalise_normals off
polygon_mode solid
scene_blend one zero
scene_blend_op add
shading gouraud
transparent_sorting on

}
}
}

is it more a blender topic, that i didnt apply the material correct to the mesh? thanks for any advice...
0 x

kubatp
Gnome
Posts: 342
Joined: Tue Jan 06, 2009 1:12 pm
x 7

more animations to one skeleton

Post by kubatp » Mon Oct 28, 2013 1:46 pm

Hi,
I would like to ask you for help with this problem:
I have more objects in Blender and each of them has an animation. I am able to export them separately with skeleton and I am able to export them merged without skeletion. Is it possible to merge them and have the animations in one skeleton file? I would like to export them to one mesh and one skeleton. Is this possible?

If it is not possible, what is the best way to achieve this? Merge all objects to one in Blender?

Thank you very much for answers.
0 x

RigoCL
Greenskin
Posts: 114
Joined: Mon Oct 14, 2013 1:41 am
Location: Chile

Re: Blender26 Ogre Exporter

Post by RigoCL » Mon Oct 28, 2013 4:53 pm

Though I'm just starting to use the Ogre/dotScene/Blender combination, what I've seen so far is that the best option is to have it all ready to export from Blender, just because that's the app specialized in armatures. Besides, in my understanding, dotScene creates a unique skeleton file for every unique mesh it founds while exporting, though I haven't gave it a try to understand how the "Independent Animation" check box affects the final mesh/skeleton files.

Just curious, why you need it so?
0 x
Integrated: Ogre3D + dotScene (Blender loader) + MyGUI (UI) + RakNet (Client/Server) + Leap Motion (The future is here!) + StereoManager (3D Anaglyph red-cyan)
WIP: StereoManager (Real 3D) + CCS (Camera Control System) + Sound, experimenting with Android.

kubatp
Gnome
Posts: 342
Joined: Tue Jan 06, 2009 1:12 pm
x 7

Re: Blender26 Ogre Exporter

Post by kubatp » Mon Oct 28, 2013 5:32 pm

Hi RicoGL,
thank you for an answer. The answer is pretty simple - I have many units and I want to keep the "administration" as simple as possible - therefore one mesh one skeleton. Or at least - one mesh more skeletons. However when I export objects in one mesh, no skeletons are exported at all.
0 x

juhipuhi
Gnoblar
Posts: 1
Joined: Mon Nov 04, 2013 7:07 pm

Blender2Ogre not creating .skeleton file

Post by juhipuhi » Tue Nov 05, 2013 12:19 am

Hello!
I’m having a problem in exporting a .blend file to Ogre. The program never creates the .skeleton file just the others as it can be seen in the picture allow. It’s a human figure imported to Blender from Makehuman 1.0.
no8.png
no8.png (83.49 KiB) Viewed 7100 times

I’m using
Blender: 2.68
Blender2Ogre 0.6.0
Makehuman 1.0 alpha 8
Python 2.75
Windows 7 (64 bit)
Program versions for 32 bit

I’ll really appreciate any idea because I’ve already tried everything mentioned on the Ogre and Blender forums, but nothing works yet.

Actually I was thinking that the reason might be that I have 9 layers of skeleton while I should have only one layer for exportation.

Can it be the reason?
And if it is the problem, how can I fix it?

These are my layers:
layers.png
layers.png (28.82 KiB) Viewed 7100 times
Thank you in advance!
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 05, 2013 1:51 am

juhipuhi,

It looks like the .skeleton.xml file was created, but for some reason OgreXMLConverter was not able to create the .skeleton file from it.
I would suggest you try running OgreXMLConverter on the .skeleton.xml file manually and see if it reports any error messages.
0 x

RigoCL
Greenskin
Posts: 114
Joined: Mon Oct 14, 2013 1:41 am
Location: Chile

Re: Blender2Ogre not creating .skeleton file

Post by RigoCL » Fri Nov 08, 2013 2:16 am

juhipuhi wrote:Hello!
I’m having a problem in exporting a .blend file to Ogre. The program never creates the .skeleton file just the others as it can be seen in the picture allow. It’s a human figure imported to Blender from Makehuman 1.0.

...

Thank you in advance!
If you already have a .mesh file I guess you converted it from the .mesh.xml file using OgreXMLConverter, so you should check the debugging massages while running the converter, does it say anything about any errors while parsing the .skeleton.xml file??

Besides, in some place inside the OgreXMLConverter.log file, you should be able to find lines referencing your skeleton file, something like:

10:45:17: Creating resource group General
10:45:17: Creating resource group Internal
10:45:17: Creating resource group Autodetect
10:45:17: Registering ResourceManager for type Mesh
10:45:17: Registering ResourceManager for type Material
10:45:17: Registering ResourceManager for type Skeleton
10:45:17: XMLSkeletonSerializer: reading XML data from XYZ.skeleton.xml...
10:45:17: XMLSkeletonSerializer: Reading Bones name...
10:45:17: XMLSkeletonSerializer: Reading Hierarchy data...
10:45:17: XMLSkeletonSerializer: Reading Bones data...
10:45:17: XMLSkeletonSerializer: Reading Animations data...
10:45:17: Animation: nom: my_animation et longueur: 2.66667
10:45:17: XMLSkeletonSerializer: Finished. Running SkeletonSerializer...

10:45:17: Exporting bones..
10:45:17: Bones exported.
10:45:17: Exporting animations, count=1
10:45:17: Exporting animation: my_animation
10:45:17: Animation exported.
10:45:17: Unregistering ResourceManager for type Skeleton
10:45:17: Unregistering ResourceManager for type Material
10:45:17: Unregistering ResourceManager for type Mesh


One more thing to check is if in your .mesh.xml file exists the reference to your .skeleton file, a line like this in your case:
<skeletonlink name="voroskeMesh.skeleton"/>

Lot of things to ckeck in order to gather more info for us to help...
0 x
Integrated: Ogre3D + dotScene (Blender loader) + MyGUI (UI) + RakNet (Client/Server) + Leap Motion (The future is here!) + StereoManager (3D Anaglyph red-cyan)
WIP: StereoManager (Real 3D) + CCS (Camera Control System) + Sound, experimenting with Android.

Magikhaos
Gnoblar
Posts: 1
Joined: Thu Nov 21, 2013 4:58 pm

Re: Blender26 Ogre Exporter

Post by Magikhaos » Thu Nov 21, 2013 5:51 pm

Hello,

I try to install Blender2Ogre but I have an error when I try to export a simple cube :

Code: Select all

Processing Scene
  Processing Materials
Traceback (most recent call last):
  File "<string>", line 3163, in execute
  File "<string>", line 3524, in ogre_export
  File "<string>", line 3363, in dot_material
TypeError: 'int' object is not callable

location: <unknown location>:-1

location: <unknown location>:-1
I have googled it but I found nothing.
I'm on Windows and I have Blender 2.69, Blender2Ogre 0.6.0, Python 2.7.

Thanks for helping !
0 x

hectorh30
Gnoblar
Posts: 1
Joined: Sun Nov 24, 2013 9:01 pm

Re: Blender26 Ogre Exporter

Post by hectorh30 » Sun Nov 24, 2013 9:04 pm

I made the change proposed here and got the export working.

https://bitbucket.org/MindCalamity/blen ... lable/diff
0 x

RigoCL
Greenskin
Posts: 114
Joined: Mon Oct 14, 2013 1:41 am
Location: Chile

Re: Blender26 Ogre Exporter

Post by RigoCL » Sun Nov 24, 2013 9:58 pm

Hard to know what your problem may be if your are exporting just the default Blender cube with some basic material, but I can say that the latest Blender2Ogre 0.6.0 has been tested only for Blender 2.66, besides Blender 2.69 is a little unstable as of today, many users have gone down to prior version 2.68.

What kind of material are you using?
0 x
Integrated: Ogre3D + dotScene (Blender loader) + MyGUI (UI) + RakNet (Client/Server) + Leap Motion (The future is here!) + StereoManager (3D Anaglyph red-cyan)
WIP: StereoManager (Real 3D) + CCS (Camera Control System) + Sound, experimenting with Android.

HTAPAWASO
Gnoblar
Posts: 16
Joined: Tue Jul 02, 2013 2:15 pm

Re: Blender26 Ogre Exporter

Post by HTAPAWASO » Mon Nov 25, 2013 6:33 am

How do I export a mesh with a partially transparent texture?

Using Blender 2.66, for the material I have:
set transparency on, set Alpha to 1, ticked "Face Textures Alpha"

For the texture I have:
ticked "Use Alpha", ticked "Alpha" and set to 1.0 for Diffuse lighting

In the 3D view the texture is not transparent, but when I render it within Blender, it is.
When I export and use in my Ogre project, the part that should be transparent appears light blue.

What am I doing wrong? Thanks.

EDIT: I managed to fix this by manually changing "scene_blend" from "one zero" to "alpha_blend" in the .material file. I would like to know what option in Blender affects this though, if anybody knows?
0 x

RigoCL
Greenskin
Posts: 114
Joined: Mon Oct 14, 2013 1:41 am
Location: Chile

Re: Blender26 Ogre Exporter

Post by RigoCL » Sat Nov 30, 2013 7:50 pm

Hi guys,
I'm getting an strange behavior using Blender 2.66.1 and the latest MindCalamity blender2ogre with the "3(mat)" fix applied, I have two very simple meshes in the same Blender file, each one with its own bone, weight painted each, Armature modifier applied on each, snowflake applied in NLA Editor....

After exporting I get two .skeleton.xml file, one anim plays ok in Ogre, but the other doesn't. After checking both .skeleton files verified that both have exactly the same structure: bone reference, animation name and all the keyframes, but in the second file all the keyframes values are translate=<0,0,0>, rotate angle=0, rotate <1,0,0>..... Checked again on Blender and everything looks pretty the same, both animations look the same in configuration.

Looking into the io_export_ogreDotScene.py file, found out that the translate (_loc) and rotate (_rot) values are assigned from the bone:

Code: Select all

bone = self.get_bone( bonename )
_loc = bone.pose_location
_rot = bone.pose_rotation
_scl = bone.pose_scale
Checked the console and exactly the same warning for both meshes, so I guess that's not the problem (Mesh XX: is offset from armature).
Anyone with the same problem?? What else has to be checked in Blender to find the difference between both mesh/anim?

Pretty sure I'm missing some important detail...
0 x
Integrated: Ogre3D + dotScene (Blender loader) + MyGUI (UI) + RakNet (Client/Server) + Leap Motion (The future is here!) + StereoManager (3D Anaglyph red-cyan)
WIP: StereoManager (Real 3D) + CCS (Camera Control System) + Sound, experimenting with Android.

Post Reply