home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 1 / ARM_CLUB_CD.iso / contents / apps / paint / a / lightmagic / UserManual < prev   
Encoding:
Text File  |  1991-07-27  |  7.1 KB  |  171 lines

  1.  
  2.  
  3. Light Magic Scene Description Language Reference Section.
  4. ==========================================================
  5.  
  6.  
  7.   Version 2.0 of Light Magic has a greatly improved Scene Description Language to previous releases. Not only has the language 
  8. become more versatile and powerful by offering greater control of Light Magic but has become more logical in its layout, allowing
  9. the user greater freedom to design scenes. The language is now almost totally free-format, meaning that the order in which items
  10. appear in the text is irrelavent. There is, however, one exception to this rule - a surface has to be defined before it can be
  11. used.  
  12.   In this section each of the commands available in the scene description language will be described in turn. Some of the 
  13. commands require integer numbers, some require real numbers and others require ordinary text. In this reference section the
  14. following naming convention is followed :-
  15.         Int    -   Integer required
  16.         Real   -   Real number required
  17.         Colour -   This is equivalent to a red, green blue triple of Reals between 0 and 1. eg. 0 0.556 0.9 is a valid colour.
  18.         Point  -   This is also a triple of Reals often consisting of the x, y and z coordinates of a point eg. 12 15.3 0.001
  19.         'Text' -   A string of text is required. The single quotes are not required and are only included to seperate
  20.                    the text from the other section. Such a string can not exactly match any of the keywords.
  21.         Keywords are shown in capital letters, eg. CAMERA is a keyword.
  22.         Items enclosed in square brackets [] are optional.
  23.         Where there is a choice between one set of commands and another, the two groups are enclosed in brackets {} and
  24.         the brackets seperated by the 'C' OR symbol ||. eg {int} || {int int} 
  25.   
  26.   An example file is included at the end of this reference section to help you understand the principles described.
  27.  
  28. ============================================================================================================================
  29.  
  30. List of keywords (Note :- These words are reserved and can not be used as strings.)
  31.  
  32. AMBIENT   ANGLE   AT   ....   
  33. BACKGROUND   BEAM   BLOB   BOX   BUMP   ....   
  34. CAMERA   CHECKED   CONE   CYLINDER   ....
  35. DARK   DEFAULT   DIFFUSE   ....   
  36. EYE   ....   
  37. FALLOFF   FROM   FILETYPE   FOG   FUZZ   ....   
  38. GRIDSIZE   ....   
  39. HITHER   ....   
  40. JITTER   ....   
  41. LIGHT   ....   
  42. MARBLE   MIRROR   ....   
  43. OFF   ON   OUTFILE   ....   
  44. PBM   PHONG   POINT   POLYGON   ....   
  45. QUADRIC   ....   
  46. RAW   RECURSION   RESOLUTION   RINDEX   ROTATE   ....   
  47. SHADOWS   SPECULAR   SPHERE   SPOT   STATIC   SURFACE   ....   
  48. TEXTURE   TORUS   TRANSLATE   TRANSMIT   TRANSFORM   TRI   ....   
  49. UP   ....   
  50. VERBOSE   ....
  51.  
  52.  
  53. The commands and their structure...
  54.  
  55. CAMERA [FROM Point]
  56.        [AT   Point]
  57.        [UP   Point]
  58.        [ANGLE Real]
  59.        [HITHER Real]
  60.  
  61.   This command allows the user to set up the viewing camera that will be used to look at the scene. You may supply as many or as
  62. few of the parameters as you require, though it is recommended that you set FROM and AT to approriate values every time. FROM
  63. is the 3D coordinates of the camera actual location. AT is also a 3D point, representing the point at which the camera will be
  64. looking towards. UP tells the camera which direction should be regarded as upwards, relative to the camera. This defaults to
  65. the Z axis. ie. The Z axis will run vertically up the screen. ANGLE allows the viewing angle to be altered (default is 45 
  66. degrees), while changing HITHER alters the distance from the camera to the view plane. This defaults to 1.
  67.                     
  68.  
  69.  
  70. RESOLUTION Int Int
  71.  
  72.   This command sets the resolution of the image produced. The two integers represent the X and Y resolution of the image 
  73. respectivly. These can be any positive values, eg. 512 512. Light Magic always assumes that pixels are square. On the 
  74. Archimedes I am using now, the x resolution of the screen is twice that of the y resolution, so to produce an accurate 
  75. image I have to set the X resolution higher eg. 512 256.
  76.  
  77. BACKGROUND Colour
  78.   This command sets the colour of the areas of the picture that have no objects in them ie. the background or sky.
  79.  
  80.  
  81. GRIDSIZE Int
  82.   This allows tight control of the amount of memory Light Magic uses when rendering an image. The higher the number, the
  83. more memory Light Magic will require to run, but the faster it will be able to render complex images. It is not worth setting
  84. this to be high when the number of objects is low (less than 10). A good, all round value, is about 40-50.
  85.  
  86.  
  87. JITTER
  88.   Switches Jittered ray tracing on. Doing this will slightly improve the image quality but will result in rendering taking
  89. 9 times longer than normal! This algorithm is obviously not very efficent - I'm working on it!
  90.  
  91.  
  92. SHADOWS { ON }  ||  { OFF }
  93.   Tells Light Magic if it should bother calculating shadows while rendering the image. Swithching them off will be faster, but
  94. less realistic. Shodows become very slow when there is a great deal of glass in the scene.
  95.  
  96.  
  97. VERBOSE
  98.   Puts Light Magic into Verbose mode. It will produce more information before rendering starts and print a '+' for every
  99. line of the image that is calculated.
  100.  
  101.  
  102. RECURSION Int
  103.   Sets the maximum depth that Light Magic should continue to follow the path of rays before ignoring them as irrelavant.
  104. Each time a ray hits a mirrored object a new reflected
  105.  
  106.  
  107. DARK Real
  108.  
  109.  
  110. OUTFILE 'filename'
  111.  
  112.  
  113. FALLOFF Real
  114.  
  115.  
  116. FILETYPE { RAW }  ||  { PBM }   
  117.  
  118.  
  119. LIGHT POINT Point { Real }  ||  { Colour }
  120.  
  121.  
  122. SPHERE 'surfacename' Point Real [ TRANSLATE Point]
  123.                                 [ ROTATE    Point Real]
  124.                                 [ TRANSFORM Point Point Point]
  125.  
  126.  
  127. TRI 'surfacename' Point Point Point [ TRANSLATE Point]
  128.                                     [ ROTATE    Point Real]
  129.                                     [ TRANSFORM Point Point Point]
  130.  
  131.  
  132. BOX 'surfacename' Point Point [ TRANSLATE Point]
  133.                               [ ROTATE    Point Real]
  134.                               [ TRANSFORM Point Point Point]
  135.  
  136.  
  137. POLYGON 'surfacename' Int Point Point Point ... [ TRANSLATE Point]
  138.                                                 [ ROTATE    Point Real]
  139.                                                 [ TRANSFORM Point Point Point]
  140.  
  141.  
  142.  
  143. SURFACE 'surfacename' [ DIFFUSE  Colour]
  144.                       [ MIRROR   Colour]
  145.                       [ AMBIENT  Colour]
  146.                       [ TRANSMIT Colour]
  147.                       [ RINDEX   Real]
  148.                       [ SPECULAR Real]
  149.                       [ PHONG    Int]
  150.                       [ FUZZ     Real]
  151.  
  152.  
  153.  
  154. DEFAULT 'surfacename' [ DIFFUSE  Colour]
  155.                       [ MIRROR   Colour]
  156.                       [ AMBIENT  Colour]
  157.                       [ TRANSMIT Colour]
  158.                       [ RINDEX   Real]
  159.                       [ SPECULAR Real]
  160.                       [ PHONG    Int]
  161.                       [ FUZZ     Real]
  162.  
  163.  
  164. TEXTURE { BLOB    Real Real 'surfacename' } ||
  165.         { CHECKED Real Real Real 'surfacename' } ||
  166.         { BUMP    Real } ||
  167.         { MARBLE  Real Real Real } ||
  168.         { STATIC  Real }
  169.         [ TRANSLATE Point]
  170.         [ ROTATE    Point Real]
  171.         [ TRANSFORM Point Point Point]