When importing OGRE meshes with animations, the mesh gets twisted

It looks like some demonic nightmare!

I made a character, normal anime style 3d girl…

When I import her with the animation "run"

then the whole skeleton gets messed up…



Any idea why?

It usually looks that weard when the mesh is not in correct place with the skeleton in blender

but I dont know how to make that in jME…

Its not like I havnt read the guide because I have!



The jme tool to correct these things does not work!

The problem is that I can use it. Import a model

But I dont see anything!

No axis, not a thing!

whats is wrong?!

Its just black!

I have clicked the background to get it in focus etc.

It doesnt work and idk how to fix this!

So the model looks fine when imported, it just gets screwed up when you try to activate an animation? Try activating the "Y Axis Up" and "Apply Modifiers" options in the Ogre3D exporter, and make sure you're using the latest version for the script and blender.

Momoko_Fan said:

make sure you're using the latest version for the script and blender.

Actually make sure your using the latest version of the script and blender 2.49b, not blender 2.5 the script hasn't been ported to that yet, I believe.
SomethingNew said:

Momoko_Fan said:

make sure you're using the latest version for the script and blender.

Actually make sure your using the latest version of the script and blender 2.49b, not blender 2.5 the script hasn't been ported to that yet, I believe.

2.5 haven't been officially released yet so 2.49b is the latest :)

Im using 2.49b of blender, and the script, idk… I got it in the tutorial where it seemed to work…

But your right, it looks normal without activating an animation but messes up afterwards…



P.S I dont have a "apply materials" button…

P.S I dont have a "apply materials" button...

Not "apply materials", "apply modifiers".. See attached image.
You can download the latest version here: http://www.xullum.net/lefthand/downloads/temp/BlenderExport.zip

Ahh!!

Dunno if that exsisted b4 but it does now! ;D

Installed ur package…

But I get an error:

Attribute error: mesh must be linked to an object first



Ehh… It is parented to the armature… but why would I wana link it?

And how do I link it?

I am just guessing, but it appears you do not have a certain mesh assigned to an object? Usually that means the mesh exists, but is not visible in the 3D view, so its just there. I am not sure how you got this error, does the cube when starting blender export fine?

Yea, the cube worked fine

I tried linking it to scene ctrl + l scene> scene

But it didnt work…

Idk what do to…

Should I select the armature or something else along with the mesh?

I read the female head.mesh.xml file

It ends at the line:

<boneassignment>



So I  guess that the bone conneciton might be some trubbeling…?

That means that some error occurred while exporting the model so an invalid file was made. It should end with </mesh>

I get still the same error :frowning:

After hours of work im back to square one!

I get this warning:

Cannot find material Material.001 for submesh 'Female HeadMesh000'

And my character is twisted so the arms and legs are way to long…

It looks like some demonic nightmare!

Well, it is only if you want too much too fast.

How did you get the model on your skeleton? Can you describe your workflow?
Do you have scaled bones?(Afaik they are not supported.) Any 'vertex not assigned'-errors?

My suggestion for you. Just start a new blender project with a very simple geometry.

Follow this instruction:
http://www.jmonkeyengine.com/forum/index.php?topic=12767.msg95159#msg95159

And the report back

Okaj!

Did that tutorial.

It works fine :slight_smile:

So now I got a cube spinning repetingly in my game :smiley:



But I want my character…

You were talking about skeleton scales were supported?



Idk what you meen by scale…

I click a bone then click s, thought that ment size…



Maybe thats the problem?!

But if so, how do I change the size of a bone without scaling?

I tried using the example tutorial that worked.

It does the same thing only that is doesnt accept that my mesh name incls a space…

It also messes up the mesh completely…



Could anyone have a look at it?

I have included my file

Ok, I made it!



Step one:

First thing,…did you see the warning by the exporter about using vertices with more than 4 bones?

Actually there is a blender script that helps with this:

http://www.ogre3d.org/wiki/index.php/NormaliseBlenderMeshForOgre

(After installing, select mesh, edit-mode, weight-paint->paint->'normalize vertex group … for ogre')



Step two:

I can only speak for the hottbj-exporter (but I think that will be true for ogre as well): Armature and Mesh have to have the same translation. To do this do following:

  • select armature, in editing panel(f9) select "rest position"
  • select mesh,  go to object-panlel (f7) remove the parent in the textfield (par:…)
  • alt+g to reset to (0,0,0)-translation
  • select armature alt+g in object-mode as well
  • still mesh: go in edit-mode, select all bones, ctrl-n (clear roll)  (Don't know if that is really necessary)
  • go to object mode: select mesh AND aramture. ctrl-p->armature->Don't create groups (as they are already there)



    Ah ok,…and rename the Mesh to a non-space name



    Good luck by fixing the problem!



    And one thing if you start working again with aramtures.
  • Once you mesh is ready, select the mesh. alt+s (cursor->selection) and create then the armature and only place it right in edit mode. This ensures that the armature is placed exactly at the same translation that the mesh has.



    (EDIT: The export-files are added to my last posting)

I must be a real tard!

I cant even manage to get it right following your instructions step by step!

Dang!



Even when runnign your file I get null point errors!

This is redicules!

Ill just go shoot my brain out, this poop doesnt work!



But I appriciate ALOT that you tried to help me, just seems like blender and java is against all that I do.

At all time. At all cost.

I do not expect anyone to put up with me anymore

but if ANYONE got any strength to beat this problem

the information is as follows:



After I had done your intructions, the armature is still on rest position.

So when loading it in java is get error at the line:

scene.load(sceneURL.openStream());

This doesnt occure at any other point except when the rest position is in.

If I unclick the rest position, the mesh deforms in blender too, because when I clicked

ctrl+g at the mesh, the center of the mesh is not center of the armature, dunno how to fix except by moving the mesh…



If I then, unclick the rest position then what happend is that I get error at this line:

MeshAnimationController cont = (MeshAnimationController)ogM.getController(0);

Nullpointer…

Oh,…ok my fault. I forgot that steps…


  • restpos have to be disabled again
  • switch to orthomode (so the following adjusting is easier. numpad-5)
  • select the mesh, go to edit-mode, select all vertices (ctrl-a), and move them so they fit to the armature



    Actually I'm not sure if it is really mandatory for the aramture to be exactly on the same pos. I'm not an ogre-exporter-user. I only know that this was once a mandatory step for the hottbj-exporter…(that is a bit more strict to use)



    And to my file I send I have to appologize as well. I added the wrong skeleton,…here the right one (hopefully).



    We will get that baby moving. Just stop being such frustrated. To be really familiar with how to do the steps in blender in order to export properly needs time…