POV-Ray : Newsgroups : povray.animations : Skeletal Animation Saga Continues : Re: Skeletal Animation Saga Continues Server Time
3 May 2024 15:48:50 EDT (-0400)
  Re: Skeletal Animation Saga Continues  
From: gregjohn
Date: 15 Feb 2008 16:45:00
Message: <web.47b606a6a986a95840d56c170@news.povray.org>
"melo" <mel### [at] coxnet> wrote:
>
> I felt brave enough to switch to moving joint rotation specifications per pose
> (i.e Key_Frame) into separate files I can read during animation.
>
> I have not managed to get too far.  I have kept my staged animation logic, let
> me include 1st two stages for discussions sake, and describe the error I am
> getting from POV-RAY, I have search the Wiki and Support to see if there is a
> documented problem, I have not seen any.


Here's how I do it.
1) I have one #included file with all the junk I don't want to look at all the
time: macro definitions, etc.  It also has the definitions of the skeletal
points for the character

2) I have another #included file which is a long series of linear_spline and
cubic_spline definitions.  Thus the right wrist position might be defined as:

#declare rwristspl=  //right wristpt
        spline {
        linear_spline
        //cubic_spline
        0.00, <20,45,0>,
        0.50, <20,70,0>,
        1.00, <20,45,0>
}

#declare rtempwristpt=<0,0,0>+rwristspl(clock);

Some of my other variables are rotations, like for the head.


3) Then I have an #included file which has all the difficult math of turning my
list of rotations and wrist translations into a long list of transforms.  One
transform for every segment of the body, including all the fingers. It is based
on the angles and skeletal points defined previously:

#declare necktrans=transform{rotate neckang translate neckendpt-ribpvt
transform{ribtrans}}

Once you go through this painful exercise, you will hopefully never have to
touch it again.

4) Then I have an #included file which has a list of textures, as needed for the
foot texture and eye texture, etc.

5) Then I have an #included file which defines the body. Each segment of the
body (either a unique povray object or merely a blob component) is transformed
and textured as above. The body is finally defined as an object called "body".

cylinder{headpvt-neckendpt,0,3.4,5  texture{necktext}transform{necktrans} }


6) Now my main povray file may use the object{body} as it wishes.


Post a reply to this message

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