First steps with jME… How to get some assets in

Im now using this engine, and after playing a bit with it im stucked in this 2 points:


  1. How should I load animations?

    I use a character structure with 6 mesh parts, each sharing the same skeleton, thus the same animations…

    But I have the animations each one in a diferent skeleton.xml file (Used ogre format to export them).

    Atm I just dunno how can I load those files into the current skeleton to get the anims inside the engine… suggestions?

    EDIT: Can I load an skeleton, and several animations, just one time, and set it to multiple meshes?


  2. PhysicsControllers seems to be buggy… When I place a capsule, and attach it to my chr’s node (It has 6 meshes inside), the capsule just gets its mid point at the floor. Also I have to set a fixed radius and height, or app will crash… so its quite useless… I have to know the mesh dimensions, and I just cant get the capsule fit the model…







    Thanks in advance for help :slight_smile:

1 - I Think it’s impossible, I think the only way would be joining the models ctrl+j. Then there will be just one skeleton xml. About the animations, yes, you can set several animations for your skeleton.

2 - Collision shapes for several models jjust work with CompoundCollisionShape.

With having several animations I mean having each animation in its own .xml file

Hmmm. The OgreXmlImporter just find for a SKELETON xml files, not animations xml files. And the OgreMeshesExporter does not export animations in separated xml files.

the animations are in .skeleton.xml files, and the exporter (OgreMax) does support exporting them…



Anyway what I want is to load the raw animation to the AnimControl, there is the Animation class, which seems to be what I want, but I just dunno how to use it and the doc about it is a bit… confusing xD

Are you sure OgreMax can’t export animations? :expressionless: .

Btw blender might have a ogre max importer, but I don’t if it loads the animations.

Nono, I CAN export them to a single XML… (then I have to export all the anims to each chr part… )

Aswell, I can export each animation to its own .skeleton.xml file, but I dunno how to load those into jME.



(Ty for your replies… and sorry for my english… is not very good and its hard for me to explain myself :frowning: )

Hmm OK. Are you talking about several skeleton.xml files? Did you already try to merge them by hand?

They can be merged by hand… yes… lot of work o.o



I have several assets to import… they are originally in FBX format… (atm i HATE that format.)

WHat its giving me more heache are the anims, cause they have no tag at all… I have a little script that let me split the anims in different FBX files, so I can export each anim to its own SKELETON.xml file… but If I export the whole track… the anims will mix, so Ill have one single anim which i’ll have to split by hand…



Repeating the process for each single model I have… PFFFFFFF :stuck_out_tongue:



Thaks for replies :smiley:

yes, unfortunately there is no way. But it’s possible to create a importer / plugin for that.

I’ll try :slight_smile:

Your model center is at its feet. The character control moves the model to its center, its all working as intended, no bugs.

Its not at its feet, its a node with 6 models, using CompundShape work fine

BTW: Other issue: How can I attach a model (lets say, a sword) to other’s bone? (eg: chr’s right hand bone)

http://www.hub.jmonkeyengine.org/wiki/doku.php/jme3:faq#how_do_i_let_players_interact_by_clicking?

No that tutorial is not about it. But, are you wanting to attach the sword node to the hand node?



[java]

hand.attachChild(sword);

//and rotate the sword acord the hand orientation.

[/java]

Humm yes… but there’s not a node for the hand… In other engines I just used the hand bone’s matrix to update weapon’s, Ill try the attachChild method :slight_smile: ty

but there’s not a node for the hand


Didn't you say your model is a couple of models together? There's a hand child?

Node handLeftNode = (Node) myModel.getChild("handLeft");

Or, if it's a geometry, just attach it to a node:

Node handLeftNode = new Node("handLeftNode");
handLeftNode.attachChild(myNode.getChild("handLeftGeom"));

No, it has childs, but what I need is a specific bone :smiley: I think I know how to do it ^^ ill test it as soon as I work out how to get the animations… probably the best way is to export the anims to separate files… and just mix them by hand XD (That way I can reuse the same skeleton ^^)

See SkeletonControl.getAttachmentsNode()