POV-Ray : Newsgroups : povray.animations : Clockless_Animation : Re: Clockless_Animation Server Time
14 May 2024 21:21:35 EDT (-0400)
  Re: Clockless_Animation  
From: clipka
Date: 30 Jun 2017 03:18:31
Message: <5955fb47$1@news.povray.org>
Am 29.06.2017 um 21:05 schrieb Bald Eagle:

> About this whole clockless animation - It would be interesting if it could be
> modified so that POV-Ray split a scene into 2 separately parsed sections - a
> static part, and a dynamic part.  Then you could have, say, a complex terrain
> that takes forever to parse - but only gets parsed once, and then clouds or the
> sun, or an automobile or a ball that is the only thing that changes position in
> the scene.

You might be interested to hear that _UberPOV_ already provides an
experimental mechanism that can be used to that end:

    #persistent Foo = ...;

defines an identifier that will survive across parser runs in an
animation. So you could use

    #ifndef(MyStaticScene)
      #persistent MyStaticScene = union {
        // Static stuff present in all frames goes here
      }
    #end
    object { MyStaticScene }
    // Dynamic stuff changing between individual frames goes here

This mechanism is also flexible enough to define the individual
components of your animation's dynamic portion just once, and in the
individual frames just rotate and translate them to their final
orientation and location.


(In UberPOV for Windows, this mechanism will even retain data between
consecutive runs of a single-frame scene, or even different scenes; but
that's more an unintended side effect of its implementation rather than
deliberate, and may be subject to change. In essence, variables declared
using `#persistent` are just never deleted as long as UberPOV is
running. This may be subject to change.)


Post a reply to this message

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