Page 30 of 34

Re: Blender26 Ogre Exporter

Posted: Sat Jul 20, 2013 10:59 pm
by Pacha
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.

Re: Blender26 Ogre Exporter

Posted: Sun Jul 21, 2013 4:08 am
by Nu11u5
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).

Re: Blender26 Ogre Exporter

Posted: Sun Jul 21, 2013 5:37 am
by Pacha
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?

Re: Blender26 Ogre Exporter

Posted: Fri Aug 16, 2013 9:09 pm
by xelfe
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 ?

Re: Blender26 Ogre Exporter

Posted: Thu Aug 22, 2013 6:41 pm
by xelfe
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 ?

Re: Blender26 Ogre Exporter

Posted: Tue Aug 27, 2013 10:43 am
by ximun64
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 :)

Re: Blender26 Ogre Exporter

Posted: Thu Sep 05, 2013 9:11 am
by snikrs
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.

Re: Blender26 Ogre Exporter

Posted: Sun Sep 08, 2013 6:46 pm
by Vader
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. :)

Re: Blender26 Ogre Exporter

Posted: Mon Sep 09, 2013 1:37 pm
by snikrs
Doesn't work for me :( I have deleted .py from /scripts/addons and installed script from desktop. Result on export stays the same.

Re: Blender26 Ogre Exporter

Posted: Mon Sep 09, 2013 3:20 pm
by Vader
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.

Re: Blender26 Ogre Exporter

Posted: Tue Sep 10, 2013 9:54 am
by snikrs
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.

Re: Blender26 Ogre Exporter

Posted: Sun Oct 06, 2013 4:41 pm
by Thyrion
have the same problem as snikrs ...

Re: Blender26 Ogre Exporter

Posted: Wed Oct 23, 2013 11:09 pm
by lunkhound
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.

Re: Blender26 Ogre Exporter

Posted: Thu Oct 24, 2013 10:15 pm
by maxthemacke
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...

more animations to one skeleton

Posted: Mon Oct 28, 2013 1:46 pm
by kubatp
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.

Re: Blender26 Ogre Exporter

Posted: Mon Oct 28, 2013 4:53 pm
by RigoCL
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?

Re: Blender26 Ogre Exporter

Posted: Mon Oct 28, 2013 5:32 pm
by kubatp
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.

Blender2Ogre not creating .skeleton file

Posted: Tue Nov 05, 2013 12:19 am
by juhipuhi
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 27884 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 27884 times
Thank you in advance!

Re: Blender26 Ogre Exporter

Posted: Tue Nov 05, 2013 1:51 am
by lunkhound
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.

Re: Blender2Ogre not creating .skeleton file

Posted: Fri Nov 08, 2013 2:16 am
by RigoCL
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...

Re: Blender26 Ogre Exporter

Posted: Thu Nov 21, 2013 5:51 pm
by Magikhaos
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 !

Re: Blender26 Ogre Exporter

Posted: Sun Nov 24, 2013 9:04 pm
by hectorh30
I made the change proposed here and got the export working.

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

Re: Blender26 Ogre Exporter

Posted: Sun Nov 24, 2013 9:58 pm
by RigoCL
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?

Re: Blender26 Ogre Exporter

Posted: Mon Nov 25, 2013 6:33 am
by HTAPAWASO
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?

Re: Blender26 Ogre Exporter

Posted: Sat Nov 30, 2013 7:50 pm
by RigoCL
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...