Latest Blender Export Script [Wed Aug 25, 2010 - v1.4]
-
- Orc
- Posts: 441
- Joined: Tue Aug 01, 2006 1:43 am
- Location: Spain!!
- x 8
Re: Latest Blender Export Script [Wed Aug 25, 2010 - v1.4]
Any plans for make the script suitable for blender 2.56?
-
- Orc
- Posts: 478
- Joined: Mon Apr 10, 2006 9:12 pm
- x 12
Re: Latest Blender Export Script [Wed Aug 25, 2010 - v1.4]
Yes, it is planned. I'm trying to allocate time to work on this. Most probably end of next month though.
-
- Gnoblar
- Posts: 5
- Joined: Sun Oct 24, 2010 7:13 pm
Re: Latest Blender Export Script [Wed Aug 25, 2010 - v1.4]
I'm looking for a way to import existing ogre animations into old 2.49b Blender. It is mentioned on several places that this exporter is also able to import Ogre stuff into Blender. Not sure if it's true, though. Don't see any import functions there.
Also when googling, found this: http://code.google.com/p/blender2ogre/
Also when googling, found this: http://code.google.com/p/blender2ogre/
-
- Orc
- Posts: 478
- Joined: Mon Apr 10, 2006 9:12 pm
- x 12
Re: Latest Blender Export Script [Wed Aug 25, 2010 - v1.4]
Hi, Dusho,
What you're looking for is not part of this blender script as this only does exporting. You're looking for the blender import script: http://www.ogre3d.org/tikiwiki/BlenderImport
What you found is another project intending to bring ogre exporting to the new blender 2.5. For the moment it's the only thing available right now for 2.5 until I get my butt into this.
What you're looking for is not part of this blender script as this only does exporting. You're looking for the blender import script: http://www.ogre3d.org/tikiwiki/BlenderImport
What you found is another project intending to bring ogre exporting to the new blender 2.5. For the moment it's the only thing available right now for 2.5 until I get my butt into this.
-
- Gnoblar
- Posts: 5
- Joined: Sun Oct 24, 2010 7:13 pm
Re: Latest Blender Export Script [Wed Aug 25, 2010 - v1.4]
Thanks lf3thn4d.
So there is no import script that handles skeletons and animations, yet. I've compiled all the scripts I had and put together importer for Torchlight models (Ogre), but what I'm struggling with is how to apply animation translation correctly (also with combination of rest skeletons and action skeletons). I was looking for any help in existing scripts I can get. All I have is here: http://code.google.com/p/torchlight-to-blender/
So there is no import script that handles skeletons and animations, yet. I've compiled all the scripts I had and put together importer for Torchlight models (Ogre), but what I'm struggling with is how to apply animation translation correctly (also with combination of rest skeletons and action skeletons). I was looking for any help in existing scripts I can get. All I have is here: http://code.google.com/p/torchlight-to-blender/
-
- Orc
- Posts: 478
- Joined: Mon Apr 10, 2006 9:12 pm
- x 12
Re: Latest Blender Export Script [Wed Aug 25, 2010 - v1.4]
I'm not exactly sure what you're trying to achieve, but translation of a full skeletal model is just simply moving the root skeleton node.
-
- Gnoblar
- Posts: 5
- Joined: Sun Oct 24, 2010 7:13 pm
Re: Latest Blender Export Script [Wed Aug 25, 2010 - v1.4]
just trying to import animations correctly.lf3thn4d wrote:I'm not exactly sure what you're trying to achieve, but translation of a full skeletal model is just simply moving the root skeleton node.
Thing is, TL has animations split into separate .skeleton files (Walk, Attack, Run, ..) and those files contain also own skeleton. That skeleton can differ from skeleton defined in .mesh file. So in order to have it correct in Blender, idea is to calculate difference between 'action skeleton' and 'bind skeleton' and apply it to animation data (using original skeleton from mesh file). The script does that, but animations are bit 'wonky' and 'slidy', so I guess there is problem how and where it is applied (bonespace in ogre vs. armature space in blender?).
-
- Orc
- Posts: 478
- Joined: Mon Apr 10, 2006 9:12 pm
- x 12
Re: Latest Blender Export Script [Wed Aug 25, 2010 - v1.4]
Ah.. ok. I'm not familiar with how Torch Light does things. Can't really help you there. It could be a bug on the applying of the diff transform.
-
- Orc
- Posts: 424
- Joined: Wed Aug 01, 2007 8:13 pm
- Location: Venice, CA, USA
- x 7
Re: Latest Blender Export Script [Wed Aug 25, 2010 - v1.4]
Are the separate skeletons actually different than the main skeleton linked by the mesh? They must be the same, at least structurally, for the key frame data to be applied. The only way they could differ would be the bone lengths (parent-relative positions). In that case, TL probably ignores the parent-relative positions specified in the separate files when they apply the key frame orientations.Dusho wrote:Thing is, TL has animations split into separate .skeleton files (Walk, Attack, Run, ..) and those files contain also own skeleton. That skeleton can differ from skeleton defined in .mesh file. So in order to have it correct in Blender, idea is to calculate difference between 'action skeleton' and 'bind skeleton' and apply it to animation data (using original skeleton from mesh file). The script does that, but animations are bit 'wonky' and 'slidy', so I guess there is problem how and where it is applied (bonespace in ogre vs. armature space in blender?).
...At least, that's what I'd think you would do. I'm no animation expert, but I'd love to hear if this is wrong. I'm also interested because I was not able to correctly use the separate skeleton files [post on my symptoms]. Here is another (short) discussion with my views about using the linked skeleton files, if you're interested.
How did you obtain the TL files?
-
- Gnoblar
- Posts: 5
- Joined: Sun Oct 24, 2010 7:13 pm
Re: Latest Blender Export Script [Wed Aug 25, 2010 - v1.4]
yes, skeleton hierarchy is the same, sure.
But position and quaternion may differ from each other for same bones.
Also, having separate files for mesh and separate for every animation isn't just Torchlight specialty. It's actually very practical to have it this way and expand your animations independently, if needed.
Ogre does have Skeleton::_mergeSkeletonAnimations(OgreSkeleton.cpp) method that will merge skeletons for you -> calculate delta positions and quaternions between skeletons and apply it to all animations of original skeleton (basically what I want to do in Blender)
Oh. And unpacked TL media files come with TorchED (http://forums.runicgames.com/viewtopic.php?f=28&t=8046)- a tool that developers released to public (for modding community).
But position and quaternion may differ from each other for same bones.
Also, having separate files for mesh and separate for every animation isn't just Torchlight specialty. It's actually very practical to have it this way and expand your animations independently, if needed.
Ogre does have Skeleton::_mergeSkeletonAnimations(OgreSkeleton.cpp) method that will merge skeletons for you -> calculate delta positions and quaternions between skeletons and apply it to all animations of original skeleton (basically what I want to do in Blender)
Oh. And unpacked TL media files come with TorchED (http://forums.runicgames.com/viewtopic.php?f=28&t=8046)- a tool that developers released to public (for modding community).
-
- Halfling
- Posts: 47
- Joined: Wed Dec 22, 2010 7:30 am
Re: Latest Blender Export Script [Wed Aug 25, 2010 - v1.4]
"Warning: Vertex with more than 4 bones assignments!"
I was wondering what the latest on the above message is. Is there a way to fix this before it gets into the exporter [1], or is there an updated exporter somewhere that normalises to four bones when you have more, or can Ogre be told to normalise it automatically on load for you? Basically, without doing manual weight painting, how do you solve this?
I'm getting weird results when exporting animations (missing geometry), and I presume that Ogre is just using the first four weights specified. I could be wrong.
I just want to see if this problem is solved before I start trying to hack the script. It doesn't look *too* difficult ("meshexport.py", just below the code that emits the warnings, near the TODO would seem to be the place).
[1] I found some dead links to scripts that claimed to do this, but no live ones.
I was wondering what the latest on the above message is. Is there a way to fix this before it gets into the exporter [1], or is there an updated exporter somewhere that normalises to four bones when you have more, or can Ogre be told to normalise it automatically on load for you? Basically, without doing manual weight painting, how do you solve this?
I'm getting weird results when exporting animations (missing geometry), and I presume that Ogre is just using the first four weights specified. I could be wrong.
I just want to see if this problem is solved before I start trying to hack the script. It doesn't look *too* difficult ("meshexport.py", just below the code that emits the warnings, near the TODO would seem to be the place).
[1] I found some dead links to scripts that claimed to do this, but no live ones.
-
- Bugbear
- Posts: 833
- Joined: Thu Apr 15, 2010 7:42 am
- Location: Poznan, Poland
- x 33
Re: Latest Blender Export Script [Wed Aug 25, 2010 - v1.4]
ogre automatically ignores bones with smallest weights leaving up to 4. It's your job to keep that below 4.
Sos Sosowski
http://www.sos.gd
http://www.sos.gd
-
- Halfling
- Posts: 47
- Joined: Wed Dec 22, 2010 7:30 am
Re: Latest Blender Export Script [Wed Aug 25, 2010 - v1.4]
Cheers for the fast reply.so0os wrote:ogre automatically ignores bones with smallest weights leaving up to 4. It's your job to keep that below 4.
I am uncertain what you are saying precisely. Is what you are saying is that if a vertex say had eight bone assignments, and they weren't in any particular order [1], then Ogre should, upon loading, already sort the weights, take the four largest results, normalise them, and use them (this is what your first sentence suggests)? OR are you saying that any more than four causes problems, and that I must ensure that there are less than four before using the exporter (this is what your second sentence suggests)?
[1] I've confirmed that the mesh exporter does not emit them in weight order.
-
- Bugbear
- Posts: 833
- Joined: Thu Apr 15, 2010 7:42 am
- Location: Poznan, Poland
- x 33
Re: Latest Blender Export Script [Wed Aug 25, 2010 - v1.4]
1. Yes. Try to load a mesh with too many assignments and read the warning inside ogre.log, it says just that.Garthy wrote:
1. Is what you are saying is that if a vertex say had eight bone assignments, and they weren't in any particular order [1], then Ogre should, upon loading, already sort the weights, take the four largest results, normalise them, and use them (this is what your first sentence suggests)?
2. OR are you saying that any more than four causes problems, and that I must ensure that there are less than four before using the exporter (this is what your second sentence suggests)?
2. Yes. If you're into doing models for real-time rendering, you have to keep to some constraints, and that is one of them. Even high-endest engines have that limit.
Sos Sosowski
http://www.sos.gd
http://www.sos.gd
-
- Halfling
- Posts: 47
- Joined: Wed Dec 22, 2010 7:30 am
Re: Latest Blender Export Script [Wed Aug 25, 2010 - v1.4]
The two questions posed were mutually exclusive; I do not believe both answers can be "yes". Surely the process either works with more than four weights [1], or it does not? I'm leaving the comparison of quality aside for the time being.so0os wrote: 1. Yes. Try to load a mesh with too many assignments and read the warning inside ogre.log, it says just that.
2. Yes. If you're into doing models for real-time rendering, you have to keep to some constraints, and that is one of them. Even high-endest engines have that limit.
[1] Although only the largest four are actually used.
-
- Bugbear
- Posts: 833
- Joined: Thu Apr 15, 2010 7:42 am
- Location: Poznan, Poland
- x 33
Re: Latest Blender Export Script [Wed Aug 25, 2010 - v1.4]
http://www.ogre3d.org/docs/manual/manual_46.html
You must have no more than 4 weighted bone assignments per vertex. If you have more, OGRE will eliminate the lowest weighted assignments and re-normalise the other weights. This limit is imposed by hardware blending limitations.
Sos Sosowski
http://www.sos.gd
http://www.sos.gd
-
- Halfling
- Posts: 47
- Joined: Wed Dec 22, 2010 7:30 am
Re: Latest Blender Export Script [Wed Aug 25, 2010 - v1.4]
Cheers. That would suggest the first case then.so0os wrote:http://www.ogre3d.org/docs/manual/manual_46.html
You must have no more than 4 weighted bone assignments per vertex. If you have more, OGRE will eliminate the lowest weighted assignments and re-normalise the other weights. This limit is imposed by hardware blending limitations.
I'll have to dig further into why I'm missing geometry from the end result; I had thought it might be due to the extra bone weightings.
-
- Halfling
- Posts: 47
- Joined: Wed Dec 22, 2010 7:30 am
Re: Latest Blender Export Script [Wed Aug 25, 2010 - v1.4]
Answering my own question:Garthy wrote:"Warning: Vertex with more than 4 bones assignments!"
...
...
Is there a way to fix this before it gets into the exporter
http://www.ogre3d.org/tikiwiki/Normalis ... ture=Tools
This seems to clean things up for Ogre. Don't ask me how you're *supposed* to run it though. The way I did it involved copying the text into the text editor view window and hitting Alt-P. It seems to work though.
...
Interestingly enough, I'm getting a couple of problems with the output. For one model, the torso and arms seem to be missing entirely when exported. They appear in Blender fine. This happens with a fresh import and when animated. The same model [1] worked fine in 3ds Max with OgreMax.
When animated, an odd thing happens to the character- the legs warp backward in an odd kind of loop (imagine rubber legs grabbed at the middle of the calves and pulled back by a couple of leg lengths), and the feet stretch out. The result looks *hideous* and is completely different from the same animation inside Blender. Now that I've got the above script to restrict weights to four bones and normalise them, I can confirm that it's not a problem with there being too many bone assignments. The animation works fine in Blender itself. The same animation worked fine in 3ds Max with OgreMax when converted and dropped on a Biped. I used weights generated from bone heat in the Blender version if that makes a difference, and the materials are almost certainly wrong. I've hacked the export script to cap and normalise to four weights on output, the same but to one weight, and tried the above pre-processing script. The problem persists. Sometimes clearing out the weights for certain bits of the model and attaching them to one of the more central bones helps, but then of course the model does not animate correctly.
Are the above symptoms of any particular common problems that I could try to track down?
[1] - Technically, not the same model. The original model was in *.max form, and exported as *.obj to load into Blender, since Blender can't load in a native *.max file.
-
- Gnoblar
- Posts: 16
- Joined: Sun Oct 07, 2007 6:04 pm
Re: Latest Blender Export Script [Wed Aug 25, 2010 - v1.4]
Is there an open code repository, e.g. on GoogleCode or GitHub, where I can follow the latest updates of this script?
-
- Gnoblar
- Posts: 2
- Joined: Fri Feb 25, 2011 8:43 am
Re: Latest Blender Export Script [Wed Aug 25, 2010 - v1.4]
Need some help here.
I am using blender 2.49b with the blender export script. Some files do export well. But The problem is with some .blend file, the export "selected" have empty list. I am totally new to blender. For example I try to export the Otto (http://www.virgiliovasconcelos.com/otto/) to ogre .mesh/.skeleton file, but nothing I can select in "selected". Anybody know the problem?
I am using blender 2.49b with the blender export script. Some files do export well. But The problem is with some .blend file, the export "selected" have empty list. I am totally new to blender. For example I try to export the Otto (http://www.virgiliovasconcelos.com/otto/) to ogre .mesh/.skeleton file, but nothing I can select in "selected". Anybody know the problem?
-
- Goblin
- Posts: 297
- Joined: Mon Jun 09, 2008 3:56 pm
- Location: Karlsruhe, Germany
- x 10
Re: Latest Blender Export Script [Wed Aug 25, 2010 - v1.4]
Well, if you don't select anything in Blender, then the list will be empty. To select a mesh, simply right-click it in the viewport.zphilip wrote:Need some help here.
I am using blender 2.49b with the blender export script. Some files do export well. But The problem is with some .blend file, the export "selected" have empty list. I am totally new to blender. For example I try to export the Otto (http://www.virgiliovasconcelos.com/otto/) to ogre .mesh/.skeleton file, but nothing I can select in "selected". Anybody know the problem?
-
- Gnoblar
- Posts: 2
- Joined: Fri Feb 25, 2011 8:43 am
Re: Latest Blender Export Script [Wed Aug 25, 2010 - v1.4]
thank you, it really work like you said.LiMuBei wrote: Well, if you don't select anything in Blender, then the list will be empty. To select a mesh, simply right-click it in the viewport.
br philip
-
- Kobold
- Posts: 36
- Joined: Tue Mar 01, 2011 3:41 pm
- x 1
Re: Latest Blender Export Script [Wed Aug 25, 2010 - v1.4]
Brocan wrote:Any plans for make the script suitable for blender 2.56?
I know you're doing this for free and in your spare time, but how is the status of porting this script to blender 2.5?lf3thn4d wrote:Yes, it is planned. I'm trying to allocate time to work on this. Most probably end of next month though.
I'm new to blender and I'm more familiar with 2.5 then with older versions, I would appreciate it if this great script could get ported in the near future.
At the moment I'm solving this problem with using 2.4 for exporting my meshes, but animations from 2.5 get in 2.4 lost. So I've to do all animation in 2.4. In the end this request to port the script in 2.5 is just a comfort thing but it would be very nice to have this script working in the new versions of blender.
Edit (March 04):
I've collected my first experiences with the exporter, blender and ogre3d and maybe it owuld be better to change the "vertex not assigned to bone"-warning as mentioned here
-
- Kobold
- Posts: 39
- Joined: Mon Feb 28, 2011 6:58 pm
- Location: Paris, France
- x 2
Re: Latest Blender Export Script [Wed Aug 25, 2010 - v1.4]
Hi,
For Blender 2.5 Exporter, see the dedicated thread there :
http://www.ogre3d.org/forums/viewtopic. ... 0&p=421789
Regards,
SRombauts
For Blender 2.5 Exporter, see the dedicated thread there :
http://www.ogre3d.org/forums/viewtopic. ... 0&p=421789
Regards,
SRombauts
http://www.srombauts.fr, comments from an Android developer
-
- Gnoblar
- Posts: 16
- Joined: Sun Oct 07, 2007 6:04 pm
Re: Latest Blender Export Script [Wed Aug 25, 2010 - v1.4]
@SRombauts I'm pretty sure you just linked to an exporter that's unrelated to the one that is being discussed here.