Originally bump_size could only be used inside a bump map but it can now be used with any normal. Typically it is used to override a previously defined size. For example:
The finish {... } statement is the part of a texture which defines the various finish properties to be applied to an object. Like the pigment or normal statement you can omit the surrounding texture block to save typing. Do not forget however that there is a texture implied. For example...
The most complete form for defining a finish is as follows:
The FINISH_IDENTIFIER is optional but should proceed all other items. Any items after the FINISH_IDENTIFIER modify or override settings given in the IDENTIFIER. If no identifier is specified then the items modify the finish values in the current default texture. Note that transformations are not allowed inside a finish because finish items cover the entire surface uniformly.
Ambient light is light that is scattered everywhere in the room. It bounces all over the place and manages to light objects up a bit even where no light is directly shining. Computing real ambient light would take far too much time, so we simulate ambient light by adding a small amount of white light to each texture whether or not a light is actually shining on that texture.
This means that the portions of a shape that are completely in shadow will still have a little bit of their surface color. It's almost as if the texture glows, though the ambient light in a texture only affects the shape it is used on.
Usually a single float value is specified even though the syntax calls for a color. For example a float value of 0.3 gets promoted to the full color vector <0.3,0.3,0.3,0.3,0.3> which is acceptible because only the red, green and blue parts are used.
The default value is very little ambient light (0.1). The value can range from 0.0 to 1.0. Ambient light affects both shadowed and non-shadowed areas so if you turn up the ambient value you may want to turn down the diffuse value.
Note that this method doesn't account for the color of surrounding objects. If you walk into a room that has red walls, floor and ceiling then your white clothing will look pink from the reflected light. POV-Ray's ambient shortcut doesn't account for this. There is also no way to model specular reflected indirect illumination such as the flashlight shining in a mirror.
You may color the ambient light using one of two methods. You may specify a color rather than a float after the ambient keyword in each finish statement. For example
You may also specify the overall ambient light source used when calculating the ambient lighting of an object using the global ambient_light setting. The formula is given by
See section "Ambient Light" for details.
POV-Ray and most other ray-tracers can only simulate directly one of these three types of illumination. That is the light which comes directly from actual light sources. Light coming from other objects such as mirrors via specular reflection (shine a flashlight onto a mirror for example). And last not least light coming from other objects via diffuse reflections (look at some dark area under a desk or in a corner: even though a lamp may not directly illuminate that spot you can still see a little bit because light comes from diffuse reflection off of nearby objects).
means that 70% of the light seen comes from direct illumination from light sources. The default value is diffuse 0.6.
The grain or noise introduced by this feature is applied on a pixel-by-pixel basis. This means that it will look the same on far away objects as on close objects. The effect also looks different depending upon the resolution you are using for the rendering. For these reasons it is not a very accurate way to model the rough surface effect but some objects still look better with a little crand thrown in.
Note that this should not be used when rendering animations. This is the one of a few truly random features in POV-Ray and will produce an annoying flicker of flying pixels on any textures animated with a crand value.
Note that specular and Phong highlights are not mutually exclusive. It is possible to specify both and they will both take effect. Normally, however, you will only specify one or the other.
The Phong method measures the average of the facets facing in the mirror direction from the light sources to the viewer.
Phong's value is typically from 0.0 to 1.0, where 1.0 causes complete saturation to the light source's color at the brightest area (center) of the highlight. The default phong 0.0 gives no highlight.
The size of the highlight spot is defined by the phong_size value. The larger the phong size the tighter, or smaller, the highlight and the shinier the appearance. The smaller the phong size the looser, or larger, the highlight and the less glossy the appearance.
Typical values range from 1.0 (very dull) to 250 (highly polished) though any values may be used. Default phong size is 40 (plastic) if phong_size is not specified. For example:
If phong is not specified phong_size has no effect.
The specular value is typically from 0.0 to 1.0, where 1.0 causes complete saturation to the light source's color at the brightest area (center) of the highlight. The default specular 0.0 gives no highlight.
The size of the spot is defined by the value given for roughness . Typical values range from 1.0 (very rough - large highlight) to 0.0005 (very smooth - small highlight). The default value, if roughness is not specified, is 0.05 (plastic).
It is possible to specify wrong values for roughness that will generate an error when you try to render the file. Don't use 0 and if you get errors check to see if you are using a very, very small roughness value that may be causing the error. For example:
If specular is not specified roughness has no effect.
White light relfected specularly from a metallic surface takes the color of the surface, except then the incidence angle approaches 90 degrees, where it becomes white again.
The metallic keyword may be follow by a numeric value to specify the influence the above effect has (the default value is one). For example:
If phong or specular is not specified metallic has no effect.
This gives the object a mirrored finish. It will reflect all other elements in the scene. Usually a single float value is specified after the keyword even though the syntax calls for a color. For example a float value of 0.3 gets promoted to the full color vector \langle 0.3,0.3,0.3,0.3,0.3> which is acceptible because only the red, green and blue parts are used.
The value can range from 0.0 to 1.0. By default there is no reflection.
Adding reflection to a texture makes it take longer to render because an additional ray must be traced. The reflected light may be tinted by specifying a color rather than a float. For example
gives a real red mirror that only reflects red light.
Note that although such reflection is called specular it is not controlled by the specular keyword. That keyword controls a specular highlight .
Note that it is recommended that you only use refraction 0 or refraction 1 (or even better refraction off and refraction on ). Values in between will darken the refracted light in ways that do not correspond to any physical property. Many POV-Ray scenes were created with intermediate refraction values before this bug was discovered so the feature has been maintained. A more appropriate way to reduce the brightness of refracted light is to change the filter or transmit value in the colors specified in the pigment statement. Note also that refraction does not cause the object to be transparent. Transparency only occurs if there is a non-zero filter or transmit value in the color.
The amount of bending or refracting of light depends upon the density of the material. Air, water, crystal and diamonds all have different densities and thus refract differently. The index of refraction or ior value is used by scientists to describe the relative density of substances. The ior keyword is used in POV-Ray to specify the value. For example:
The default ior value of 1.0 will give no refraction. The index of refraction for air is 1.0, water is 1.33, glass is 1.5 and diamond is 2.4. The file consts.inc pre-defines several useful values for ior.
Note that if a texture has a filter component and no value for refraction and ior are supplied the renderer will simply transmit the ray through the surface with no bending. In layered textures, the refraction and ior keywords must be in the last texture, otherwise they will not take effect.
Section 7.6.3.3.2
Specular Highlight
Section 7.6.3.3.3
Metallic Highlight Modifier
Section 7.6.3.4
Specular Reflection
Section 7.6.3.5
Refraction
Table Of Contents