POV-Ray : Newsgroups : povray.binaries.utilities : Perl script for batch renders - render.zip Server Time
31 Oct 2024 23:30:29 EDT (-0400)
  Perl script for batch renders - render.zip (Message 1 to 10 of 13)  
Goto Latest 10 Messages Next 3 Messages >>>
From: Peter Popov
Subject: Perl script for batch renders - render.zip
Date: 2 Feb 2000 19:43:19
Message: <PMuYOBo9E5klsUDaH2m7Yu12Ax3U@4ax.com>
The attached Perl script can be useful for batch renders like the new
MegaPOV demo scenes etc. If ImageMagick is available it can also be
used to convert the output images to GIF/JPEG and create thumbnails.

Usage is pretty simple. I haven't written any docs yet but the -v
option will give a brief summary of what each variable is for. If the
script is run with no parameters, it will spit out a list of all
recognized command-line parameters, short and long versions. The
latter can be abbreviated to the shortest unique prefix.

Basically, you pass it a file ("-i <filename>") or a directory ("-I
<filename>") and it will render the former or all POV files in the
directory and all subdirectories. It will also convert them, create
thumbnails, delete raw output etc. if instructed.

This is work-in-progress. It works on my computer, it should work for
you too, but I guarrantee nothing. A Unix system helps :) though from
what the docs of the File::Find module say, it should run flawlessly
on Mac, Amiga, Win32, Dos and Unix. I tried to make it fool protected
but if you try to, for example, use --render-engine "rm -rf ~", I
cannot be blamed :) Seriously, bug reports, ideas for improvement,
suggestions for new functionality, complains etc. are welcome. Also,
this is my first real Perl program (aside from a simple CGI script
which spits out a joke it randomly selects from a file) so I am also
welcoming suggestions on how to improve my code efficiency- and
style-wise.

Thanks in advance to anyone who shows interest in this baby.


Peter Popov
pet### [at] usanet
ICQ: 15002700


Post a reply to this message


Attachments:
Download 'render.zip' (6 KB)

From: Bob Hughes
Subject: Re: Perl script for batch renders - render.zip
Date: 3 Feb 2000 05:29:33
Message: <3899588d@news.povray.org>
Might be good, although I've never actually wanted to render more than one file
at a time before.  Maybe it would be a good change of pace.  Come to think of it
I've never even seen a PERL program before either.  Will let you know if it
works here on this Win98SE.

Bob

"Peter Popov" <pet### [at] usanet> wrote in message
news:PMuYOBo9E5klsUDaH2m7Yu12Ax3U@4ax.com...
| The attached Perl script can be useful for batch renders like the new
| MegaPOV demo scenes etc. If ImageMagick is available it can also be
| used to convert the output images to GIF/JPEG and create thumbnails.
|
| Usage is pretty simple. I haven't written any docs yet but the -v
| option will give a brief summary of what each variable is for. If the
| script is run with no parameters, it will spit out a list of all
| recognized command-line parameters, short and long versions. The
| latter can be abbreviated to the shortest unique prefix.
|
| Basically, you pass it a file ("-i <filename>") or a directory ("-I
| <filename>") and it will render the former or all POV files in the
| directory and all subdirectories. It will also convert them, create
| thumbnails, delete raw output etc. if instructed.
|
| This is work-in-progress. It works on my computer, it should work for
| you too, but I guarrantee nothing. A Unix system helps :) though from
| what the docs of the File::Find module say, it should run flawlessly
| on Mac, Amiga, Win32, Dos and Unix. I tried to make it fool protected
| but if you try to, for example, use --render-engine "rm -rf ~", I
| cannot be blamed :) Seriously, bug reports, ideas for improvement,
| suggestions for new functionality, complains etc. are welcome. Also,
| this is my first real Perl program (aside from a simple CGI script
| which spits out a joke it randomly selects from a file) so I am also
| welcoming suggestions on how to improve my code efficiency- and
| style-wise.
|
| Thanks in advance to anyone who shows interest in this baby.
|
|
| Peter Popov
| pet### [at] usanet
| ICQ: 15002700
|


Post a reply to this message

From: Ken
Subject: Re: Perl script for batch renders - render.zip
Date: 3 Feb 2000 06:04:45
Message: <389960C3.2882381C@pacbell.net>
Bob Hughes wrote:
> 
> Might be good, although I've never actually wanted to render more than one file
> at a time before.

I think Peter's main purpose for writing this is to render the example
scenes that came with the program. This would be useful for Patch
writers and the POV-Team so they can do comparison testing between
versions and so they can tell if there any adverse changes in image
output caused by bugs or intentional changes in a functions behavior.
It is possible that you might use it to batch render animations that
are not using the clock variable, just to see what all of the examples
look like, or perhaps to look at a bunch of your older scene files
that you deleted the images for because they were taking up too much
space on your hard drive.

-- 
Ken Tyler -  1300+ Povray, Graphics, 3D Rendering, and Raytracing Links:
http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/


Post a reply to this message

From: cadman
Subject: Re: Perl script for batch renders - render.zip
Date: 3 Feb 2000 17:59:00
Message: <389a0834@news.povray.org>
Why not just use the queue?

Ken <tyl### [at] pacbellnet> wrote in message
news:389960C3.2882381C@pacbell.net...
>
>
> Bob Hughes wrote:
> >
> > Might be good, although I've never actually wanted to render more than
one file
> > at a time before.
>
> I think Peter's main purpose for writing this is to render the example
> scenes that came with the program. This would be useful for Patch
> writers and the POV-Team so they can do comparison testing between
> versions and so they can tell if there any adverse changes in image
> output caused by bugs or intentional changes in a functions behavior.
> It is possible that you might use it to batch render animations that
> are not using the clock variable, just to see what all of the examples
> look like, or perhaps to look at a bunch of your older scene files
> that you deleted the images for because they were taking up too much
> space on your hard drive.
>
> --
> Ken Tyler -  1300+ Povray, Graphics, 3D Rendering, and Raytracing Links:
> http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/


Post a reply to this message

From: Ken
Subject: Re: Perl script for batch renders - render.zip
Date: 3 Feb 2000 18:29:51
Message: <389A0F6B.CDD418D@pacbell.net>
cadman wrote:
> 
> Why not just use the queue?

Not everyone uses the Windows version.

-- 
Ken Tyler -  1300+ Povray, Graphics, 3D Rendering, and Raytracing Links:
http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/


Post a reply to this message

From: Bob Hughes
Subject: Re: Perl script for batch renders - render.zip
Date: 3 Feb 2000 21:15:32
Message: <389a3644@news.povray.org>
Good point, on both counts.  I hadn't thought of that.

Bob

"Ken" <tyl### [at] pacbellnet> wrote in message
news:389### [at] pacbellnet...
| cadman wrote:
| > Why not just use the queue?
|
| Not everyone uses the Windows version.


Post a reply to this message

From: Peter Popov
Subject: Re: Perl script for batch renders - render.zip
Date: 4 Feb 2000 08:02:46
Message: <4saaODno75IozarYxDVzdGkyCRVw@4ax.com>
On Thu, 3 Feb 2000 18:07:56 -0500, "cadman"
<NOS### [at] graffitinet> wrote:

>Why not just use the queue?

With the script in its current form (which I will upload a newer
version tonight unless I get some bug reports/idea suggestions to work
on (hint hint :) ) one can do the following:

1. Render a single file or batch render all files in a directory tree
2. Convert the output image(s) to JPEG or GIF
3. Create (a) thumbnail(s) in the corresponding format
4. Tune the JPEG/GIF compression/color depth for the image/thumbnail
5. Replicate the directory structure of the input directory, eg:

Input directory is /usr/local/lib/megapov/demos/
Output directory is /home/peter/scriptus/

The script will create:

/home/peter/scriptus/thumbnails/iso
/home/peter/scriptus/images/uv
/home/peter/scriptus/streams/uv/tweaked_by_me

etc. and will place the corresponding files there.

6. Auto-continue render if raw output file found
7. Only render files if corresponding JPEG or GIF not found
8. Delete the raw output file after rendering

and more.

I am currently working on a sort of a database for the renders. The
other thing I am working on is a CGI script which will automatically
generate a web page with previews, individual stats, render
histograms, global stats etc. The ultimate goal is to have a system
which you can give a motherload of work, go on vacation an monitor its
progress online. Well, maybe not :) but it sure helps when you have a
blind Linux box. The bash scripts which my brother and I wrote did a
good job in rendering the MegaPOV sample scenes, but they can't do
much more than that.

Enough blabber, back to coding :)


Peter Popov
pet### [at] usanet
ICQ: 15002700


Post a reply to this message

From: Sander
Subject: Re: Perl script for batch renders - render.zip
Date: 4 Feb 2000 15:45:09
Message: <389b3a55@news.povray.org>
Hey Peter,
What is Perl ?

--
Regards,
Sander


Peter Popov <pet### [at] usanet> schreef in berichtnieuws
PMuYOBo9E5klsUDaH2m7Yu12Ax3U@4ax.com...
> The attached Perl script can be useful for batch renders like the new
<snip>


Post a reply to this message

From: Peter Popov
Subject: Re: Perl script for batch renders - render.zip
Date: 4 Feb 2000 16:28:04
Message: <v0ObOMTKcjSC3Kj07OOXQJ5sTWU1@4ax.com>
On Fri, 4 Feb 2000 21:45:11 +0100, "Sander" <san### [at] stolscom> wrote:

>Hey Peter,
>What is Perl ?

To quote Larry, the author of Perl,

"Perl actually stands for Pathologically Eclectic Rubbish Lister, but
don't tell anyone I said that. "

"The Perl motto is ``There's more than one way to do it.'' Divining
how many more is left as an exercise to the reader. "

"The three principal virtues of a programmer are Laziness, Impatience,
and Hubris. See the Camel Book for why. "

:)

It actually means Practical Extraction and Report Language. It is a
script, interpreted language (like POV :) ) which is very suitable,
among other things, for manipulating text streams.


Peter Popov
pet### [at] usanet
ICQ: 15002700


Post a reply to this message

From: Peter Popov
Subject: Re: Perl script for batch renders - render.zip - render.zip
Date: 5 Feb 2000 07:01:39
Message: <0A2cOODL3M=U41NkPGXpY5OChw6D@4ax.com>
Here comes the next version (as if anyone cares :) ). The
--replicate-tree option now works. Return codes are handled so if you
cancel a render in a batch the script will know and will not try to
convert the output file nor delete it. MS users might have problems
with the / vs. \ pathname separators but that's what beta testers are
for. As of MacOS... well, I have no idea how to execute a command line
on the Mac, so there. No MacOS support.

I am working on a few other things. One of them is an option to zip up
the stream files. The other is of course the CGI part which will
analyze the whole mess and generate a master page with thumbnails and
links to individual pages with various stats (not only those reported
by the renderer). I will be glad if I get some feedback before I hit
1000 lines of code.

Thanks for your time.


Peter Popov
pet### [at] usanet
ICQ: 15002700


Post a reply to this message


Attachments:
Download 'render.zip' (6 KB)

Goto Latest 10 Messages Next 3 Messages >>>

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