POV-Ray : Newsgroups : povray.binaries.animations : first Fabrik IK animation Server Time
31 Oct 2024 08:18:19 EDT (-0400)
  first Fabrik IK animation (Message 1 to 7 of 7)  
From: ingo
Subject: first Fabrik IK animation
Date: 11 Dec 2018 14:39:38
Message: <XnsA9B5D22BA1C98seed7@news.povray.org>
not quite there yet, too much jerkness and some spots where the targets ar 
not reached even if they could.

ingo


Post a reply to this message


Attachments:
Download 'fabrik.mp4.mpg' (250 KB)

From: jr
Subject: Re: first Fabrik IK animation
Date: 11 Dec 2018 15:45:01
Message: <web.5c102131fed5bd3748892b50@news.povray.org>
hi,

ingo <ing### [at] tagpovrayorg> wrote:
> not quite there yet, too much jerkness and some spots where the targets ar
> not reached even if they could.

and yet, accomplished.  looks quite impressive already.  Q - how do you keep
state between frames?  is the animation using the fabrik.inc macros (only)?


regards, jr.


Post a reply to this message

From: ingo
Subject: Re: first Fabrik IK animation
Date: 12 Dec 2018 01:49:35
Message: <XnsA9B64F9DC40DAseed7@news.povray.org>
in news:web.5c102131fed5bd3748892b50@news.povray.org jr wrote:

> and yet, accomplished.  looks quite impressive already.  Q - how do
> you keep state between frames?  is the animation using the fabrik.inc
> macros (only)? 
> 

Fabrik is only initilised once and 'returns' its own resulting 
datastructure that I use for the new target. Scene below, if you run it 
with the .inc in p.b.scene-files you'll get a better result than in this 
clip as some speed up optimalisations are turned off. Still a few little 
jumps left then.

ingo

---%<----%<-----%<---

//Pov-Ray   : 3.8
//Scene File: FABRIK.inc
//Author    : Ingo Janssen
//Date      : 11-12-2018

// +a0.1 +KFF300 -KC +W640 +H480

#version 3.8;
#include "FABRIK.inc"

#global_settings{assumed_gamma 1.0 }
#default{pigment{rgb 1} finish{ ambient 0.2 diffuse 0.9 }} 
light_source{<1000,1000,-1000>, rgb 1}
plane{y,0 pigment{checker rgb 0.05 rgb 0.1}}
camera{location <0,4.5,-12> look_at <0,4.5,0>}
plane{z,0 pigment{checker rgb 0.05 rgb 0.1}}

#declare F = dictionary{ 
  ["Index"] : dictionary{
    ["Chains"] : array[5]{"Base", "Left", "Right", "Right1", "Right2"},
    ["SubBases"]: array[2]{"LRB", "RRR"}
  },
  ["Proc"] : array[7]{"Right1", "Right2", "RRR", "Right", "Left",  
"LRB" ,"Base"},
  ["Base"] : dictionary{
      ["Joint"]  : array[5]{<0,0,0>, <0,1,0>, <0,2,0>,<0,3,0>, <0,4,0>},
      ["Type"]   : "BaseSubbase",
      ["SubBase"]: array mixed[1]{"LRB"}
  },                                               
  ["Left"] : dictionary{
      ["Joint"]  : array[4]{<0,4,0>, <-1,5,0>, <-2,6,0>,<-3,7,0>},
      ["Type"]   : "SubbaseEnd",
      ["SubBase"]: array mixed[1]{"LRB"}
  },                                               
  ["Right"]: dictionary{
      ["Joint"]  : array[4]{<0,4,0>, <1,5,0>, <2,6,0>,<3,7,0>},
      ["Type"]   : "SubbaseSubbase",
      ["SubBase"]: array mixed[2]{"RRR", "LRB"}
  },
  ["Right1"]: dictionary{
      ["Joint"]  : array[3]{<3,7,0>, <4,8,0>, <5,9,0>},
      ["Type"]   : "SubbaseEnd",
      ["SubBase"]: array mixed[1]{"RRR"}
  },
  ["Right2"]: dictionary{
      ["Joint"]  : array[3]{<3,7,0>, <2,8,0>, <1,9,0>},
      ["Type"]   : "SubbaseEnd",
      ["SubBase"]: array mixed[1]{"RRR"}
  },
  ["LRB"]  : dictionary{
      ["Index"]   : array[3]{"Left", "Right", "Base"}
      ["Type"]    : "SubBase",
      ["Centroid"]: <0,0,0>
  },
  ["RRR"]  : dictionary{
      ["Index"]   : array[3]{"Right1", "Right2", "Right"}
      ["Type"]    : "SubBase",
      ["Centroid"]: <0,0,0>
  }
};
#declare S = FABRIK(F);

#declare SL = spline{
  natural_spline
  0   , <-3,7,0>,
  0.25, <-1,3,0>,
  0.5 , <-3,1,0>,
  0.75, <-4,3,0>,
  1   , <-3,7,0>
}

#declare T = dictionary {
  ["Index"] : array[3]{"Left", "Right1", "Right2"},
  ["Right1"]: array mixed[1]{<5,9-6.5*clock , 0>}, //<5,9,0>
  ["Right2"]: array mixed[1]{<1,9-5.7*clock, 0>}, //<1,9,0>
  ["Left"]  : array mixed[1]{SL(clock)}, //<-3,7,0>
};
SetTarget(S, T)
PillMan(S)


Post a reply to this message

From: ingo
Subject: Re: first Fabrik IK animation
Date: 12 Dec 2018 01:54:45
Message: <XnsA9B6507E21B2Fseed7@news.povray.org>
in news:XnsA9B64F9DC40DAseed7@news.povray.org ingo wrote:

> SetTarget(S, T)
> PillMan(S)
> 

Oops, PillMann is not in the zip, use SplineMan(S) or StickMan(S) instead,

ingo


Post a reply to this message

From: jr
Subject: Re: first Fabrik IK animation
Date: 12 Dec 2018 06:40:00
Message: <web.5c10f25afed5bd3748892b50@news.povray.org>
hi,

ingo <ing### [at] tagpovrayorg> wrote:
> in news:web.5c102131fed5bd3748892b50@news.povray.org jr wrote:
> > ...  Q - how do you keep state between frames?  ...
> Fabrik is only initilised once and 'returns' its own resulting
> datastructure that I use for the new target. Scene below, if you run it
> with the .inc in p.b.scene-files you'll get a better result than in this
> clip as some speed up optimalisations are turned off. Still a few little
> jumps left then.

hey, thanks.  those "fudge" factors ("-6.5", "-5.7") look .. interesting.  well,
that's my weekend taken care of.  :-)


regards, jr.


Post a reply to this message

From: ingo
Subject: Re: first Fabrik IK animation
Date: 12 Dec 2018 09:48:00
Message: <XnsA9B6A0BB5C6A5seed7@news.povray.org>
in news:web.5c10f25afed5bd3748892b50@news.povray.org jr wrote:

> well,
> that's my weekend taken care of.  :-)

Have fun,

ingo


Post a reply to this message

From: ingo
Subject: Re: first Fabrik IK animation
Date: 19 Dec 2018 13:46:03
Message: <XnsA9BDC915FAF25seed7@news.povray.org>
in news:XnsA9B5D22BA1C98seed7@news.povray.org ingo wrote:

> not quite there yet, too much jerkness and some spots where the

Improved version, a lot smoother. Fixed some bugs and changed interface to 
the Fabrik macros.

Added the thing to Fossil SCM:
https://chiselapp.com/user/ingo/repository/POV-Ray-FABRIK/home

ingo


Post a reply to this message


Attachments:
Download 'anim.mp4.mpg' (245 KB)

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