POV-Ray : Newsgroups : povray.animations : Animation Issues Server Time
28 Mar 2024 07:26:14 EDT (-0400)
  Animation Issues (Message 1 to 2 of 2)  
From: jkennedy12
Subject: Animation Issues
Date: 14 Apr 2011 16: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 17:47:23
Message: <4da76b6b$1@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.
>
>

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-2023 Persistence of Vision Raytracer Pty. Ltd.