3D objects have 2D surfaces. Povray has a complex array of choices for specifying what the 2D surface of an object will look like. Below, we describe some of the basics of how to specify surface color and surface properties in Povray. For more details, please see the Povray documentation.
Textures are combinations of the following:
We describe each in more detail below.
Pigments describe the underlying color of a surface. Pigments can be specifed as:
images - paste (tile) a 2d image (e.g. gif, jpg) onto a 2D surface. Distortion may occur if surface is not flat.
code: imagepigment.pov
color maps - multiple colors with smooth transitions from one color to next.
code: colormapEx.pov
pigment maps - multiple pigments with smooth transitions from one color to next.
The appearance of a surface depends on the angle the light hits it. More specifically, the appearance depends on the relative positions of the surface normal, the direction of the light and position of the viewer. For example, consider light hitting a diffuse (i.e. matte) surface. Light that "grazes" the surface is going to reflect less than light that hits directly from right above the surface. For more details, see surface interaction.
To make a surface appear bumpy, we can perturb the surface normal. This is how normal maps work - they add a slight adjustment to the existing surface normal.
| |
Note, bump maps do not change the surface, they only change the normals. Displacement maps actually change the surface. The difference can be seen when an object's silhouette is viewed.
Other ways of changing the normals in Povray without image maps: bumps, wrinkles, and dents:
FInishes control how light interacts with the surface. For example, a surface might be highly reflective or have a matte finish. Povray has the following keywords to set the finish:
ambient: Ambient is used to simulate the light that is scattered around the scene that does not come directly from a light source. Ambient light is the same for every point in a scene. As a result, objects lit only with ambient light appear flat and two dimensional.
diffuse:Diffuse determines how much of the light that is seen comes directly from a light source. Highly diffuse surfaces are not shiny. Light that hits diffuse surfaces is scattered in all directions so the surface has a matte (or dull) appearance.
phong/phong_size: Shiny surfaces do not scatter the light in all directions, rather they produce sharp highlights. This is because most of the light is reflected at one angle (corresponding to the angle of incidence). Phong shading is one method for modeling highlights. The phong_size determines how sharp the highlights are. The larger the phong_size, the sharper the highlight.
specular/roughness: This is an alternative way of modeling highlights (see phong above). The smaller the roughness, the sharper the highlight. Phong is generally preferred but it is worth experimenting with both.
Examples of the above parameters:
(click for larger image)
povray code
brilliance: This is used to vary the way light falls off depending upon the angle of incidence. That is, it controls the tightness of the basic diffuse illumination on objects and slightly adjusts the appearance of surface shininess. Objects may appear more metallic by increasing their brilliance. It is best used in concert with highlighting.
reflection: Diffuse and specular model light coming directly from a light source. However, light might also come from reflection off of another object. Reflection makes it possible to see the reflection of one object in another.
(click for larger image)
povray code
Note, reflectance is only interesting if there are other objects around to reflect. The above scene looks very different if we remove the planes that are surrounding the spheres. The result is shown below:
iridescence:ridescence, or Newton's thin film interference, simulates the effect of light on surfaces with a microscopic transparent film overlay. The effect is like an oil slick on a puddle of water or the rainbow hues of a soap bubble.
[top]
[Home]