7 DoF robot arm from blender 2.75 to JME 3.0

but joining meshes will cancel the parent relation between bone and mesh. How could I make the animation in this case?

I saw by glancing at the tutorial you were looking at that each actuator was an individual object, directly parented to the bones. Jmonkey’s pipeline is a bit weird I guess.

Your going to want to create vertex groups for each of your bones, (you can do this by clicking on each bone than selecting new vertex group) and assigning each vert to the corresponding bone. in weight painting mode. You can get into weight paint by selecting the armature, shift selecting the mesh, than hitting ctrl-tab.

Now in weight paint, select a vertex group, select all of the verts that would be attached to that bone, and paint until there is full red, or weight of one. Now those bones are weighted. :smiley: repeat for each

3 Likes

oookaay! :relaxed: I’ll try it and make you know. Thank you for butting into the conversation :laughing:

Hi friend.
I’m asking you for forgiveness . because my knowledge was just about here. I do not know more.
we should study more. It is for whole day that I am working with makehuman and blender and bvh
and face animation. I made some great progress. but disaster start when i wanted to import it to jme. When i tried to import .blend jme really sucked up. when imported ogre file it worked but there was some scratch. every thing is fine in blender i did what is said in help. If i made no success i will put my .blend model here so any body try to import in jme.

Oh no problem… I understand, and I really appreciate your effort to help me. Actually the tips of adding blend2ogre and the armature modifier were yours. We both can actually find solutions to our problems :smiley: again thank you very much

1 Like

I love this community, everyone is always helping each other out and sharing what they know :smile: If you guys have any questions, feel free to send me a message and I’ll see if I can help. The pipeline from blender to Jmonkey is a little weird, and there’s a lot that goes into modeling and animating. I’d be more than happy to share whatever I know :smiley:

1 Like

Hi,
I’m actually doing what you said about selecting the vertices… I have 10 meshes, each mesh contains about 100 vertices… I remembered that before I attached the bones I joined all the vertices :confounded: shall I un-join vertices to select all of them then rejoin theme again?
this is really giving me headackes :astonished:

Okay, I made some little slide things :smiley:

3 Likes

Oh! thank you very much, It’s pretty clear now, I really appreciate it. and it’s working actually :smile: greate. I’ve done just one mesh. soo many vertices to paint but it reminds me my childhood :laughing:
Ok, since it is a robot arm, I’m getting all vertices red, and I’ll do that again all over the other bones and meshes. Shall I joint the meshes before or after painting?
Thank you again
PS: you really should make a tutorial, you’re good in that

you want to join all of the meshes into one before weight painting. and thanks, I’ll give it a try :smile:

Ok… I think that I was stupid and I appologize for wasting your time @Mechanatrix . Actually The solution proposed by @Ali_RS is effecient and all correct. After I exported the blend project to ogre xml files, I got 8 mesh xml files, since I have 8 meshes, a skeleton xml file, a material file and a scene file. I thaught that I have to group all the meshes together, according to several threads and forums and the official doc but I don’t have to do that anymore, I onely have to convert the scene file into .j3o file and I get all the model standing in the scene viewer.
I think it is time to make this topic “solved” and to move to the next point
Again thank you very much

Hi friends.
Before when I expected to Ogre whit "export the scene " option enabled. It worked and I get any thing in one .scene in JME (This case was not a makehuman body). But I don’t know why when I exported a makehuman body whit animation I just get an empty scene box inside .scene file. the size was in KB. I think .scene is not a good approach in all case.
please try to import .blend file of yours in (if you have jme3.1 alpha try in it because blender support is better in it ) .
I did it for makehuman case and the convert .blend to .j3o in jme. it worked amazing . any thing was in one place. and animation worked correctly.
Be patient . I am testing. If every thing goes well I may create a video tutorial for it.(Including how to get animation from mixamo website).

I imported directly the Blend file to JME 3.0, that’s what I have, but the problem is in there again, all the meshes are in a mess. the blender2ogre thing is better, but I have to say that I didn’t make any animations so far :confused: .any way I’m going on with this approach. I’m downloading JME 3.1 alpha at the same time… We’ll see :smile:
Thank you

Jmonkey doesn’t natively support inverse kinematics, all animations need I be exported to ogre

what about dynamic interactive animations? I mean by doing rotations to the actutators via buttons or selecting rotaton degrees just by code. Do I have to set animations in blender before? Please just an idea… I don’t know how to proceed :confused:

Yes for such kind of thing that the whole model need to rotate or move is done by code.
Also I recommend for animation like walking in which the whole mesh changes it’s location while playing animation try to clean this movement ( by cleaning root bone location movement) and do that inside code.( This is for cases that the mesh movement is controlled by player by pressing a keyboard button like walking )
also there is a program named “BVH hacker” that can do the issue for you in bvh animations.
I am sorry if my explanation is bad. If you have question don’t hesitate to ask.

This example https://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/model/anim/TestCustomAnim.java demonstrates a custom bone animation.

Sure you can, this is how I did it for head tracking with my character. You first grab the bone you want through the skeleton control. Than, its as easy as rotating it with a quaternion. What I meant, is that Blender’s kinematics system is not supported by Jmonkey 3.0, sadly.

Private bone head = ((SkeletonControl)spatial.getControl(SkeletonControl.class)).getSkeleton().getBone("Head");
Quaternion focusQuat = new Quaternion();
head.setUserTransformsWorld(head.getModelSpacePosition(), focusQuat);

I’ve tried your lines of code after loading the model and the material, but I get a NullPointerException, the getSkeleton method causes the exception, it seems that there is no skeleton. Should I import anythink else before?

when you’ve successfully exported an ogre mesh, you than convert it to a j3o to use natively. Are you using the ogre mesh directly?