POV-Ray : Newsgroups : povray.windows : Passing user-defined parameters Server Time
16 Oct 2024 00:15:56 EDT (-0400)
  Passing user-defined parameters (Message 1 to 8 of 8)  
From: twister
Subject: Passing user-defined parameters
Date: 15 Feb 2009 06:40:00
Message: <web.4997fe53b885b11bfb79cd6c0@news.povray.org>
Hello,

I am quite new to povray, but as I read tutorials and any posts regarding
launching povray as a side application there is only one possibility to pass
additional parameters that are required for my images to be rendered.
I want to run povray from my own script and generate number of images that
differs the content. The difference is caused by the parameters used. Is it
only way to do this an additional .inc file with some #declare commands?
It would be much easier to use a command line options...
Any advice appracated.

Best regards,
Twister


Post a reply to this message

From: Darren New
Subject: Re: Passing user-defined parameters
Date: 15 Feb 2009 13:38:04
Message: <4998610c@news.povray.org>
twister wrote:
> Any advice appracated.

Check section 3.1.2 of the manual. Anything there can be put in an .ini file 
or can be passed on the command line.  You'll probably want something like
   pvengine.exe myscene.pov +w640 -h480 /render /exit
which sets the size of the scene to render, renders it, then exits. 
"pvengine.exe" is the name of the executable in Windows. It's going to bring 
up the GUI, but that closes again when it exits after the render.

HTH!

-- 
   Darren New, San Diego CA, USA (PST)
   "Ouch ouch ouch!"
   "What's wrong? Noodles too hot?"
   "No, I have Chopstick Tunnel Syndrome."


Post a reply to this message

From: Christian Froeschlin
Subject: Re: Passing user-defined parameters
Date: 15 Feb 2009 14:47:04
Message: <49987138@news.povray.org>
Darren New wrote:
> twister wrote:
>> Any advice appracated.
> 
> Check section 3.1.2 of the manual. Anything there can be put in an .ini 
> file or can be passed on the command line.  

In particular, see 3.1.2.5.1 "Declare=IDENTIFIER=FLOAT". This can
be  used to set the value of a numeric constant from the command line,
which can then be used a switch in the scene file. Unfortunately, it
does not work for strings (would come in very handy for POV scripts
which actually render text, such as buttons for web pages).


Post a reply to this message

From: twister
Subject: Re: Passing user-defined parameters
Date: 15 Feb 2009 14:55:01
Message: <web.499871ecd6fa0f35fb79cd6c0@news.povray.org>
Darren New <dne### [at] sanrrcom> wrote:
You'll probably want something like
>    pvengine.exe myscene.pov +w640 -h480 /render /exit

Not exactly. I want to generate couple of scenes with different content. As far
as I know there is no other option to do this than specifying this in
additional .inc file. Or I miss something...
I am quite familiar with the tutorial.

Regards,
Twister


Post a reply to this message

From: Darren New
Subject: Re: Passing user-defined parameters
Date: 15 Feb 2009 17:46:21
Message: <49989b3d$1@news.povray.org>
twister wrote:
> Darren New <dne### [at] sanrrcom> wrote:
> You'll probably want something like
>>    pvengine.exe myscene.pov +w640 -h480 /render /exit
> 
> Not exactly. I want to generate couple of scenes with different content.

Shamelessly based on the block wall macros in the object library:

#if (frame_number = 0)
#declare my_scene = 5;  // The one you're fiddling with right now
#else
#declare my_scene = frame_number;
#end

#if (my_scene = 1)
#include "MyFirstScene.pov"
#end

#if (my_scene = 2)
#include "MySecondScene.pov"
#end

...

rem Render scenes 2 though 7 without stopping.
pvengine.exe +KFI2 +KFF7 +IMyMasterScene.pov


Does that help give an idea?

-- 
   Darren New, San Diego CA, USA (PST)
   "Ouch ouch ouch!"
   "What's wrong? Noodles too hot?"
   "No, I have Chopstick Tunnel Syndrome."


Post a reply to this message

From: Alain
Subject: Re: Passing user-defined parameters
Date: 16 Feb 2009 14:45:35
Message: <4999c25f$1@news.povray.org>
Darren New nous illumina en ce 2009-02-15 13:37 -->
> twister wrote:
>> Any advice appracated.
> 
> Check section 3.1.2 of the manual. Anything there can be put in an .ini 
> file or can be passed on the command line.  You'll probably want 
> something like
>   pvengine.exe myscene.pov +w640 -h480 /render /exit
> which sets the size of the scene to render, renders it, then exits. 
> "pvengine.exe" is the name of the executable in Windows. It's going to 
> bring up the GUI, but that closes again when it exits after the render.
> 
> HTH!
> 
If you want to render multiple images in a batch, you can remove the /exit 
parameter. Just make sure that tou set POV-Ray to only keep a single instance.
In "Options" check "Keep Single Instance".
So, the command line becomes:
pvengine.exe myscene.pov +w640 -h480 /render

-- 
Alain
-------------------------------------------------
Politicians are like diapers, they should be changed often and for the same reason.
	Bob Monkhouse


Post a reply to this message

From: Alain
Subject: Re: Passing user-defined parameters
Date: 16 Feb 2009 14:46:35
Message: <4999c29b@news.povray.org>
twister nous illumina en ce 2009-02-15 14:50 -->
> Darren New <dne### [at] sanrrcom> wrote:
> You'll probably want something like
>>    pvengine.exe myscene.pov +w640 -h480 /render /exit
> 
> Not exactly. I want to generate couple of scenes with different content. As far
> as I know there is no other option to do this than specifying this in
> additional .inc file. Or I miss something...
> I am quite familiar with the tutorial.
> 
> Regards,
> Twister
> 
> 
> 
> 
pvengine.exe myscene.pov +w640 -h480 /render

-- 
Alain
-------------------------------------------------
'Power corrupts. Absolute power is kind of neat, though.'


Post a reply to this message

From: Alain
Subject: Re: Passing user-defined parameters
Date: 16 Feb 2009 14:49:12
Message: <4999c338$1@news.povray.org>
twister nous illumina en ce 2009-02-15 14:50 -->
> Darren New <dne### [at] sanrrcom> wrote:
> You'll probably want something like
>>    pvengine.exe myscene.pov +w640 -h480 /render /exit
> 
> Not exactly. I want to generate couple of scenes with different content. As far
> as I know there is no other option to do this than specifying this in
> additional .inc file. Or I miss something...
> I am quite familiar with the tutorial.
> 
> Regards,
> Twister
> 
> 
> 
> 
This will render 4 scenes from 4 sources files then exit after the last one is 
finished:

pvengine.exe myscene1.pov +w800 +h480 /render
pvengine.exe myscene2.pov +w640 +h480 /render
pvengine.exe myscene3.pov +w480 +h700 /render
pvengine.exe myscene4.pov +w1024 +h768 /render /exit

-- 
Alain
-------------------------------------------------
You know you've been raytracing too long when you even think about using Povray 
for writing letters.
Sven Rudolph (Germany)


Post a reply to this message

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