POV-Ray : Newsgroups : povray.animations : Animation Issues Server Time: 23 Jul 2019 12:25:03 GMT
  Animation Issues (Message 1 to 2 of 2)  
From: jkennedy12
Subject: Animation Issues
Date: 14 Apr 2011 20:30:00
Message: <web.4da758979d5f8b3b149867310@news.povray.org>
Is it possible to store a value and access it over the duration of the
animation?
I'm trying to create an animation of a camera following a track created by
Spline_Trans and Sphere_Sweep. I would like to control speed with the change in
y. Any ideas as to pass the variable along would be great.


Post a reply to this message

From: Alain
Subject: Re: Animation Issues
Date: 14 Apr 2011 21:47:23
Message: <4da76b6b$1@news.povray.org>
Le 2011/04/14 16:27, jkennedy12 a écrit :
> Is it possible to store a value and access it over the duration of the
> animation?
> I'm trying to create an animation of a camera following a track created by
> Spline_Trans and Sphere_Sweep. I would like to control speed with the change in
> y. Any ideas as to pass the variable along would be great.
>
>

You can use the file i/o feature.

At the end of the parsing, or just after you get the value to pass, you 
write it to a file.

On the next frame, you read it back.
Add a test so that, on the first frame, you don't attempt to read the 
yet unexistant file.

For an example, look at bounce.pov in animation\boing.
That scene does just that: For each frame, it saves the position and 
speed of a bouncing ball for the next frame. Starting on frame 2, it 
reads back the previous values.



Alain


Post a reply to this message

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