 |
 |
|
 |
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
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'

|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Bald Eagle" <cre### [at] netscape net> 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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
hi,
"m@b" <nomail@nomail> wrote:
"Bald Eagle" <cre### [at] netscape net> 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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"jr" <cre### [at] gmail com> wrote:
> hi,
>
> "m@b" <nomail@nomail> wrote:
> "Bald Eagle" <cre### [at] netscape net> 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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"m@b" <nomail@nomail> wrote:
> "jr" <cre### [at] gmail com> 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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"jr" <cre### [at] gmail com> 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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"jr" <cre### [at] gmail com> 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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|
 |