 |
 |
|
 |
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
I have a scene for which I want a number of different renderings (different
camera and light locations). I run a .ini file to render the variations, which
get numbered 0 to 49. In my .pov file I have the following code:
#declare Rnd1 = seed(frame_number); // camera
#declare Rnd2 = seed(frame_number); // light
From these 50 I select a number to render at high resolution, and I run a
different .ini file for these. In my .pov file I write the following code, which
maps the sequence numbers to my own:
#declare frames = array[5] {2, 3, 5, 8, 13} // selected for high-res rendering
#declare frame_nr = frames[frame_number];
#declare Rnd1 = seed(frame_nr); // camera
#declare Rnd2 = seed(frame_nr); // light
The result is a series of output files with filename numbers in sequence
(defined by the .ini file)
outfile_00
outfile_01
outfile_02
outfile_03
outfile_04
Is there a way to have custom numbering for the output files? Like
outfile_02
outfile_03
outfile_05
outfile_08
outfile_13
numbers I would get from the array in my .pov file, which would mean that the
output filename should be defined in the .pov file.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
hi,
"stevenvh" <nomail@nomail> wrote:
> I have a scene for which I want a number of different renderings (different
> camera and light locations). I run a .ini file to render the variations, which
> get numbered 0 to 49. In my .pov file I have the following code:
> ...
> The result is a series of output files with filename numbers in sequence
> (defined by the .ini file)
> ...
> Is there a way to have custom numbering for the output files? Like
> outfile_02
> outfile_03
> outfile_05
> outfile_08
> outfile_13
> numbers I would get from the array in my .pov file, which would mean that the
> output filename should be defined in the .pov file.
not directly, afaik. if you could use that "map" of frame->file# from a script,
the 'Post_Scene_Command' option will help.
<wiki.povray.org/content/Reference:Shell_Command_Options>
regards, jr.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"jr" <cre### [at] gmail com> wrote:
> ...
> 'Post_Scene_Command' option will help.
sorry, 'Post_Frame_Command' is what I meant.
regards, jr.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 11/14/25 11:16, stevenvh wrote:
> Is there a way to have custom numbering for the output files? Like
>
> outfile_02
> outfile_03
> outfile_05
> outfile_08
> outfile_13
Not exactly what you asked for, but you can render single frames with
the animation frame subset capability via flags or ini options:
subset_start_frame, subset_end_frame, frame_step, +sf, +ef and +stp
povray myAnimation.pov +sf7, +ef7 +kff10
would render just frame 7 of a 10 frame animation for example - with the
same frame animation output file name. You'd be running povray multiple
times change the subset options rather than using an SDL array, but if
not many high res frames perhaps not a bad approach.
---
Alternately.
Though I'm not a big fan of the capability due possible confusion, It is
also possible to set the 'frame_number' inside the SDL for your scene.
#declare frame_number = 2; // Or make '2' Ary[0] etc.
or set it - and the complete output file name - on the command line with:
povray myAnimation.pov declare=frame_number=9 +omyAnimation09
Bill P.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"jr" <cre### [at] gmail com> wrote:
> "jr" <cre### [at] gmail com> wrote:
> > ...
> > 'Post_Scene_Command' option will help.
>
> sorry, 'Post_Frame_Command' is what I meant.
>
>
> regards, jr.
Ultimately I wrote a quick-and-dirty program in Delphi to do the renumbering. I
run it after the scene (i.e. all frames) are rendered. The program looks for the
line with the definition of "frameList" (var name editable by the user),
#declare framesList = array[12] {26, 29, 31, 34, 38, 50, 79, 81, 127, 129,
173, 185}
and builds a list of the elements in the array. Then renumbers the output files
as explained in my OP.
So since I run it after the scene your original "Post_Scene_Command" was indeed
what I needed.
Current issue:
when I add the line
Post_Scene_Command = c:RenumberPOVrayFiles.exe %s
nothing happens, my program doesn't run. Is my understanding of
"Post_Scene_Command" wrong?
Also, the"%s" in the command is just the filename without the path. I need that
path in my program (I have a select folder command there), which I hoped to
automate.
Thanks for the replies.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"stevenvh" <nomail@nomail> wrote:
> Current issue:
> when I add the line
>
> Post_Scene_Command = c:RenumberPOVrayFiles.exe %s
>
> nothing happens, my program doesn't run. Is my understanding of
> "Post_Scene_Command" wrong?
> Also, the"%s" in the command is just the filename without the path. I need that
> path in my program (I have a select folder command there), which I hoped to
> automate.
>
> Thanks for the replies.
The "c:RenumberPOVrayFiles.exe" is actually "c:\RenumberPOVrayFiles.exe" with
the "\" included. The path + program name is correct.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"stevenvh" <nomail@nomail> wrote:
> Current issue:
> when I add the line
>
> Post_Scene_Command = c:RenumberPOVrayFiles.exe %s
>
> nothing happens, my program doesn't run. Is my understanding of
> "Post_Scene_Command" wrong?
I don't really use the shell commands, so I have no idea.
Maybe use some program that would be super obvious, and just run a test scene.
> Also, the"%s" in the command is just the filename without the path. I need that
> path in my program (I have a select folder command there), which I hoped to
> automate.
Yeah - I had a question about that too in some other thread that I can't find
(because Google doesn't fully index our site, in spite of Chris Cason's many
attempts to ensure they do)
I'm guessing you're going to have to find some workaround.
I also have no idea if exposing the full filename path to the user has been
implemented in Willaim Pokorny's yuqk fork...
- BE
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 17.11.2025 22:05, stevenvh wrote:
> "stevenvh" <nomail@nomail> wrote:
>
> The "c:RenumberPOVrayFiles.exe" is actually "c:\RenumberPOVrayFiles.exe" with
> the "\" included. The path + program name is correct.
>
Any chances it may expect "/" rather than "\"? Just a wild guess, in
theory, in "" everything must work (are "" really a part of command
line? I mean, are they passed to the system? Any chances you have to
double them, like '""'?)
--
Ilyich the Toad
https://dnyarri.github.io/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
hi,
"stevenvh" <nomail@nomail> wrote:
> "jr" <cre### [at] gmail com> wrote:
> > "jr" <cre### [at] gmail com> wrote:
> > > ...
> > > 'Post_Scene_Command' option will help.
> >
> > sorry, 'Post_Frame_Command' is what I meant.
> > ...
> Current issue:
> when I add the line
>
> Post_Scene_Command = c:RenumberPOVrayFiles.exe %s
>
> nothing happens, my program doesn't run. Is my understanding of
> "Post_Scene_Command" wrong?
by default "we" are not allowed to run shell commands, to avoid a potential
security issue. in your global 'povray.conf' file, the "[Shellout Security]"
must be enabled / "allowed"; it is a good idea, generally, to tune the global
..conf and .ini files as part of "post installation".
> Also, the"%s" in the command is just the filename without the path. I need that
> path in my program (I have a select folder command there), which I hoped to
> automate.
I've not tried, but can you not write: post_frame_command = sh myscript
path/to/%s
?
regards, jr.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"jr" <cre### [at] gmail com> wrote:
> ...
> > Also, the"%s" in the command is just the filename without the path. I need that
> > path in my program (I have a select folder command there), which I hoped to
> > automate.
>
> I've not tried, but can you not write: post_frame_command = sh myscript
> path/to/%s
given you have a "target" directory, the 'output_file_name' can (should ?) be a
complete pathname, eg "output_file_name = C:/path/to/selectfolder/myscene". also
use the 'all_file = on' option and POV-Ray's screen output will be (largely)
duplicated in a 'alltext.out' "log" file. and re your Delphi code, what if it
takes two arguments, that is path and %s separately ?
<wiki.povray.org/content/Reference:File_Output_Options#Output_File_Name>
regards, jr.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|
 |