POV-Ray : Newsgroups : povray.general : Animation feature request. Server Time
28 Mar 2026 14:47:30 EDT (-0400)
  Animation feature request. (Message 1 to 10 of 13)  
Goto Latest 10 Messages Next 3 Messages >>>
From: m@b
Subject: Animation feature request.
Date: 20 Mar 2026 23:30:00
Message: <web.69be105f435354d91463fe62d568493a@news.povray.org>
I wish we had access to Subset_Start_Frame and Subset_End_Frame from within the
SDL.

We already have access to initial_frame, final_frame, frame_number, etc.

I have a inc file that reports (via #debug) animation average frame time,
estimated completion time, etc. It doesn't work if I am only rendering a subset
of an animation.

(In response to "Post something", Bald Eagle)

m@


Post a reply to this message


Attachments:
Download 'sshot01.png' (3 KB)

Preview of image 'sshot01.png'
sshot01.png


 

From: Maetes
Subject: Re: Animation feature request.
Date: 21 Mar 2026 08:40:00
Message: <web.69be907ff7a27764e29d7fa930225ff5@news.povray.org>
It won't solve your problem, but I want to advertise my animation script
collection again at this point.

https://www.maetes.com/en/povray-os/ma_screenplay


ma


Post a reply to this message

From: Bald Eagle
Subject: Re: Animation feature request.
Date: 21 Mar 2026 09:30:00
Message: <web.69be9c7bf7a277641f9dae3025979125@news.povray.org>
"m@b" <nomail@nomail> wrote:
> (In response to "Post something", Bald Eagle)

Thanks - that's one facet of this thread - so often we're independently trying
to work something out by ourselves (which is admirable), but the solution might
elude us for some time and thwart the completion of a project.

> I wish we had access to Subset_Start_Frame and Subset_End_Frame from within the
> SDL.
>
> We already have access to initial_frame, final_frame, frame_number, etc.
>
> I have a inc file that reports (via #debug) animation average frame time,
> estimated completion time, etc. It doesn't work if I am only rendering a subset
> of an animation.

Yes, that would be helpful.
I don't often use animation or ini files (that's more of a jr thing)
but I'm wondering if you can do something similar to what's done with screen.inc
where the user defines the camera position and look_at vectors as SDL-visible
identifiers, and then proceeds to use them from there.

I recall that you can set identifier values from an ini file, so perhaps you can
pass the information in to the main scene file that way.

3.2.5.1 Constant
Declare=IDENTIFIER=FLOAT Declares an identifier with a float value
You can now declare a constant in an INI file, and that constant will be
available to the scene. Since INI file statements may also be laced on the
command-line, you can therefore also declare on the command-line (though there
is no switch for it).

  Declare=MyValue=24
This would be the same as a #declare MyValue=24; in a scene file. The value on
the right-hand side must be a constant float value.

A possible use could be switching off radiosity or photons from command-line:

--in INI-file / on command-line

Declare=RAD=0

--in scenefile

global_settings {
  #if (RAD)
    radiosity {
    ...
    }
#end
}

So, in your ini file you do something like Subset_Start_Frame=30
but I'm wondering if you can then do something like
Declare=SSF=Subset_Start_Frame.
If not, you could just set Declare=SSF=30 and then do Subset_Start_Frame=SSF
(if that works)


- BE


Post a reply to this message

From: m@b
Subject: Re: Animation feature request.
Date: 22 Mar 2026 04:00:00
Message: <web.69bf9f70f7a277641463fe62d568493a@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> "m@b" <nomail@nomail> wrote:
> > (In response to "Post something", Bald Eagle)
>
> Thanks - that's one facet of this thread - so often we're independently trying
> to work something out by ourselves (which is admirable), but the solution might
> elude us for some time and thwart the completion of a project.
>
> > I wish we had access to Subset_Start_Frame and Subset_End_Frame from within the
> > SDL.
> >
> > We already have access to initial_frame, final_frame, frame_number, etc.
> >
> > I have a inc file that reports (via #debug) animation average frame time,
> > estimated completion time, etc. It doesn't work if I am only rendering a subset
> > of an animation.
>
> Yes, that would be helpful.
> I don't often use animation or ini files (that's more of a jr thing)
> but I'm wondering if you can do something similar to what's done with screen.inc
> where the user defines the camera position and look_at vectors as SDL-visible
> identifiers, and then proceeds to use them from there.
>
> I recall that you can set identifier values from an ini file, so perhaps you can
> pass the information in to the main scene file that way.
>
> 3.2.5.1 Constant
> Declare=IDENTIFIER=FLOAT Declares an identifier with a float value
> You can now declare a constant in an INI file, and that constant will be
> available to the scene. Since INI file statements may also be laced on the
> command-line, you can therefore also declare on the command-line (though there
> is no switch for it).
>
>   Declare=MyValue=24
> This would be the same as a #declare MyValue=24; in a scene file. The value on
> the right-hand side must be a constant float value.
>
> A possible use could be switching off radiosity or photons from command-line:
>
> --in INI-file / on command-line
>
> Declare=RAD=0
>
> --in scenefile
>
> global_settings {
>   #if (RAD)
>     radiosity {
>     ...
>     }
> #end
> }
>
> So, in your ini file you do something like Subset_Start_Frame=30
> but I'm wondering if you can then do something like
> Declare=SSF=Subset_Start_Frame.
> If not, you could just set Declare=SSF=30 and then do Subset_Start_Frame=SSF
> (if that works)
>
>
> - BE

Thanks for the reply, I didn't realise I could pass identifier values from an
ini file, that's useful.

Unfortunately "The value on the right-hand side must be a constant float value."

So this works:

   Subset_Start_Frame=394
   Declare=SSF=394

But these don't:

   Subset_Start_Frame=394
   Declare=SSF=Subset_Start_Frame

   Subset_Start_Frame=394
   Declare=SSF=float(Subset_Start_Frame)

   Declare=SSF=394
   Subset_Start_Frame=SSF

Declaring twice is no big hardship as long as I remember!
Thanks again,
m@


Post a reply to this message

From: jr
Subject: Re: Animation feature request.
Date: 22 Mar 2026 04:50:00
Message: <web.69bfad1af7a2776448bf72fa6cde94f1@news.povray.org>
hi,

"m@b" <nomail@nomail> wrote:
"Bald Eagle" <cre### [at] netscapenet> wrote:
> > ...
> > So, in your ini file you do something like Subset_Start_Frame=30
> > but I'm wondering if you can then do something like
> > Declare=SSF=Subset_Start_Frame.
> > If not, you could just set Declare=SSF=30 and then do Subset_Start_Frame=SSF
> > (if that works)
>
> Thanks for the reply, I didn't realise I could pass identifier values from an
> ini file, that's useful.
>
> Unfortunately "The value on the right-hand side must be a constant float value."
>
> So this works:
>
>    Subset_Start_Frame=394
>    Declare=SSF=394
>
> But these don't:
>
>    Subset_Start_Frame=394
>    Declare=SSF=Subset_Start_Frame
>
>    Subset_Start_Frame=394
>    Declare=SSF=float(Subset_Start_Frame)
>
>    Declare=SSF=394
>    Subset_Start_Frame=SSF
>
> Declaring twice is no big hardship as long as I remember!

another option, not yet mentioned, is having a (shell) script run from the
'pre_frame_command' which writes the values to a simple CSV type file that you
can read from within the scene.


regards, jr.


Post a reply to this message

From: m@b
Subject: Re: Animation feature request.
Date: 22 Mar 2026 21:50:00
Message: <web.69c09b89f7a277641463fe62d568493a@news.povray.org>
"jr" <cre### [at] gmailcom> wrote:
> hi,
>
> "m@b" <nomail@nomail> wrote:
> "Bald Eagle" <cre### [at] netscapenet> wrote:
> > > ...
> > > So, in your ini file you do something like Subset_Start_Frame=30
> > > but I'm wondering if you can then do something like
> > > Declare=SSF=Subset_Start_Frame.
> > > If not, you could just set Declare=SSF=30 and then do Subset_Start_Frame=SSF
> > > (if that works)
> >
> > Thanks for the reply, I didn't realise I could pass identifier values from an
> > ini file, that's useful.
> >
> > Unfortunately "The value on the right-hand side must be a constant float value."
> >
> > So this works:
> >
> >    Subset_Start_Frame=394
> >    Declare=SSF=394
> >
> > But these don't:
> >
> >    Subset_Start_Frame=394
> >    Declare=SSF=Subset_Start_Frame
> >
> >    Subset_Start_Frame=394
> >    Declare=SSF=float(Subset_Start_Frame)
> >
> >    Declare=SSF=394
> >    Subset_Start_Frame=SSF
> >
> > Declaring twice is no big hardship as long as I remember!
>
> another option, not yet mentioned, is having a (shell) script run from the
> 'pre_frame_command' which writes the values to a simple CSV type file that you
> can read from within the scene.
>
>
> regards, jr.

Hmm, yes, I could shell out to a Python script that parses the resolution.ini
file.
But how could Python know which section of the resolution file I have selected?

m@


Post a reply to this message

From: jr
Subject: Re: Animation feature request.
Date: 23 Mar 2026 03:30:00
Message: <web.69c0eb53f7a2776448bf72fa6cde94f1@news.povray.org>
"m@b" <nomail@nomail> wrote:
> "jr" <cre### [at] gmailcom> wrote:
> > ...
> > another option, not yet mentioned, is having a (shell) script run from the
> > 'pre_frame_command' which writes the values to a simple CSV type file that you
> > can read from within the scene.
>
> Hmm, yes, I could shell out to a Python script that parses the resolution.ini
> file.

too complex, really, for the need.  apologies.  it can (should) all be done "in
scene", the following quick test works, assuming ten frames and you only want 4
through 6:

- create a simple "CSV" file with (subset) end and start frame numbers:

  $ echo '6,4' > framenos.csv


- my ini file ("mb.ini"):

  initial_frame = 1
  final_frame = 10
  cyclic_animation = off
  subset_start_frame = 4
  subset_end_frame = 6

  input_file_name = mb.pov
  output_file_name = mb_


- and your scene, ie only the code inside the conditional:

  #version 3.7;

  global_settings {assumed_gamma 1}

  #declare datafn_ = "framenos.csv";

  #fopen tmp_fp_ datafn_ read
  #read (tmp_fp_,last_,first_)
  #fclose tmp_fp_

  #if (first_ < last_ & first_ <= frame_number)

    /* scene stuff */
    box {0,1}


    #declare first_ = first_ + 1;  /* 'incr()' ?! ;-) */
    #fopen tmp_fp_ datafn_ write
    #write (tmp_fp_,last_,",",first_)
    #fclose tmp_fp_

  #end


hth, let me know if I got "the wrong end of the stick" :-).


regards, jr.


Post a reply to this message

From: ingo
Subject: Re: Animation feature request.
Date: 23 Mar 2026 04:55:00
Message: <web.69c0fec3f7a2776417bac71e8ffb8ce3@news.povray.org>
"jr" <cre### [at] gmailcom> wrote:

> too complex

yeah ;) Write the data that have to survive between the frames to an array.
Write the array to an include file. Or even just write `#declare This = 3` etc.
instead of an array. Then include it in the next frame.

ingo (or write the complete next frame scene and include it...)


Post a reply to this message

From: jr
Subject: Re: Animation feature request.
Date: 23 Mar 2026 06:45:00
Message: <web.69c11966f7a2776448bf72fa6cde94f1@news.povray.org>
hi,


"ingo" <nomail@nomail> wrote:
> > too complex
> yeah ;)

one of my (many) "Achilles heel"s.  </shrug+grin>


> ...
> ingo (or write the complete next frame scene and include it...)

now there's a challenge, "any takers" ?  ;-)



@m@b -- the code is "buggy" I noticed, after posting.. </sigh>  in the 'if' both
comparisons must be '<=', as is the third/last frame will not execute the
"scene" code.  v sorry (it _was_ early :-)).


regards, jr.


Post a reply to this message

From: Bald Eagle
Subject: Re: Animation feature request.
Date: 23 Mar 2026 06:55:00
Message: <web.69c11babf7a277641f9dae3025979125@news.povray.org>
"jr" <cre### [at] gmailcom> wrote:

> too complex, really, for the need.

Probably, but good learning exercise for more complex scenes.
We really don't have any demonstrations / tutorials for this.
Working example code beats everything.

>   #if (first_ < last_ & first_ <= frame_number)

won't this always be true?


If I understand this correctly, the only data point both necessary and
sufficient is that last frame.  Because once the first sub-frame starts
rendering, you get frame_number, which you can write to file and test the
existence of.

Then you can calculate how many frames altogether and how much left to go

Passing both values in through the ini would be best, but of course it's one
more number to forget to change.

- BE


Post a reply to this message

Goto Latest 10 Messages Next 3 Messages >>>

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