POV-Ray : Newsgroups : povray.newusers : Output file name with a scene parameter Server Time
1 Nov 2024 06:16:53 EDT (-0400)
  Output file name with a scene parameter (Message 1 to 10 of 12)  
Goto Latest 10 Messages Next 2 Messages >>>
From: Alex
Subject: Output file name with a scene parameter
Date: 13 May 2010 13:03:00
Message: <4bec30c4$1@news.povray.org>
Hi All :)

Can we put in the output file name a parameter coming from the scene 
file (.pov) ?
Eg: myScene_CAMERA2.bmp

with pov file named myScene.pov
and the parameter being "_CAMERA2"


Thanks

ALeX


Post a reply to this message

From: clipka
Subject: Re: Output file name with a scene parameter
Date: 13 May 2010 13:13:44
Message: <4bec3348$1@news.povray.org>
Am 13.05.2010 19:02, schrieb Alex:

> Can we put in the output file name a parameter coming from the scene
> file (.pov) ?
> Eg: myScene_CAMERA2.bmp
>
> with pov file named myScene.pov
> and the parameter being "_CAMERA2"

No.

What you can do, however, is automatically generate a batch file or 
shell script to rename the output file, by using the #fopen and #write 
SDL statements.


Post a reply to this message

From: Alex
Subject: Re: Output file name with a scene parameter
Date: 13 May 2010 13:29:14
Message: <4bec36ea$1@news.povray.org>

> Am 13.05.2010 19:02, schrieb Alex:
>
>> Can we put in the output file name a parameter coming from the scene
>> file (.pov) ?
>> Eg: myScene_CAMERA2.bmp
>>
>> with pov file named myScene.pov
>> and the parameter being "_CAMERA2"
>
> No.
>
> What you can do, however, is automatically generate a batch file or
> shell script to rename the output file, by using the #fopen and #write
> SDL statements.

Really ? According to the help #fopen is only for text file :s
Or the usage you give is not clear to me. Could you please develop your 
idea ?

I prefer not using external (to POVRay) batch file...

Thank you ;-)


Post a reply to this message

From: Alex
Subject: Re: Output file name with a scene parameter
Date: 13 May 2010 13:34:01
Message: <4bec3809$1@news.povray.org>

> Am 13.05.2010 19:02, schrieb Alex:
>
>> Can we put in the output file name a parameter coming from the scene
>> file (.pov) ?
>> Eg: myScene_CAMERA2.bmp
>>
>> with pov file named myScene.pov
>> and the parameter being "_CAMERA2"
>
> No.
>
> What you can do, however, is automatically generate a batch file or
> shell script to rename the output file, by using the #fopen and #write
> SDL statements.


Here is my current 'solution':

I set vue to the appropriate view I want to compute.... but I get a 
single picture while I would like to get for example views 0, 1 and 10....

#local vue =  3;

#switch (vue)
   #case (0) // Vue globale de face
     camera { location < 50, 170, -650 > look_at < 50, 170, 0 > }
     #break;
   #case (1) // Vue globale de face proche
     camera { location < 60, 10, -30 > look_at < 65, 5, 0 > }
     #break;

     camera { location < 80, 120, -150 > look_at < 60, 60, 0 > }
     #break;

     camera { location < 0, 0, -150 > look_at < 0, 0, 0 > }
     #break;
   #case (10) // Vue de dessous
     camera { location < 0, -50, 0 > look_at < 0, 0, 0 > }
     #break;
   #case (100) // Vue de de droite
     camera { location < 150, 50, -100 > look_at < 50, 50, 0 > }
     #break;

     camera { location < 250, 170, -50 > look_at < 50, 50, 50 > }
     #break;

     camera { location < -50, 0, 50 > look_at < 0, 0, 0 > }
     #break;
   #case (202) // Vue de de gauche avant
     camera { location < -50, 0, -50 > look_at < 0, 0, 0 > }
     #break;
#end


Post a reply to this message

From: clipka
Subject: Re: Output file name with a scene parameter
Date: 13 May 2010 14:28:13
Message: <4bec44bd$1@news.povray.org>
Am 13.05.2010 19:29, schrieb Alex:

>> What you can do, however, is automatically generate a batch file or
>> shell script to rename the output file, by using the #fopen and #write
>> SDL statements.
>
> Really ? According to the help #fopen is only for text file :s
> Or the usage you give is not clear to me. Could you please develop your
> idea ?

Batch files and shell scripts /are/ "text files" in this sense; all you 
need to do is choose a proper file extension (on Windows) or write a 
proper "#!/bin/sh" line at the beginning to make the operating system 
automatically recognize it as a script.

> I prefer not using external (to POVRay) batch file...

Then you're quite lost.

Note that there exist ini file options to specify a command to be run 
after each frame or after the full render (or before, for that matter), 
if it's a question of usability.


Post a reply to this message

From: Jaime Vives Piqueres
Subject: Re: Output file name with a scene parameter
Date: 13 May 2010 17:37:56
Message: <4bec7134@news.povray.org>

> Here is my current 'solution':
>
> I set vue to the appropriate view I want to compute.... but I get a
> single picture while I would like to get for example views 0, 1 and
> 10....

   Then you can create a pov scene for each value of "vue", just containing
the declaration and then including the rest of the scene.

   For example, the file "face_vue.pov" will contain:

   #local vue=0;
   #include "rest_of_the_sdl.pov"

   and so on for each value of "vue". Then simply queue all of them for
rendering... :)


-- 
Jaime Vives Piqueres

http://www.ignorancia.org


Post a reply to this message

From: Alain
Subject: Re: Output file name with a scene parameter
Date: 13 May 2010 21:06:51
Message: <4beca22b$1@news.povray.org>


>> Am 13.05.2010 19:02, schrieb Alex:
>>
>>> Can we put in the output file name a parameter coming from the scene
>>> file (.pov) ?
>>> Eg: myScene_CAMERA2.bmp
>>>
>>> with pov file named myScene.pov
>>> and the parameter being "_CAMERA2"
>>
>> No.
>>
>> What you can do, however, is automatically generate a batch file or
>> shell script to rename the output file, by using the #fopen and #write
>> SDL statements.
>
>
> Here is my current 'solution':
>
> I set vue to the appropriate view I want to compute.... but I get a
> single picture while I would like to get for example views 0, 1 and 10....
>
> #local vue = 3;
>
> #switch (vue)
> #case (0) // Vue globale de face
> camera { location < 50, 170, -650 > look_at < 50, 170, 0 > }
> #break;
> #case (1) // Vue globale de face proche
> camera { location < 60, 10, -30 > look_at < 65, 5, 0 > }
> #break;

> camera { location < 80, 120, -150 > look_at < 60, 60, 0 > }
> #break;

> camera { location < 0, 0, -150 > look_at < 0, 0, 0 > }
> #break;
> #case (10) // Vue de dessous
> camera { location < 0, -50, 0 > look_at < 0, 0, 0 > }
> #break;
> #case (100) // Vue de de droite
> camera { location < 150, 50, -100 > look_at < 50, 50, 0 > }
> #break;

> camera { location < 250, 170, -50 > look_at < 50, 50, 50 > }
> #break;

> camera { location < -50, 0, 50 > look_at < 0, 0, 0 > }
> #break;
> #case (202) // Vue de de gauche avant
> camera { location < -50, 0, -50 > look_at < 0, 0, 0 > }
> #break;
> #end

You can easily do an animation and get all the views.
Add +kff9 on the command line.

Replace #local vue = 3; by this:
#local vue = frame_number-1;

The internal variable frame_number starts at 1, so you need to substract 
1 from it.

Change the cases larger than 3 to:
#case(4) in place of #case(10)
#case(5) in place of #case(100)
#case(6) in place of #case(101)
#case(7) in place of #case(201)
#case(8) in place of #case(202)

This will result in images named myScenen.bmp
Where the last "n" will range from 1 to 8


Alain


Post a reply to this message

From: Alex
Subject: Re: Output file name with a scene parameter
Date: 15 May 2010 04:32:45
Message: <4bee5c2d$1@news.povray.org>

> to the appropriate view I want to compute....

Oups, sorry, I confused threads with another post I've made in p.windows :))

But finally this matches, I just need to study animation mechanism (I 
don't know yet)....

Thanks for your helpful tips :-)

ALeX


Post a reply to this message

From: Alex
Subject: Re: Output file name with a scene parameter
Date: 15 May 2010 04:52:14
Message: <4bee60be@news.povray.org>



>>> Am 13.05.2010 19:02, schrieb Alex:
>>>
>>>> Can we put in the output file name a parameter coming from the scene
>>>> file (.pov) ?
>>>> Eg: myScene_CAMERA2.bmp
>>>>
>>>> with pov file named myScene.pov
>>>> and the parameter being "_CAMERA2"
>>>
>>> No.
>>>
>>> What you can do, however, is automatically generate a batch file or
>>> shell script to rename the output file, by using the #fopen and #write
>>> SDL statements.
>>
>>
>> Here is my current 'solution':
>>
>> I set vue to the appropriate view I want to compute.... but I get a
>> single picture while I would like to get for example views 0, 1 and
>> 10....
>>
>> #local vue = 3;
>>
>> #switch (vue)
>> #case (0) // Vue globale de face
>> camera { location < 50, 170, -650 > look_at < 50, 170, 0 > }
>> #break;
>> #case (1) // Vue globale de face proche
>> camera { location < 60, 10, -30 > look_at < 65, 5, 0 > }
>> #break;

>> camera { location < 80, 120, -150 > look_at < 60, 60, 0 > }
>> #break;

>> camera { location < 0, 0, -150 > look_at < 0, 0, 0 > }
>> #break;
>> #case (10) // Vue de dessous
>> camera { location < 0, -50, 0 > look_at < 0, 0, 0 > }
>> #break;
>> #case (100) // Vue de de droite
>> camera { location < 150, 50, -100 > look_at < 50, 50, 0 > }
>> #break;

>> camera { location < 250, 170, -50 > look_at < 50, 50, 50 > }
>> #break;

>> camera { location < -50, 0, 50 > look_at < 0, 0, 0 > }
>> #break;
>> #case (202) // Vue de de gauche avant
>> camera { location < -50, 0, -50 > look_at < 0, 0, 0 > }
>> #break;
>> #end
>
> You can easily do an animation and get all the views.
> Add +kff9 on the command line.
>
> Replace #local vue = 3; by this:
> #local vue = frame_number-1;
>
> The internal variable frame_number starts at 1, so you need to substract
> 1 from it.
>
> Change the cases larger than 3 to:
> #case(4) in place of #case(10)
> #case(5) in place of #case(100)
> #case(6) in place of #case(101)
> #case(7) in place of #case(201)
> #case(8) in place of #case(202)
>
> This will result in images named myScenen.bmp
> Where the last "n" will range from 1 to 8
>
>
> Alain

Oups, thank you so much, but when you talk about command line, do you 
mean I can't use the GUI ? I'm using POV-Ray with windows... Thus in 
that case where to put this switch ?
Looking for in the same time...

Thanks,
ALeX


Post a reply to this message

From: Alex
Subject: Re: Output file name with a scene parameter
Date: 15 May 2010 05:03:00
Message: <4bee6344@news.povray.org>




>>>> Am 13.05.2010 19:02, schrieb Alex:
>>>>
>>>>> Can we put in the output file name a parameter coming from the scene
>>>>> file (.pov) ?
>>>>> Eg: myScene_CAMERA2.bmp
>>>>>
>>>>> with pov file named myScene.pov
>>>>> and the parameter being "_CAMERA2"
>>>>
>>>> No.
>>>>
>>>> What you can do, however, is automatically generate a batch file or
>>>> shell script to rename the output file, by using the #fopen and #write
>>>> SDL statements.
>>>
>>>
>>> Here is my current 'solution':
>>>
>>> I set vue to the appropriate view I want to compute.... but I get a
>>> single picture while I would like to get for example views 0, 1 and
>>> 10....
>>>
>>> #local vue = 3;
>>>
>>> #switch (vue)
>>> #case (0) // Vue globale de face
>>> camera { location < 50, 170, -650 > look_at < 50, 170, 0 > }
>>> #break;
>>> #case (1) // Vue globale de face proche
>>> camera { location < 60, 10, -30 > look_at < 65, 5, 0 > }
>>> #break;

>>> camera { location < 80, 120, -150 > look_at < 60, 60, 0 > }
>>> #break;

>>> camera { location < 0, 0, -150 > look_at < 0, 0, 0 > }
>>> #break;
>>> #case (10) // Vue de dessous
>>> camera { location < 0, -50, 0 > look_at < 0, 0, 0 > }
>>> #break;
>>> #case (100) // Vue de de droite
>>> camera { location < 150, 50, -100 > look_at < 50, 50, 0 > }
>>> #break;

>>> camera { location < 250, 170, -50 > look_at < 50, 50, 50 > }
>>> #break;

>>> camera { location < -50, 0, 50 > look_at < 0, 0, 0 > }
>>> #break;
>>> #case (202) // Vue de de gauche avant
>>> camera { location < -50, 0, -50 > look_at < 0, 0, 0 > }
>>> #break;
>>> #end
>>
>> You can easily do an animation and get all the views.
>> Add +kff9 on the command line.
>>
>> Replace #local vue = 3; by this:
>> #local vue = frame_number-1;
>>
>> The internal variable frame_number starts at 1, so you need to substract
>> 1 from it.
>>
>> Change the cases larger than 3 to:
>> #case(4) in place of #case(10)
>> #case(5) in place of #case(100)
>> #case(6) in place of #case(101)
>> #case(7) in place of #case(201)
>> #case(8) in place of #case(202)
>>
>> This will result in images named myScenen.bmp
>> Where the last "n" will range from 1 to 8
>>
>>
>> Alain
>
> Oups, thank you so much, but when you talk about command line, do you
> mean I can't use the GUI ? I'm using POV-Ray with windows... Thus in
> that case where to put this switch ?
> Looking for in the same time...
>
> Thanks,
> ALeX

Ok, self response :)) Just played with frame number, 1 to 5 in INI file, 
this is enough.
Just would be curious to find more about that famous command line :p
Another short question but out of that topic : can we have a separate 
.ini file per scene file (.pov) ?

Merci :-)


Post a reply to this message

Goto Latest 10 Messages Next 2 Messages >>>

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