Descriptions and Examples for the POV-Ray Raytracer by Friedrich A. Lohmüller
Design of Surfaces by "texture" with POV-Ray -
Deutsch Deutsch
Italiano Italiano
Français français

Home
- POV-Ray Tutorial
  Design of Surfaces
  - Colors and Textures
    Index

    texture Syntax
    - Basic Sample
    - pigment{ ... }
    - normal{ ... }
      - pigment_pattern
      - normal Samples
   > finish{ ... }
    Ready-made Textures
    - Rules
    - colors.inc
    - textures.inc
    Do-it-yourself Colors
    - color rgb< , , >
    - Transparency
    Patterns
    Patterns Lists
    Warps
    uv_mapping
    Mapping
    Superpositions

    Your own Textures
 
                                           
color rgb

  Syntax of "texture"

  "finish {.....}"    

This statement defines the surface brightness, the ambient light, the surface shining and the reflection of a texture. Refraction of light is defined by "interior {.....}".
The most important values are the following: (the values behind the statements are only a sample!)
ambient 0.10 This defines the brightness of a shape on the shadow side (Don't need to be defined - default: ambient 0.1)
This simulates the brightness which is caused by indirect illumination of an object. - a concrete calculation of all light beams which hit an object indirectly is impossible! An approximation which results in very realistic effects is tried by the so called "radiosity" technique.)

"ambient 1 diffuse 0" means that the according object is never shaded by any other object and that it is seen always in the whole brightness (i.e. good for blue skies!). diffuse 0.85 The part of the illumination which is contributed by direct light. (default: diffuse 0.6)
ambient color<0.25,0,0> This is a possibility to define the color of the ambient light. (This simulates colored indirect light)
phong 1.0 Produces highlights by phong method.
phong_size 70 The size of phong highlights
 1 = very dull; 40 = plastic; 250 = highly polished!
specular highlights similar to phong
specular highlights similar to phong
roughness highlight size with specular highlights
 0,0005 // very smooth, no highlights;
 0.05 // (default) plastic;;
 1 // very rough, large highlights.
reflection 0.15 The mirroring part of the reflected light.
metallic (without any value!) this allows with phong or specular to simulate metallic shining.
brilliance 4 Surface brightness, (default = 1) as higher this value as more metallic.
irid { 0.25 simulates iridescense = interferences at thin layers (films of oil etc.) 0.25 = part of reflected light
     thickness 0.2 // of the layer
     turbulence 0.7 }

Important: the default values are: "finish {ambient 0.1 diffuse 0.6 }". If using Intel compatible computers in this way the colors seem to be too dark. To avoid this ist highly recommended to increase these values by "finish {ambient 0.1 diffuse 0.9}".
 
texture{ pigment{color White}
         finish {ambient 0.1
                 diffuse 0.9
                 phong 1}
       } // end of texture 

But it is much better we define these values at the begin of each scene file as default:
#default{finish{ambient 0.1 diffuse 0.9}}
with ambient 0.1 diffuse 0.9
with ambient 0.1 diffuse 0.9
without ambient and diffuse
without ambient and diffuse
If we want a shape to become more sculptural but not brighter (less indirect light, harder contrasts, deeper shadows), then we should keep the sum of both ambient and diffuse constantly around 1.0. I.e. by: "finish {ambient 0.05 diffuse 0.95}" . Doing so we keep the brightness of directly illuminated parts of the shape constant! If ambient value + diffuse value + reflection value is greater than 1 the illumination seem to be unrealistic!
It is possible to get a color like "Red" = rgb< 1 , 0 ,  0 > brighter by increasing the values of "ambient" and "diffuse", but we should avoid this technique because it causes an unnatural proportion of the shadow parts to the direct illuminated parts. To produce "light red" it is better to increase the white component (= same rgb values!) of this color: i.e. by "rgb<1 ,0.5 ,0.5 >". Also we better get "dark red" i.e. by : rgb<0.5, 0,0>.
top

© Friedrich A. Lohmüller, 2012
www.f-lohmueller.de