POV-Ray : Newsgroups : povray.advanced-users : IK Skeleton Server Time
23 Nov 2024 20:53:15 EST (-0500)
  IK Skeleton (Message 1 to 3 of 3)  
From: Tail Kinker
Subject: IK Skeleton
Date: 18 Feb 2012 13:36:02
Message: <4f3fef92$1@news.povray.org>
I have created an IK skeleton macro package, if anybody is interested. 
You can grab it from my web page, at:

<http://tailkinker.contrabandent.com/software.htm>


Post a reply to this message

From: Tail Kinker
Subject: Re: IK Skeleton
Date: 19 Feb 2012 23:41:24
Message: <4f41cef4$1@news.povray.org>
On 12-02-18 01:36 PM, Tail Kinker wrote:
> I have created an IK skeleton macro package, if anybody is interested.
> You can grab it from my web page, at:
>
> <http://tailkinker.contrabandent.com/software.htm>

Whoops!  A bug got past me.  I've uploaded a fixed version.


Post a reply to this message

From: Tail Kinker
Subject: Re: IK Skeleton
Date: 21 Feb 2012 06:31:25
Message: <4f43808d$1@news.povray.org>
Uploaded a new version of IK Skeleton.  Added a waist joint, and allowed 
for rotating it in three dimensions instead of only one.  The 
documentation reflects these changes, and the html version includes two 
flash animations showing off what the package can do.  (I'll be adding 
at least four more of those over time.)

You can grab it at http://tailkinker.contrabandent.com/software.htm


Post a reply to this message

From: robotguy
Subject: Re: IK Skeleton
Date: 20 Apr 2012 03:10:03
Message: <web.4f91093bd487aa7a2ca022ce0@news.povray.org>
Tail Kinker <the### [at] gmailcom> wrote:
> Uploaded a new version of IK Skeleton.  Added a waist joint, and allowed
> for rotating it in three dimensions instead of only one.  The
> documentation reflects these changes, and the html version includes two
> flash animations showing off what the package can do.  (I'll be adding
> at least four more of those over time.)
>
> You can grab it at http://tailkinker.contrabandent.com/software.htm

I just had a brief look at your work.  You might be interested in a couple other
projects:

http://www.magicalrobotics.com/bones.zip

Alive! at http://www.imagicproductions.com/

I wrote bones.inc (posted the link here in May 2010:
http://news.povray.org/povray.animations/thread/%3Cweb.4bdf545b88bb62bc926a7e230%40news.povray.org%3E/?ttop=371289&toff
=50
), and I think we've both got different aspects of this problem solved from
different angles; your work and my work might fit together very well.  For
instance the base of the torso in a skeleton in bones.inc is called the Zero
bone and the positions of the hands and feet (really the wrists and heels) can
be looked up with simple bones.inc macro calls:

baseOfTorso = getSkeletonPosition (SkelName)
rightHand = getBoneStart(IndirectBoneLabel("RArm_Hand_Wrist"))
leftHand = GBS(IBL("LArm_Hand_Wrist"))
rightFoot = GBS(IBL("RLeg_Foot"))
leftFoot = GBS(IBL("LLeg_Foot"))

Using my skeleton data structures, much of the work you have done here could be
overlaid on top of my base, with the positions of the hands, feet, and lower
torso (or center of mass) driving macros (later to be attached as a string
object to the Zero bone) that determine the rest of the joint angles, thus
generating Poses automatically.  If you check out bones.inc, look at section 4.6
and 3.2 of the readme file and the way I generated joint angles in the Canfield
joint demo with the CanfieldCalc() macro.  Animation of skeletons in bones.inc
is accomplished by interpolating between poses.

I've been looking for some sort of IK solution for bones.inc to generate poses,
and I think you've got it.  Have a look at the readme file in bones.zip and tell
me what you think.  The BipedRobot file will give you a good bones.inc bipedal
skeleton to work with if you want to try messing around with adding your IK work
to my Poses and interpolations.

I'm thinking about ways to incorporate a converter program between blobman and
bones.inc, so existing blobman characters can be overlaid on bones.inc
skeletons, have poses generated by your IK functions attached to Zero bones, and
then animated via the InterpolatePose() macro in bones.inc.  That way existing
blobman work can be re-used and much more easily animated.

Several skeletons can be animated at once with bones.inc, and they don't need to
be bipedal - could be dragons or spiders or snakes.  Your IK stuff could be
applied to these types of skeletons as well.  This could be very useful for lots
of people.


Post a reply to this message

From: Tail Kinker
Subject: Re: IK Skeleton
Date: 20 Apr 2012 18:13:24
Message: <4f91df84$1@news.povray.org>
On 12-04-20 02:59 AM, robotguy wrote:
> Tail Kinker<the### [at] gmailcom>  wrote:

> I just had a brief look at your work.  You might be interested in a couple other
> projects:
>
> http://www.magicalrobotics.com/bones.zip
>
> Alive! at http://www.imagicproductions.com/

Thanks!  I'll check them out.
>
> I wrote bones.inc (posted the link here in May 2010:
>
http://news.povray.org/povray.animations/thread/%3Cweb.4bdf545b88bb62bc926a7e230%40news.povray.org%3E/?ttop=371289&toff
> =50
> ), and I think we've both got different aspects of this problem solved from
> different angles; your work and my work might fit together very well.  For
> instance the base of the torso in a skeleton in bones.inc is called the Zero
> bone and the positions of the hands and feet (really the wrists and heels) can
> be looked up with simple bones.inc macro calls:
>
> baseOfTorso = getSkeletonPosition (SkelName)
> rightHand = getBoneStart(IndirectBoneLabel("RArm_Hand_Wrist"))
> leftHand = GBS(IBL("LArm_Hand_Wrist"))
> rightFoot = GBS(IBL("RLeg_Foot"))
> leftFoot = GBS(IBL("LLeg_Foot"))

I take it that bones.inc is forward kinesic?

> Using my skeleton data structures, much of the work you have done here could be
> overlaid on top of my base, with the positions of the hands, feet, and lower
> torso (or center of mass) driving macros (later to be attached as a string
> object to the Zero bone) that determine the rest of the joint angles, thus
> generating Poses automatically.  If you check out bones.inc, look at section 4.6
> and 3.2 of the readme file and the way I generated joint angles in the Canfield
> joint demo with the CanfieldCalc() macro.  Animation of skeletons in bones.inc
> is accomplished by interpolating between poses.
>
> I've been looking for some sort of IK solution for bones.inc to generate poses,
> and I think you've got it.  Have a look at the readme file in bones.zip and tell
> me what you think.  The BipedRobot file will give you a good bones.inc bipedal
> skeleton to work with if you want to try messing around with adding your IK work
> to my Poses and interpolations.

I'll do that, when I get a few free moments.  :)

> I'm thinking about ways to incorporate a converter program between blobman and
> bones.inc, so existing blobman characters can be overlaid on bones.inc
> skeletons, have poses generated by your IK functions attached to Zero bones, and
> then animated via the InterpolatePose() macro in bones.inc.  That way existing
> blobman work can be re-used and much more easily animated.

Blobman parts could be separated out and attached to my ik_skeleton 
fairly easily - I actually wrote ik_skeleton with that in mind. 
Unfortunately, I haven't got it working yet, as the blobman parts are 
oriented differently than ik_skeleton wants.

> Several skeletons can be animated at once with bones.inc, and they don't need to
> be bipedal - could be dragons or spiders or snakes.  Your IK stuff could be
> applied to these types of skeletons as well.  This could be very useful for lots
> of people.

I'll compare the two and think about what can be done.  I need to do 
some re-work on ik_skeleton again, anyway, due to issues with some of 
the joints.  Especially, I want to be able to solve three segments per 
limb, instead of only two, possibly with an adjustable bias between 
joints, so that digitigrade skeletons can be built.  I also want some 
ready-made macros for walking, running, jumping, etc., with 
interpolation between movement styles.  (That's getting into hurty math, 
though.)


Post a reply to this message

From: robotguy
Subject: Re: IK Skeleton
Date: 21 Apr 2012 00:10:01
Message: <web.4f923292d487aa7a2ca022ce0@news.povray.org>
Tail Kinker <the### [at] gmailcom> wrote:
> I also want some
> ready-made macros for walking, running, jumping, etc., with
> interpolation between movement styles.  (That's getting into hurty math,
> though.)

The BipedRobot.pov file in bones.zip (yes it is forward kinematics) already has
walking and running and interpolation and all the hurty math already done for
you.


Post a reply to this message

From: Tail Kinker
Subject: Re: IK Skeleton
Date: 21 Apr 2012 10:16:27
Message: <4f92c13b$1@news.povray.org>
On 12-04-21 12:07 AM, robotguy wrote:
> Tail Kinker<the### [at] gmailcom>  wrote:
>> I also want some
>> ready-made macros for walking, running, jumping, etc., with
>> interpolation between movement styles.  (That's getting into hurty math,
>> though.)
>
> The BipedRobot.pov file in bones.zip (yes it is forward kinematics) already has
> walking and running and interpolation and all the hurty math already done for
> you.
>
>
>
>
But if it's forward, it won't work at all with ik_skeleton.


Post a reply to this message

From: robotguy
Subject: Re: IK Skeleton
Date: 29 Apr 2012 18:25:00
Message: <web.4f9dbeced487aa7a2ca022ce0@news.povray.org>
Tail Kinker <the### [at] gmailcom> wrote:
> On 12-04-21 12:07 AM, robotguy wrote:
> > Tail Kinker<the### [at] gmailcom>  wrote:
> >> I also want some
> >> ready-made macros for walking, running, jumping, etc., with
> >> interpolation between movement styles.  (That's getting into hurty math,
> >> though.)
> >
> > The BipedRobot.pov file in bones.zip (yes it is forward kinematics) already has
> > walking and running and interpolation and all the hurty math already done for
> > you.
> >
> >
> >
> >
> But if it's forward, it won't work at all with ik_skeleton.

I think our ideas can work together.  The key part of your IK software is the
calculation of the ShoulderAngle, ElbowAngle, HipAngle and KneeAngle, using the
Cosine Rule.  You're basically taking a minimum number of data points and using
them to calculate all the intermediate angles.  This is very useful for
generating a single character Pose.

I did something similar in my Canfield joint simulation; the IK for the Canfield
joint is attached to the Zero bone.  It is possible to attach other inverse
kinematics pose-generation shortcuts to the Zero bone of other skeletons.  I can
see how to use your implementation of the Cosine rule to simplify some character
pose generation.


Post a reply to this message

From: trp
Subject: Re: IK Skeleton
Date: 5 May 2012 11:50:01
Message: <web.4fa54bf5d487aa7a23227c740@news.povray.org>
Hi Guys.

I've been reading your discussions and you got me thinking. I have looked at
reconstructing Blobman to use in my Alive! program. But, it occurred to me
yesterday that it might be easier to just create a translation link file. I
already have a stick figure I animate in Alive! I wrote the following this
morning:

          ----------------

//*****
// Temporarily move arms out of the way for testing.
//*****
#local BM_RA_S2E=<90,90,-8>; // Right Shoulder
#local BM_RA_E2W=<90,90,-3>; // Right Elbow
#local BM_LA_S2E=<90,-90,8>; // Left Shoulder
#local BM_LA_E2W=<90,-90,3>; // Left Elbow


//*****
// Link the Joints angles from Alive! to Blobman
//*****

// Right Hip
#ifdef (Rhip_R)
  #local BM_RL_H2K=<8,0,-5>;             // Set to Blobman default
                                         // Add Alive! action angle
  #local BM_RL_H2K=BM_RL_H2K + <-Rhip_R.x,Rhip_R.y,Rhip_R.z>;
  #local BM_RL_H2K=BM_RL_H2K - <0,0,45>; // Subtract Alive! default angle
#else
  #local BM_RL_H2K=<8,0,-5>;             // Started at the hip. Need to complete
the linkage to the base.
#end


// Right Knee
#ifdef (RKnee_R)
  #local BM_RL_K2A=<-8,0,3>;              // Set to Blobman default
  #local BM_RL_K2A=BM_RL_K2A + BM_RL_H2K; // Add angles of preceeding joints
                                          // Add Alive! action angle
  #local BM_RL_K2A=BM_RL_K2A + <-RKnee_R.x,RKnee_R.y,RKnee_R.z>;
  #local BM_RL_K2A=BM_RL_K2A - <0,0,0>;   // Subtract Alive! default angle
#else
  #local BM_RL_K2A=<-8,0,3> + BM_RL_H2K;  // Set to Blobman default plus
preceeding joint angles
#end


// Right Ankle
#ifdef (RAnkle_R)
  #local BM_RF_Rot=<8,0,-3>;
                                          // Add Alive! action angle
  #local BM_RF_Rot=BM_RF_Rot + <-(RAnkle_R.x+180),RAnkle_R.y,RAnkle_R.z>;
  #local BM_RF_Rot=BM_RF_Rot - <-90,0,0>; // Subtract Alive! default angle
#else
  #local BM_RF_Rot=<8,0,-3>;
#end


// Left Hip
#ifdef (LHip_R)
  #local BM_LL_H2K=<8,0,5>;              // Set to Blobman default
                                         // Add Alive! action angle
  #local BM_LL_H2K=BM_LL_H2K + <-LHip_R.x,LHip_R.y,LHip_R.z>;
  #local BM_LL_H2K=BM_LL_H2K - <0,0,-45>;// Subtract Alive! default angle
#else
  #local BM_LL_H2K=<8,0,5>;              // Started at the hip. Need to complete
the linkage to the base.
#end


// Left Knee
#ifdef (LKnee_R)
  #local BM_LL_K2A=<-8,0,-3>;             // Set to Blobman default
  #local BM_LL_K2A=BM_LL_K2A + BM_LL_H2K; // Add angles of preceeding joints
                                          // Add Alive! action angle
  #local BM_LL_K2A=BM_LL_K2A + <-LKnee_R.x,LKnee_R.y,LKnee_R.z>;
  #local BM_LL_K2A=BM_LL_K2A - <0,0,0>;   // Subtract Alive! default angle
#else
  #local BM_LL_K2A=<-8,0,-3> + BM_LL_H2K; // Set to Blobman default plus
preceeding joint angles
#end


// Left Ankle
#ifdef (LAnkle_R)
  #local BM_LF_Rot=<8,0,3>;
                                          // Add Alive! action angle
  #local BM_LF_Rot=BM_LF_Rot + <-(LAnkle_R.x+180),LAnkle_R.y,LAnkle_R.z>;
  #local BM_LF_Rot=BM_LF_Rot - <-90,0,0>; // Subtract Alive! default angle
#else
  #local BM_RF_Rot=<8,0,3>;
#end

//*****
// Include the Blobman
//*****
#include "bmpeople.inc"
Blob_Man(Male,2)
object {BlobMan transform BMO_Abdomen_U scale 35 rotate Unknown_ROT1 rotate
Unknown_ROT2 rotate Unknown_ROT3 translate <0,30,0>}

          --------------------

As you have seen, Blobman orients each limb separately rather then chaining off
of the proceeding limb. This include file (while quick and dirty and only
dealing with the legs at present) accounts for that and applies my LKnee_R
vector to Blobman's left knee adjusting for the preceeding adjustment to the
hip. I included this file in my character and used the walk cycle from lesson 3
of my documentation and got this:

http://www.imagicproductions.com/Example/Animation21.gif

It is not perfect. But, I was pleased with 2 hours of playing around. I left the
stick figure legs in to show how it translated.

Maybe everyone else has already thought of this. But, I'm happy to have a way to
incorporate Blobman and POVpeople without as much work as I thought. If you
haven't thought of it, maybe it would help with your packages.

I should also be able to use the existing Costume Definition Files.  :)

TRP


Post a reply to this message

From: robotguy
Subject: Re: IK Skeleton
Date: 18 May 2012 01:45:01
Message: <web.4fb5e19bd487aa7a2ca022ce0@news.povray.org>
"trp" <trp### [at] imagicproductionscom> wrote:
> Hi Guys.
>
> I've been reading your discussions and you got me thinking. I have looked at
> reconstructing Blobman to use in my Alive! program. But, it occurred to me
> yesterday that it might be easier to just create a translation link file. I
> already have a stick figure I animate in Alive! I wrote the following this
> morning:
>
>


//snikt code

>
> As you have seen, Blobman orients each limb separately rather then chaining off
> of the proceeding limb. This include file (while quick and dirty and only
> dealing with the legs at present) accounts for that and applies my LKnee_R
> vector to Blobman's left knee adjusting for the preceeding adjustment to the
> hip. I included this file in my character and used the walk cycle from lesson 3
> of my documentation and got this:
>
> http://www.imagicproductions.com/Example/Animation21.gif
>
> It is not perfect. But, I was pleased with 2 hours of playing around. I left the
> stick figure legs in to show how it translated.
>
> Maybe everyone else has already thought of this. But, I'm happy to have a way to
> incorporate Blobman and POVpeople without as much work as I thought. If you
> haven't thought of it, maybe it would help with your packages.
>
> I should also be able to use the existing Costume Definition Files.  :)
>
> TRP


I've been thinking about incorporating translations files between blobman and
bones.inc; it would be really nice to use work people have already done on
costumes etc.  Using the IK algorithms developed here in IK skeleton on
bones.inc should help with pose generation.  Ideally, we want to use existing
characters as much as possible and just extend the functionality.  This could go
a long way to using POVray for much more complex character animations.

I've also been thinking about having multiple skeletons associated with the same
character, with the skeleton used being chosen based on the distance from the
character to the camera as a computational shortcut.  Still haven't figured out
how that would work in bones.inc, but the idea is bubbling around in my head
anyhow.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.