Richard Brooks wrote:
>
> How can I pass a variable between frames rendering iterations in POV?
>
> I'm running an 1800 frame animation, 30 frames per second, and I want
> a different random number every 6 seconds (180 frames).
// these two lines are to eliminate a potential FP rounding error
#declare Frame=floor(clock*30+.5); // 30 comes from the frame rate
#declare Clock=Frame/30;
#declare Seed=seed(floor(Clock/6));
#declare MyRandomValue=rand(Seed);
MyRandomValue will change every six seconds.
Hope this helps,
John
Post a reply to this message
|