Introduction to the Scene Description Langage of the POV-Ray Raytracer         - page 4 -
by Friedrich A. Lohmüller
Italiano Italiano
Français français
Deutsch Deutsch

Home
- POV-Ray Tutorials
 
  
POV-Ray Introduction
  Content  -  INDEX
 
  1. Working with POV-Ray:
      "Insert Menu Add-on".
  2. Basics on
      How To Make a Scene.
      3D Coordinates,
      Floats and Vectors
  3. Scene Structure
      Basic example.
>4. Scene File Header,
      #include files,
      camera, light_source.
  5. Basic Geometric Objects
      sphere, box, cylinder,
      cone, torus, plane.
      and other shapes
  6. Transformations
      Streching, Turning,
      Moving and others.
      CSG: union,
      difference, intersection.
  7. Colors on Surfaces
      texture, pigment, normal, finish
  8. #declare, #local, #macro,
      placeholders + flexible objects.
  9. #while Loops
      Basic examples.
 10. #include, include files,
      re-usable objects.
 11. Efficiency,
      speed, flexibility,
      modulare working
      adapting from 3.1 to 3.5;3.6
      adapting from 3.5;3.6 to 3.7
      POV-Ray + Windows Vista.
 
  - Insert Menu Add-on
    & Download
                                       

#include - The include files in the header.
#include "colors.inc"
#include "textures.inc"
#include "shapes.inc" 
If we have inserted this line we can use about 100 different English color expressions like 'pigment{color YellowGreen}'.
In these text files we have prefabricated definitions like color expressions (#include "colors.inc"), and some texture expressions (#include "textures.inc" or "glass.inc" etc.) and the shapes of special geometric objects (#include "shapes.inc" etc.).
Such include files you can also create by yourself (save the text files with a name ending in ".inc"). They are just simply parts of ASCII-text and will be inserted in your scene description when POV-Ray is parsing (= translating the keywords in mathematical equations) the scene file for rendering.
It's highly recommanded to advanced users to take a look in these files to see "how to do this".
But be carefully: Don't ever change anything in the 'standard include files' nor add something to them: If you do so, scene files of other people may fail with such changed files! How to make your own include files for fast access to your own objects and textures see here: #Include!


camera - The standpoint of the viewer and where he looks at.
camera { location<0,1,-3> // standpoint of the viewer
         look_at <0,1,0> // where to look at
         right x*image_width/image_height  // aspect ratio
         angle 75 // camera angle
       } 
Multible camera definitions for a comfortable fast changing of the position
we can define in the following way:
#declare Cam1 = camera { location<0,1,-3>
                         look_at <0,1,0>
                         right x*image_width/image_height
                         angle 45 }
#declare Cam2 = camera { ultra_wide_angle angle 180  
                         location<2,4,-2>
                         right x*image_width/image_height
                         look_at <0,1,0>} //etc.,
camera{Cam1} // for fast changing of the camera
             // just exchange only the "1" by "2"! 


A more detailed description of the types of cameras and further details about the camera you can find here: Cameras, Light Sources and Details
Attention: For easier keeping track in complex scenes
the camera should look from negative z direction on the center <0,0,0> of the world. Only if your looking constantly from this direction expressions like "in front of/ behind of" , "above / beneath " , and "left of/ right of" will have an unambiguous sense for the orientation in the cyberspace!


light_source - The sun and other lights.
The most important and also easiest kind of light source is a point light. For this type you have to add only the coordinates of the location and the color of the light:
light_source{ <1000,1000,-1500> color White}
Other types of lightsources are e.g. the spot light and the area light (produces soft shadows).
A more detailed description of the types of light sources and further details about the lights you can find here: Cameras, Light Sources and Details

It is possible to install in a scene nearly an infinite number of light sources, but the rendering time is proportional to the number of light sources! And ... rendering scenes over many days and nights is not a great achievement of the author of this scene!


part 0 | part 1 | part 2 | part 3 | part 4 | part 5 | part 6 | part 7 | part 8 | part 9 | part 10 | part 11

top

© Friedrich A. Lohmüller, 2014
homepage:www.f-lohmueller.de