Introduction to the Scenery Description Langage of the POV-Ray Raytracer        
by Friedrich A. Lohmüller
           Cameras, Light Sources and Details in POV-Ray
Italiano Italiano
Français français
Deutsch Deutsch

- POV-Ray Tutorials
Camera + Light
in POV-Ray
  Content  -  INDEX
 Types of Light Sources:
   point light
   cylindrical spotlight,
   parallel light,
   area light, soft shadows
 Light Source Specials:
   Visible light sources
   Shadowless light sources
   Fade out
 Types of Cameras:
   Perspective camera
   Orthographic camera
   Cylindrical camera
   Spherical camera
   Fisheye camera
   Panoramic camera
   Omnimax camera
 Camera Specials:
   Aspect ratio
   Focal blur
   Perturbated camera

 Architectural Perspective
 Show and Hide:
Architectural Perspective Camera
A sheared perspective camera for avoiding converging vertical lines.
Simulating shifting of the lens upwards or downward, like with a folding camera or a camera with a perspective control lens (shift lens), as used in architectural photography.

For comparison:
The Standard Perspective Camera
The perspective camera (POV-Ray default):
#declare Camera_Location = <0.0,1.6,-5.0>;
#declare Camera_Look_At  = <0.0,4.0, 0.0>;
#declare Camera_Angle    =  45;
camera{ //perspective //(optional, it's default)
        location Camera_Location
        look_at  Camera_Look_At
        angle    Camera_Angle
        right x*image_width/image_height
      } // ------------------------------ 

The default perspective camera
Classic perspective view
with 3 vanishing points

How to avoid converging lines:
The Architectural Perspective Camera
For a sheared perspective camera:

Here we need to predeclare:
Camera_Location, Camera_Look_At, Camera_Angle

#declare Camera_Location = <0.0,1.6,-5.0>;
#declare Camera_Look_At  = <0.0,4.0, 0.0>;
#declare Camera_Angle    =  45;
Then we have to calculate some additional values and to declare the camera with these valuse as follows:
Architectural Perspective Camera
Architectural Perspective
with 2 vanishing points
#include ""
#declare Cam_V = Camera_Look_At - Camera_Location;
#declare Cam_Ho = sqrt(pow(Cam_V.x,2)+pow(Cam_V.z ,2));
#declare Cam_Y  = Camera_Look_At.y - Camera_Location.y;
camera{ angle Camera_Angle
        right x*image_width/image_height
        matrix<1,0,0, 0,1,0, 0,Cam_Y/Cam_Ho,1, 0,0,0>
      } //------------------------------------------//
Note: With this camera we will get
          this yellow warning:
// Parse warning: Camera vectors are not perpendicular. Making look_at the last statement may help.
Ignore it! - Don't worry! It still works!
Sure the up vector is not perpendicular to the direction vector, but for a perspective control lens, this ought to be like this!

Example file for POV-Ray: BusinessBuilding_000_demo3.pov,
needs the include file

Index | Lights | Light Specials | Cameras | Camera Specials | Architectural Perspective | Show+Hide


© Friedrich A. Lohmüller, 2013
email email: