POV-Ray : Newsgroups : povray.general : Batch files Server Time
5 Nov 2024 22:24:04 EST (-0500)
  Batch files (Message 1 to 8 of 8)  
From: Ron H 
Subject: Batch files
Date: 21 Mar 1999 16:03:30
Message: <36f55ea2.0@news.povray.org>
How can I run a batch file that will automatically render POVray scene
files?

Is there a way to do it something like this?

for(i=0; i<256; i++) {

    render_file( "scene" + i + ".pov" );

}


Thanks in advance !!

Ron


Post a reply to this message

From: Johannes Hubert
Subject: Re: Batch files
Date: 22 Mar 1999 12:42:18
Message: <36f680fa.0@news.povray.org>
You should at least tell us which operating system you plan to be doing this
on...

Johannes.

Ron H. wrote in message <36f55ea2.0@news.povray.org>...
>How can I run a batch file that will automatically render POVray scene
>files?
>
>Is there a way to do it something like this?
>
>for(i=0; i<256; i++) {
>
>    render_file( "scene" + i + ".pov" );
>
>}
>
>
>Thanks in advance !!
>
>Ron
>
>


Post a reply to this message

From: Ron H 
Subject: Re: Batch files
Date: 22 Mar 1999 22:55:49
Message: <36f710c5.0@news.povray.org>
I'm sorry, I forgot to do that.

I'm using WinNT4.0, and I'd like to  perform this repetitive batch loop
either in a java program or perhaps even in POVray's own language using
POVray itself.

Is this possible?

Ron


Johannes Hubert wrote in message <36f680fa.0@news.povray.org>...
>You should at least tell us which operating system you plan to be doing
this
>on...
>
>Johannes.
>
>Ron H. wrote in message <36f55ea2.0@news.povray.org>...
>>How can I run a batch file that will automatically render POVray scene
>>files?
>>
>>Is there a way to do it something like this?
>>
>>for(i=0; i<256; i++) {
>>
>>    render_file( "scene" + i + ".pov" );
>>
>>}
>>
>>
>>Thanks in advance !!
>>
>>Ron
>>
>>
>
>


Post a reply to this message

From: Johannes Hubert
Subject: Re: Batch files
Date: 23 Mar 1999 02:51:24
Message: <36f747fc.0@news.povray.org>
In Java it should be easy. Something like this:

public static void main(String[] args)
{
    int firstFrame = ???;            // set first
    int lastFrame = ???;             // and last frame here
    String pathToYourPOV = ???;      // set your path here
    String yourPOVArguments = ???;   // set your render-args here
    String yourPOVFile = ???;        // set the name of the scenefile here,

    for (int i = firstFrame; i <= lastFrame; i++) {
        String povArgString = pathToYourPOV +
                              "pvengine.exe +I" +
                              yourPOVFile + i + ".pov" +
                              yourPOVArguments;
        Process pov = Runtime.getRuntime().exec(povArgString);
        try {
            pov.waitFor();
        }
        catch (Exception) {
            System.out.println("Something went wrong!");
            break;
        }
    }
}

The scenefile name should be the name without the frame-number and the
".pov" extension, of course.
You should also choose render arguments that make POV-Ray close itself after
rendering, otherwise you will have to close it manually or "waitFor()" will
wait forever ;-)

Greetings,
Johannes.

Ron H. wrote in message <36f710c5.0@news.povray.org>...
>I'm sorry, I forgot to do that.
>
>I'm using WinNT4.0, and I'd like to  perform this repetitive batch loop
>either in a java program or perhaps even in POVray's own language using
>POVray itself.
>
>Is this possible?
>
>Ron


Post a reply to this message

From: Roland Mas
Subject: Re: Batch files
Date: 23 Mar 1999 04:18:32
Message: <m3u2vcftsn.fsf@clodomir.rezel.enst.fr>
"Ron H." <aya### [at] homecom> writes:

> ... even in POVray's own language using POVray itself.
> 
> Is this possible?

  Sure.  There was a thread here some time ago about image-mapping a
different image file at each frame of an animation.  You can reuse
this to include a different *.pov file at each frame.

Roland.
-- 
Roland Mas

Food, shelter, source code.
  -- Cyclic Software


Post a reply to this message

From: Ken
Subject: Re: Batch files
Date: 23 Mar 1999 05:40:38
Message: <36F76EB5.8D9A004F@pacbell.net>
Roland Mas wrote:
> 
> "Ron H." <aya### [at] homecom> writes:
> 
> > ... even in POVray's own language using POVray itself.
> >
> > Is this possible?
> 
>   Sure.  There was a thread here some time ago about image-mapping a
> different image file at each frame of an animation.  You can reuse
> this to include a different *.pov file at each frame.
> 
> Roland.
> --
> Roland Mas
> 
> Food, shelter, source code.
>   -- Cyclic Software

  If you want a working example let me know as I was the one
that needed help in that thread and got it to work in an easy
and straight forward manner.

-- 
Ken Tyler

mailto://tylereng@pacbell.net


Post a reply to this message

From: PoD
Subject: Re: Batch files
Date: 23 Mar 1999 12:01:15
Message: <36F7C8E5.736E@merlin.net.au>
Ron H. wrote:
> 
> I'm sorry, I forgot to do that.
> 
> I'm using WinNT4.0, and I'd like to  perform this repetitive batch loop
> either in a java program or perhaps even in POVray's own language using
> POVray itself.
> 
> Is this possible?
> 
> Ron
> 

Here it is again

#declare BaseName = "foo"
#declare Extension = ".pov"
#declare NameDigits = 8-strlen(BaseName); // or just put a number in
here for how many digits after the name
#declare LastFrame = 20;
#declare FirstFrame = 1;
#declare Frame = clock * (LastFrame-FirstFrame) + FirstFrame;
#declare FileName = concat( BaseName, str(Frame,-NameDigits,0),
Extension )


FileName will have values such as foo00001.pov, foo00002.pov etc.

Cheers, PoD


Post a reply to this message

From: Stephen Lavedas
Subject: Re: Batch files
Date: 23 Mar 1999 12:52:39
Message: <36F7D4C6.5D69A049@virginia.edu>
It should be possible to do it in NT Batch language too.  Just a
thought.

Steve


"Ron H." wrote:
> 
> I'm sorry, I forgot to do that.
> 
> I'm using WinNT4.0, and I'd like to  perform this repetitive batch loop
> either in a java program or perhaps even in POVray's own language using
> POVray itself.
> 
> Is this possible?
> 
> Ron
> 
> Johannes Hubert wrote in message <36f680fa.0@news.povray.org>...
> >You should at least tell us which operating system you plan to be doing
> this
> >on...
> >
> >Johannes.
> >
> >Ron H. wrote in message <36f55ea2.0@news.povray.org>...
> >>How can I run a batch file that will automatically render POVray scene
> >>files?
> >>
> >>Is there a way to do it something like this?
> >>
> >>for(i=0; i<256; i++) {
> >>
> >>    render_file( "scene" + i + ".pov" );
> >>
> >>}
> >>
> >>
> >>Thanks in advance !!
> >>
> >>Ron
> >>
> >>
> >
> >


Post a reply to this message

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