|
![](/i/fill.gif) |
Am 01.09.2010 11:04, schrieb bobsta:
> i) is it better to rotate the camera about the direction vector, or apply the
> inverse camera matrix to the structure (to rotate and translate it) and keep the
> camera fixed (thereby generating the same image)
As you are /thinking/ about the animation in terms of a camera rotation,
that's what you should go for. It will also prevent you from having to
rotate the light source(s), sky sphere, and whatever else you have in
the scene.
> ii) how can I automate the orbit? Do I need to generate a .pov file for a single
> camera position. Or can I read in one file containing the mesh2 object and then
> pass a number of simple "camera" files to povray containing the necessary camera
> setup. Or should I simply define all camera positions in the .pov file and allow
> povray to serially raytrace each camera (60< number of cameras<= 180)
POV-Ray has some built-in features to help creating animations. By
specifying the command line parameter (e.g.) "+KFF100" (or INI-file
parameter "Final_Frame=100") you tell POV-Ray to render the scene file
100 times, varying a variable named "frame_number" from 1 to 100 and
appending the same number to the output file name. There's also a
"clock" variable, varying from 0.0 to 1.0 by default.
In your scene file, you would then use just a single camera, but compute
its position from "frame_number" or "clock", e.g.
camera {
rotate y*360*clock
}
which would have the camera position rotate around the Y axis in steps
of 3.6 degrees per frame (presuming Final_Frame=100).
If you absolutely /need/ to go through the pain of manually defining the
individual camera positions, you'd typically use a "#switch" construct.
See also sections 2.3.8 "Making Animations" and 3.2.1.3.6 "Built-in
Variables" of the documentation
> iii) is it possible to write a pbm file directly with povray since I am really
> only interested in whether the image pixel is inside (1) or outside the mesh (0)
> As far as I can tell povray outputs .png .tga or .ppm. Since speed is critical I
> want to avoid having to convert the images into pbm files (which are used for
> further processing)
No - POV-Ray being a raytracing software, file formats with a bit depth
of 1 are a pretty seldom asked-for feature. The current v3.7 beta does
support .pgm as well, but that's as close as you'll get.
> iv) is there a way to batch run the raytracing of multiple structures either in
> series or preferably in parallel on different CPUs?
I know of two "out-of-the-box" ways of rendering a set of images in a batch:
(A) Use an external script, such as a Unix shell script.
(B) Use the built-in animation mechanism. You can not only #switch
between different cameras or object, but even whole scenes if you so wish,
As for making use of multiple CPUs or CPU cores, there are also
different approaches:
(A) Simply run multiple instances of POV-Ray in parallel, each rendering
a different frame or scene of your batch. (For best performance, make
sure not to run more instances than you have (virtual) CPU cores.)
(B) Go for the POV-Ray 3.7 beta, which is pretty stable to use by now,
and does symmetric multiprocessing out-of-the-box, taking all cores it
can get by default.
For your particular situation, solution (A) may be better suited though,
as during scene file parsing even the POV-Ray beta uses only a single
core, and from your description I guess your scenes may take more time
to parse than to actually render.
Post a reply to this message
|
![](/i/fill.gif) |