Additional script for ogre-blender-plugin

We might add another script to the ogre-blender-plugin that normalizes every vertex to be influenced by max 4 bones.

(I think most of the people using blender's ogre-export had once the warning "more than 4 bones assigned…" (or similar))


i have several problems trying to import a model from blender with ogre.



when I try to import a texture image it doesn't work in the view model of jmonkey platform.



when i import a bone animation, the animation deform the mesh, i see an good animation in blender but when i import to jmonkey the mesh deforms. even with an animation of only 2 bones and a box .



and a suggestion, why dont you put an bone editor with frames and transforms, it could be very usefull.



if I'm doing something wrong with the ogre model import, could upload a video tutorial with animation and texture? :?



and sorry for my English, I speak Spanish. :smiley:

montblack said:

i have several problems trying to import a model from blender with ogre.
when I try to import a texture image it doesn't work in the view model of jmonkey platform.
when i import a bone animation, the animation deform the mesh, i see an good animation in blender but when i import to jmonkey the mesh deforms. even with an animation of only 2 bones and a box .

The material name and name of the imported mesh or scene must be the same when importing the model. You can simply rename the material file if that is not so. The deforming of animations is probably due to non-applied transforms or rotations in the meshes. Apply them before creating animations.
Cheers,
Normen

As normen said one possible problem might be the not applied scale/rotation on the mesh.

In blender (object-mode) select the mesh (that have the bones) press ctrl-a ("scale and rotation to objdata").

Then export again.



If that does not work,post your blend-file and I have a look.


Sorry ttrocha, I didnt get the purpose of this script until now. Its just a menu extension for blender, great! Things like these can very well be put into the script installer plugin, yeah. I will add this soon.

Btw, did you look into the changes in blender 2.5? I guess its a pain to move stuff from 2.49, huh? :confused:

Anyway the OgreXML exporter is also for 2.49 so I guess thats gonna be our base for a while :slight_smile:

many thanks to the two normen and ttrocha for your help, I ran everything perfectly.  :smiley:

I also get the issue of a disconfigured mesh in jme but fine in blender. Applying Rotation and transformation on the mesh and armature as well as using ttrocha's handy tool got rid of the bone assignment warnings however in jme the animation is still disconfigured is their anything else i might be able to try.?


normen said:

Sorry ttrocha, I didnt get the purpose of this script until now. Its just a menu extension for blender, great! Things like these can very well be put into the script installer plugin, yeah. I will add this soon.
Btw, did you look into the changes in blender 2.5? I guess its a pain to move stuff from 2.49, huh? :/
Anyway the OgreXML exporter is also for 2.49 so I guess thats gonna be our base for a while :)


According to L3fth4nd in response to my post on the ogre forums HERE its better to wait until blender 2.6 arrives before importing any scripts
using ttrocha's handy tool


Just for info, I was only the one that got it from the ogre-wiki :D

Post your .blend-file and I will have a look.

Also have a look here:
http://www.jmonkeyengine.com/forum/index.php?topic=13922.msg100843#msg100843

lol you still found it  :stuck_out_tongue:



This is the .blend file and texture i am not sure why I am still having issues thank you for the assistance

The files were a shy big for a message attachment so



Talenx.blend



Talenx.dds

~Kyle

Hmm,…first of all! do never use constraint based animations (like you do with your character's

feet) But I doubt that is the mainreason.  Another point I'm not sure about those segments.

Actually the bone-vertex-groups looks ok for me but somehow even after removing constraints

and creating an animation on my own it is somehow messed up.



I don't know how you messed it up, but somehow you did! I would say. Detach armature from

skeleton, add feet to legs,remove constraints,apply scale to skeleton (ctrl-a) (what will mess up ALL your animations), delete animations, delete all vertex groups, apply aramture to mesh, and start again.



I don't see another option. good luck

hmm so the action constraints on the finger bones to make a quick fist is also poor practice?

I used constraints mainly to allow be to make quick animations that did not look completely bad.



I am planning on making a single skeleton archetype for all of the characters in my app so the names of the bones are more general. Do you have any suggestions? I had no idea constraints were so bad to use lol…



bahh!! okay thnx a lot ttrocha

anyone know where I can get that script for normalizing the vertices?