POV-Ray : Documentation : 1.2.1.2 Adding Standard Include Files
  POV-Ray 3.6 Documentation Online View  
1.2.1.1 Understanding POV-Ray's Coordinate System   1.2.1.3 Adding a Camera

1.2.1.2 Adding Standard Include Files

You know you have been raytracing too long when ...
... you've just seen Monsters.Inc at the movies, and you are wondering when they will release Monsters.Pov.
-- Fabien Mosen

Using our personal favorite text editor, we create a file called demo.pov. Some versions of POV-Ray come with their own built-in text editor which may be easier to use. We then type in the following text. The input is case sensitive, so we have to be sure to get capital and lowercase letters correct.

  #include "colors.inc"    // The include files contain
  #include "stones.inc"    // pre-defined scene elements

The first include statement reads in definitions for various useful colors. The second include statement reads in a collection of stone textures. POV-Ray comes with many standard include files. Others of interest are:

  #include "textures.inc"    // pre-defined scene elements
  #include "shapes.inc"
  #include "glass.inc"
  #include "metals.inc"
  #include "woods.inc"

They read pre-defined textures, shapes, glass, metal, and wood textures. It is a good idea to have a look through them to see a few of the many possible shapes and textures available.

We should only include files we really need in our scene. Some of the include files coming with POV-Ray are quite large and we should better save the parsing time and memory if we do not need them. In the following examples we will only use the colors.inc, and stones.inc include files.

We may have as many include files as needed in a scene file. Include files may themselves contain include files, but we are limited to declaring includes nested only ten levels deep.

Filenames specified in the include statements will be searched for in the current directory first. If it fails to find your .Inc files in the current directory, POV-Ray searches any "library paths" that you have specified. Library paths are options set by the +L command-line switch or Library_Path option. See the chapter "Setting POV-Ray Options" for more information on library paths.

Because it is more useful to keep include files in a separate directory, standard installations of POV-Ray place these files in the c:\povray3\include directory (replace 'c:\povray3' with the actual directory that you installed POV-Ray in). If you get an error message saying that POV-Ray cannot open "colors.inc" or other include files, make sure that you specify the library path properly.

1.2.1.1 Understanding POV-Ray's Coordinate System   1.2.1.3 Adding a Camera


Copyright 2003-2021 Persistence of Vision Raytracer Pty. Ltd.