|
![](/i/fill.gif) |
I think this is possible without patching povray or using any external
utility.
Let me think...
First you have to create a file named, for example, "currentframe" with
a "0" in it. For example:
echo 0 > currentframe
You set it to "0" each time you start rendering (no matter if it's a
continued render or the first time).
You also need another file, which you also initialize to "0". Let's name
it "calculatedframes":
echo 0 > calculatedframes
We don't change this one anymore (until we have finished all the frames).
Now, in the povray script you open both files and read their contents
into two identifiers (with same names, for example).
If the 'currentframe' value is less than 'calculatedframes', we skip
this frame.
AFAIK there's no way to tell povray "stop rendering this image". I think
this would be a good suggestion for the next version. Something like an
#exit directive. The #error directive is not good because it completely
stops povray instead of stopping just the current frame.
We can however just enclose all the scene inside the #if-block. The scene
could be in another file. For example:
#if(!currentframe<calculatedframes)
#include "scene.pov"
#end
This way we save the parsing of the scene when we don't want to calculate
this frame.
Now we add 1 to 'currentframe' and save it to its correspondent file. If
we rendered the scene we do this also to 'calculatedframes'. Like this:
(read 'currentframe' and 'calculatedframes')
#if(!currentframe<calculatedframes)
#include "scene.pov"
#declare calculatedframes=calculatedframes+1;
#end
#declare currentframe=currentframe+1;
(save 'currentframe' and 'calculatedframes' to their files)
--
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/
Post a reply to this message
|
![](/i/fill.gif) |