|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I want to pass information to debug files for each animation frame output.
I'd liked a new debug file for each animation frame using the same
filename/number combination so I can match up the the appropriate text file
with the appropriate animation frame.
Is it possible to obtain the filename the animation loop has created to do
this?
David
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"davidafisher" <dav### [at] attbicom> wrote in message
news:web.3da9c2351086f46167ebf1b60@news.povray.org...
> I want to pass information to debug files for each animation frame output.
>
> Is it possible to obtain the filename the animation loop has created to do
> this?
Yes. Take a look at section 5.2.4.1 String Substitution in Shell Commands
of the Scene Help (Documentation).
You should be able to create a text file and append to that using a shell
command.
--
Farewell,
Bob
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Back to say that there is a way to get filenames made from just within the
scene or include file with the frame number showing. You'd still need to
write in the current scene name though, the word "debug" within the
concatenation line could be a string declared elsewhere.
#declare Debugged = frame_number*clock; // info or whatever placed into file
// #fopen debugtext "c:\allframesdebug.txt" append // to keep within one
file
#fopen debugtext concat("c:""\frame",str(frame_number,0,0),"debug.txt")
write
#write(debugtext,"Frame ",frame_number,"\n",Debugged)
#fclose debugtext
Not sure at the moment if there's a better way, often is. During my reply
before I thought it might work well to use shell commands but with file I/O
and frame_number that's probably not going to be needed.
--
Farewell,
Bob
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Your first two replies really helped in getting me started here thanks.
This is where I'm at.
#if (clock_on=true)
#declare Fileout = concat("Scene_Name", str(frame_number,2,0),
".txt");
#fopen loop_files Fileout write
#write(loop_files,"\"Frame\",", frame_number, "\n")
#end
light_source {
<0,0,0>
color White // light's color
translate SunPos(-2000, 6, 21, 4, clock, 0, 51.1666667,
-1.8333333)*100000;
}
#if (clock_on=true)
#write(loop_files,"\"Azimuth and Altitude\",",Az,",",Al, "\n")
#write(loop_files,"\"Declination and RA\",",Decl,",",RA, "\n")
#write(loop_files,"\"LST and GST\",",LST,",",GST, "\n")
#end
on an animation loop the rendered image files are called:
location01.bmp
location02.bmp
the above code gives me
Scene_Name 1.txt
Scene_Name 2.txt
where I would like
location01.txt
location02.txt
So the text file names matches the image file name. (Just a change in ext)
I tried the %s, %o but these appear to be recognized only in the shellout
command line.
So I tried using the debug file settings in the ini file i.e.
Debug_File=true
I can either get the default file name - DEBUG.OUT or set it to a single
file name e.g. Debug_File=locationAll
The good thing about this is I can use the debug command to write to it,
but then as I loop on the clock everything gets stuffed into a single file,
which isn't exactly what I want (more work involved in parsing the data)
The ultimate solution would be, to rename the debug_file within SDL!
Is either approach that I've taken what I have to live with?
David
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Now you know why I changed from suggesting the INI way to saying it could be
done within the scene file using that #fopen. Just seems easier than the old
shell commands as long as you are willing to manually enter the animation
file name.
I reworked your script so it would render here and you can see what I mean.
The frame number with zero padding is due to a -2 instead of the 2 you had
which left a space. I should have pointed that out before but I didn't know
you wanted constant double digits or whatever you'll be using. Rechecking
what I wrote before too and I notice I used the drive letter part of the
string wrong, should have been double backward slashes not double double
quotes (oops!).
#declare Scene_Name="location"
#macro SunPos(A,B,C,D,E,F,G,H)
<0,0,0>
#end
#if (clock_on=true)
#declare Fileout = concat("c:\\",Scene_Name,
str(frame_number,-2,0),".txt");
#fopen loop_files Fileout write
#write(loop_files,"\"Frame\",", frame_number, "\n")
#end
light_source {
<0,0,0>
color rgb 1 // light's color
translate SunPos(-2000, 6, 21, 4, clock, 0,
51.1666667,-1.8333333)*100000
}
#local Az=1;
#local Al=2;
#local Decl=3;
#local RA=4;
#local LST=5;
#local GST=6;
#if (clock_on=true)
#write(loop_files,"\"Azimuth and Altitude\",",Az,",",Al, "\n")
#write(loop_files,"\"Declination and RA\",",Decl,",",RA, "\n")
#write(loop_files,"\"LST and GST\",",LST,",",GST, "\n")
#end
The fact that the scene needs to know the file name at parse time, yet there
isn't a way to call for it from the scene file itself, is a barrier for this
kind of thing. Although, as I was first trying to suggest, Pre_Scene_Command
could be used to create the properly named file there wouldn't be a way the
POV (or a INC) can know the same automatically. Hence, manually writing it
into a declared string seems the only alternative.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|