-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ronan Sandford wrote:
> Hello
> 
> I would like to create animation on the fly in order
> to move a arm to an object for exemple without
> predetermined animations to make the animations more
> real without take too much quantities of graphics.
> 
> I read somewhere soya have the capabilities to do that
> by squeleton animations.
>  I know in blender we can attribute bones in a 3D
> model. 
> will it be possible to make the bones move in a soya
> 3D application.
> 
> Thanks
> 

This is not that easy, at least not with the stock Cal3D which Soya
uses. I have implemented something like that with OpenSceneGraph and
Cal3D for another project. It is possible to do it, but you have to
write some C++ glue code to do it for you, you cannot do it just from
Python (Soya).

What you need to do (model is CalModel*, elapsed is elapsed time):

1) model->getSkeleton()->clearState();

2) update the bones to the desired posture

3) model->getSkeleton()->lockState();
4) model->getSkeleton()->calculateState();
5) model->getMorphTargetMixer()->update(elapsed);
6) model->getPhysique()->update();
7) model->getSpringSystem()->update(elapsed);


Normally Cal3D just calls model->update(elapsed) instead, so you need to
put this modified code into a callback or something that gets called
instead of the standard update(). Normal update() will just take the
next frame from the animation and override whichever posture you have
set manually.

Good luck,

Jan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
Comment: Using GnuPG with Mandriva - http://enigmail.mozdev.org

iD8DBQFC5kpTn11XseNj94gRAtrSAKC9KInfi6vkkD9bc95q68vmpHX+2wCg7ned
ZXmDyJA5yVLiIBKfuZYYvRg=
=9DBi
-----END PGP SIGNATURE-----

Reply via email to