POV-Ray : Newsgroups : povray.advanced-users : Complex Annimation Server Time
26 Nov 2024 19:25:08 EST (-0500)
  Complex Annimation (Message 1 to 4 of 4)  
From: David Vincent-Jones
Subject: Complex Annimation
Date: 27 Oct 1999 19:55:58
Message: <3817910e@news.povray.org>
I am looking for an example of an animation where the camera moves in
something other than a simple lineal fashion. I am creating a walk through
where I want to be able to go around objects and generally move in a non
linear form.
Any ideas or examples would help


Post a reply to this message

From: Chris Colefax
Subject: Re: Complex Annimation
Date: 27 Oct 1999 20:41:05
Message: <38179ba1@news.povray.org>
David Vincent-Jones <geo### [at] galaxynetcom> wrote:
> I am looking for an example of an animation where the camera moves in
> something other than a simple lineal fashion. I am creating a walk
through
> where I want to be able to go around objects and generally move in a
non
> linear form.

There are a number of ways to create non-linear animations (whether of
the camera, objects, textures, whatever...).  If your animation is
completely non-linear, then you could actually have a separate scene for
every frame, with things positioned and altered as desired.  Obviously,
though, this is less than a practical solution!  Instead, what you'll
probably want is to define your animation actions as functions of
POV-Ray's clock value.  Parametising your animations in this way means
you can change the frame-rate and still have predictable, accurate
movements.

Now, POV-Ray offers plenty of mathematical and vector functions and it's
possible to use these to animate just about any action desired, eg:

  camera {location 0 direction z
    translate vrotate(vrotate(-x, y*90*pow(clock, 3))*<3, 0, 2>, x*15)}

Here the camera accelerates (the power function) along a quarter of an
elliptical arc (from x*-3 to z*2) which is then inclined by 15 degrees
to the XZ plane.

On the other hand, if you want a simpler way of approaching the problem
you could look at my Automatic Clock Modifier macro file:

   http://www.geocities.com/ccolefax

The macros allow you to define actions using a simple, step-by-step
syntax, and you can modify the clock to create
accelerations/decelerations, waves, oscillations, jumps, bounces,
recoils, etc.  The macros can be used wherever vectors or floats would
normally be used (controlling any numerical aspect of your scene), and
you can also animate pigments, textures, and other map entries by
specifying targets and transitions.

Also on my site is the Spline include file, which lets you animate
movements along smoothly interpolated Bezier curves.  However, the file
was designed for POV-Ray 3.0 and a new, vastly-improved macro version is
currently on the way (a preview animation of an animated vehicle tracks
system can be found on the binaries.animations group).


Post a reply to this message

From: Ken
Subject: Re: Complex Annimation
Date: 27 Oct 1999 20:45:00
Message: <38179B85.CC957389@pacbell.net>
Chris Colefax wrote:

> On the other hand, if you want a simpler way of approaching the problem
> you could look at my Automatic Clock Modifier macro file:
> 
>    http://www.geocities.com/ccolefax

If you decide to use Chris's include file there is an excellent tutorial
for using it at: http://www.puzzlecraft.com/cm/ClockMod.html

-- 
Ken Tyler -  1100+ Povray, Graphics, 3D Rendering, and Raytracing Links:
http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/


Post a reply to this message

From: Matt Giwer
Subject: Re: Complex Annimation
Date: 20 Nov 1999 01:35:38
Message: <38364144.596AA9A9@giwersworld.org>
David Vincent-Jones wrote:

> I am looking for an example of an animation where the camera moves in
> something other than a simple lineal fashion. I am creating a walk through
> where I want to be able to go around objects and generally move in a non
> linear form.
> Any ideas or examples would help

Here is an elliptical sweep down/in, sweep up/out pair that makes
a horrible example if you are looking for something simple but it
shows what you can do with it. It is also not in its simplest
math form yet. (Note: clock is used in a manner different than
the POV docs recomment.) 

#if ( (clock >= 5) & ( clock < 6) )
camera
{
location<-20.0 + 38*sin((clock-5)*pi/2), 
3-(clock-5)*11,
-8.0 -22*cos((clock-5)*pi/2)>
  direction 1.5*z
  right     4/3*x
  look_at   <-5.0, -8.0,  -10.0>
}  
#end 

#if ( (clock >= 6) & ( clock < 7) )
camera
{
location<-20.0+38*sin((clock-5)*pi/2),
3-11+(clock-6)*11,
-8.0 +22*cos((clock-5)*pi/2)>
  direction 1.5*z
  right     4/3*x
  look_at   <-5.0, -8.0,  -10.0>
}  
#end 

	That sweeps half way around the look_at point while coming down
to its y level and then returns by the same path to where it
started. 

	For a walkthrough of a say a hallway you would have to define
the path down the hallway. If there are obstacles in the hallway
you would have to test the distance between each and the camera.
That is sqrt(sqr(x2-x1) + sqr(y2-y1) + sqr(z2-z1)) -- they
hypotenuse of a triangle in three dimensions. Then when "close
enough" implement your avoidance routine until it is "far enough"
away. 

And not going to swear to it but <object_location> -
<camera_location> = look_at or something very close to that. That
way you can move the camera along a hall but have it look at
different objects as it moves along as eyes would do. 

-- 
<blink>---please--don't---</blink>

http://www.giwersworld.org/artiii/

Oh my God! They've rendered Kenny!


Post a reply to this message

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