1

I'm creating a POV-Ray 3.6.2 (Windows) animation using an ini file as usual. In the pov file, I calculate several values such as camera position based on the clock value. How can I output these values in some way that is easily retrievable for (non-realtime) use in an external program?

In descending priority, these are the methods I thought of:

  1. Save it in the filename (instead of the usual filename00.bmp, filename01.bmp etc)
  2. Save it in an external text file (either one per frame, or one for the whole animation)
  3. Save it in the file metadata (though I don't know whether BMP has metadata fields similar to EXIF tags)

At the moment, I'm using a text object to write it into the image, which can later be manually copied and cropped off.

I know I can rewrite the algorithm that generates these numbers in another language, but rather avoid this because I'll need to maintain 2 copies of the algorithm in case it changes.

Thanks!

Gnubie
  • 2,587
  • 4
  • 25
  • 38

1 Answers1

3

Use the #debug "Some text" directive together with the Debug_File=filename.out command line parameter to store your output in a file. Note that #debug can only accept textual arguments, so consider using the str() and concat() functions for any numeric data, e.g.:

#debug "Output follows"
#debug str(123.456789, 0, 3) // do not pad and round to 3 decimal places: 123.456
#debug concat("Six by six is ", str(6 * 6, 5, 0)) // pad with up to 5 zeroes, omitting decimal places: Six by six is 00036
Vadim Landa
  • 2,784
  • 5
  • 23
  • 33
  • 1
    Thanks, Vadim. For the record, adding Debug_File=on to my ini file and #debug "...\n" to my pov file outputs a DEBUG.OUT text file. The \n ensures that each debug message is on a separate line. – Gnubie Jan 04 '16 at 18:27