Index of /~mccoyjo/povray/cm
Notes on running the parapov curriculum modes scripts.
Solutions to the curriculum modules (animated gifs) can be found at:
http://cs.earlham.edu/~mccoyjo/povray/cm/
==Parallel structure of parapov==
Parapov partitions the rendering work in a workpool approach. A
master node hands tells a slave to render an x pixel by y pixel
portion of the image. This granularity of the work load can by
modified by adding +PWn and +PHn to the pertanent .ini file where n is
a number of pixels. The default vaules are +PW32 and +PH32.
The default granularity does not scale well over around 4 processes.
Good results have been obtained by making the granularity a quarter of
the final image size.
When photon mapping, the master process does very little work. A good
-np value to pass to mpi run is one more than the number of processors
available for rendering.
==Output Notes==
The output of each process is logged and placed in the working
directory of the node local to each process (i.e. parapov_n1.log).
The default output generated is a number of ppm images that are meant
to be merged into an animated gif. Given a machine that has
ImageMagick's convert utility installed, the following command line
will produce an animated gif from the ppm images:
convert -delay 30 *.ppm animation.gif
For better looking results, more frames of animation can be added in
the appropriate ini file. Just increase the value of the Final_Frame
parameter.
Resultant image size can be changed with the +W and +H options.
==.pov file syntax for used rendering options==
Raytracing is povray's default mode. You only need to specify a
camera position, a light source, and scene objects for a basic
ray-traced image.
To enable photon mapping, photon blocks must be added globally and to
each object that is to interact with the photons (including having a
light sources that emit photons). A basic, usable global photon block
looks like:
global_settings{
photons{
count 200000
autostop 0
spacing .0005
jitter 0
}
}
A light source that emits photons:
light_source{
<10*clock-5,5*sin(clock*pi),0>, rgb <1,1,1>
photons{
reflection on
refraction on
}
}
An object that interacts with photons (note that to see caustics with
transparent objects, refraction must be enabled by giving the interior
block an ior value grater than 1):
sphere{< 0, 1.5, 0>, 1.0
texture{Glass}
photons{
target
reflection on
refraction on
}
interior{
dispersion 1
ior 1.5
}
}
Enabling dispersion (the seperating of photons of different
wavelengths with refracting through media -- aka prism effect of color
spreading) is simple: give set the dispersion value in the interior
block to a value greater than 1. Good results happen between
dispersion values of 1.1 and 1.4.