POV-Ray : Newsgroups : povray.general : Retrieving / Changing output options from script Server Time
23 Dec 2024 22:44:50 EST (-0500)
  Retrieving / Changing output options from script (Message 1 to 6 of 6)  
From: Jesse Hallam
Subject: Retrieving / Changing output options from script
Date: 1 Jul 2003 21:14:30
Message: <3f0231f6@news.povray.org>
Is there anyway to acess or change the paramaters from within the 
script? For example, I am trying to achieve a two-pass render, and would 
like the second pass to read in the first pass as an image_map... but I 
would like the output options to be changed dynamically for each script 
name.

For example, if the pov src file = "test.pov", then the resulting image 
(in my configuration, would be test.png) -- I would like to grab 
"test.png", and change it to "test_image_map.png", which is then read in 
on the second pass.

Any way to achieve the above, and more?

Thanks for suggestions


Post a reply to this message

From: Breton Slivka
Subject: Re: Retrieving / Changing output options from script
Date: 2 Jul 2003 00:26:31
Message: <Xns93ABE6B3F81FEZenPsychoyahoocom@204.213.191.226>
Jesse Hallam <hal### [at] amtelecomnet> wrote in news:3f0231f6@news.povray.org:

> Is there anyway to acess or change the paramaters from within the 
> script? For example, I am trying to achieve a two-pass render, and would 
> like the second pass to read in the first pass as an image_map... but I 
> would like the output options to be changed dynamically for each script 
> name.
> 
> For example, if the pov src file = "test.pov", then the resulting image 
> (in my configuration, would be test.png) -- I would like to grab 
> "test.png", and change it to "test_image_map.png", which is then read in 
> on the second pass.
> 
> Any way to achieve the above, and more?
> 
> Thanks for suggestions
> 
> 

I suppose you could create an INI file which contains all your output 
options, and then dynamically change this file using povray file I/O.

But then the details of getting it to automatically render two in a row or 
however many are slightly beyond me, since when rendering an animation, it 
doesn't re-read output options between frames. 

Though if you're using a command line version of povray, this task could be 
made much simpler by just making a shell script that invokes povray with 
different output options however many times or different ways you want.


Post a reply to this message

From: ABX
Subject: Re: Retrieving / Changing output options from script
Date: 2 Jul 2003 02:37:08
Message: <ouu4gvgbkgiq8bl1uv6ha761sjqk5cns74@4ax.com>
On Tue, 01 Jul 2003 21:14:36 -0400, Jesse Hallam <hal### [at] amtelecomnet> wrote:
> For example, if the pov src file = "test.pov", then the resulting image 
> (in my configuration, would be test.png) -- I would like to grab 
> "test.png", and change it to "test_image_map.png", which is then read in 
> on the second pass.

You can't read name of output from within a script thought unofficial patched
MegaPOV has prepared feature (for next relase) with reading name of currently
rendered image (numbered in animation). This name could be written into new ini
file for post_frame_command http://www.povray.org/documentation/view/130/

ABX


Post a reply to this message

From: Warp
Subject: Re: Retrieving / Changing output options from script
Date: 2 Jul 2003 10:04:52
Message: <3f02e683@news.povray.org>
Jesse Hallam <hal### [at] amtelecomnet> wrote:
> Any way to achieve the above, and more?

  You can make a two-frame animation, where the first frame (#if(clock=0))
creates the image map and the second frame (#else) reads test1.png (or
whatever your pov-file is called, plus '1' after the name) as image map.

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

From: JC (Exether)
Subject: Re: Retrieving / Changing output options from script
Date: 2 Jul 2003 10:38:49
Message: <3F02EE78.5070606@spam.fr>
It's a problem I had several times too, and I use Warp's way, doing it 
in an animation.

The only problem I couldn't solve like this is when I want to use a 
previously rendered image as a height field and I want the height field 
image to use the hf_gray_16 option, even though this option appears in 
the script and can be conditioned it seems that it is handled just like 
any other output option by POV-Ray so that all images are rendered with 
the hf_gray_16.

Beeing able to change options dynamically would ease things up a lot,

For the accessing part, you can access parameters like resolution, but 
not all parameters are accessible,

JC

Jesse Hallam wrote:
> Is there anyway to acess or change the paramaters from within the 
> script? For example, I am trying to achieve a two-pass render, and would 
> like the second pass to read in the first pass as an image_map... but I 
> would like the output options to be changed dynamically for each script 
> name.
> 
> For example, if the pov src file = "test.pov", then the resulting image 
> (in my configuration, would be test.png) -- I would like to grab 
> "test.png", and change it to "test_image_map.png", which is then read in 
> on the second pass.
> 
> Any way to achieve the above, and more?
> 
> Thanks for suggestions
>


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Retrieving / Changing output options from script
Date: 2 Jul 2003 15:51:12
Message: <3f0337b0@news.povray.org>
In article <3F0### [at] spamfr> , "JC (Exether)" <no### [at] spamfr> wrote:

> Beeing able to change options dynamically would ease things up a lot,

No, it would only create a mess because POV-Ray is in no way meant to allow
this.  You can create paradoxes and that is why this "feature", which
existed in early versions of MegaPOV, was not included in POV-Ray 3.5 and
will not be included in any future version of POV-Ray either.

Use INI files to change options, use scene files to describe scenes.

    Thorsten

____________________________________________________
Thorsten Froehlich
e-mail: mac### [at] povrayorg

I am a member of the POV-Ray Team.
Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

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