colours | objects | textures | transformation | lighting


p o v - r a y
lighting

light_source colour

blue sphere in white light » blue sphere in yellow light » blue sphere in red light

the left image is a scene of a blue sphere in white light. the light colour is determined using the rgb notation. the code used is as follows:
line32: color rgb <1.0, 1.0, 1.0>
this line is used in the light_source object. given that the light_source is on the left, the specular highlight of the sphere is on the left as well, with shading and shadows on the right.

the middle image is a scene of the same blue sphere, but this time in yellow light. as the colour yellow is achieved by combining red with green, this is used. the code for this is as follows:
line32: color rgb <1.0, 1.0, 0.0>
everything in the scene within the line of sight of the light_source is influenced with the colour yellow. the specular highlight on the sphere has also changed according to the colour of the light_source. on the other hand, the shading and shadow is not affected as it is not visible to the light_source. a bit of diffusion should have taken place though.

the right image is a scene of the blue sphere again, but now in red light. only red is used in the rgb notation of this scene. the code used is as follows:
line32: color rgb <1.0, 0.0, 0.0>
the effects are similar to that of the middle image, except the colour red is used here.



multiple light_source's

blue sphere with one light_source » blue sphere with two light_source's

the left image is a scene of a blue sphere with one light_source to the left. the code used is as follows:
line32: color rgb <1.0, 1.0, 1.0>
this line indicates that the light_source has its rgb values all set to 100% intensity, resulting in a white coloured light.

the right image is a scene of the blue sphere with two light_source's, one to the left and another to the right. the code used is as follows:
line32: color rgb <1.0, 1.0, 1.0>
line38: color rgb <1.0, 1.0, 1.0>
as there are two light_source's, this would also create two shadows, one for each light_source. the shadows and shading appear less dark than before because a light_source has brightened the shadow and shading of another light_source. the two light_source's has also created two specular highlights onto the surface of the sphere. creating two light_source's with a colour of white by using 100% intensity for all red, green and blue values results in the scene having a white light intensity of 200% when added up.



brightness

blue sphere in bright scene » blue sphere in normal scene

the left image is a scene of a blue sphere surrounded by light with high intensity because there are two light_source's with normal intensity. the code used is as follows:
line32: color rgb <1.0, 1.0, 1.0>
line38: color rgb <1.0, 1.0, 1.0>
both the lines indicate that they have their rgb values all set to 100% intensity, resulting in a white coloured light. when both light_source intensities are combined, the light intensity of the scene becomes 200%. a shortcut for the syntax used in line32 and line38 is "color rgb 1.0" so that red, green and blue are given the values of 1.0.

the right image is a scene of the blue sphere surrounded by light with normal intensity even though there are two light_source's. the code used is as follows:
line32: color rgb <0.5, 0.5, 0.6>
line38: color rgb <0.5, 0.5, 0.6>
these two lines have their rgb values set to 50% intensity for red and green, and 60% for blue. this results in a grey coloured light which is darker than that of white. when both light_source intensities are combined, the brightness of the scene becomes around 100%. the specular highlights on the sphere are also smaller and less bright than the ones in the left image. the blue values in line32 and line38 are 10% higher than those of red and green to maintain consistency in appearance of the scene.



colours | objects | textures | transformation | lighting