Introduction to the scenery 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
 
  0. Working with POV-Ray:
      "Insert Menu Add-on".
  1. Basics
      on writing texts.
  2. 3D Coordinates,
      Floats and Vectors
  3. Scene Structur
   > #include files,
      camera, light_source.
      Types of light sources
  4. Basic Objects plane, sphere,
      box, cylinder, cone, torus.
      Other Shapes
      height_field, text, etc.
  5. Transformations
      Streching, Turning,

      Moving and others.
      CSG: union,
      difference, intersection.
  6. Color + Surfaces       texture, pigment, normal, finish
  7. #declare, #local,
      #macro .. #end,
      #include,
      re-usable objects.
  8. #while Loops
  9. 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
                                       

0. "#include"-files in the header

In these text files there are 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. If we have inserted the line:
#include "colors.inc"
we can use about 100 different English color expressions like "pigment{color YellowGreen}".
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 of these standard include files nor add something to them: If you do so, scene files of other people may fail with this changed include files!
How to make your own include files for fast access to your own objects and textures is descriped in chapter VII -> see #Include!




1. "camera" - this definies the standpoint of the viewer and where he's looking at.


camera { location<0,1,-3> // standpoint of the viewer
         look_at <0,1,0>} // where to look at
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>}
#declare Cam2 = camera { ultra_wide_angle angle 180
                         location<2,4,-2>
                         look_at <0,1,0>} //etc.,
camera{Cam1} // for fast changing of the camera
             // just exchange only the "1" by "2"! 

Attention: For easier keeping track in complex scenes
the camera for basic construction 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!


2. "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).
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!

top

© Friedrich A. Lohmüller, 2009
email email: Friedrich.Lohmueller_at_t-online.de
homepage:http://www.f-lohmueller.de