POV-Ray : Newsgroups : povray.advanced-users : auto running of OV-ray Server Time
5 Jul 2024 16:16:07 EDT (-0400)
  auto running of OV-ray (Message 1 to 10 of 11)  
Goto Latest 10 Messages Next 1 Messages >>>
From: sitha
Subject: auto running of OV-ray
Date: 2 Apr 2007 01:45:02
Message: <web.4610974b6ce3c18c4ac3566b0@news.povray.org>
Hi All,
I have houndreds of pov files. Now i want to visualize them. I would like to
write a program in C++ to execute povray and visualize all files. please
help me how can I do this...

For an example:
for(i=0; i<100; i++)
{
system ".//povray.exe" + "i".pov;
}

I need your help how to code for above case.

Thanks a lot in advance.


Post a reply to this message

From: sitha
Subject: Re: auto running of OV-ray
Date: 2 Apr 2007 01:55:01
Message: <web.46109a97cdbfcbd44ac3566b0@news.povray.org>
"sitha" <nsi### [at] excitecom> wrote:
Sorry I forgot to mention that I am using windows POV.


Post a reply to this message

From: Warp
Subject: Re: auto running of OV-ray
Date: 2 Apr 2007 02:10:16
Message: <46109e48@news.povray.org>
sitha <nsi### [at] excitecom> wrote:
> Hi All,
> I have houndreds of pov files. Now i want to visualize them. I would like to
> write a program in C++ to execute povray and visualize all files. please
> help me how can I do this...

> For an example:
> for(i=0; i<100; i++)
> {
> system ".//povray.exe" + "i".pov;
> }

  Perhaps learning C++ first would be a good start?

-- 
                                                          - Warp


Post a reply to this message

From: Le Forgeron
Subject: Re: auto running of OV-ray
Date: 2 Apr 2007 05:39:26
Message: <4610cf4e@news.povray.org>
sitha scripsit::
> "sitha" <nsi### [at] excitecom> wrote:
> Sorry I forgot to mention that I am using windows POV.

Then why bother: just use the queue inside windows Pov.


-- 
Eifersucht ist die Leidenschaft, die mit Eifer sucht, was Leiden
schafft.

Eco: -8.75 Soc: -6.72
http://www.politicalcompass.org/


Post a reply to this message

From: Christian Froeschlin
Subject: Re: auto running of OV-ray
Date: 2 Apr 2007 12:34:09
Message: <46113081$1@news.povray.org>
C++ might not be the best tool for the job, try executing something like

   for %t in (*.pov) do pvengine [your options here] /exit %t.pov

from the command prompt in the appropriate directory instead (of course,
you need to ensure that the POV-Ray "bin" directory is in the %PATH%).

BTW, does someone know if there is a way to prevent opening of
the GUI in Windows version when using it from the command line?
It's a bit annoying if a background rendering process
continually open and close windows ;)


Post a reply to this message

From: sitha
Subject: Re: auto running of OV-ray
Date: 2 Apr 2007 21:35:02
Message: <web.4611ae58cdbfcbd44ac3566b0@news.povray.org>
I uesd a following program in C++ to run a pov file...

#include <iostream>
#include <fstream>
#include <string>

using namespace std;

void runsystem(string cmm)
{
  cout << "          * " << cmm << " starts.n";
  system(cmm.c_str());
  cout << "          * " << cmm << " ends.n";
}

int main(void)
{
  string cmm;
  cmm ="./pvengine /render /exit dam.pov";
  runsystem (cmm);


return 0;
}

Here the problem is my program does not exit unless I close POV-ray window.
Once rendering finish program should exit from the loop, How can I do this?


Post a reply to this message

From: Tim Attwood
Subject: Re: auto running of OV-ray
Date: 3 Apr 2007 04:32:30
Message: <4612111e$1@news.povray.org>
> Here the problem is my program does not exit unless I close POV-ray 
> window.
> Once rendering finish program should exit from the loop, How can I do 
> this?

In the windows version of POV-Ray...
Select... Render | On Completion | Exit POV-Ray for Windows
Select.. Options | Other Settings | Use Editor
Allow POV-Ray to restart. Exit and try your code again.

Or use the built-in file queue....
Select... Render | File Queue
Click Add File
Select... File Type POV
Left click on the first item,
Hold down shift and click on the last item.
Click Open, Click OK
Your files should begin to render... any that have
errors will remain open in the editor, but
the others will continue to load and render.


Post a reply to this message

From: Christian Froeschlin
Subject: Re: auto running of OV-ray
Date: 3 Apr 2007 09:41:49
Message: <4612599d$1@news.povray.org>
sitha wrote:

>   cmm ="./pvengine /render /exit dam.pov";

Try without "/render", I think it overrides "/exit".


Post a reply to this message

From: sitha
Subject: Re: auto running of OV-ray
Date: 3 Apr 2007 23:55:01
Message: <web.46132151cdbfcbd44ac3566b0@news.povray.org>
Thanks a lot for your help.
I tried in following way, it works fine now.

cmm ="./pvengine /render  dam.pov  -d /exit";

But now my problem is I should run my program from diffrent location, so set
directory path as follows (I use cygwin to compile & run program)

cmm ="POV-Ray\ for\ Windows\ v3.6/bin/./pvengine  /render  dam.pov   -d
/exit";

Now the problem is it just run POV-ray without rendering the file. I mean it
just appear POV window, just run something for a while and close the window.
I dont understand why it does so. Please help me.


Post a reply to this message

From: sitha
Subject: Re: auto running of OV-ray
Date: 4 Apr 2007 00:20:01
Message: <web.46132720cdbfcbd44ac3566b0@news.povray.org>
"sitha" <nsi### [at] excitecom> wrote:
..
>
> cmm ="./pvengine /render  dam.pov  -d /exit";
>
>
> cmm ="POV-Ray for Windows v3.6/bin/./pvengine  /render  dam.pov   -d
> /exit";
>
Insted of above syntex I tried following way too.

cmm ="POV-Ray\ for\ Windows\ v3.6/bin/./pvengine  /render  POV-Ray\ for\
Windows\ v3.6/bin/ dam.pov  -d ";

Here I set the pov file directory as well without exit command. Now the
error message is "Cannot open input file". I hope this information will
help you to give me a solution.


Post a reply to this message

Goto Latest 10 Messages Next 1 Messages >>>

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