home *** CD-ROM | disk | FTP | other *** search
/ Mega A/V / mega_av.zip / mega_av / GRAPHUTL / POVIBM.ZIP / DAT2POV.DOC next >
Text File  |  1992-07-18  |  5KB  |  157 lines

  1.                   Persistence of Vision Raytracer
  2.                             Version 1.0 
  3.                         DAT2POV Intructions
  4.                   -------------------------------
  5.  
  6. DAT2POV is a simple DKBTrace and POV-Ray V0.5 BETA to POV-Ray V1.0 
  7. scene file converter. If you've never used POV-Ray or DKBTrace before
  8. and you don't have any old style scene files you don't need to use this
  9. program.
  10.  
  11. -------------------------------------------------------------------------
  12.  
  13.  Usage is...
  14.     
  15.     DAT2POV < filename.dat > filename.pov
  16.     
  17.  For example,
  18.  
  19.     C:\POVRAY\SCENE>DAT2POV < panther.dat > panther.pov
  20.   
  21.    will read the POV-Ray V0.5 scene file panther.dat in and convert it to a
  22. new file, panther.pov in POV-Ray V1.0 format. Light sources have to be
  23. converted by hand, but the rest is done automatically. Converting light 
  24. sources is described below.
  25.  
  26. -------------------------------------------------------------------------
  27.  Conversions made by DAT2POV
  28. -------------------------------------------------------------------------
  29.  
  30. Comments in the form of { ... } are changed to /* ... */
  31.  
  32. The resulting scene file will have the all uppercase keywords converted 
  33. to lower case. For instance, MARBLE will be marble.
  34.  
  35. Instead of 
  36.   
  37.   KEYWORD 
  38.     ... 
  39.   END_KEYWORD 
  40.  
  41. the new format is 
  42.   
  43.   keyword { 
  44.     ... 
  45.   } 
  46.   For instance,
  47.   
  48.   OBJECT 
  49.     ... 
  50.   END_OBJECT 
  51.   
  52.   becomes
  53.   
  54.   object { 
  55.     ... 
  56.   } 
  57.  
  58.  
  59. Several keywords that were one are divided by an underscore.
  60.   BUMPSIZE   = bump_size
  61.   PHONGSIZE  = phong_size
  62.   IMAGEMAP   = image_map {
  63.   BUMPMAP    = bump_map {
  64.   
  65.   
  66. These conversions are also made.
  67.   VIEW_POINT = camera {  
  68.   CRed       = Red
  69.   CGreen     = Green
  70.   CBlue      = Blue  
  71.   QSphere    = Ellipsoid
  72.   Sphere     = Ellipsoid
  73.   Cone_X     = QCone_X
  74.   Cone_Y     = QCone_Y
  75.   Cone_Z     = QCone_Z
  76.   X_Disk     = Disk_X
  77.   Y_Disk     = Disk_Y
  78.   Z_Disk     = Disk_Z
  79.  
  80.   colors.dat   = colors.inc
  81.   shapes.dat   = shapes.inc
  82.   shapesq.dat  = shapes.inc
  83.   textures.dat = textures.inc
  84.   
  85.   INCLUDE = #include
  86.   DECLARE = #declare
  87.   
  88.   CHECKER_TEXTURE = tiles {
  89.     
  90. ---------------------------------------------------------------------------
  91. Light Sources
  92. ---------------------------------------------------------------------------
  93.   
  94. NOTE: Light sources are not converted by this program and must be 
  95.       converted manually. 
  96.  
  97. Old light source format was:
  98.  
  99.   OBJECT
  100.      SPHERE <0 0 0> 1 END_SPHERE
  101.      TEXTURE COLOR White AMBIENT 1 DIFFUSE 0 END_TEXTURE
  102.      TRANSLATE <1 2 3>
  103.      LIGHT_SOURCE
  104.      COLOR White
  105.   END_OBJECT
  106.  
  107. Here's how this translates to POV-Ray Beta and DKBTrace internally,
  108.  
  109.  A bright white sphere is created at 0,0,0 and translated to the point
  110.  1,2,3. Then the program is told to put an invisible point light source
  111.  at the center of the white sphere and make the sphere transparent to this
  112.  light. If the sphere were not transparent, the light from the point
  113.  light source couldn't get out of the sphere. 
  114.  COMMON MISUNDERSTANDING:
  115.    Many users thought that the sphere was a light source and that the
  116.    texture and size of the sphere had some effect on the light source.
  117.    This wasn't the case. The sphere was just a visible shell for the
  118.    light_source. The actual light source was an invisible point.
  119.    In most scenes, the sphere shell wasn't even visible and it just 
  120.    added an extra object to calculate.
  121.    Also, light sources could be added to a composite object, but not
  122.    a CSG object.
  123.    Version 1.0 changes the format for the better.
  124.    
  125.   To duplicate the light source above, you would type:
  126.  
  127.   object { 
  128.      union {
  129.        sphere { 
  130.          <1 2 3> 1 
  131.          texture { color White ambient 1 diffuse 0 }
  132.        }
  133.        light_source { <1 2 3> color White }
  134.      }
  135.     no_shadow
  136.    }
  137.  
  138.    Light_source is now a shape type of its own and can be used anyplace
  139. a regular shape type can. Keep in mind that it is not visible and textures
  140. do not affect it. The no_shadow keyword can be used on any object and
  141. makes it transparent to all light so that it doesn't cast a shadow.
  142.  
  143. The only color that affects the light is the one inside the braces
  144. after light_source. The brightness of a light is its color. White is
  145. the brightest light, grey would be a dim light and so on.
  146.  
  147. A better way to specify most lights is:
  148.   
  149.   object { 
  150.        light_source { <1 2 3> color White }
  151.    }
  152.  
  153. That's no nonsense and cuts to the heart of the matter. 
  154.  
  155. The syntax for a light_source is:
  156.        light_source { <location> color (color) }
  157.