POV-Ray - the Persistence of Vision Ray Tracer

POV-Ray

POV-Ray, the Persistence of Vision Ray Tracer.

POV-Ray is was a very nice way to explore ray tracing over a SDL (Scene Description Language).

These days CSS 2.1 transformations reminds me of POV-Ray, for example variables and transformations found its way into css decades later, in POV-Ray with floats.

VRML “vermal” or what later evolved into X3D (eXtensible 3D) by the web3D working group also provides a quite similiar transform translations in its SceneGraph to XML.

In Computergraphics there are 3 Types of Transformations. 3D transformations are supplemented by the missing z-component:

  • translation: T = T(tx,ty,tz)
  • scaling: Sx,Sy,Sz
  • rotation: arround φ angle “phi”

Renderings

These renderings are just for fun. High-quality renderings can be found in the Hall of Fame.

Scene Description Language

POV-Ray parses a plain ASCII text file, processes it by creating an internal model of the scene and then renders the scene.

Nothing to impress your friends with, helpful for exploring the SDL:

// PoVRay 3.7 Scene File "forms5.pov"
// author:  pce
// date:    yesterday
//--------------------------------------------------------------------------
#version 3.7;
global_settings{ assumed_gamma 1.0 }
#default{ finish{ ambient 0.1 diffuse 0.9 }} 
//--------------------------------------------------------------------------
#include "colors.inc"
#include "textures.inc"
#include "glass.inc"
#include "metals.inc"
#include "golds.inc"
#include "stones.inc"
#include "woods.inc"
#include "shapes.inc"
#include "shapes2.inc"
#include "functions.inc"
#include "math.inc"
#include "transforms.inc"
//--------------------------------------------------------------------------
// camera ------------------------------------------------------------------
// focal blur camera          

#declare Camera_0 = camera {     
  angle 75
  location  <0.0, 1.0, -3.0>
  look_at   <0.0, 1.0,  0.0>
  right     x*image_width/image_height
  aperture 0.3           // [0...N] larger is narrower depth of field (blurrier)
  blur_samples 10        // number of rays per pixel for sampling
  focal_point <0,1.5,12>    // point that is in focus <X,Y,Z>
  confidence 0.95        // [0...<1] when to move on while sampling (smaller is less accurate)
  variance 1/200         // [0...1] how precise to calculate (smaller is more accurate)
}

camera{Camera_0}

// sun ---------------------------------------------------------------------
light_source{<2900,1900,-2500> color White}
// sky ---------------------------------------------------------------------
light_source{ <1200, 100, 2800> 
              color White
              looks_like{ sphere{ <0,0,0>, 200 
                                  texture{ pigment{ color White*0.9 }
                                           normal { bumps 1.5
                                                    scale 20    }
                                           finish { ambient 0.8   
                                                    diffuse 0.2
                                                    phong 1     }
                                                  
                                         } // end of texture
                                } // end of sphere
                        } //end of looks_like
            } //end of light_source
// sky --------------------------------------------------------------------
// the dark blue
plane{ <0,1,0>,1 hollow  
       texture{ pigment { color rgb <0.20, 0.20, 1.0> }
                finish  { ambient 0.25 diffuse 0 } 
              }      
       scale 10000}

// fog ---------------------------------------------------------------------

fog{ fog_type   2
     distance   50
     color      White
     fog_offset 0.2
     fog_alt    1.5
     turbulence 0.8
   }
// ground ------------------------------------------------------------------

// sea ---------------------------------------------------------------------

plane{ <0,1,0>, 0 
       texture{ Polished_Chrome
                normal { crackle 0.15 scale <0.35,0.25,0.25> turbulence 0.5 } 
                finish { reflection 0.60}
              }
     }

//--------------------------------------------------------------------------
//---------------------------- objects in scene ----------------------------
//--------------------------------------------------------------------------
 
union{
  //  threshold 0.65
  //#for(Identifier, Start, End [, Step]) 
  #for (NrX, 0,7, 1) 
    #for (NrY, 0, 1, 1) 
      #for (NrZ, 0, 11, 1)               
      
        torus { 1.0,0.25       
          translate<  NrX*3, NrY*5, NrZ*5> 
               
          texture{ pigment{ color rgb<1,0.3,0.7> }
          normal { bumps 2.5
                 scale 10    }
          finish { ambient 0.8   
               // diffuse 0.2
                 phong 1
                 reflection { 0.3 metallic 0.5}
          }        
        } // end of texture
                
        scale <1,1,1> rotate<0,0,0> 
      } // end of torus  -------------------------------              

      #end // --------------- end z of #for loop 
    #end // --------------- end y of #for loop 
  #end // --------------- end x of #for loop 

  //rotate<0,0,0> 
  translate<-9,0,10>
} // end of union ---------------------------------------------------------

Scene File Elements

  • Global Settings
  • Camera
  • Atmospheric Effects
  • Lighting Types
  • Object
  • Texture
  • Pattern
  • Media
  • Include Files
  1. POV-Ray Keywords
  2. unofficial Mac POV-Ray
  3. POV-Ray as Blender Renderer Add-On

Tutorials

Written on May 21, 2023
[ raytracing  ]