Many apologies for this post; I have a feeling I'm going to get a lot of sighs from moderators and frequent forum readers.
So I made a little model in blender, made a walk cycle for it, exported it using the OgreMeshExporter (most recent one), converted it to a .mesh using the commandline tools, and loaded it up into an Ogre app that uses code from the How to play an animated mesh article in the wiki... and I get terrible deformation in my mesh in my Ogre app, whereas in Blender, it works fine. It's almost as though there are some verts in my mesh that I forgot to assign to a bone, but this is not the case.
okokok, before you start sighing, I did do some research, and I read that the armature cannot have any rotations on it when exported, so I cleared those, and I cleared the translations as well. (The scale was not 1.0, but does this matter?). I cleared the rotations and translations for both my armature and mesh objects in blender and re-exported everything using the LATEST export script. But I still get the same undesirable behavior, which can be seen here:
(sorry that it's kinda hard to see becuase the mesh is not oriented correctly, and it has no texture)
versus in blender:
I circled the offending parts in both cases, for easier comparison. (Actually, the other hand is deformed, too but you can't tell cuz the mesh is all white.)
So to summarize, I am having problems getting my mesh to deform correctly in Ogre, even though it deforms correctly in blender; and I did try clearing the rotations and locations of the armature and mesh objects, and I am using the most up-to-date exporting script.
Thanks in advance.
blender -> ogre animation problem
-
- Gnoblar
- Posts: 24
- Joined: Fri Nov 10, 2006 7:07 pm
-
- Gnoblar
- Posts: 24
- Joined: Fri Nov 10, 2006 7:07 pm
Ok, it seems I didn't look hard enough... I found some tips in the wiki that say I have to set the roll of each bone to 0, make sure the size parameters of the mesh object are positive, and apply size/rot to the armature (mesh?) before animating :repeatedly slams head against table:
Ok, so I have some questions regarding these tips:
1. The second tip says I have to select the mesh object, open the properties window (N), and make sure all the "size"-values are positive. I don't see any "size" values. Does it mean all the Loc, Rot, Scale, and Dim values have to be positive?
2. The third tip is the more pressing issue. First of all, when exactly do I apply transformations? RIGHT after I parent the mesh object to the armature object? Can it be after I assign weights to the vertices but before I start animating (i.e. inserting LocRot keyframes)?
Also, to what exactly do I apply the transformation? The tip makes it sound like I only have to apply it the armature, which would be awesome, because that doesn't affect my mesh, just my pose. If I have to apply transformations to the mesh object, I will cry because that TOTALLY screws up my mesh.
And for future reference, I would like to know what the general order of things should be... should it be:
Model mesh -> apply transformations (to mesh) -> create armature -> apply transformations (to armature) -> parent mesh to armature -> assign vertices to bones -> animate
or something else?
Thanks
edit: Actually, I lied. Applying transformations even to the armature only completely screws up my mesh also.... SIGH. so I guess all I want to know now is what the order of creating an animated mesh should be, so I don't waste anymore time doing the wrong things and then going back and having to redo everything.
Ok, so I have some questions regarding these tips:
1. The second tip says I have to select the mesh object, open the properties window (N), and make sure all the "size"-values are positive. I don't see any "size" values. Does it mean all the Loc, Rot, Scale, and Dim values have to be positive?
2. The third tip is the more pressing issue. First of all, when exactly do I apply transformations? RIGHT after I parent the mesh object to the armature object? Can it be after I assign weights to the vertices but before I start animating (i.e. inserting LocRot keyframes)?
Also, to what exactly do I apply the transformation? The tip makes it sound like I only have to apply it the armature, which would be awesome, because that doesn't affect my mesh, just my pose. If I have to apply transformations to the mesh object, I will cry because that TOTALLY screws up my mesh.
And for future reference, I would like to know what the general order of things should be... should it be:
Model mesh -> apply transformations (to mesh) -> create armature -> apply transformations (to armature) -> parent mesh to armature -> assign vertices to bones -> animate
or something else?
Thanks
edit: Actually, I lied. Applying transformations even to the armature only completely screws up my mesh also.... SIGH. so I guess all I want to know now is what the order of creating an animated mesh should be, so I don't waste anymore time doing the wrong things and then going back and having to redo everything.
-
- Kobold
- Posts: 28
- Joined: Sat Mar 03, 2007 7:37 pm
I had a similar problem when making content for my game and the simplest solution is to flip your model corectly(so it stands upright in ogre) before applying the armature to it.
Another solution if you really dont want to redo the armature is to add a root bone that is parent to all other bones and flip the mesh to stand uppright in ogre for every animation. But i advise you to go with the first approach especially if the model is going to have alot of animations.
Here is my workflow when making a animated character for Ogre:
1. make the mesh.
2. Unwrap and color it
3. flip it so it stands upright in Ogre
4. apply scale and rotation(I scale the model so it is the right size compared to my other models here aswell maybe unnecessary)
5. make the armature
6. weightpaint
7. Make animations
8. rename the model from cube to something more suitable
9. make new material for the model
10. Select everything(AA)
11. Export to Ogre mesh
Another solution if you really dont want to redo the armature is to add a root bone that is parent to all other bones and flip the mesh to stand uppright in ogre for every animation. But i advise you to go with the first approach especially if the model is going to have alot of animations.
Here is my workflow when making a animated character for Ogre:
1. make the mesh.
2. Unwrap and color it
3. flip it so it stands upright in Ogre
4. apply scale and rotation(I scale the model so it is the right size compared to my other models here aswell maybe unnecessary)
5. make the armature
6. weightpaint
7. Make animations
8. rename the model from cube to something more suitable
9. make new material for the model
10. Select everything(AA)
11. Export to Ogre mesh