POV-Ray : Newsgroups : povray.unix : Batch rendering. : Re: Batch rendering. Server Time
26 Jun 2024 02:48:28 EDT (-0400)
  Re: Batch rendering.  
From: Andrea Reina
Date: 4 Jun 2006 00:30:00
Message: <web.4482611ac73578efdaf3cdfd0@news.povray.org>
This (small) script will set up a dynamic que, that is you can add more
files to the que after the job has been started, by using a while loop
instead of for. I don't have POVRay working yet, so I haven't tested it
with that, but I've tested it with a simple echo command to verify that the
loop does work and send out the commands properly.

#! /bin/bash
# Begin que

POVCOMMAND=foo
QUEFILE=bar

while [ -s "$QUEFILE" ]; do
    "$POVCOMMAND" "$(head -n 1 "$QUEFILE")" && sed -i 1d "$QUEFILE"
done

# End que

The quefile should consist of the source that you're rendering, one job per
line, nothing else. If you have your quefile set up and running, and at the
last minute want to add another job to the que, adding something to the last
position is as simple as "echo [sourcefile] >> [quefile]" replace the text
in [brackets] with the appropriate text, of course. Actually, you can get a
lot of control if you assign "bash -c" to POVCOMMAND, and the lines in
QUEFILE would be the same commands you'd type out in the command line
normally. A little more work, but a whole lot more control.


Post a reply to this message

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