Looking for Good soul to help me out!

Hi Guys,

I’m a noob in making 3D application but I’m a professional java developer.

I’ve been doing a project that involved scaling of human model and scaling of a chair. My project exactly is to do a simulation program that will input user height and then it will show the proper sitting arrangement on a chair based on one height . What I did is that I make a model in makehuman > animate it in sitting position via blender> make a scene in JME that scales the makehuman character as well as the chair. Everything goes well. Now the problem is this, the requirement changes, as we’ve noticed every human has different scale on its upper body part and lower body part. Now, instead of just height the user input will be upper body part and lower body part because it is essential to know the ratio between the two in order to get the chair proper height. Here are my question?

  1. I’ve noticed that the scaling of makehuman character is done per object right? Is there a possibility that I could scale lower body part and upper body part differentely? Because on my program I’m using this code snippet to scale: ninja.scale(0.05f, 0.05f, 0.05f);

2.I was thinking of a way where In I would choose a model in makehuman, (because in makehuman we could choose the proper measurement of the body parts and that’s what I need) and run in background the sitting position that I’ve done in blender. or I could say I will make an animation pose(which is sitting position) and apply it to any makehuman model that I want to do a sitting position in runtime?

  1. Maybe I’m not using the right tool for my project? Can somebody tell me the right tool that I need? I think its a simple task, By the way, I choose JME3 initially because It was made in java and then I can used it with java swing and I’m quite familiar with that. Also, the chasing camera is what I need for my project. But choosing the model at runtime is the hard task for me.

This post is quite long. Sorry for that! Cause I really need help. Thanks GuyS!

I think you should scale bones not all armature - probably it is possible (i’m 3d “artist” :wink: )

Thanks for your reply bro.

Can I scale the bone programmaticaly? like this ninja.scale(0.05f, 0.05f, 0.05f);? if so how can I get the specific bone to scale?

Can someone point me a tutorial how to do the scaling of bone?

Unfortunately I’m not programmer but this can help you: Is it possible to scale a skeleton or bone?

SkeletonControl sc = spatial.getControl(SkeletonControl.class);
sc.getSkeleton().getBone("name_of_bone").setUserControl(true); //Allow programmatic control of bone.
Vector3f bone1Scale = sc.getSkeleton().getBone("name_of_bone").getLocalScale();
bone1Scale.multLocal(0.5f); //scale bone to 50%
bone1Scale.multLocal(2f); //double current bone scale

multLocal() will multiply the current scale of the bone. You could set it directly too with:

bone1Scale.x = 1f; //1.0 = 100% scale, 0.5 = 50%, 2.0 = 200%
bone1Scale.y = 1f;
bone1Scale.z = 1f;

While that might work, you should not modify the results of getLocalScale() directly without setting them back to the bone. There is no guarantee that the bone will pick up the proper scaling unless you call setUserTransforms().


Thanks pspeed, that’s good to know. I had been setting bone rotations directly in my game and haven’t seen any problems, but I’ll go ahead and insert some setUserTransforms() here and there just to be sure.