home *** CD-ROM | disk | FTP | other *** search
/ Crawly Crypt Collection 2 / crawlyvol2.bin / graphics / ftpovscn / 1 / imagetst.pov < prev    next >
Text File  |  1992-07-21  |  3KB  |  105 lines

  1. // Persistence Of Vision raytracer version 1.0 sample file.
  2. //
  3. // NOTE: Requires "TEST.GIF"
  4. //
  5. // This is a good image to practice placing an mapping image onto objects.
  6. // A specially designed image is mapped onto a unit sphere and a unit box.
  7. // Experiment with scaling, translation, map types, etc.  (But be sure that
  8. // you keep a backup so can find your way home if you get things too turned
  9. // around.  It can happen.
  10. //
  11. // If you are not using an extended mode version of POV-Ray,  you may not be
  12. // able to access enough memory to run this entire file.  In this case,
  13. // the best you can do is to comment out all but one or two of the three
  14. // imagemapped objects.
  15.  
  16. #include "colors.inc"           // Standard colors library
  17. #include "shapes.inc"           // Commonly used object shapes
  18. #include "textures.inc"         // LOTS of neat textures.  Lots of NEW textures.
  19.  
  20. #declare POVPlastic = texture {
  21.    ambient 0.3   diffuse 0.7
  22.    phong 0.5     phong_size 60                /*  Satiny sheen */
  23. }
  24.  
  25.  
  26. camera {
  27.    location <0.0  1.75  -6>
  28.    direction <0.0 0.0  1.0>
  29.    up  <0.0  1.0  0.0>
  30.    right <1.33333 0.0 0.0>
  31.    look_at <0 -0.5 0>
  32. }
  33.  
  34. object {
  35.    light_source { <100.0  200.0  -60.0>
  36.       colour White
  37.    }
  38. }
  39.  
  40. object {
  41.    light_source { <-50.0  60.0  -30.0>
  42.       colour Gray
  43.    }
  44. }
  45.  
  46. object {
  47.    light_source { <-15.0  -10.0  -30.0>
  48.       colour Gray
  49.    }
  50. }
  51.  
  52.  
  53. // Sphere on the right
  54. object {
  55.    sphere { <0  0  0>  1 }                    /* A "unit" sphere */
  56.    texture { Glossy color White }             /* Optional sub-texture */
  57.    texture {
  58.       POVPlastic
  59.       image_map { <1 -1 0>  gif "test.gif"   /* x-y oriented planar map */
  60.          once                                   /* Don't tile the image */
  61.          interpolate 4                          /* highest quality interpolation */
  62.       }
  63.       translate <-0.5 -0.5 0>                /* Center the image */
  64.       scale <2 2 2>                          /* Scale to fit diameter */
  65.    }
  66.    translate <1.2 1 0>                        /* Move imagemap with object */
  67. }
  68.  
  69. // Sphere on the left
  70. object {
  71.    sphere { <0  0  0>  1 }
  72.    texture { Glossy color White }
  73.    texture {
  74.       POVPlastic
  75.       image_map { 1  gif "test.gif"          /* Spherical map type */
  76.          /*"once" is implicit here */
  77.          interpolate 4
  78.       }
  79.       rotate <0 -90 0>                       /* put "seam" in back */
  80.       scale <2 2 2>                          /* scale to fit diameter */
  81.    }
  82.    translate <-1.2 1 0>                       /* Move image with object */
  83. }
  84.  
  85.  
  86.  
  87. // Box
  88. object {
  89.    box { UnitBox scale <2 1 2>}
  90.    texture { Metal color DimGray }
  91.  
  92.    texture {
  93.       image_map { <1 -1 0> gif "test.gif"    /* x-y oriented bitmap image */
  94.          interpolate 2                          /* Faster interpolation than 4 */
  95.          alpha 0 1.0
  96.       }
  97.       translate <-0.5 -0.5 0>                /* Center image */
  98.       scale <2 2 1>                          /* Scale to fit */
  99.       ambient 0.25
  100.       diffuse 0.75
  101.    }
  102.  
  103.    translate <0 -1 0>                         /* Move image with object */
  104. }
  105.