Lights and material

Lights and material are poorly implemented. Basically, we need to enter the povray string.


By default, in the template, the lights of the camera are defined by:

camera.povraylights="light_source {<"+ str(light.location[0])+","+str(light.location[1])+","+str(light.location[2])+ "> color White " + "}\n\n"

You may Change camera.povraylights with any string which is a valid light string in povray.


We can easily define colors with

object.color='Red' # Red is a color known to povray
object.color= '<0.5,0.5,0.5>' # rgb description
object.color='<1.5,0.5,0.5,1,0>' # for transparence, see povray doc

If we want something more suttle, we directly introduce the povray string we want, in which case the object.color is ignored:


For instance:

cyl2.material="pigment { brick  brick_size 2 mortar 0.2 }"

is a valid string.

Other Povray string

If some attributes are still missing, recall that we can enter any povray string in camera.preamble which is put at the beginning of the povray file. Default to ‘#include “” n#include “” nbackground {Blue}nn’