POV-Ray : Newsgroups : povray.general : Parsing time and animations : Re: Parsing time and animations Server Time
3 May 2024 09:02:47 EDT (-0400)
  Re: Parsing time and animations  
From: Mike Horvath
Date: 4 Oct 2016 23:47:36
Message: <57f477d8$1@news.povray.org>
On 10/4/2016 11:09 AM, clipka wrote:
> As omniverse already mentioned, you definitely want to check out
> UberPOV, which features an experimental (but working) mechanism to
> persist data between frames of an animation (or, more precisely, for as
> long as the instance of POV-Ray is running, which is the same on Unix
> but makes a difference on Windows; but that's more of a side effect than
> intentional, and is the sole reason why the mechanism is still
> considered experimental).
>
> The mechanism can persist virtually anything you can stuff into a
> variable. To my knowledge (and I wrote the thing), the only exceptions
> are random number generators (as created by `seed()` and used by
> `rand()`) and file handles (as created by `#fopen` and used e.g. by
> `#read` or `write`), as in both cases the variables technically just
> hold plain numbers, which happen to be valid indices into tables
> maintained separately.
>
> The use is pretty straightforward: Simply use `#persistent` instead of
> `#declare`, and the variable and its contents will still be around in
> the next frame. `#ifdef` should work as expected, so you can e.g. choose
> whether or not to include a file depending on whether the variable is
> already set, without having to rely on frame numbers.
>

I must remember to try UberPOV next time. Thanks!


Mike


Post a reply to this message

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