POV-Ray : Newsgroups : povray.binaries.animations : Keyframe-System (MPG1, 186kb x2) Server Time
1 Jul 2024 02:59:20 EDT (-0400)
  Keyframe-System (MPG1, 186kb x2) (Message 1 to 1 of 1)  
From: Tim Nikias
Subject: Keyframe-System (MPG1, 186kb x2)
Date: 20 Apr 2006 17:41:54
Message: <44480022@news.povray.org>
So, since I've got my new keyboard I've been hacking away at a small
macro-driven system to easily handle keyframes for animation.

The system begins with simple Value->Time keyframing, but doesn't end there.
If the Value is multi-dimensional, you may define keyframes where you set a
single dimension to be ignored. In effect, if you have three keyframes for a
vector, of which the middle one ignores the x-component, y and z will move
from keyframe 1, to 2, to 3, whereas x will move from keyframe 1 to 3.

I'm not quite sure if there's any use for that, but I just wanted to make
sure. ;-)

Currently, the keyframes interpolate either linear (jerky motion) or cubic
(smooth from one stop to the next), and you may choose the interpolation
method on a keyframe basis (which gets even more interesting once you ignore
certain components, of course, cause then x might interpolate linearly,
while y and z are interpolated cubicly).

The remaining effort is to introduce slerp, spherical-based interpolation.
As the rig of my robot (and some other macros of mine) take a "direction
vector" instead of an actual position, interpolating those kinds of vectors
on a sphere is smoother and asked for. Once that is accomplished, I guess
the keyframing system is complete. Anything that requires more detail or
functionality than such a system can easily provide is something probably
better hand-crafted on the spot than trying to build a multi-million-line
script that can handle all kinds of cases. It's just POV-SDL after all...

Anyways, the animations show off the interpolation. The green and blue
sphere are keyframes which set the entire vector, the blue disc represents a
keyframe where the x-component is ignored.

I'm not sure if anyone actually interested in this, but I thought I'd share,
just in case. :-)

Regards,
Tim

-- 
aka "Tim Nikias v2.0"
Homepage: <http://www.nolights.de>


Post a reply to this message


Attachments:
Download 'kf_test_linear.mpg' (187 KB) Download 'kf_test_cubic.mpg' (187 KB)

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