Blender26 Ogre Exporter
-
- Greenskin
- Posts: 107
- Joined: Tue Nov 16, 2010 7:33 am
- x 15
Re: Blender25 Ogre Exporter + extended .scene format
hi Ping,
Looks like i need to fix the Reporter.
Your not doing anything wrong, just open the texture panel, at the bottom should be "Ogre Texture" and uncheck the "rotation animation" option.
Looks like i need to fix the Reporter.
Your not doing anything wrong, just open the texture panel, at the bottom should be "Ogre Texture" and uncheck the "rotation animation" option.
-
- Gnoblar
- Posts: 2
- Joined: Mon Jun 06, 2011 9:13 am
Re: Blender25 Ogre Exporter + extended .scene format
Hi again.
Thx 4 your help , but again I have some small problem.
I make animation of my ball and when i export it there isn't any animation. Again i have some screenshots, and .blend file for better understand.
I don't know what to do ... my ball don't have any armature becouse there is only rotation animation. I read many tutorials and documentation of sdk and I really confused If you have any time to help noob person please to do it I be gratefull . (Sorry for my English, i hope you understand this.)
PS: if you have solution please write it step by step xP as you now I just learning ...
http://imageshack.us/photo/my-images/854/47595282.png/
http://imageshack.us/photo/my-images/861/90075575.png/
Thx 4 your help , but again I have some small problem.
I make animation of my ball and when i export it there isn't any animation. Again i have some screenshots, and .blend file for better understand.
I don't know what to do ... my ball don't have any armature becouse there is only rotation animation. I read many tutorials and documentation of sdk and I really confused If you have any time to help noob person please to do it I be gratefull . (Sorry for my English, i hope you understand this.)
PS: if you have solution please write it step by step xP as you now I just learning ...
http://imageshack.us/photo/my-images/854/47595282.png/
http://imageshack.us/photo/my-images/861/90075575.png/
-
- Greenskin
- Posts: 107
- Joined: Tue Nov 16, 2010 7:33 am
- x 15
Re: Blender25 Ogre Exporter + extended .scene format
Hi ProfEsSional,
You can not export animation without an armature. So you will have to apply an armature to your ball and animate its bones. The root of the armature must be at 0,0,0 when you rig it. The in and out time set in blender will be the start and end time of the exported animation.
If you want more precise control or export multiple animation as named tracks, follow the NLA hijacking tutorials.
You can not export animation without an armature. So you will have to apply an armature to your ball and animate its bones. The root of the armature must be at 0,0,0 when you rig it. The in and out time set in blender will be the start and end time of the exported animation.
If you want more precise control or export multiple animation as named tracks, follow the NLA hijacking tutorials.
- Night Elf
- Halfling
- Posts: 96
- Joined: Sun Jun 26, 2005 5:25 pm
- Location: Argentina
- Contact:
Re: Blender25 Ogre Exporter + extended .scene format
Hi hartsantler! How do you install on OSX? The README.txt file only talks about Windows or Linux...
Mariano Ruggiero // Follow me on Twitter (@ArtCoder) // Check out our games:
NEW! Elemental Rage - metroidvania-style adventure platformer
Silent Swords // Silent Swords ZERO // Crunchy Planets
NEW! Elemental Rage - metroidvania-style adventure platformer
Silent Swords // Silent Swords ZERO // Crunchy Planets
-
- Gnoblar
- Posts: 1
- Joined: Sat Jun 11, 2011 1:54 pm
Re: Blender25 Ogre Exporter + extended .scene format
I have an issue with collisions, when trying to apply a collision primitive or export with collisions, i get a exception like this:
Traceback (most recent call last):
File "E:\blender\win32-trunk\2.57\scripts\addons\io_export_ogreDotScene.py", line 843, in draw
if not ob.show_bounds: ob.show_bounds = True
AttributeError: Writing to ID classes in this context is not allowed: infantry,
Object datablock, error setting Object.show_bounds
Does anybody know what can cause this and what is the fix?
Traceback (most recent call last):
File "E:\blender\win32-trunk\2.57\scripts\addons\io_export_ogreDotScene.py", line 843, in draw
if not ob.show_bounds: ob.show_bounds = True
AttributeError: Writing to ID classes in this context is not allowed: infantry,
Object datablock, error setting Object.show_bounds
Does anybody know what can cause this and what is the fix?
-
- Kobold
- Posts: 30
- Joined: Thu Jan 20, 2011 6:37 am
- Location: Shanghai/China
Re: Blender25 Ogre Exporter + extended .scene format
Why after I preview in the OgreMeshy window then the blender got Not responding...And the worst thing: My CPU Usage becomes 100%...
PS:I use Blender 2.57a and exporter 0.4.1
PS:I use Blender 2.57a and exporter 0.4.1
-
- Kobold
- Posts: 30
- Joined: Thu Jan 20, 2011 6:37 am
- Location: Shanghai/China
Re: Blender25 Ogre Exporter + extended .scene format
Seems the OgreMeshy didn't work well. When I closed OgreMeshy, it still exists in the Processes. So I changed to use the latest OgreMeshy (before I used the minimal-deps provided one), now it works well.
BTW, thanks for your amazing work!
BTW, thanks for your amazing work!
-
- Greenskin
- Posts: 107
- Joined: Tue Nov 16, 2010 7:33 am
- x 15
Re: Blender25 Ogre Exporter + extended .scene format
Hi solar_plexus,
I am working on the collision problem right now, and also fixing face normals. Will post an update soon.
pizzazhang, when OgreMeshy opens it blocks blender, i have it block blender so that users are forced to close it before going back to blender; but i can change this behavior to non-blocking if people request it. The disadvantage of non-blocking is that if you forget to close OgreMeshy and then preview again, then you will have multiple instances of OgreMeshy, which is probably not so bad since we all have lots of RAM. Too bad OgreMeshy is not listening on a port for updates, it would be nicer to update previews that way.
So what do people want, blocking or non-blocking OgreMeshy?
I am working on the collision problem right now, and also fixing face normals. Will post an update soon.
pizzazhang, when OgreMeshy opens it blocks blender, i have it block blender so that users are forced to close it before going back to blender; but i can change this behavior to non-blocking if people request it. The disadvantage of non-blocking is that if you forget to close OgreMeshy and then preview again, then you will have multiple instances of OgreMeshy, which is probably not so bad since we all have lots of RAM. Too bad OgreMeshy is not listening on a port for updates, it would be nicer to update previews that way.
So what do people want, blocking or non-blocking OgreMeshy?
-
- Greenskin
- Posts: 107
- Joined: Tue Nov 16, 2010 7:33 am
- x 15
Re: Blender25 Ogre Exporter + extended .scene format
Hi Night Elf,
Sorry, but i am not sure all the steps you will need for OSX, i only applied a patch somebody sent in that allows for OSX to work, i never tested it on OSX since i'm strictly using Linux.
There is this download from Ogre, but its super old from 2007
http://downloads.sourceforge.net/ogre/O ... _1.4.0.zip
Probably you are going to have to build OgreCommandLineTools from source, not fun.
In the long term, it would be more ideal and many times faster to directly write .mesh and bypass OgreCommandLineTools. This is possible using Python's struct.pack, and then would run on every platform with no installation. I hear that .mesh is a simple format. But, right now blender2ogre has limited funding, so direct to .mesh is not going to happen until that hopefully changes.
Sorry, but i am not sure all the steps you will need for OSX, i only applied a patch somebody sent in that allows for OSX to work, i never tested it on OSX since i'm strictly using Linux.
There is this download from Ogre, but its super old from 2007
http://downloads.sourceforge.net/ogre/O ... _1.4.0.zip
Probably you are going to have to build OgreCommandLineTools from source, not fun.
In the long term, it would be more ideal and many times faster to directly write .mesh and bypass OgreCommandLineTools. This is possible using Python's struct.pack, and then would run on every platform with no installation. I hear that .mesh is a simple format. But, right now blender2ogre has limited funding, so direct to .mesh is not going to happen until that hopefully changes.
-
- Gnoblar
- Posts: 6
- Joined: Sun Jun 12, 2011 9:04 pm
Re: Blender25 Ogre Exporter + extended .scene format
Nice work!
I did encounter one issue in io_export_ogreDotScene.py.
Python complains that badverts is uninitialized on line 6169 and prevents anything from being exported. Simply commenting that line out solves the problem though. This issue popped up because I had more that 4 weights asigned to a vertex. Hopefully this won't crash Ogre itself.
I did encounter one issue in io_export_ogreDotScene.py.
Python complains that badverts is uninitialized on line 6169 and prevents anything from being exported. Simply commenting that line out solves the problem though. This issue popped up because I had more that 4 weights asigned to a vertex. Hopefully this won't crash Ogre itself.
- Svenstaro
- Greenskin
- Posts: 115
- Joined: Fri Dec 15, 2006 1:30 pm
- Location: Germany
- x 3
- Contact:
Re: Blender25 Ogre Exporter + extended .scene format
Did the upstream repo change? The last commit was in April but the last release was just a few days ago.
Also, why do you recommend using Wine for the XML tools?
Also, why do you recommend using Wine for the XML tools?
- Kukanani
- Halfling
- Posts: 67
- Joined: Thu Jun 12, 2008 11:42 pm
- x 1
Re: Blender25 Ogre Exporter + extended .scene format
Hey everyone, this exporter looks great but I'm having trouble exporting. I have a human model that is deformed with an armature. But when I try to export, I get the following console error output:
Thanks,
Kukanani
What am I doing wrong here?Thanks,
Kukanani
Grammar is the greatest joy in life, don't you find?
--Aunt Josephine in The Wide Window
--Aunt Josephine in The Wide Window
-
- Orc Shaman
- Posts: 788
- Joined: Mon Jan 18, 2010 6:06 pm
- Location: Costa Mesa, California
- x 24
Re: Blender25 Ogre Exporter + extended .scene format
My exported .mesh file seems to crash my game application. The only .mesh exporter I've found to work is for milkshape 3d, and even that doesn't work half the time I try to export. I've tried exporters for 3dsmax, blender, and cinema 4d and they all crash my game. Is this everyone else's experience with OGRE exporters or is it a coding problem on my end? Also, is there a blender 2.5 importer in the works?
- LiMuBei
- Goblin
- Posts: 297
- Joined: Mon Jun 09, 2008 3:56 pm
- Location: Karlsruhe, Germany
- x 10
Re: Blender25 Ogre Exporter + extended .scene format
I think for most people the exporters work pretty well. I have only one model that is able to crash my app and that is when I use stencil shadows with it. It seems stencil shadows pose some requirements on the geometry to work correctly, maybe that's the case with your model too. Unfortunately I can't tell you the exact requirements for geometry as I don't know them myself, but I think the mesh needs to be 2d manifold.
- Kukanani
- Halfling
- Posts: 67
- Joined: Thu Jun 12, 2008 11:42 pm
- x 1
Re: Blender25 Ogre Exporter + extended .scene format
I would like to say that I fixed my error that I posted above, but it required changing the lines
badverts += 1
to
badverts = badverts + 1
badverts += 1
to
badverts = badverts + 1
Grammar is the greatest joy in life, don't you find?
--Aunt Josephine in The Wide Window
--Aunt Josephine in The Wide Window
-
- Kobold
- Posts: 27
- Joined: Wed Apr 07, 2010 12:45 am
Re: Blender25 Ogre Exporter + extended .scene format
That is kind of funny, "var += x" is not valid python? Oh well, dont forget to send a patch to Bret so he notices ;D I'm sure he will pop up here soon aswell.Kukanani wrote:I would like to say that I fixed my error that I posted above, but it required changing the lines
badverts += 1
to
badverts = badverts + 1
- Klaim
- Old One
- Posts: 2565
- Joined: Sun Sep 11, 2005 1:04 am
- Location: Paris, France
- x 56
- Contact:
Re: Blender25 Ogre Exporter + extended .scene format
It's only valid to add elements to lists, if I remember correctly.
-
- Greenskin
- Posts: 107
- Joined: Tue Nov 16, 2010 7:33 am
- x 15
Re: Blender25 Ogre Exporter + extended .scene format
fixed badverts reported by Kukanani,
fixed sharp normals (meshes can mix both sharp and smooth face normals)
fixed collision panel issue reported by solar_plexus.
fixed library linked objects when materials have naming collision
http://blender2ogre.googlecode.com/file ... -0.4.2.zip
python note: var += 1 is valid python
fixed sharp normals (meshes can mix both sharp and smooth face normals)
fixed collision panel issue reported by solar_plexus.
fixed library linked objects when materials have naming collision
http://blender2ogre.googlecode.com/file ... -0.4.2.zip
python note: var += 1 is valid python
-
- Gnoblar
- Posts: 2
- Joined: Tue Jun 07, 2011 1:54 pm
Re: Blender25 Ogre Exporter + extended .scene format
Thanks hartsantler for your response.
It was the scale animation... sorry I didn't try it very fast.
For the reporter, the bug is only present when the ogre UI is not shown.
thanks again
It was the scale animation... sorry I didn't try it very fast.
For the reporter, the bug is only present when the ogre UI is not shown.
thanks again
-
- Halfling
- Posts: 57
- Joined: Sun Feb 15, 2009 4:00 am
- x 1
Re: Blender25 Ogre Exporter + extended .scene format
Thanks for the update Hartsantler. In two sections the variable usealpha is used, it is defined in an "if". If the "if" is not taken, the variable is not defined. Added "usealpha = False" at line 1959 and 2031. Otherwise I get:
Could you consider using the hg-repository at code.google? It would be very cool to be able to check changes and evolution of the code easily. Are there plans to support the RT Shader System?
Code: Select all
...2.57\scripts\addons\io_export_ogreDotScene.py", line 1965, in dotmat_pass
if usealpha: alpha = 1.0
UnboundLocalError: local variable 'usealpha' referenced before assignment
-
- Greenskin
- Posts: 107
- Joined: Tue Nov 16, 2010 7:33 am
- x 15
Re: Blender25 Ogre Exporter + extended .scene format
http://blender2ogre.googlecode.com/file ... -0.4.3.zip
Fixed User_Report not showing if toolbar was not shown, reported by ping
Fixed var not initialized reported by f00bar
New:
. floating bones are now allowed (disconnected / free floating )
. multiple root bones, and roots no longer need to be at zero
. default axis is now x,z,-y
@f00bar, the repo on googlecode is not being updated anymore, the source is going to move to blender's svn. If you want to see the change log, its in the header of the source code. A smaller change log is at the bottom of the README file.
Fixed User_Report not showing if toolbar was not shown, reported by ping
Fixed var not initialized reported by f00bar
New:
. floating bones are now allowed (disconnected / free floating )
. multiple root bones, and roots no longer need to be at zero
. default axis is now x,z,-y
@f00bar, the repo on googlecode is not being updated anymore, the source is going to move to blender's svn. If you want to see the change log, its in the header of the source code. A smaller change log is at the bottom of the README file.
-
- Greenskin
- Posts: 107
- Joined: Tue Nov 16, 2010 7:33 am
- x 15
Re: Blender25 Ogre Exporter + extended .scene format
@f00bar,
If OgreMeshy supports RT Shader System, then i will add support to .material, it would be a nice way to export normal maps and other stuff.
Anybody got links to the RT Shader System spec for .material? I can't seem to find many links.
If OgreMeshy supports RT Shader System, then i will add support to .material, it would be a nice way to export normal maps and other stuff.
Anybody got links to the RT Shader System spec for .material? I can't seem to find many links.
-
- Gnoblar
- Posts: 23
- Joined: Mon Apr 25, 2011 11:04 am
- x 1
Re: Blender25 Ogre Exporter + extended .scene format
Hello,
Here i'm again.
After exporting successfully the mesh i needed, i added an animation: "walk". However, i don't obtain a good result when exporting it. It is very deformed.
Front in Ogre: http://dl.dropbox.com/u/17018559/frente_Ogre.png
Side in Ogre: http://dl.dropbox.com/u/17018559/lado_Ogre.png
Front in Meshy: http://dl.dropbox.com/u/17018559/meshy.png
Front in Blender: http://dl.dropbox.com/u/17018559/blender_frente.png
Side in Blender: http://dl.dropbox.com/u/17018559/lado_Blender.png
Render in Blender: http://dl.dropbox.com/u/17018559/Render.png
If you need to test it here you can download the blender file:
Source Blender File: http://dl.dropbox.com/u/17018559/player1.zip
The only warning i obtain is "mesh has 358 vertices weighted to too many bones(Ogre limits a vertex to 4 bones). If I change Trim option to 0.10, I obtain 36 vertices instead of 358 but the animation in Ogre is still bad.
What can i do? Is this because of the exporter?
Another point is that the name of the animation(action) (in blender was walk) and in the .skeleton.xml is "Act: esqueleto_jugadorActi" -> a merge between the armature name and something else. Is this a mini-bug?
Thanks in advance.
Here i'm again.
After exporting successfully the mesh i needed, i added an animation: "walk". However, i don't obtain a good result when exporting it. It is very deformed.
Front in Ogre: http://dl.dropbox.com/u/17018559/frente_Ogre.png
Side in Ogre: http://dl.dropbox.com/u/17018559/lado_Ogre.png
Front in Meshy: http://dl.dropbox.com/u/17018559/meshy.png
Front in Blender: http://dl.dropbox.com/u/17018559/blender_frente.png
Side in Blender: http://dl.dropbox.com/u/17018559/lado_Blender.png
Render in Blender: http://dl.dropbox.com/u/17018559/Render.png
If you need to test it here you can download the blender file:
Source Blender File: http://dl.dropbox.com/u/17018559/player1.zip
The only warning i obtain is "mesh has 358 vertices weighted to too many bones(Ogre limits a vertex to 4 bones). If I change Trim option to 0.10, I obtain 36 vertices instead of 358 but the animation in Ogre is still bad.
What can i do? Is this because of the exporter?
Another point is that the name of the animation(action) (in blender was walk) and in the .skeleton.xml is "Act: esqueleto_jugadorActi" -> a merge between the armature name and something else. Is this a mini-bug?
Thanks in advance.
-
- Greenskin
- Posts: 107
- Joined: Tue Nov 16, 2010 7:33 am
- x 15
Re: Blender25 Ogre Exporter + extended .scene format
hi omniyo,
I downloaded and tested your file, it can export correctly if you use the NLA strictly as the doc defines it. I know the doc is a bit confusing, so maybe i better make "export only keyed bones" as an option for export so things are easier for everybody.
What is happening is you converted your action into an NLA strip, and your action contains animation on only some of the bones, ie. your IK handles. So when exported only the IK handles are animated and the rest of the bones remain static. In general its a bad idea to have bones of the same armature used as constraints for other bones, because as you can see here your bones used as IK handles also have a little bit of skin weighted to them. A cleaner setup is to have IK handles as Empty objects, or bones in another armature.
Anyways the solution you can see in the attachment. What i did was create a second NLA track, and another action. In the new action i simply add a single keyframe to the armature at object level, and then convert this action to an NLA strip, then set the out time of the strip to 30. If the exporter sees an NLA strip that contains no bone animation, then it assumes to export all bone animation.
Hope this is clear,
-brett
I downloaded and tested your file, it can export correctly if you use the NLA strictly as the doc defines it. I know the doc is a bit confusing, so maybe i better make "export only keyed bones" as an option for export so things are easier for everybody.
What is happening is you converted your action into an NLA strip, and your action contains animation on only some of the bones, ie. your IK handles. So when exported only the IK handles are animated and the rest of the bones remain static. In general its a bad idea to have bones of the same armature used as constraints for other bones, because as you can see here your bones used as IK handles also have a little bit of skin weighted to them. A cleaner setup is to have IK handles as Empty objects, or bones in another armature.
Anyways the solution you can see in the attachment. What i did was create a second NLA track, and another action. In the new action i simply add a single keyframe to the armature at object level, and then convert this action to an NLA strip, then set the out time of the strip to 30. If the exporter sees an NLA strip that contains no bone animation, then it assumes to export all bone animation.
Hope this is clear,
-brett
- Attachments
-
- walking-proper-nla.zip
- proper nla setup
- (183.38 KiB) Downloaded 205 times
-
- Orc Shaman
- Posts: 788
- Joined: Mon Jan 18, 2010 6:06 pm
- Location: Costa Mesa, California
- x 24
Re: Blender25 Ogre Exporter + extended .scene format
I'm using your latest version and it says WARNING : vertex count is not as claimed, will this lead to a problem?