Animate rigged model according to given commands

Started by aeroxr1, June 05, 2014, 10:14:22 PM

Previous topic - Next topic

aeroxr1

Hello to everyone :)
I'm trying to animate a human's rigged model for an Android Application ( Real-time Motion Capture ).
Is possible to do this using jPCT-AE and Bones ?
Something like this https://www.youtube.com/watch?v=NYT-nx533nM

I have the library that gives me the position of the sensor in a quaternion.
I thought to set the quaternion on the relative bones.
But I don't know which function I have to use to identify bones and joints of my rigged model and which function I have to use to set its position in quaternion format.

Have you any suggestion for me ? 

Thanks all :)

raft

yes, sure it's possible. you have to set position/rotation of joints of skeleton. that is done via SkeletonPose. as its name suggests it's a pose of Skeleton. later that pose is applied to target object's mesh via Animated3D.applySkeletonPose().

have a look at ProceduralAnimationSample which programatically changes SkeletonPose and applies it.

however, calculating poses based on some input is not trivial and to tell the truth i'm not fluent with writing equations for it.

aeroxr1

Thank you so much :)

I'll download jpct-ae and bones and I'll look the proceduralanimationsample :)

aeroxr1

Sorry,
I downloaded bones-android-ninja, I imported it in eclipse , but
5 errors appeared :

import raft.jpct.bones.Animated3D;
import raft.jpct.bones.AnimatedGroup;
import raft.jpct.bones.BonesIO;
import raft.jpct.bones.SkeletonPose;
import raft.jpct.bones.SkinClip;


(import raft cannot be resolved)

And I have another question :

bones is included in jpct-ae ?
or I have to import some library ? I ask that because I'm downloaded jpct and bone , but I don't find bones's libs :/

raft

Bones is not included in ninja demo app. you should download it separately and import to Eclipse. by default, Ninja demo app looks for Bones project in its classpath.

for your own projects, either add Bones the same way to your classpath or add its jar, which is in Bones/build directory.



raft


aeroxr1

#7
sorry i'm burned out  :'(

(tired and stupid -.-")

Before to read your post I compiled and built all files included in Bone.zip ahahah

raft


aeroxr1

can you suggest me a rigged model that is easy to export to bones ?
I downloaded this model http://www.blendswap.com/blends/view/21948 and I'm trying to follow this tutorial http://www.jpct.net/wiki/index.php/Exporting_from_Blender_to_Bones to export in bones format, but for now I'm failing  :'(

raft

not really, sorry :/ i've never exported from Blender myself. maybe contacting a Blender user may help?

aeroxr1


raft

in the past i've used 3dsMax + OgreMax exporter to export to Ogre3D format. it was quite stable and usable. AFAIK there is an OgreMax for Maya too.

aeroxr1

#13
I want to develop Android app but if I want to see if the conversion is done well can I import bones project in eclipse and use LoadBonesFormatSample ?

I did :
1- exported from blender to collada
2- used collada script exporter (in rotation what I have to put ? O.o )
3- I changed the LoadBonesFormatSample's code line from
FileInputStream fis = new FileInputStream("./samples/data/ninja/ninja.group.bones");
to
FileInputStream fis = new FileInputStream("./samples/data/ninja/scheletro.group.bones");
4- imported all the folder in eclipse and run LoadBonesFormatSample

But sadly It doesn't work, I see only one ninja's leg -.-" During the conversion the warning say me "WARNING : max of 4 joints .."

last question : when I export in ogree different files are being created , but how I have to use jmeOgre2Bones ?

For example in the last conversion I had this file :
- Sphere.000.mesh
- Sphere.000.mesh.xml
-Sphere.004.mesh
-Sphere.004.mesh.xml
-Sphere.004.skeleton
-Sphere.004.skeleton.xml

p.s : now I'm downloading 3dmax student version .. I have to find the way to import a rigged model in bones :(

raft

Quote from: aeroxr1 on August 19, 2014, 08:01:26 PM
1- exported from blender to collada
why not export to Ogre format as mentioned in wiki page? i found Ogre a much usable format
Quote from: aeroxr1 on August 19, 2014, 08:01:26 PM
2- used collada script exporter (in rotation what I have to put ? O.o )
-rotation x180

Quote from: aeroxr1 on August 19, 2014, 08:01:26 PM
last question : when I export in ogree different files are being created , but how I have to use jmeOgre2Bones ?
jmeOgre2Bones -rotation x180 -out sphere.group.bones -in Sphere.000.mesh.xml