Previous:Using Ambient Main Index Next:Using Reflection and Metallic
In the glass example above, we noticed that there were bright little hotspots on the surface. This gave the sphere a hard, shiny appearance. POV-Ray gives us two ways to specify surface specular highlights. The first is called Phong highlighting. Usually, Phong highlights are described using two keywords: phong
and phong_size
. The float that follows phong
determines the brightness of the highlight while the float following phong_size
determines its size. Let's try this.
sphere { <0,0,0>, 1 pigment { Gray50 } finish { ambient .2 diffuse .6 phong .75 phong_size 25 } }
Rendering this we see a fairly broad, soft highlight that gives the sphere a kind of plastic appearance. Now let's change phong_size
to 150. This makes a much smaller highlight which gives the sphere the appearance of being much harder and shinier.
There is another kind of highlight that is calculated by a different means called specular highlighting. It is specified using the keyword specular
and operates in conjunction with another keyword called roughness
. These two keywords work together in much the same way as phong
and phong_size
to create highlights that alter the apparent shininess of the surface. Let's try using specular in our sphere.
sphere { <0,0,0>, 1 pigment { Gray50 } finish { ambient .2 diffuse .6 specular .75 roughness .1 } }
Looking at the result we see a broad, soft highlight similar to what we had when we used phong_size
of 25. Change roughness
to .001 and render again. Now we see a small, tight highlight similar to what we had when we used phong_size
of 150. Generally speaking, specular is slightly more accurate and therefore slightly more realistic than phong but you should try both methods when designing a texture. There are even times when both phong and specular may be used on a finish.
Previous:Using Ambient Main Index Next:Using Reflection and Metallic