> If your pov files are generated, make becomes even more useful. I'll
> write a sample makefile for you; but first I need more info. Does a
> single program call convert all the coordinates into all the .pov files,
> or do you need to run it repeatedly to convert each coordinate file into
> a single .pov file?
Thanks for offering to help! Here's more details. There's looping at two levels.
One over a variable number (say 6 to 20) of coordinate files.
Second, over two views (front and top).
The existing parser and povray-invoker is written in python. Here's some pseudo
code:
python code:
foreach coordinate_file
parse coordinate_file into frontview.pov
povray call to produce frontview.ppm
parse coordinate_file into topview.pov
povray call to produce topview.ppm
montage call to combine frontview.ppm and topview.ppm -> image.jpeg
Right now I mangaed to speed it up by using a shell script to call the python
code over and over again but in the background. This allows me to split the
background processes each over different cores. And that does speed up things!
Luckily each image render is independent so that was easy.
shell wrapper:
for each coordinate_file
call python_code &
On the other hand both front and top views must be rendered prior to the montage
call for each image. So that's not so straightforward to parallelize within a
single python call. Its only the povray calls that take time; the parsing is
quick.
Does this answer your question? If not just let me know.
Thanks again and I'm really curious to see how you use "make" here!
-Rahul
Post a reply to this message
|