POV-Ray : Newsgroups : povray.general : Exit when done Server Time
26 Dec 2024 01:59:49 EST (-0500)
  Exit when done (Message 1 to 8 of 8)  
From: Manuel Mata
Subject: Exit when done
Date: 26 Jul 2007 03:00:02
Message: <web.46a8454bcc1f3343d141b3240@news.povray.org>
Hi all.

I'd like to know if i can execute povray from a command line and make it
exit when the image was rendered, just like the sample after install it
(without the alert message).

I mean, I launch Pov from a Java program and i need to know when it finished
to continue the program. I do it in Windows XP with Pov 3.6 and Pov 3.1

The problem is that when Pov finish the render it still is active, the main
window, and the Java program does not continue.

I search the docs for any command line option but didnt find anything. Does
anybody know how to do it ?. Or in other way, if i could know when the
image is rendered i could kill the pov process, but i dont know how to do
it.

Any help?. Thx anyway and excuse my english.

                    Manuel Mata
                    http://www.mmata.org


Post a reply to this message

From: Thomas de Groot
Subject: Re: Exit when done
Date: 26 Jul 2007 03:09:17
Message: <46a8489d$1@news.povray.org>
"Manuel Mata" <man### [at] yahooes> schreef in bericht 
news:web.46a8454bcc1f3343d141b3240@news.povray.org...
> Hi all.
>
> I'd like to know if i can execute povray from a command line and make it
> exit when the image was rendered, just like the sample after install it
> (without the alert message).
>
> I mean, I launch Pov from a Java program and i need to know when it 
> finished
> to continue the program. I do it in Windows XP with Pov 3.6 and Pov 3.1
>
> The problem is that when Pov finish the render it still is active, the 
> main
> window, and the Java program does not continue.
>
> I search the docs for any command line option but didnt find anything. 
> Does
> anybody know how to do it ?. Or in other way, if i could know when the
> image is rendered i could kill the pov process, but i dont know how to do
> it.
>

I don't know about a command line option for this, but in the 'Render' 
window you can go to 'On Completion' and check 'Exit POV-Ray for Windows'. 
Would this help?

Thomas


Post a reply to this message

From: Sherry Shaw
Subject: Re: Exit when done
Date: 26 Jul 2007 09:39:35
Message: <46a8a417@news.povray.org>
Manuel Mata wrote:

>Hi all.
>
>I'd like to know if i can execute povray from a command line and make it
>exit when the image was rendered, just like the sample after install it
>(without the alert message).
>
>  
>

"/Exit" on the command line closes POV-Ray when the render is complete.  
It's under "Special Command Line Options"--
http://www.povray.org/documentation/view/3.6.1/603/

--Sherry Shaw

-- 
#macro T(E,N)sphere{x,.4rotate z*E*60translate y*N pigment{wrinkles scale
.3}finish{ambient 1}}#end#local I=0;#while(I<5)T(I,1)T(1-I,-1)#local I=I+
1;#end camera{location-5*z}plane{z,37 pigment{granite color_map{[.7rgb 0]
[1rgb 1]}}finish{ambient 2}}//                                   TenMoons


Post a reply to this message

From: Tim Attwood
Subject: Re: Exit when done
Date: 26 Jul 2007 18:31:00
Message: <46a920a4$1@news.povray.org>
You should be able to set up POV to /EXIT

However, in DOS you can kill POV with
taskkill /f /im pvengine.exe /t
I think in Java you need to spawn a runtime
thread to make a system call, then monitor
it for completion, and kill the thread when it's
done.


Post a reply to this message

From: Manuel Mata
Subject: Re: Exit when done
Date: 27 Jul 2007 07:30:02
Message: <web.46a9d68fe160b8e1d141b3240@news.povray.org>
"Tim Attwood" <tim### [at] comcastnet> wrote:
> You should be able to set up POV to /EXIT
>
> However, in DOS you can kill POV with
> taskkill /f /im pvengine.exe /t
> I think in Java you need to spawn a runtime
> thread to make a system call, then monitor
> it for completion, and kill the thread when it's
> done.

Right in Java i do something like:

Runtime r = Runtime.getRuntime() // gets the current runtime
Process p = r.exec("pvengine -isample.pov -osample.png"); // Execute pov ray
and return the associated process
p.waitFor(); // Waits the current thread until povray finished

But Povray renders the image and is still open. So the thread is still
stopped at p.waitFor() When i close the window manually the program
continues.

I think the best is to set up the "Exit when done" option but still didnt
had time to try it.


Post a reply to this message

From: Alain
Subject: Re: Exit when done
Date: 27 Jul 2007 14:32:51
Message: <46aa3a53$1@news.povray.org>
Manuel Mata nous apporta ses lumieres en ce 2007/07/27 07:27:
> "Tim Attwood" <tim### [at] comcastnet> wrote:
>> You should be able to set up POV to /EXIT
>>
>> However, in DOS you can kill POV with
>> taskkill /f /im pvengine.exe /t
>> I think in Java you need to spawn a runtime
>> thread to make a system call, then monitor
>> it for completion, and kill the thread when it's
>> done.
> 
> Right in Java i do something like:
> 
> Runtime r = Runtime.getRuntime() // gets the current runtime
> Process p = r.exec("pvengine -isample.pov -osample.png"); // Execute pov ray
> and return the associated process
> p.waitFor(); // Waits the current thread until povray finished
> 
> But Povray renders the image and is still open. So the thread is still
> stopped at p.waitFor() When i close the window manually the program
> continues.
> 
> I think the best is to set up the "Exit when done" option but still didnt
> had time to try it.
> 
> 
> 
> 
In Windows:
Start POV-Ray.
In the menu, select "Renderer".
Go down to the "On Completion..." item.
In the sub-menu, select "Exit POV-Ray for Windows". It default to "Do nothing".
Exit POV-Ray.
You're done.

-- 
Alain
-------------------------------------------------
Either write something worth reading or do something worth writing.
Benjamin Franklin


Post a reply to this message

From: Rarius
Subject: Re: Exit when done
Date: 28 Jul 2007 05:21:51
Message: <46ab0aaf$1@news.povray.org>
As has been suggested before just add "/exit" to the command line options... 
Then it will render and exit when done...you waitFor() will then continue.

Rarius


"Manuel Mata" <man### [at] yahooes> wrote in message 
news:web.46a9d68fe160b8e1d141b3240@news.povray.org...
> "Tim Attwood" <tim### [at] comcastnet> wrote:
>> You should be able to set up POV to /EXIT
>>
>> However, in DOS you can kill POV with
>> taskkill /f /im pvengine.exe /t
>> I think in Java you need to spawn a runtime
>> thread to make a system call, then monitor
>> it for completion, and kill the thread when it's
>> done.
>
> Right in Java i do something like:
>
> Runtime r = Runtime.getRuntime() // gets the current runtime
> Process p = r.exec("pvengine -isample.pov -osample.png"); // Execute pov 
> ray
> and return the associated process
> p.waitFor(); // Waits the current thread until povray finished
>
> But Povray renders the image and is still open. So the thread is still
> stopped at p.waitFor() When i close the window manually the program
> continues.
>
> I think the best is to set up the "Exit when done" option but still didnt
> had time to try it.
>
>
>
>


Post a reply to this message

From: Manuel Mata
Subject: Re: Exit when done
Date: 28 Jul 2007 06:25:02
Message: <web.46ab195de160b8e16c941f7e0@news.povray.org>
I'll try when i can ... The goal of this is to integrate POV-Ray with a
basic J2EE application.

I mean. I want to make a Servlet that get data from a web form. Then I'll
create some "povray files" with that data, and launch Pov to generate a
"dinamic image". Once the image is completed the servlet would serialize
the image with its correct mime/type.

And here we have a dinamic image generated with Pov.

I cant use it now. I had Pov 3.6 correctly installed and after some
programming it doesn't work, even reinstalling doesn't start. I get the
main drawing and the message "Windows detected a problem in this program
and must be closed".

Anyway I have not much time for it, but I'll be alert ...

Thx.


Post a reply to this message

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