home *** CD-ROM | disk | FTP | other *** search
/ Avalon - 3D Objects & Resources / Avalon.iso / misc / mac / pov_rayd / quickref.doc < prev    next >
Text File  |  1995-01-01  |  26KB  |  671 lines

  1.                   Persistence of Vision Raytracer
  2.                           Version 1.0 
  3.                         Quick Reference
  4.                   -------------------------------
  5.                    By Larry Tweed & Drew Wells
  6. This document is designed as a quick reference for those already familiar
  7. with the program POV-Ray. You should use POVRAY.DOC to learn about
  8. POV-Ray and then use this document as a memory jogger or for quick syntax
  9. checks. It is not meant to replace the main documents that accompany
  10. POV-Ray.
  11. NOTE: This document is not complete or perfectly accurate in all cases.
  12.       We judged it to be useful even with a few innacuracies and its state 
  13.       of completion. Hopefully, it will be useful to you. 
  14.       If you can't find something here or can't understand what is here,
  15.       refer to POVRAY.DOC.
  16. Some entries have been left blank due to time constraints. A later version
  17. of this document will contain text for these entries. For now, refer to
  18. POVRAY.DOC. The list is alphabetical, with texture modifiers at the end
  19. of the list.
  20. ---------------------------------------------------------------------------
  21.                       
  22. bezier/bicubic patches
  23. ----------------------
  24. Syntax:
  25. Description:
  26. blob
  27. ----
  28. Syntax: blob {
  29.           threshold #
  30.           component (strength_val) (radius_val) <component center>
  31.           component (strength_val) (radius_val) <component center>
  32.           [ any number of components ]
  33.           [sturm]
  34.         }   
  35. Description: A blobby shape. Components radii should overlap.
  36. bounded_by
  37. ----------
  38. Syntax: object {
  39.            ...
  40.            bounded_by {
  41.               shape {...}
  42.            }
  43.         }
  44. Description: A bounding shape helps speed rendering time in many cases. The
  45.              bounding shape is first tested by the raytracer. If the ray
  46.              does not strike the bounding shape, the raytracer does not need
  47.              to test or calculate any of the bounded objects.
  48. box
  49. ---
  50. Syntax: box { <x1 y1 z1> <x2 y2 z2> }
  51. Description: A box shape is defined by specifying 2 corners. The first corner
  52.              (<x1 y1 z1> in the example above) must be smaller than the
  53.              second corner.
  54. camera
  55. ------
  56. Syntax: camera {
  57.           location <0 0 0>
  58.           direction <0 0 1>
  59.           up <0 1 0>
  60.           right <1.33 0 0>
  61.           look_at<0 0 0>
  62.           sky <0 1 0>
  63.         }
  64. Description: The camera defines the orientation and location in space
  65.              of the viewer. The values shown above are the default values.
  66.              If these items are not specified, the defaults will be used.
  67. clipped_by
  68. ----------
  69. Syntax: object {
  70.           ...
  71.           clipped_by {
  72.              object {...}
  73.           }
  74.         }
  75. Description: clipped_by will "cut off" any part of the object that is outside
  76.              the clipping shape. This should not be confused with bounded_by.
  77. composite
  78. ---------
  79. Syntax: composite {
  80.            object1 {...}
  81.            object2 {...}
  82.         }
  83. Description: composite will "glue together" 2 or more objects. Essentially,
  84.              the objects can then be considered as single unit.
  85. difference
  86. ----------
  87. Syntax: object {
  88.           difference {
  89.              shape1 {...}
  90.              shape2 {...} // This will be "cut out" of shape1
  91.              shape3 {...} // This will be "cut out" of shape1
  92.              shape4 {...} // This will be "cut out" of shape1
  93.              (...)
  94.           }
  95.         }
  96. Description: A difference is a CSG shape. All points in shape1 that are not
  97.              in shape2 will be included in the final shape. A difference
  98.              essentially subtracts the shapes following shape1 from shape1.
  99.              Any number of shapes may be used. 
  100. direction
  101. ---------
  102. Syntax: direction <# # #>
  103. Description: The direction vector is used in the camera block and specifies
  104.              the direction the camera is pointing with a vector. Normally,
  105.              this vector points straight ahead (<0 0 1>) and look_at is 
  106.              used to point the camera. The direction vector should be used
  107.              to set the "length" of the camera lens. Small values are
  108.              similar to a wide-angle lens, large values are like a tele-photo
  109.              lens.
  110. height_field
  111. ------------
  112. Syntax: height_field { gif "file.gif" water_level # }
  113. Description: A height field is a rectangular mesh of triangles where the
  114.              height of a triangle at a certain X,Z point is controlled
  115.              by the number in a file at that same index. GIF, TGA and POT
  116.              files may be used as height fields. The water_level is
  117.              the height below which the untransformed height field is cut
  118.              off. The untransformed height field is similar in size to:
  119.                  box { <0 0 0> <1 1 1> }
  120. intersection
  121. ------------
  122. Syntax:  object {
  123.            intersection {
  124.               shape1 {...}
  125.               shape2 {...}
  126.            }
  127.          }
  128. Description: An intersection is a CSG shape composed of 2 or more shapes.
  129.              All points that are contained in all the included shapes are
  130.              included in the final shape. In essence, an intersection is
  131.              the space where all the shapes meet.
  132. inverse
  133. -------
  134. Syntax: object {
  135.           csg_shape_type {
  136.              shape1 {...}
  137.              shape2 {... inverse }
  138.           }
  139.         }
  140. Description: Inverse only has effect when using CSG. When inverse is put into
  141.              the definition of a shape, it turns the shape "inside-out".
  142.              Essentially, every point that was "inside" the shape is now
  143.              "outside" and vice versa.
  144. light_source
  145. ------------
  146. Syntax: light_source { <x y z> color red # green # blue #}
  147. Description: To shed a little light on a scene, you must provide a
  148.              light_source. The center of the light is at the vector x, y
  149.              and z. The red, green, and blue color values define the color 
  150.              of the light which is cast. The light_source itself is 
  151.              invisible. A light source is treated as a shape even though it
  152.              cannot be seen. It may be used in CSG.
  153. look_at
  154. -------
  155. Syntax: camera {
  156.           ...
  157.           look_at <x y z>
  158.         }
  159. Description: look_at defines the point in space at which the camera is
  160.              pointing, or focused on as defined by the x, y and z parameters.
  161. no_shadow
  162. ---------
  163. Syntax: object {
  164.           ...
  165.           no_shadow
  166.         }
  167. Description: no_shadow causes an object to be transparent to all light
  168.              sources. The object will not cast a shadow. This feature is
  169.              especially useful for enclosing a light source to give the
  170.              illusion that the light source is actually visible with a shape.
  171. object
  172. ------
  173. Syntax: object { 
  174.           shape_type { ... }
  175.           texture { ... }
  176.         }
  177. Description: objects are the basic building blocks. An object defines a shape
  178.              and associated textures. Objects may not be used in CSG, but
  179.              they may be used in composite objects.
  180. plane
  181. -----
  182. Syntax: plane { <x y z> d }
  183. Description: A plane is a flat surface which is infinite in all directions.
  184.              The surface normal (or orientation) of the plane is determined
  185.              by the x, y and z arguments. The d parameter specifies the
  186.              distance of the plane from the origin in the direction of the
  187.              surface normal.
  188.                 plane { <0 1 0> 0 } // XZ plane, a floor
  189.                 plane { <0 0 1> 10 }// XY plane, a wall
  190. Quadric
  191. -------
  192. Syntax:
  193. Description:
  194. Quartic
  195. -------
  196. Syntax:
  197. Description:
  198.  
  199. right
  200. -----
  201. Syntax: right <x y z>
  202. Description: Used in the camera description, it specifies which direction
  203.              in the ray tracing universe is the right hand side of the
  204.              image being generated. Usually, right <1.33 0 0>.
  205. rotate
  206. ------
  207. Syntax: object { ... rotate <x y z> }
  208.         shape  { ... rotate <x y z> }
  209.         texture{ ... rotate <x y z> }
  210. Description: rotate will move any element about the origin in x, y and z
  211.              degrees. It is important to note that if the object is not
  212.              centered at the origin, it will "orbit" the origin rather
  213.              than its current center. 
  214. scale
  215. -----
  216. Syntax: object { ... scale <x y z> }
  217.         shape  { ... scale <x y z> }
  218.         texture{ ... scale <x y z> }
  219. Description: scale will enlarge or reduce the size of any element.
  220.              If the values for x, y or z are greater than 1.0, the object
  221.              is enlarged. If the values are between 0.0 and 1.0, the object
  222.              is shrunk. Scale may also be use on textures.
  223.              NOTE: Scaling by zero will cause an error.
  224. sky
  225. ---
  226. Syntax: camera {
  227.           ...
  228.           sky <x y z>
  229.         }
  230. Description: sky describes the orientation of the sky, which is not
  231.              necessarily the same as the UP direction. If sky is defined,
  232.              it must be defined before the look_at parameter.
  233. sphere
  234. ------
  235. Syntax: sphere { <x y z> r }
  236. Description: A sphere is a perfectly round shape. Its location in space is
  237.              defined by the x, y, and z arguments. The radius is determined
  238.              by the r argument. The width of a sphere will be 2 x r. It
  239.              cannot be scaled unevenly.
  240. spotlight
  241. ---------
  242. Syntax: light_source {
  243.           <x y z> // center of light source
  244.           color red # green # blue #
  245.           spotlight
  246.           point_at <x y z>
  247.           radius #
  248.           falloff #
  249.           tightness #
  250.         }
  251. Description: A spotlight light_source emulates the behavior of a real
  252.              spotlight, projecting a cone of light. point_at specifies the
  253.              point in space that the light is aimed at. radius is the radius
  254.              in degrees of the circular "hotspot" at the center of the
  255.              spotlight's area of effect. falloff is the radius in degrees
  256.              that defines the area where the brightness falls off to zero.
  257.              Both values may range between 1 and 180. Tightness controls
  258.              how fast the brightness falls off at the edges. Low values
  259.              cause softer edges, high values create sharper edges.
  260. texture
  261. -------
  262. Syntax:  object {
  263.            ...
  264.            texture {
  265.               (texture modifiers)
  266.            }
  267.          }
  268.          shape { ... texture {...} }
  269. Description: The texture keyword begins a block which describes the appearance
  270.              of an object, but not the size. See the section on texture
  271.              modifiers for a list of available modifiers and their defaults.
  272.              A texture may be used inside a shape or object, but not
  273.              in a composite object.
  274. translate
  275. ---------
  276. Syntax: object { ... translate <x y z> }
  277.         shape  { ... translate <x y z> }
  278.         texture{ ... translate <x y z> }
  279.  
  280. Description: translate moves the element in space by the number of units
  281.              specified by the x, y and z parameters. Translate is relative
  282.              to the element's current location. If the element is at <3 4 5>
  283.              and is translated by <1 -1 1>, the element is moved to <4 3 6>.
  284.              Normally, translate is used after scale because the scale will
  285.              "scale" the translate.
  286. triangle
  287. --------
  288. Syntax: triangle { <x1 y1 z1> <x2 y2 z2> <x3 y3 z3> }
  289. Description: A triangle is specified by the coordinates of the 3 vertices.
  290.              Triangles have no inside or outside, so cannot be used correctly
  291.              in CSG shapes.
  292. union
  293. -----
  294. Syntax: object {
  295.           union {
  296.              shape1 {...}
  297.              shape2 {...}
  298.           }
  299.         }
  300. Description: Union is a CSG shape. A union essentially superimposes two or
  301.              more shapes to create a single object. All points in the shapes
  302.              included in a union are included in the final object.
  303. up
  304. --
  305. Syntax: camera {
  306.            ...
  307.            up <x y z>
  308.         }
  309. Description: The up parameter describes the surface normal of the "up"
  310.              direction. up <0 1 0>, for example would have a "up" direction
  311.              in the positive y direction.
  312.  
  313.   
  314.   
  315. --------------------------------------------------------------------------
  316.   Texture Modifiers
  317. --------------------------------------------------------------------------
  318. agate
  319. -----
  320. Syntax: agate color_map {...}
  321. Description: agate is a pattern similar to marble. It is always turbulent
  322.              and ignores the turbulence keyword. agate is used within a
  323.              texture block.
  324. alpha
  325. -----
  326. Syntax: color red # green # blue # alpha #
  327. Description: The alpha property of a color determines how transparent the
  328.              color is. Values range from 0.0 (opaque) to 1.0 (totally
  329.              transparent). Transparency is a filter. Black is always
  330.              opaque. The color red with alpha 1 will only allow red light
  331.              through, and so on.
  332. ambient
  333. -------
  334. Syntax: texture {
  335.            ...
  336.            ambient #
  337.         }
  338. Description: ambient determines the amount of light an object receives even
  339.              if it is in complete shadow. This emulates the light that is just
  340.              "bouncing around" the room. The default value for ambient is
  341.              0.1. Values range from 0.0 to 1.0.
  342. bozo
  343. ----
  344. Syntax: bozo color_map {...}
  345. Description: A splotchy color pattern. Turbulence works on it. It's often
  346.              used to create clouds.
  347.  
  348. brilliance
  349. ----------
  350. Syntax: texture {
  351.            ...
  352.            brilliance #
  353.         }
  354. Description: brilliance controls the tightness of diffuse illumination on
  355.              an object and adjusts the appearance of surface shininess. Values
  356.              from 3.0 to 10.0 can give a shiny or metallic appearance. The
  357.              default value is 1.0. There is no limit on the brilliance value.
  358. bump_map
  359. --------
  360. Syntax: bump_map { file_type "filename"  
  361.                    map_type # interpolate # bump_size # 
  362.                     (use_color) (use_index) }
  363. Ex: bump_map { gif "rough.gif" map_type 1 interpolate 2 bump_size 3 }
  364. Description: Use a graphic image to simulate bumps on a shape.
  365. bumps
  366. -----
  367. Syntax: texture {
  368.              bumps #
  369.         }
  370. Description: bumps gives the surface of an object a bumpy appearance. Values
  371.              for bumps range from 0.0 (no bumps) to 1.0 (very bumpy).
  372. checker
  373. -------
  374. Syntax: checker color red # green # blue #
  375.                 color red # green # blue #
  376. Description: the checker pattern gives an object a checkerboad appearance.
  377.              Two colors must be specified after the checker keyword. These
  378.              are the colors that will alternate in the checker pattern. The
  379.              checker option is used within the texture block and works best
  380.              on planes.
  381. color
  382. -----
  383. Syntax: color red # green # blue # alpha #
  384. Description: colors are specified using the red, green, blue and
  385.              (optionally) alpha components. The values for each component
  386.              range form 0.0 to 1.0. If a component is not specified, it is
  387.              assumed to be 0 (none of that component color).
  388.              Alpha specifies the transparency of the color.
  389. color_map
  390. ---------
  391. Syntax: color_map {
  392.           [start_value end_value color1 color2]
  393.           [start_value end_value color1 color2]
  394.           ...
  395.         }
  396. Description: A color_map provides a palette for color patterns. A point on the
  397.              surface is located and it is determined which start_value
  398.              end_value pair the points falls within. The color is then
  399.              determined by smoothly blending the colors associated with
  400.              the start_value end_value pair. Values for start_value and
  401.              end_value range from 0.0 to 1.0. 
  402. Example:
  403.      color_map {
  404.           [0   .25 color red 1 color red 1]
  405.           [.25 .5  color red 1 color green 1]
  406.           [.5 .75  color green 1 color blue 1]
  407.           [.75 .76 color Yellow color Orange]
  408.           [.76 1   color Black  color blue 1]
  409.         }        
  410. default texture
  411. ---------------
  412. Description: When a texture is first created, POV-Ray initializes it with
  413.              default values for all options. The default values are:
  414.              color red 0 green 0 blue 0 alpha 0
  415.              ambient .1
  416.              diffuse .6
  417.              phong 0
  418.              phong_size 40
  419.              specular 0
  420.              roughness .05
  421.              brilliance 1
  422.              metallic FALSE
  423.              reflection 0
  424.              refraction 0
  425.              ior 1
  426.              turbulence 0
  427.              octaves 6
  428.              texture randomness (dither) 0
  429.              phase 0
  430.              frequency 1
  431.              color map NONE
  432. #default
  433. ---------
  434. Syntax: #default { texture { (modifications to default texture) }
  435. Description: The default textures can be modified by using the #default
  436.              option. Any textures created after this option has been used
  437.              will use the new defaults as specified in #default. All other
  438.              defaults not specified will remain the unchanged.
  439. dents
  440. -----
  441. Syntax: texture {
  442.            ...
  443.            dents #
  444.         }
  445. Description: dents will give the object the appearance of being dented. Values
  446.              for dents range between 0.0 (no dents) and 1.0 (the dentiest)
  447.              that determines how dented the surface should be.
  448. diffuse
  449. -------
  450. Syntax: texture {
  451.            ...
  452.            diffuse #
  453.         }
  454. Description: The diffuse value specifies how the colors in a texture react
  455.              to light directly shining on it. Higher values make the colors
  456.              very bright, lower values make the colors more subdued. Values
  457.              for diffuse range from 0.0 to 1.0. The default value is 0.6.
  458. fog
  459. ---
  460. Syntax: fog { color red # green # blue # distance_val }
  461. Description: Simulate a uniform haze over the entire scene. Fog should be
  462. described outside of all other descriptions. Ie. don't put it inside a 
  463. texture, object, camera, or shape block.
  464. Example: fog { color red 1 green 1 blue 1 200.0 }
  465. gradient
  466. --------
  467. Syntax: gradient <axis vector> color_map {...}
  468. Description: 
  469.  
  470. granite
  471. -------
  472. Syntax: granite color_map {...}
  473. Description: This will create a granite pattern based on the supplied
  474.              color_map. granite will respond to the turbulence keyword, but
  475.              the default is no turbulence. granite is typically used with
  476.              small scaling values (2.0 to 5.0).
  477. image_map
  478. ---------
  479. Syntax: image_map { file_type "filename" alpha (index # or all) # 
  480.                     map_type # interpolate # (once) }
  481. Description: Place a graphic image on a shape as surface coloring.
  482.  
  483. interpolate
  484. -------------
  485. Syntax: image_map { gif "file.gif" interpolate # }
  486.         
  487.         interpolate 1  // Norm dist interpolation  
  488.         interpolate 2  // Bilinear interpolation (best) 
  489. Description: Smooths the jaggies on image_maps and bump_maps.
  490. ior
  491. ---
  492. Syntax: texture {
  493.           ...
  494.           refraction 1
  495.           ior #
  496.         }
  497. Description: The ior is the Index of Refraction. This value determines how
  498.              far light will bend as it passes through a texture. To be
  499.              effective, refraction should be set to 1 and the texture must
  500.              have some transparent colors that use alpha. A value of 1.0 will
  501.              not bend the light. Some typical ior values are 1.0 for air,
  502.              1.33 for water, 1.5 for glass and 2.4 for diamond.
  503. leopard
  504. -------
  505. Syntax: leopard color_map {...}
  506. Description: Uniform spotted color pattern. Turbulence works.  
  507. map_type
  508. --------
  509. Syntax: map_type #
  510. Description: Changes the mapping type used with image_map, bump_map, and
  511.              material map.
  512.              0 = Planar
  513.              1 = Spherical
  514.              2 = Cylindrical
  515.              3 = Toroidal (donut)
  516. marble
  517. ------
  518. Syntax: marble color_map {...}
  519. Description: marble creates parallel bands of colors based on the color_map.
  520.              Adding turbulence will give the appearance of true marble or
  521.              other types of stones. The default is no turbulence.
  522.  
  523. material_map
  524. ------------
  525. Syntax: material_map { file_type "filename" map_type #  [once]
  526.                        texture {...} texture {...} (...) 
  527.         }
  528. Description: Changes the texture on a surface based on the colors in the
  529.              mapped image.
  530. max_trace_level
  531. ---------------
  532. Syntax: max_trace_level #
  533. Description: This option will set the number of levels that a ray will be
  534.              traced. If a ray is reflected or refracted, it creates another
  535.              ray. This is 1 level. The default value is 5.
  536. metallic
  537. --------
  538. Syntax: texture {
  539.            ...
  540.            metallic
  541.         }
  542. Description: This keyword specifies that the color of specular and phong
  543.              highlights will be the surface color rather than the color
  544.              of the light source. This creates a metallic appearance.
  545. octaves
  546. -------
  547. Syntax: octaves #
  548. Description: Affects turbulence. Default value is 6. Values range from 1
  549.              to 16.
  550. onion
  551. -----
  552. Syntax: onion color_map {...}
  553. Description: onion creates a pattern of concentric circles based on the
  554.              supplied color_map. By default, onion has no turbulence.
  555. phong
  556. -----
  557. Syntax: texture {
  558.            ...
  559.            phong #
  560.         }
  561. Description: The phong keyword causes a bright shiny spot on the object that
  562.              is the same color as the light source. Values for phong range
  563.              from 0.0 (none) to 1.0 (very bright at the center of the
  564.              highlight). There is no phong highlighting by default.
  565. phong_size
  566. ----------
  567. Syntax: texture {
  568.            ...
  569.            phong_size #
  570.            phong #
  571.         }
  572. Description: The value for phong_size determines the size of the phong
  573.              highlight of the object. The larger the value, the smaller
  574.              (tighter) the highlight. The smaller the value, the larger
  575.              (looser) the highlight. Values range from 1.0 (very dull) to
  576.              250 (highly polished). The default phong_size is 40.
  577. reflection
  578. ----------
  579. Syntax: texture {
  580.            ...
  581.            reflection #
  582.         }
  583. Description: The value of reflection determines how much of the light coming
  584.              from an object is reflected from other objects in the scene.
  585.              Values range from 0.0 (no reflection) to 1.0 (a perfect mirror).
  586. refraction
  587. ----------
  588. Syntax: texture {
  589.            ...
  590.            refraction #
  591.         }
  592. Description: The value for refraction will affect how light passing through
  593.              transparent textures is treated. Values range from 0 to 1.
  594.              Lower values will make the transparent portions less transparent.
  595.              This value will usually be set to 1 with the transparancy
  596.              amounts controlled by alpha. By default, there is no refraction.
  597. ripples
  598. -------
  599. Syntax: texture {
  600.           ...
  601.           ripples #
  602.          }
  603. Description: Simulates ripples on a shape's surface.
  604. roughness
  605. ---------
  606. Syntax: texture {
  607.            ...
  608.            roughness #
  609.         }
  610. Description: The roughness value for a surface determines the size of the
  611.              specular highlight of that object. Typical values range from
  612.              1.0 (Very Rough, large highlight) to 0.0005 (Very Smooth,
  613.              small highlight). The default, if no roughness is specified, is
  614.              0.05.
  615. specular
  616. --------
  617. Syntax: texture {
  618.            ...
  619.            specular #
  620.         }
  621. Description: A specular highlight is similar to a phong highlight, but
  622.              provides a more credible spreading of the highlights near
  623.              the object horizons. Values for specular range from 0.0
  624.              (no highlighting) to 1.0 (bright highlighting). The size of
  625.              the highlight is determined by the roughness value.
  626. spotted
  627. -------
  628. Syntax:
  629. Description:
  630. tiles
  631. -----
  632. Syntax: texture {
  633.            tiles {
  634.               texture {...}
  635.            tile2
  636.               texture {...}
  637.            }
  638.         }
  639. Description: tiles gives an effect similar to checker, but with textures
  640.              rather than just colors. The textures for tile1 and tile2
  641.              may also be layered, but only the first layer will be seen.
  642. turbulence
  643. ----------
  644. Syntax: texture {
  645.            ...
  646.            turbulence #
  647.         }
  648. Description: turbulence will distort a pattern so that it is not so "perfect".
  649.              Typcical values for turbulence range between 0.0 and 1.0, but
  650.              any value can be used.
  651. waves
  652. -----
  653. Syntax: waves #
  654. Description: Simulates bumpy waves on a shape's surface.
  655. wood
  656. ----
  657. Syntax: wood color_map {...}
  658. Description: wood used the supplied color map to create concentric cylindrical
  659.              bands of color centered on the Z axis. Small amounts of
  660.              turbulence will make the texture look more like real wood. There
  661.              is no turbulence by default.
  662. wrinkles
  663. --------
  664. Syntax: texture {
  665.           ...
  666.           wrinkles #
  667.         }
  668. Description: wrinkles is a bump pattern that will give the appearance of a
  669.              wrinkled surface. Values for wrinkles range from 0.0 (no wrinkles
  670.              to 1.0 (very wrinkled)
  671.