Page 3 of 18

Re: Latest Blender Export Script [Sat Dec 20, 2008 - v1.1]

Posted: Mon Jan 05, 2009 5:38 am
by nikki
johnDonson wrote:One question though, Is it possible that I'm getting skeletons of version 1.1.0 which Ogre 1.6 cannot read?
I believe that's dependent more on the version of 'OgreXMLConverter' you use than on the script itself. If you're getting Ogre from SVN then you'll also get the tools package along with it, you can build it there (it gets built with Ogre by default I think).

Re: Latest Blender Export Script [Sat Dec 20, 2008 - v1.1]

Posted: Mon Jan 05, 2009 1:52 pm
by johnDonson
Thank you nikki for your fast reply. What I did this morning following your advice was:
1. wake up
2. download ogre from SVN
3. build it (all went well except for some linking errors in the CGProgramManager but that's not the thread for that)
4. build the tools against the freshly built Ogre.framework
5. open blender with my model
6. export again

When I load the model into the engine I get
Mesh: Loading my_model.mesh.
Skeleton: Loading my_model.skeleton
Mesh: Loading my_model.skeleton.
An exception has occurred: OGRE EXCEPTION(7:InternalErrorException): Cannot find serializer implementation for current version [Serializer_v1.10] in MeshSerializer::importMesh at /Users/steve/projects/Shoggoth_clean/ogre/Mac/Ogre/../../OgreMain/src/OgreMeshSerializer.cpp (line 115)
Which means problem solved. The exporter works fine, the problem was either 04:00 am or that I'm an idiot... My resource manager tried to load the .skeleton as a .mesh :oops:

Thanks again for this great tool. There's no stoppin' me now. :lol:

Re: Latest Blender Export Script [Sat Dec 20, 2008 - v1.1]

Posted: Tue Jan 06, 2009 1:18 pm
by less
Hey there,

I had some problems figuring out, how to get this thing work. The hook is, that the current blender version won't work with Python >=2.6, but the script refuses to work with Python <=2.4. I first installed Version 3.0.x, Blender told me, that there was no python found, same with 2.6.x. Then I tried with 2.4.x, for it's recommended at the blender hp, but then the script produced some error. Finally I got everything working with 2.5.4 I think. Just for the case anyone experiences the same problems.

Cheers, Paul

Re: Latest Blender Export Script [Sat Dec 20, 2008 - v1.1]

Posted: Thu Jan 08, 2009 7:42 am
by lf3thn4d
Ok. Noted. I've added a note on the first post. Thanks :)

Re: Latest Blender Export Script [Sat Dec 20, 2008 - v1.1]

Posted: Sat Jan 17, 2009 6:42 pm
by Ygrae
Hi everybody, it's my first post, and you'll understand I'm not English
I have a question about the script, I hope it's not been asked before, and my friend google didn't help me out this time.

I want to export some parts of a body in the same object.mesh.xml file, in some submeshs.
When I try I have my parts in different .mesh.xml files. I know that I can past xml code of one in the other, but I don't want a manual method.

I looked in the help file, and I tried to understand the code but I couldn't.
May someone help me ?

I've seen in an other topic some ideas like :
- Writing a script that joins all .mesh files in a single one.
- Modify the OgreXMLConverter to handle multiple files.
I'm curerntly trying to figure out a more convenient solution, with less stage for 3d worker, it's for a video-game.
Moreover, I found two classes named Submesh and SubmeshManager which let me hope there is a simple solution.

+

Re: Latest Blender Export Script [Sat Dec 20, 2008 - v1.1]

Posted: Mon Jan 19, 2009 6:35 am
by lf3thn4d
Hey Ygrae,
You need to join your meshes into one in Blender. Select the meshes you need to join and hit ctrl-J. Btw, you should really start a new topic for this one. It's not an exporter related question. ;)

Re: Latest Blender Export Script [Sat Dec 20, 2008 - v1.1]

Posted: Mon Jan 19, 2009 2:57 pm
by Ygrae
No I don't want a simple mesh, I want to divise my body in different submesh then I will can change them with other submesh.
In reallity, I want to create a clothes system and I want to line up my clothes by set. One file.mesh will be one set with a submesh for legs, an other submesh for the torso, an other for hands... Do you understand ?
And I want to do this stage in exportation from Blender to Ogre. This is the link with this topic :).

Re: Latest Blender Export Script [Sat Dec 20, 2008 - v1.1]

Posted: Mon Jan 19, 2009 3:17 pm
by jacmoe
There's no such thing as a submesh in Ogre.
You need to export the different bodyparts as separate meshes, using the same skeleton.
Then in Ogre, you can share that skeleton instance between them.
That's also known as a segmented model. :wink:

If someone would be so kind as to make a small video tutorial of how to do this, it would be great! :)

Re: Latest Blender Export Script [Sat Dec 20, 2008 - v1.1]

Posted: Mon Jan 19, 2009 6:57 pm
by lf3thn4d
What you really want is meshmagick.
http://www.ogre3d.org/forums/viewtopic. ... meshmagick

It has features to merge multiple meshes together exactly like what you want to achieve. You can either use it as a commandline tool or statically link it into your own game to do realtime merging.

I believe you have misunderstood ogre's submesh system. Ogre's submesh is designed more for applying different materials in the same mesh. Think of it as a multi material mesh system. Each submesh can only point to one material. And it's pretty much static. You can't just load submeshes up and form a mesh. That's why there exist this meshmagick tool. ;)

The blender exporter just export meshes. It doesn't concern itself on merging your meshes for avatar usage. That is a tool that needs to be done on your app's side. So yes, this is still not the right topic. :P

Re: Latest Blender Export Script [Sat Dec 20, 2008 - v1.1]

Posted: Mon Jan 19, 2009 7:50 pm
by Ygrae
Oh, I'm sorry I didn't understand the uses of submesh, thank you to teach me that.
I was believing that it was the right topic.
yes meshmagick is exactly what I sought, but with your education it's now useless.
I'll use one mesh for one object until you say to me an other way to line up my objet. I know it's not the right topic, a pm will be enough...
Thanx and sorry for my bad
Bye

Re: Latest Blender Export Script [Sat Dec 20, 2008 - v1.1]

Posted: Thu Feb 12, 2009 4:43 pm
by bencevoltam
Hi,
I've a problem at export time.

If i have a mesh object with an armature modifier, and the armature doesn't have an action linked in action the editor, the exporter fails when i start the process.

Error message:

Code: Select all

...
 File "/home/bencevoltam/.blender/scripts/ogrepkg/armatureexport.py", line 643, in _convertAnimations
    actionAtExportTime.setActive(self.bArmatureObject)
AttributeError: 'NoneType' object has no attribute 'setActive'
I think, this is a bug,
in file: ogrepkg/armatureexport.py, in method ArmatureExport::_convertAnimations()

Code: Select all

line 628: actionAtExportTime = self.bArmatureObject.getAction()
              ...			
line 646: actionAtExportTime.setActive(self.bArmatureObject)
If actionAtExportTime is None, then at line 646 the script must fail.
Probably one solution is to check if it is None, and clear the action property of the armature object in that case. (?)

cskb.,

Re: Latest Blender Export Script [Sat Dec 20, 2008 - v1.1]

Posted: Thu Feb 12, 2009 5:09 pm
by lf3thn4d
Hi, Thanks for the report. But I can't seem to reproduce it. Can you show me from ground up how to reproduce this?

Re: Latest Blender Export Script [Sat Dec 20, 2008 - v1.1]

Posted: Thu Feb 12, 2009 5:31 pm
by bencevoltam
lf3thn4d wrote:Hi, Thanks for the report. But I can't seem to reproduce it. Can you show me from ground up how to reproduce this?
1.Start Blender
2. Add a Cube
3. Add an Armature
4. Parent Cube to Armature (like Armature)
5. Create an action for the armature (make some keys)
6. Unlink the action in action editor (after this, there is no action assigned to the armature)
7. Run the exporter, and try to export the Cube and the action

For me, it plays the animation on the screen, then fails with this error.

cskb.,

Re: Latest Blender Export Script [Sat Dec 20, 2008 - v1.1]

Posted: Thu Feb 12, 2009 6:25 pm
by lf3thn4d
Hmm.. yeah. I see the problem. If no active action is being selected with the armature before export, it'll fail. I've made it not set the action if it wasn't set. However this leads to the armature gets set to the last action the exporter sets it to. Hopefully this isn't much of an issue. At least exporter doesn't fail. :P

Done and uploaded.

Re: Latest Blender Export Script [Sat Dec 20, 2008 - v1.1]

Posted: Thu Feb 12, 2009 6:39 pm
by bencevoltam
lf3thn4d wrote:However this leads to the armature gets set to the last action the exporter sets it to. Hopefully this isn't much of an issue. At least exporter doesn't fail. :P
I'm not sure, but try setting

Code: Select all

self.bArmatureObject.action=None
I'm working on a patch which add batch exporting capability to the script. However probably i need to much customization for my project, so i don't know if it reaches upstream or not.

cskb.,

Re: Latest Blender Export Script [Fri Feb 13, 2009 - v1.1a]

Posted: Thu Feb 12, 2009 7:08 pm
by lf3thn4d
Ah.. I didn't notice that you could access the action variable directly. Thanks and fixed.
bencevoltam wrote:I'm working on a patch which add batch exporting capability to the script. However probably i need to much customization for my project, so i don't know if it reaches upstream or not.
What do you mean by batch exporting? If I understand what you are trying to do, you should be able to batch export already. Just select multiple meshes at once then start/update the exporter and export.

Re: Latest Blender Export Script [Fri Feb 13, 2009 - v1.1a]

Posted: Thu Feb 12, 2009 7:28 pm
by bencevoltam
lf3thn4d wrote: Just select multiple meshes at once then start/update the exporter and export.
Ok i used the wrong word, i need a non-interactive exporter. So i can export from multiple files by running one script (using blender batch processing ability).

cskb.,

Re: Latest Blender Export Script [Fri Feb 13, 2009 - v1.1a]

Posted: Thu Feb 12, 2009 7:59 pm
by lf3thn4d
Ah.. that would be a nice feature. :) Though that is quite difficult to achieve for animation based export. Maybe useful for static meshes. :)

Re: Latest Blender Export Script [Fri Feb 13, 2009 - v1.1a]

Posted: Fri Feb 13, 2009 5:57 pm
by bencevoltam
lf3thn4d wrote:Though that is quite difficult to achieve for animation based export. Maybe useful for static meshes. :)
Why do you think that?
cskb.,

Re: Latest Blender Export Script [Fri Feb 13, 2009 - v1.1a]

Posted: Fri Feb 13, 2009 6:13 pm
by lf3thn4d
Well, for animation, each animated mesh requires an independent list of animation to export. If done from command line, these information would be hard to convey. Unless you mean to have them already set up and saved in the blender file before the batch exporting thing is executed.

Re: Latest Blender Export Script [Fri Feb 13, 2009 - v1.1a]

Posted: Fri Feb 13, 2009 6:53 pm
by bencevoltam
lf3thn4d wrote:Well, for animation, each animated mesh requires an independent list of animation to export. If done from command line, these information would be hard to convey. Unless you mean to have them already set up and saved in the blender file before the batch exporting thing is executed.
In my existing files, they have been set up already. Btw all action has a well defined name, so in the future it won't be so hard to choose, which one goes to export.
cskb.,

Re: Latest Blender Export Script [Fri Feb 13, 2009 - v1.1a]

Posted: Tue Feb 17, 2009 12:38 pm
by bencevoltam
Hi!
Why does the script filter out bones with NO_DEFORM flag by default?
Usually those bones have important ipo channels. Or I miss something?

cskb.,

Re: Latest Blender Export Script [Fri Feb 13, 2009 - v1.1a]

Posted: Tue Feb 17, 2009 2:54 pm
by lf3thn4d
Hey, no idea. That's was done before I took over the code. Maybe the author wanted to do away with un needed bones that doesn't have weights set on them. For smaller filesize stuffs.

Re: Latest Blender Export Script [Fri Feb 13, 2009 - v1.1a]

Posted: Tue Feb 17, 2009 5:46 pm
by SaiCo
Maybe i will be of some help.
Point of NO_DEFORM flag is to exclude bones that you dont need to export to Ogre; for me they're for example various IK targets/helpers that lie outside main bone hierarchy. Since exporter samples the skeleton on export, theyre just useless clutter at that point. (and it helps with size, too, but main idea is to ditch useless bones) . So if u dont need something exported, just uncheck the deform flag in blender. Exporting just bones that have vertex group attached won't work- for usable rig one will need some "vertexless bones", for example as origin point, camera attachment, weapon mount points etc, etc ....

Re: Latest Blender Export Script [Fri Feb 13, 2009 - v1.1a]

Posted: Tue Feb 17, 2009 5:55 pm
by lf3thn4d
Aha! There you go. :) Thanks SaiCo for the help. :) That explains a lot. So basically if you don't want any vertex deform on a certain bone but still want it exported, just make sure there's no vertex weight on them. :)