POV-Ray : Newsgroups : povray.animations : POV Seems to Parse Everything for Every Frame : Re: POV Seems to Parse Everything for Every Frame Server Time
27 Sep 2024 18:14:00 EDT (-0400)
  Re: POV Seems to Parse Everything for Every Frame  
From: Nicolas Alvarez
Date: 3 Jun 2004 19:08:01
Message: <40bfaf51@news.povray.org>

news:lGf### [at] econymdemoncouk...
> Wasn't it Bret who wrote:
> >I'm currently running an animation that (so far) has taken 23 hours to parse
> >and 1.5 hours to render.  It seems to be parsing everything for every
> >frame.  Is there anyway to convince POV to just read the files in once?
>
> If it's taking that long to parse, then I guess that you're doing an
> awful lot of actual calculation in your POV code. You might consider
> performing these calculations only in the first frame, writing the
> calculated data out to a file, and coding subsequent frames to read the
> file instead of repeating the calculations.
>
> #if (frame_number = initial_frame)
>   . . . do the calculations
>   #fopen F "temporary.dat" write
>   #write(. . .)
>   #fclose F
> #else
>   // don't do the calculations
>   #fopen F "temporary.dat" read
>   #read(. . .)
>   #fclose F
> #end
>
> --
> Mike Williams
> Gentleman of Leisure

Another way to do that:

#if (frame_number = initial_frame)
    . . . do the calculations
    #fopen F "temporary.inc" write
    #write(. . .) //in pov's format
    #fclose F
#end
#include "temporary.inc"


...


Post a reply to this message

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