POV-Ray : Newsgroups : povray.animations : Clockless_Animation : Re: Clockless_Animation Server Time
28 Apr 2024 15:07:03 EDT (-0400)
  Re: Clockless_Animation  
From: clipka
Date: 4 Jan 2018 11:40:35
Message: <5a4e5903$1@news.povray.org>
Am 04.01.2018 um 13:02 schrieb muyu:
> clipka <ano### [at] anonymousorg> wrote:
>> Am 03.01.2018 um 16:16 schrieb muyu:
>>
>>> I did another search in the forum. It seems that UberPOV can pass data through
>>> frames without parsing each time. Is this true?
>>
>> Yes, absolutely.
> 
> I did not find material to show how to use this feature. Could you please give
> an simple example? Thanks a lot.

For example, to load a complex mesh just once, you could use:

    #ifndef MyMesh
      #persistent MyMesh = mesh { ... }
    #endif
    object { MyMesh }

Or, to load an image map just once, you could use:

    #ifndef MyPigment
      #persistent MyPigment = pigment {
        image_map { ... }
      }
    #endif
    object { SomeObject
      texture {
        pigment { MyPigment }
        finish { ... }
      }
    }


In essence, `#persistent` works like `#declare`, but the variable sticks
around until UberPOV exits.

You'll still need to assemble the contents of such persistent variables
into a new scene for each frame; however, you can prepare arbitrarily
complex objects in this manner, such as nested CSG unions.


Post a reply to this message

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