POV-Ray : Newsgroups : povray.general : passing custom parameter Server Time
1 Nov 2024 07:25:54 EDT (-0400)
  passing custom parameter (Message 1 to 5 of 5)  
From: bhupesh
Subject: passing custom parameter
Date: 2 Jan 2013 07:35:01
Message: <web.50e427e8922af2f62324a6090@news.povray.org>
Hi,

I want to render a scene multiple times with different rotation on each
rendering, and I want to execute my pov script from my website (java), so I want
to call same script with a custom parameter, and use that parameter for rotation
angle value in the script.

I also tried to use +O (output) parameter, as we can use similar value for both,
say on first term we can pass 1, which will create 1.png with 1*X rotation, term
2 will create 2.png with 2*X rotation and so on.

However I am not getting, how to do that in Pov-Ray, any help would be greatly
appropriated.

Thanks in advance.


Post a reply to this message

From: Le Forgeron
Subject: Re: passing custom parameter
Date: 2 Jan 2013 09:13:09
Message: <50e44075$1@news.povray.org>
Le 02/01/2013 13:31, bhupesh nous fit lire :
> Hi,
> 
> I want to render a scene multiple times with different rotation on each
> rendering, and I want to execute my pov script from my website (java), so I want
> to call same script with a custom parameter, and use that parameter for rotation
> angle value in the script.
> 
> I also tried to use +O (output) parameter, as we can use similar value for both,
> say on first term we can pass 1, which will create 1.png with 1*X rotation, term
> 2 will create 2.png with 2*X rotation and so on.
> 
> However I am not getting, how to do that in Pov-Ray, any help would be greatly
> appropriated.
> 
> Thanks in advance.

You would need to build on the fly the INI file, to use the
"Define=foo=44" capability (not available from the command line) to set
the value of variable foo to 44. (should work with 3.7 version, at least)

Either that, or you create also on the fly some file that get #include
by your main script. Content of such file could be "#define foo=44;"

Now, if all you have to set is just one single parameter (and not a
collection of them), you can instead use the animation sub-system to set
the clock value,
look at +K, +KI, +KF, +KFI, +KFF, +SF, +EF, +KC vs -KC

> http://wiki.povray.org/content/Documentation:Animation_Options


Post a reply to this message

From: James Holsenback
Subject: Re: passing custom parameter
Date: 2 Jan 2013 09:15:09
Message: <50e440ed$1@news.povray.org>
On 01/02/2013 07:31 AM, bhupesh wrote:
> Hi,
>
> I want to render a scene multiple times with different rotation on each
> rendering, and I want to execute my pov script from my website (java), so I want
> to call same script with a custom parameter, and use that parameter for rotation
> angle value in the script.
>
> I also tried to use +O (output) parameter, as we can use similar value for both,
> say on first term we can pass 1, which will create 1.png with 1*X rotation, term
> 2 will create 2.png with 2*X rotation and so on.
>
> However I am not getting, how to do that in Pov-Ray, any help would be greatly
> appropriated.
>
> Thanks in advance.
>
>
>
povray has an animation loop here's some examples in the tutorial section:
http://wiki.povray.org/content/Documentation:Tutorial_Section_3.7#Making_Animations

and here's other control options:
http://wiki.povray.org/content/Reference:Animation_Options


Post a reply to this message

From: Jaime Vives Piqueres
Subject: Re: passing custom parameter
Date: 2 Jan 2013 09:20:22
Message: <50e44226@news.povray.org>
El 02/01/13 15:13, Le_Forgeron escribió:
> You would need to build on the fly the INI file, to use the
> "Define=foo=44" capability (not available from the command line)

   IIRC, that works from the command line too, at least on the unix version.

--
Jaime


Post a reply to this message

From: Le Forgeron
Subject: Re: passing custom parameter
Date: 2 Jan 2013 09:23:34
Message: <50e442e6$1@news.povray.org>
Le 02/01/2013 15:20, Jaime Vives Piqueres nous fit lire :
> El 02/01/13 15:13, Le_Forgeron escribió:
>> You would need to build on the fly the INI file, to use the
>> "Define=foo=44" capability (not available from the command line)
> 
>   IIRC, that works from the command line too, at least on the unix version.

Right. but no shortcut:

povray -Ibb.pov Declare=foo=23


Post a reply to this message

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