|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hi,
Is there any way to know the final name of the image file that is being
created from the code?
I want to preprocess a series of frames and store the radiosity information
(save_file option) in a different file for each frame so that I can reuse
them later in the same serie of frames at a higher quality. I would like the
radiosity file to have the same name than the image file but with a
diffreent extension but I can't imagine how can i get the file image name
(my_image001.bmp, for instance).
Thanks,
Zoly
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Zoly nous apporta ses lumieres en ce 2007/08/26 07:37:
> Hi,
>
> Is there any way to know the final name of the image file that is being
> created from the code?
>
> I want to preprocess a series of frames and store the radiosity information
> (save_file option) in a different file for each frame so that I can reuse
> them later in the same serie of frames at a higher quality. I would like the
> radiosity file to have the same name than the image file but with a
> diffreent extension but I can't imagine how can i get the file image name
> (my_image001.bmp, for instance).
>
> Thanks,
> Zoly
>
>
The image's name is the same as that of the scene file.
scene.pov -> scene.bmp
Unless you specificaly set it to something else.
In the case of an animation, it's:
scene.pov -> scene01.bmp, scene02.bmp, scene03.bmp,...
If your animation is up to 9 frames, it use 1 digit.
If your animation is 10 to 99 frames, it use 2 digits.
If your animation is 100 to 999 frames, it use 3 digits...
To save the radiosity data for each frame, you need to specify the naming yourself:
save_file concat("Some_name",str(frame_number,-2,0),".rad")
will create files of the format:
Some_namexx.rad
You can change the file format by using some command-line parameter: +fn set the
output as PNG for example. You can add this to the main ini file to set it for
all produced images: add a line with "+fn" to povray.ini. PNG is lossless and a
LOT smaller than BMP. You can't set the output to JPG. Read the documentation
for the supported image formats and the coresponding switches.
--
Alain
-------------------------------------------------
Scientology: If shit happens, see "Dianetics", p.157.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Thank you for your illustration about file types, compression types and
naming conventions for frame images.
Regarding my question, I guess that the answer is: No, it is not possible to
know the file name of the image that is being created from the SDL code.
Regards,
Zoly.
"Alain" <ele### [at] netscapenet> wrote in message
news:46d1986c@news.povray.org...
> Zoly nous apporta ses lumieres en ce 2007/08/26 07:37:
>> Hi,
>>
>> Is there any way to know the final name of the image file that is being
>> created from the code?
>>
>> I want to preprocess a series of frames and store the radiosity
>> information (save_file option) in a different file for each frame so that
>> I can reuse them later in the same serie of frames at a higher quality. I
>> would like the radiosity file to have the same name than the image file
>> but with a diffreent extension but I can't imagine how can i get the file
>> image name (my_image001.bmp, for instance).
>>
>> Thanks,
>> Zoly
> The image's name is the same as that of the scene file.
> scene.pov -> scene.bmp
> Unless you specificaly set it to something else.
>
> In the case of an animation, it's:
> scene.pov -> scene01.bmp, scene02.bmp, scene03.bmp,...
> If your animation is up to 9 frames, it use 1 digit.
> If your animation is 10 to 99 frames, it use 2 digits.
> If your animation is 100 to 999 frames, it use 3 digits...
> To save the radiosity data for each frame, you need to specify the naming
> yourself:
> save_file concat("Some_name",str(frame_number,-2,0),".rad")
> will create files of the format:
> Some_namexx.rad
>
> You can change the file format by using some command-line parameter: +fn
> set the output as PNG for example. You can add this to the main ini file
> to set it for all produced images: add a line with "+fn" to povray.ini.
> PNG is lossless and a LOT smaller than BMP. You can't set the output to
> JPG. Read the documentation for the supported image formats and the
> coresponding switches.
>
> --
> Alain
> -------------------------------------------------
> Scientology: If shit happens, see "Dianetics", p.157.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Zoly nous apporta ses lumieres en ce 2007/08/27 05:15:
> Thank you for your illustration about file types, compression types and
> naming conventions for frame images.
>
> Regarding my question, I guess that the answer is: No, it is not possible to
> know the file name of the image that is being created from the SDL code.
>
> Regards,
> Zoly.
>
>
It IS possible to know the image's name: it's the SAME as that of the scene!
--
Alain
-------------------------------------------------
Church of SubGenius: BoB shits.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Zoly" <zol### [at] kroncom> wrote:
> Thank you for your illustration about file types, compression types and
> naming conventions for frame images.
>
> Regarding my question, I guess that the answer is: No, it is not possible to
> know the file name of the image that is being created from the SDL code.
>
> Regards,
> Zoly.
>
Well yes and no I suppose.
Read the docs "3.1.2.4.2 Output File Name" regarding the file name options.
However, if you are trying to get a scene to know the name of the output
file automatically without hardcoding it, I don't think you can.
Perhaps you can explain what you want to do and a solution can be found.
-tgq
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I just want to create a name for the radiosity info with extension .rad but
with the same name than the image that is being created. I already did it
but I am assuming that the output file name is not changed through command
line options or the .ini file and also I am assuming that the number of
frames is not greater than a certain number. Remember that name of the
output of a frame not only epends on the frame number but also on the total
number of frames (the number of digits).
I have been programming during 25 years and I learnt that assumimg things in
the code is not a good practice. I just wanted to be sure that hardcoding
the file name was the only way to do it and that there is not a constant or
system variable that gives the name of the file.
Cheers!
Zoly.
"Trevor G Quayle" <Tin### [at] hotmailcom> wrote in message
news:web.46d2c81a21b8a3b2c150d4c10@news.povray.org...
> "Zoly" <zol### [at] kroncom> wrote:
>> Thank you for your illustration about file types, compression types and
>> naming conventions for frame images.
>>
>> Regarding my question, I guess that the answer is: No, it is not possible
>> to
>> know the file name of the image that is being created from the SDL code.
>>
>> Regards,
>> Zoly.
>>
>
> Well yes and no I suppose.
>
> Read the docs "3.1.2.4.2 Output File Name" regarding the file name
> options.
> However, if you are trying to get a scene to know the name of the output
> file automatically without hardcoding it, I don't think you can.
>
> Perhaps you can explain what you want to do and a solution can be found.
>
> -tgq
>
>
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> I have been programming during 25 years and I learnt that assumimg things in
> the code is not a good practice. I just wanted to be sure that hardcoding
> the file name was the only way to do it and that there is not a constant or
> system variable that gives the name of the file.
I suppose there is no way to do that in POVRay itself, but you can
call it from the command line to get external control over the render
and file name. You can even pass parameters to the scene file, although
this does not seem to work for string parameters. You can get around
that by writing the string into a file.
For example, to create a web page button for a given caption I used:
@echo off
echo "%1" > caption.txt
CALL render_image 0
move button.png buttons\%1_normal.png
CALL render_image 1
move button.png buttons\%1_highlighted.png
CALL render_image 2
move button.png buttons\%1_pressed.png
where render_image.bat was just
pvengine -D +a0.2 +w100 +h20 +FN +UA /EXIT button.pov Declare=STATE=%1
and button.pov reading caption.txt, with "STATE" set from command line.
And yes, it's a bit annoying that each invocation pops up the GUI,
makes it impossible to run this in the background, although MegaPOV
might not have this issue ;)
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
>I just want to create a name for the radiosity info with extension .rad but
>with the same name than the image that is being created. I already did it
>but I am assuming that the output file name is not changed through command
>line options or the .ini file and also I am assuming that the number of
>frames is not greater than a certain number. Remember that name of the
>output of a frame not only epends on the frame number but also on the total
>number of frames (the number of digits).
>
> I have been programming during 25 years and I learnt that assumimg things
> in the code is not a good practice. I just wanted to be sure that
> hardcoding the file name was the only way to do it and that there is not a
> constant or system variable that gives the name of the file.
You can access the frame number with the frame_number system variable.
With a little bit of string manipulation you can stick the frame number onto
a hard coded name.
#declare final_radiosity = off;
#declare rname = concat("radiosity_data",str(frame_number,0,0),".dat");
global_settings {
// settings
#if (final_radiosity)
radiosity {
load_file rname
// radiosity settings
}
#else
radiosity {
// radiosity settings
save_file rname
}
#end
}
If you don't have many moving objects and are just moving the camera
around then you don't need to recalculate the all the radiosity data for
every frame... it's OK to just use load_file and save_file with a single
file, you load the file, let it calculate the "holes" in the data, then save
the
updated file for the next frame.
#declare final_radiosity = on;
global_settings {
// settings
#if (final_radiosity)
radiosity {
load_file "radiosity_data.dat"
// radiosity settings
save_file "radiosity_data.dat"
}
#else
// no radiosity for previews
#end
}
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|