POV-Ray : Newsgroups : povray.newusers : Output file name with a scene parameter : Re: Output file name with a scene parameter Server Time
7 Jul 2024 08:37:35 EDT (-0400)
  Re: Output file name with a scene parameter  
From: Alex
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

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