home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / hensa / graphics / merlin / document next >
Text File  |  1999-04-27  |  54KB  |  1,032 lines

  1. Creating objects
  2.  
  3. Basics
  4.  
  5. You have three views of the scene  in which you can create objects. These are views from the front, right and top. As 
  6. a window is a 2D representation of 3D space you need a way to specify the third dimension in your construction. For 
  7. instance, from the front view right is the x axis, up is the y axis, and the z axis is into the screen. In this program the 
  8. problem of the "depth" has been solved with "creation planes". With these you have two ways of defining the depth of 
  9. an object.
  10.  
  11. Creation planes
  12. The creation plane icons are at the right end of the toolbox. They specify the position of the invisible plane in which a 
  13. new object is created. For example: if you do your construction on the front view then the z-axis will be used to 
  14. determine the depth of the object into the screen. The other two creation axes will be shown as dotted lines.
  15.  
  16. Depth equals width
  17. This is the default mode picked if you click select on the toolbox icons. This means that the width that you drag with 
  18. the mouse will equal the depth of the object.
  19.  
  20. Depth equals height
  21. This mode is chosen when clicking with adjust on the toolbox icons. This means that the height that you drag with the 
  22. mouse will equal the depth of the object.
  23.  
  24. Standard objects (Spheres, Cubes, Cylinders, Cones and super quadrics)
  25.  
  26. To create one of these objects you simply drag a bounding box to the required size in one of the front, right or top 
  27. windows.
  28.  
  29. Cylinders & Cones
  30. When creating cylinders or cones you can alter the upper radius of the cylinder in the parabox, if it is open.
  31.  
  32. Super quadrics
  33. Super quadrics are a mixture of cubes and octahedrons. In the parabox you can specify how close they are to one of 
  34. these objects. A value of 1 will be a octahedron. A value of 2 will be a sphere and above 2 it will get closer to a 
  35. cube.Anywhere between 1 and 2 and the object will look like a box with smoothed edges.
  36.  
  37. Planes
  38.  
  39. Planes are created immediately with the first mouse click on the window. They are created horizontally.
  40.  
  41. Lights
  42.  
  43. Spot lights
  44. A spot light is a point light source. The light produces shadows with sharp edges. Spot lights are created with a simple 
  45. click on the window.
  46.  
  47. Extended lights
  48. Extended light can be described as a sphere that emits light - these are much more similar to light bulbs than spot 
  49. lights. They produce shadows with "fuzzy" edges (penumbrae). The images produced using extended light sources 
  50. are usually superior to those produced with point lights, but ray-tracing time is increased substantially. [Anti-aliasing 
  51. must be used to produce error-free pictures  Rather than tracing one shadow ray to a light source, multiple rays are 
  52. traced to various points on the extended source. The extended source is approximated by sampling a square grid 
  53. light sources.] To create an extended light you must drag it's radius on the window.
  54.  
  55. Directional lights
  56. A directional light is similar to sun light. The light comes from the same direction everywhere in the scene. The actual 
  57. position of the light is unimportant and is shown in the editor only for display reasons. To create a directional light you 
  58. must drag it's lighting direction on the window.
  59.  
  60. Miscellaneous objects
  61.  
  62. These are various stars, tetrahedrons, octahedrons, icosahedrons and dedocahedrons. If you click on the icon with 
  63. the question mark a menu will appear from which you can choose which object to create. Some of the objects can be 
  64. customised when you click the menu button over the misc object icon. The objects are created with a simple click on 
  65. the window.
  66.  
  67. Polygons
  68.  
  69. To create polygons you must first select the polygon icon on the toolbox. If instead of the select mouse button you 
  70. click with adjust you will create simple lines. You can change the mode during a creation process. You position the 
  71. corners of the polygon by clicking in the view window a number of times.
  72.  
  73. Select click
  74. When clicking with the select button you create a point of the polygon.
  75.  
  76. Adjust click
  77. When clicking with the adjust button you will delete the last point created.
  78.  
  79. Double click select
  80. With a double click of the select mouse button the polygon will be finished.
  81.  
  82. The Parabox
  83.  
  84. The parabox has two purposes creation of objects by typing in their dimensions or limiting the dimensions of new 
  85. objects by fixing certain values.:
  86.  
  87. Creation of objects
  88. You can type in the desired values into the writable icons and when you press return in the last icon of the parabox 
  89. the new object is created. If the parabox isn't already displayed then you have to switch it on with "Ctrl P" or selecting 
  90. the icon on the toolbox. 
  91.  
  92. Fixing certain values
  93. When you are creating objects with the mouse, you can fix some dimensions to the displayed values in the parabox. 
  94. You should type the desired value into the appropriate box and click on the button beside it so that it turns from green 
  95. to red. This value will not be changed while dragging the mouse creating a new object.
  96.  
  97.  
  98.  
  99. Translating points
  100.  
  101. When clicking on thetranslate points  icon on the toolbox, you are able to move single or groups of points which are 
  102. part of polygons.
  103.  
  104. Select click
  105. This selects the nearest point found under the mouse pointer. It automaticallydeselects  all other points.
  106.  
  107. Adjust click
  108. The nearest point found under the mouse pointer is added to the selection. If you click on a point that is already 
  109. selected, then it is deselected.
  110.  
  111. Adjust drag
  112. This moves all selected points to the new position. You don't need to start the drag over an object that is selected.
  113.  
  114. Selection tool
  115.  
  116. Select click
  117. This selects the first object found under the mouse pointer. It automatically deselects  all other objects.
  118.  
  119. Select double click
  120. This selects the next object which is found under the mouse pointer. It automatically deselects all other objects.
  121.  
  122. Select drag
  123. This selects all object which touch the rectangle you have dragged. It automatically deselects all other objects.
  124.  
  125. Adjust click
  126. The first object found under the mouse pointer is added to the selection. If you click on an object that is already 
  127. selected, then it is deselected.
  128.  
  129. Adjust double click
  130. The next object in relation to the current selected one found under the mouse pointer in relation to the current 
  131. selected one is added to the selection. 
  132.  
  133. Adjust drag
  134. This moves all selected objects to the new position. You don't need to start the drag over an object that is selected.
  135.  
  136. Zoom tool
  137.  
  138.  
  139.  
  140. Select click
  141. If you click with select on the zoom tool on the tool box, the zoom window is opened. There are some preset zoom 
  142. values which scale the view by the given amount. The button "Show all" will calculate a zoom value which will allow 
  143. you to see all objects currently in the scene - without changing the window size. It will also set automatically the scroll 
  144. bars to center the image in the window.
  145. If you click with select on the buttons then the zoom factor is altered first and you must click on the "OK" button to 
  146. activate the new zoom value. If you click with adjust then the new value is activated immediately.
  147.  
  148. Adjust click
  149. If you click with adjust, then nothing immediately happens, but you can then drag a rectangle on the view window to 
  150. select an area of screen which you want to zoom into.
  151.  
  152. Multicopy tool
  153.  
  154. With the multicopy tool you are able to copy objects in the several ways. You should select all objects you want to 
  155. copy with the selection tool and then click on the multicopy icon. A window pops up allowing you to pick between the 
  156. following methods:
  157.  
  158.  
  159. Linear copy
  160.  
  161. This is the simplest choice of the multicopy tool. It simply adds a given value to the position of the object. You have to 
  162. specify how many times this is done and to which axis the value is added.
  163.  
  164. Trapezoid copy
  165.  
  166. With this option you can copy all selected objects into a rectangle or trapezoid shape. You must specify the width and 
  167. the length of the rectangle and if you want to have a trapezoid shape you must change the angle from 90°. 
  168. Furthermore you must give the number of intermediates between the edges of the rectangle. "0" means that only at 
  169. the edges are objects copied to. The objects are always copied into the plane depending on which view window is 
  170. active.
  171.  
  172. Circular copy
  173.  
  174. This option copies the selected objects into a circle of the specified radius. This copy also depends on the window last 
  175. opened, so you will always see the circle from the front. You must specify the angle which is added by each copy to 
  176. the position of the objects according to the center of the circle. You can give also an offset in the three axes which is 
  177. added each time the selection is copied. You can also choose whether the objects are to be rotated according to their 
  178. position in the circle or if their orientation stays as in the original position.
  179.  
  180.  
  181. Globular copy
  182.  
  183. This option copies the objects into a sphere shape. You give the radius of the sphere and the angle between the 
  184. objects. You can also choose whether the objects are rotated according to their position in the sphere or if their 
  185. orientation stays as in the original position. The globular copy is independent of which view window is active.
  186.  
  187. List tool
  188.  
  189. The list window shows you all the objects in the scene. Lights are printed in yellow, groups in dark green and all other 
  190. objects in black. On the right of the object's name its attributes are shown. These are "H" for hidden, "D" for double 
  191. sided, "P" for phong shaded. The three numbers that follow are the middle of the object. 
  192. You can open a group by double clicking on the group's line. The first icon shows the group path and the objects in 
  193. the group are shown in the list field. If you want to close the group you must click on the group path.
  194. You can also select objects in the list window by clicking on their row with adjust. So you can select also objects which 
  195. are part of a group to alter its surface.
  196.  
  197.  
  198. Measure tool
  199.  
  200. The measure tool measures distances in the view window. This is helpful when you need to set some parameters eg. 
  201. in the multicopy window. To do this you first select a writable icon where you need the value. This is simply be done 
  202. by clicking with the mouse into it, so that the caret is shown in the icon. Then use the key shortcut "Ctrl -" to activate 
  203. the measure tool. Drag now the distance on the window, which you want to know. After finishing the drag the value is 
  204. written into the icon you have selected.
  205.  
  206. Mirror tool
  207.  
  208. With the mirror tool you can reflect an object in a plane. Before you can use this tool you must select all objects which 
  209. you want to reflect. When you click on the mirror icon on the toolbox, a window appears. You have to decide what the 
  210. plane of reflection is and at what distance the reflection is done to the outmost point of the selection.
  211.  
  212. Sweep tool
  213.  
  214. The sweep tool takes a polygon and rotates it through 360° creating an object which looks like it has been lathed. This 
  215. is the same as a mathematical volume of revolution. Sweep objects are no more than a number of cones end to end. 
  216. As an alternative to cones you can approximate the lathed object with a large number of triangles - however this uses 
  217. alot more memory and the objects generated aren't as smooth.
  218.  
  219.  
  220.  
  221. Connect tool
  222. The connect tool takes two polygons and joins them with a ribbon of triangles. Select the two polygons using any of 
  223. the methods mentioned and click on the connect tool icon. The connect tool can be called automatically during 
  224. drawfile import in order to create a shaped tube of triangles.
  225.  
  226.  
  227. Thickening tool
  228.  
  229. The thickening tool turns a flat polygon into a three dimensional object by adding sides and a back to the shape. 
  230. Select the polygon to thicken and then click on the thickening tool icon. An option window is displayed in which you 
  231. can enter the thickness of the new group object.
  232.  
  233.  
  234. View types
  235.  
  236. You have three different editing view windows: front, right, top and 3D view. You change views by clicking on the 
  237. correct button on the tool box. Usually only one view is displayed at one time, but you can have more than one view 
  238. on screen if you click with adjust on the view icons. If you hold down the shift key while clicking on the view icons, you 
  239. will look on the scene from the opposite site.
  240.  
  241. Objects can only be created in the plane views like front, right and top and not the 3D view.
  242.  
  243. When you do a drag on the 3D view you can change the angle and the distance of the observers view. Use a select 
  244. drag to change the angle and an adjust drag up or downwards to change the distance.
  245.  
  246. 3D View
  247.  
  248. In the 3D view window you can change the view position by dragging on that window. With a select drag you can 
  249. rotate the scene and with a adjust drag you can alter the distance to the view point. Dragging downwards will move 
  250. nearer to the center and dragging upwards will move away.
  251.  
  252. Display modes
  253.  
  254. Line mode (F9)
  255. In the line display mode you can see through all objets. Only the outlines of the polygons are displayed.
  256.  
  257. Hidden line mode (F10)
  258. In the hidden line display mode the polygons behind a polygon are hidden. This gives already a good 3D feeling of the 
  259. scene. In addition to this polygons which are far behind are shaded to visualise the distance between them.
  260.  
  261. Gouraud display mode (F11)
  262. In this display mode all polygons and lines are displayed with an approximated colour. For this the specular and the 
  263. ambient colour are taken into account. A minimum of one light must be set before this mode can be used (else 
  264. everything would appear totally black). Shadows are not calculated, so all objects appear as if they are in full light - 
  265. whether or not they are shadowed.
  266.  
  267. Camera setting
  268.  
  269. If you click on the camera in the toolbox, you can set the camera (or view point) position and angle. The position of 
  270. the camera will be shown in the open window together with its position. The field of view is also shown with a triangle, 
  271. starting at the camera's lens. You can simply change the camera's position by dragging with the select button on view 
  272. window. The view angle of the camera can be changed by dragging with adjust.
  273. After a change the camera will be automatically recentered in the view window and the objects will be redisplayed 
  274. according to the new position of the camera.
  275. A preview of the actual picture which is taken by the camera can be seen in the 3D view window.
  276.  
  277. Material editor
  278.  
  279. To get a photorealistic image out of a 3D scene you must choose appropriate surfaces to represent the desired 
  280. materials. You must be very careful in choosing the colours, transparency, reflection and other values. All these can 
  281. change the resulting image significantly. You can have the most wonderful 3D data, but if you choose poor surface 
  282. attributes you will get a dull and uninteresting picture. 
  283.  
  284. To define the surface of each object you must use the material editor and what stands behind it.
  285.  
  286. Material handling
  287.  
  288. There is a list of materials used in a scene. When you create an object a standard material, with the internal index of 
  289. zero, is automatically applied to that object. This will always be the first material in the list. Different objects can share 
  290. one material. If you want to change an object's material and it is shared by several other objects you must decide if 
  291. want to change the surface of all objects which use that material or if you want to create a new material just for the 
  292. selected object. If you chose "new" then only the selected objects will have the new material. Otherwise all objects 
  293. which shared that material will have the changed material attributes. If you have selected an object that has a shared 
  294. material then the button "New" is shown on the material organiser window. Otherwise it will be faded.
  295.  
  296. Material editor main window
  297.  
  298. Several materials are predefined for your convenience. You are not limited to these surfaces but you may wish to use 
  299. them whilst learning how to use the editor.
  300.  
  301.  
  302. Choose predefined material
  303.  
  304. To choose a material you can use the arrow buttons or click on the pop-up menu button. This will let you select from 
  305. all the predefined materials.
  306.  
  307. Change predefined material
  308.  
  309. If you want to change a predefined material or simply want to create your own then click on the sample picture of the 
  310. current material. This will open the material window. See "Change material".
  311.  
  312. Add a material
  313.  
  314. If you have created a material definition which you would like in the predefined list, you must choose "add" in the 
  315. material editor menu. A window opens up in which you can type the name of the new material. Furthermore you must 
  316. choose a subdirectory  to put it in. You will find a list of the current ones when clicking on the list icon besides the 
  317. directory icon. If you want to add a new subdirectory you must type the name into the writable icon and click on the 
  318. add button. For the correct picture to be displayed for the new material in the same way as the predefined material 
  319. you must trace it first. You trace the new material by selecting "Trace" in the menu and then !Merlin produces the 
  320. picture. You must then copy the picture into the appropriate directory in !MerlinDat.Textures . The sprite must have the 
  321. same name as it's name in the definition. The sprite must have 200 by 200 pixels and a maximum of 256 colours.
  322.  
  323. Delete material
  324.  
  325. To delete a material from the list of predefined materials you must choose "delete" on the material editor menu. You 
  326. then pick the material from a menu with the material directories. If you delete a material which is the last in the 
  327. directory the directory will be removed too.
  328.  
  329. Trace material
  330.  
  331. If you have changed the parameters of a material and you want to see how it looks you can choose "trace" in the 
  332. material editor menu. This will trace the current material on a sphere on a plane. Here you should take into account 
  333. that the appearance of a surface may change significantly according to its environment. Due to this the background 
  334. colour of the sample trace is taken from the actual environment setting.
  335.  
  336. In the first window of the material editor you can choose one of the predefined materials. You can add or delete a 
  337. material to or from the list. You can also trace an edited material to see how the changes look.
  338.  
  339.  
  340. Change Material
  341.  
  342. To get to this window you must click on the material sample picture. The material window shows you the current 
  343. material setting. On the top you will find the values for reflection and transparency and also the colour setting. Below 
  344. that you will see if any texture is applied to the surface. There can be a maximum of two textures for one surface, 
  345. whereby the second will be always dominant.
  346. If you want to change the values you must click on the pictures what will lead you into the next window.
  347.  
  348.  
  349.  
  350. Change Surface
  351.  
  352. In this window you can choose the main surface attributes.
  353.  
  354.  
  355. Transparency
  356.  
  357. The value given here will determine how much of a ray goes through the object. A value of 0% will be a surface that 
  358. isn't transparent at all. Whereas a value of 100% will be a surface that is totally transparent. A value of 100% should 
  359. only be taken if a texture is applied to the surface.
  360.  
  361.  
  362. Index of refraction
  363.  
  364. If a light ray hits a transparent object it will be refracted. That means its direction will be changed giving an optical 
  365. illusion. The light ray stays going in the same direction if it hits the surface perpendicular. The higher the density the 
  366. higher the refraction will be. A value higher than 1 will be an object with higher density and a value lower than 1 will be 
  367. an object with lower density. A value of one will mean that the ray is not refracted when going through the object.
  368.  
  369.  
  370. Reflection
  371.  
  372. This value will set the percentage of a ray that is reflected on the surface. O% gives totally matt objects and 100% 
  373. gives totally shiny objects.
  374.  
  375.  
  376. Diffuse colour
  377.  
  378. The diffuse colour is the main colour of the surface. To determine the colour of each pixel on screen the raytracer 
  379. program mainly uses the colour of the object, the brightness of the light, and the angle the light hits the surface. [It 
  380. finds the angle by using the dot product of the incoming ray and the surface normal at the point of intersection.]
  381.  
  382. Specular colour
  383.  
  384. This colour simulates specular reflections of light sources on the surface of the object. These are the shiny circles of 
  385. light seen in the reflections picture above.
  386.  
  387. Specular coefficient
  388.  
  389. The specular coefficient, a floating-point number, controls the appearance of the specular colour.  The larger coef is, 
  390. the smaller highlights will be. A value of 50 or so is suitable for highly polished surfaces, whereas a cloth or paper-like 
  391. material would have a coef of  0 to 2. A value of zero will turn off the specular colour. [It indicates the power to which 
  392. the dot product of the surface's normal vector at the point of intersection and the vector to each light source should be 
  393. raised. This number is then used to scale the specular colour of the surface, which is then added to the colour of the 
  394. ray striking the surface.] 
  395.  
  396.  
  397. Ambient colour
  398.  
  399. This colour simulates background lighting. This colour is always applied to a ray striking the surface. If you have a 
  400. scene with only one light source and there is a shadow the shadow will be black. But if you set the ambient colour to 
  401. something else than black then the shadow will become that colour.
  402.  
  403. Translucent & Specular transmission coefficients
  404.  
  405. The optional parameters translucent and specular transmission coefficients may be used to give a surface a 
  406. translucent appearance. If translucent is non-zero and a light source illuminates the side of the surface opposite that 
  407. being rendered, diffuse lighting calculations are performed with respect to the side of the surface facing the light, and 
  408. the result is scaled by translucent and added to the colour of the incident ray. Thus, translucent accounts for diffuse 
  409. transmission of light through the object. Specular transmission coefficient is similar to specular coefficient, but it 
  410. applies to the specular transmission of highlights.  Note that in both cases the index of refraction of the surface is 
  411. ignored. By default, surfaces have zero translucency. Note that if these optional parameters are used, then they must 
  412. both be present.
  413.  
  414. Change Texture
  415.  
  416. Textures in raytracers are modifications to the appearance of an object so that it looks like it has a particular texture. 
  417. They do not actually change the physical location of a surface - so for instance a bump texture makes a surface 
  418. appear with bumps but there are no real bumps on the surface.
  419.  
  420. To add a texture to the surface you need to activate the texture in the material window. Then click on the sample 
  421. picture to open the texture window. Here you can choose between various texture types, parameters and eventually 
  422. also colour maps. Each texture can also be scaled, rotated and translated. Scaling of textures is very useful as you 
  423. can achieve different effects with the same texture. Rotation and translation is mainly useful with the textures checker, 
  424. tile and bitmap. 
  425.  
  426.  
  427. Blotch
  428.  
  429. ... produces an interesting blotchy-looking surface in which the main colour is mixed with a new colour.  A value of 0 
  430. results in a roughly 50-50 mix of the two surfaces. Higher values result in greater instances of the 'default' surface 
  431. type. [The blend factor is used to control the interpolation between a point's default surface characteristics and the 
  432. characteristics of the blotch surface.]
  433.  
  434.  
  435. Bump
  436.  
  437. ... applies a random bump map to the surface being textured. [The point of intersection is passed to DNoise(). The 
  438. returned normalized vector, weighted by scale is added to the normal vector at the point of intersection.]
  439.  
  440.  
  441. Checker
  442.  
  443. ... applies a (3D) checkerboard texture to the object being textured. Every point that falls within an "even" cube will be 
  444. shaded using the characteristics of the named surface. Every point that falls within an "odd" cube will retain its usual 
  445. surface characteristics.  Be warned that strange effects due to roundoff error are possible when the planar surface of 
  446. an object lies in a plane of constant integral values in texture space. Anti-aliasing is recommended with this texture 
  447. type.
  448.  
  449. Crack
  450.  
  451. ... puts cracks into the surface - a value of 0 applies no texture, 0.1 gives a good crack appearance through to about 
  452. 1.2 which totally covers the object with surface surf_name
  453.  
  454.  
  455. FBM
  456.  
  457. ... generates a sample of discretized fractional Brownian motion (fBm) and uses it to modify the diffuse component of 
  458. an object's colour. If no colourmap is used, the sample is used to scale the object's diffuse colour. If a colourmap is 
  459. given, a 256-entry colourmap is read from the named file, and the object is coloured using the values in this 
  460. colourmap (see below).
  461. Scale is used to scale the output of the fractional Brownian motion function.
  462. Offset allows one to control the minimum value of the fBm function.
  463. H is related to the holder constant used in the fBm (a value of 0.5 works well).
  464. Lambda is used to control the lacunarity, or spacing between successive frequencies, in the fBm (a value of 2.0 will 
  465. suffice).
  466. Octaves specifies the number of octaves of Noise() to use in simulating the fBm (5 to 7 works well).
  467. Thresh is used to specify a lower bound on the output of fBm function. Any value lower than thresh is set to zero.
  468.  
  469.  
  470.  
  471.  
  472.  
  473.  
  474.  
  475.  
  476. FBMBump
  477.  
  478. ... is similar to the fBm texture. Rather than modifying the colour of a surface, fBmBump acts as a bump map.
  479.  
  480.  
  481.  
  482. Marble
  483.  
  484. ... gives a surface a marble-like appearance. If a colourmap is used, the marble will be coloured using the RGB values 
  485. in the colourmap. If no colourmap is given, the diffuse component of the object's surface is simply scaled. One may 
  486. transform the texture to control the density of the marble veins.
  487.  
  488. Mottle
  489.  
  490. When scaled small this texture applies a mottled texture to the object. When scale larger a blotchy agate type surface 
  491. will result.
  492.  
  493. Rough
  494.  
  495. A value of 1 makes the surface glossy and 0 makes the surface very rough.
  496.  
  497.  
  498. Sky
  499.  
  500. Similar to fbm, but rather than modulating the colour of the surface it modulates the transparency. assume the fbm 
  501. function returns a value between 0 and 1. Cthresh is the value above which the surface becomes totally opaque. 
  502. Lthresh is the value below which the surface becomes totally transparent. Note that for this to work, the ray maxdepth 
  503. must be greater than one, and the surface to be modulated must have a valid refractive index - normally 1.
  504.  
  505.  
  506.  
  507.  
  508.  
  509. Spot
  510.  
  511. Applies a spotty texture to the surface. a small value of n (0.1) applies small spots of the texture surface. Larger 
  512. values will make the spots merge until only spots of the original surface remain.
  513.  
  514. Tile
  515.  
  516. The tile texture works similar as the checker texture. But the tile texture inserts separate squares to the surface. This 
  517. works as follows: There are two parts: the original surface and the surface of the tile. The length of the original is 
  518. always 1. In addition to that there is the tile surface which length you specify with the index value. So if you set it to 1 
  519. it has the same length as the original part.
  520.  
  521.  
  522.  
  523. Wood
  524.  
  525. This texture gives a wood-like appearance to a surface. An example of this texture is given in the scene 'varnshteak'.
  526.  
  527. Bitmap
  528.  
  529. With bitmap texture you can project a sprite onto a surface. This works like a film projector. You will need to change 
  530. the angle of the projection to get the desired effect. The image is an acorn format sprite and needs the palette to be 
  531. present. In the case of a 256 colour image the palette is not needed, as the default colours are used. The image is 
  532. mapped 'through' the object so if viewed from behind a mirror image will be seen. The image is taken to be of unit size 
  533. in the x-z plane. Transformations ( in particular scale and rotate ) will normally be necessary to texture the object as 
  534. required. 
  535.  
  536. Environment setting
  537.  
  538. In this window you can set all environmental effects of the scene.
  539.  
  540. Background colour
  541.  
  542. This will set the colour which will be given to any ray which does not hit any object. This is not the same as a 
  543. background light. So if you set the background colour to white you still need a separate light object.
  544.  
  545. Aperture radius
  546.  
  547. ...  is the radius, in world units, of the camera hole centered at the eye point. Together with the focal distance this 
  548. controls the depth of field, and thus how out of focus the image will be. Rays are cast from various places on the 
  549. aperture disk towards a point which is focal distance units away from the center of the aperture disk. This causes 
  550. objects which are focal distance units from the eye point to be in sharp focus. Note that an aperture radius of zero 
  551. causes a pinhole camera model to be used, and there will be no blurring (this is the default).  Increasing the aperture 
  552. radius leads to increased blurring.  When using a non-zero aperture radius, it is best to use jittered sampling in order 
  553. to reduce aliasing effects.
  554.  
  555. Focal distance
  556.  
  557. ... specifies the distance, in world units, from the eye point to the focal plane. Points which lie in this plane will always 
  558. be in sharp focus. By keeping the aperture radius constant and changing focal distance, it is possible to create a 
  559. sequence of frames which simulate pulling focus. By default, focal distance is equal to the distance from the eye point 
  560. to the look point.
  561.  
  562. Field of View
  563.  
  564. The horizontal field of view specifies the angle, in degrees, between the left-most and right-most columns of pixels in 
  565. the final image. The vertical field of view specifies the angle between the center of the top-most and bottom-most row 
  566. of pixels. The relation of the horizontal to the vertical field of view should always correspond to the tracing resolution 
  567. (eg. 800 by 600 equals ratio 1.333 so a horizontal field of view of 60° requires a vertical field of view of 60° / 1.333 = 
  568. 45°). 
  569.  
  570. Line thickness
  571.  
  572. The line thickness set the default line thickness. These thickened lines are represented in the trace output as 
  573. cylinders with the specified radius. The line thickness specified in the environment window will also be used for the 
  574. conversion of polygons to lines.
  575.  
  576. Fog
  577.  
  578. Here you can put a fog effect into scene. You must choose a colour  for the fog (usually white)and the thickness of the 
  579. fog.
  580.  
  581. Fog is simulated by blending the colour of the fog with the colour of each light ray.  The higher the value the thinner 
  582. the fog will be. Values between 10 (thick fog) and 1000 (thin fog) work well. [The amount of fog colour added to each 
  583. ray is an exponential function of the distance from the ray origin to the point of intersection. If the distance divided by 
  584. thickness is equal to 1, a ray's new colour will be half of the fog colour plus half its original colour.]
  585.  
  586. Setting attributes
  587.  
  588. Phong shaded
  589.  
  590. This switches the objects shading from flat shading to phong shading in the tracer. This will remove any hard edges 
  591. form the object as all edges will be smoothed. This works only for groups of polygons. In the editor these objects will 
  592. be displayed with gouraud shading, which will give a slightly different appearance compared with the traced image.
  593. You can use key shortcut CTRL J to switch it on and CTRL Y to switch it off.
  594.  
  595. Double sided
  596.  
  597. This will enable you to see polygons from both sides. Normally the polygons can be seen only from the side from 
  598. which the points of the polygon appear in clockwise order. This option will not affect the tracing output.
  599. You can use key shortcut CTRL Q to switch it on and CTRL O to switch it off.
  600.  
  601. Hidden
  602.  
  603. This option will hide any object selected. The use of this is mainly to speed up redraw time if you already  have a big 
  604. scene but don't need to display all objects for construction work.
  605. You can use key shortcut CTRL H to switch it on and CTRL G to switch it off.
  606.  
  607.  
  608. Configure Merlin editor
  609.  
  610.  
  611. Colours
  612. Here you can set the colours for the background, lines, selected objects, axis and grid. Click on the surface where the 
  613. colour is displayed and a colour picker will appear.
  614.  
  615. Display
  616. Here you can choose if the toolbox and the parabox is displayed at standard. For the parabox you can even decide if 
  617. it is displayed at the lower right, the upper right, the upper left or the lower left of the window.
  618.  
  619. Draw file import
  620. Drawfiles can contain continuous Bezier curves. The editor cannot handle these directly - but has to approximate the 
  621. curves to a number of straight lines. By default each bezier curve is split up into 8 straight lines, but when you have a 
  622. few large complex curves you may wish to raise this value. When you have many small curves fewer lines may be 
  623. needed. Remember however that the higher the number of points in your polygons the more memory required.
  624.  
  625. Auto save
  626. If you want you files to be saved automatically then you must change this value to something other than zero. The 
  627. value gives the time between automatic saves in minutes. The file is saved as "Autosave" in the !MerlinDat directory 
  628. and not using the filename you might have loaded.
  629.  
  630. Special menu
  631.  
  632. Poly to Line
  633.  
  634. Here you can transform an object made of solid surfaces into a line object. Only the borders of the polygons will be 
  635. displayed and the line thickness will be taken from the current setting in the environment window. Even spheres, 
  636. cylinders and other objects can be transformed. This operation cannot be reversed.
  637.  
  638. Turn polygon
  639.  
  640. In the editor a polygon can only be seen, when it's points are in clockwise orientation according to the viewer. This 
  641. needs to be true for the tracer to render the polygons correctly, otherwise only the ambient colour will be shown. If you 
  642. have problems with polygons not appearing correctly you can change its orientation so that it will be flipped over and 
  643. seen from the opposite site.
  644.  
  645. Connect points
  646.  
  647. This function enables you to connect points from different polygons together. You must select the points you wish to 
  648. join. The first selected point stays where it is and the others are moved to that location. You can select as many points 
  649. as you want at one time. After the points are joined then they stay together when moved around.
  650.  
  651. Set axis
  652.  
  653. This function will set the creation axis to the position of the first selected point. This should be done when you want to 
  654. create a polygon which will be connected with the connect point function or should use points of other polygons.
  655.  
  656. Configure Merlin tracer
  657.  
  658. In the iconbar menu you will find the entry "configuration". Here you can set the different trace types (Preview 1, 
  659. Preview 2, Trace 1, Trace 2) which are used by the editor. You switch from one to the other by clicking on the icon 
  660. after "Tracetype". When clicking on the "save" button the current displayed trace type will be saved.
  661.  
  662. Image size
  663.  
  664. With the image size you define the resolution in which the picture will be traced. You can choose one of the presets or 
  665. set a user defined resolution. The ratio between the x / y resolution must correspond with the ratio of the field of view, 
  666. otherwise the picture is stretched. Remember that the trace time rises by the factor four when the resolution doubles 
  667. (eg. from 160 x 120 to 320 x 240).
  668.  
  669. Trace Type
  670.  
  671. Here you can choose between scanline and multipass mode. In the scanline mode each line of the picture is 
  672. calculated sequentially.  Multipass is probably best for previewing a picture and Scanline best for the finished scene. 
  673. In the multipass mode the picture is calculated out of a grid, which gives you the opportunity to see how the picture 
  674. will look like much earlier than in scanline mode.
  675.  
  676. Options
  677.  
  678. Display Report
  679. When this option is switched on a status report is displayed which gives information about the time taken, estimated 
  680. time, calculated rays and so on. This window is updated during tracing.
  681.  
  682. Display Image
  683. When this option is selected the traced image is displayed in a window.
  684.  
  685. Blank Screen
  686. This option affects only pre-RiscPC machines as this switches off the VIDC display, which maximises the processor 
  687. power for the tracing process. There will be nothing on the screen to show that the computer is still working - but the 
  688. screen will be restored on moving the mouse or pressing a key.
  689.  
  690. Multitask
  691. Here you can choose between multitasking tracing and single-tasking. In single-tasking the tracing process is much 
  692. faster, but you will not be able to do any other work. [In actual fact the single-tasking mode the raytracer does not use 
  693. 100% of the cpu time. Every few seconds it lets other programs in the desktop run so you may find that you are able 
  694. to do some things - but very very slowly.]
  695.  
  696. Settings
  697.  
  698. Anti-aliasing
  699. Two types of anti-aliasing are supported: "adaptive subdivision" and  "jittered sampling". Anti-aliasing smooths high 
  700. contrast edges. For example if you have a white polygon on a black background. If you don't use anti-aliasing you will 
  701. see a grid at the border of the polygon. With anti-aliasing this will be smoothed. On pictures with low contrast you will 
  702. not notice a great difference when using anti-aliasing and when not.
  703.  
  704. Adaptive subdivision works by sampling each pixel at its corners. The contrast between these four samples is 
  705. computed, and if too large, the pixel is subdivided into four equivalent sub-pixels and the process is repeated. The 
  706. threshold contrast may be controlled via the contrast command. There are separate thresholds for the red, green, and 
  707. blue channels. If the contrast in any of the three is greater than the appropriate threshold value, the pixel is 
  708. subdivided. The pixel-subdivision process is repeated until either the samples' contrast is less than the threshold or 
  709. the maximum pixel subdivision level, specified via the adaptive command, is reached. When the subdivision process 
  710. is complete, a weighted average of the samples is taken as the colour of the pixel. The adaptive anti-aliasing is an 
  711. intelligent process as it is only performed when the contrast is high between two pixels. Like this it will not take much 
  712. more time on a low contrast picture than without anti-aliasing.
  713.  
  714. Jittered sampling works by dividing each pixel into a number of square regions and tracing a ray through some point 
  715. in each region. The exact location in each region is chosen randomly. The number of regions into which a pixel is 
  716. subdivided is specified through the use of the samples command. The integer following this option specifies the 
  717. square root of the number of regions.
  718.  
  719. While jittered sampling is generally slower than adaptive subdivision, it can be beneficial if the penumbrae cast by 
  720. extended light sources take up a relatively large percentage of the entire image or if the image is especially prone to 
  721. aliasing.
  722. Each area light source is, in effect, approximated by a square grid of light sources. The length of each side of the 
  723. square is equal to the diameter of the extended source. Each array element, which is square in shape, is in turned 
  724. sampled by randomly choosing a point within that element to which a ray is traced from the point of intersection. If the 
  725. ray does not intersect any primitive object before it strikes a light source element, there is said to be no shadow cast 
  726. by that portion of the light source. The fraction of the light emitted by an extended light source which reaches the point 
  727. of intersection is the number of elements which are not blocked by intervening objects divided by the total number of 
  728. elements. The fraction is used to scale the intensity (colour) of the light source, and this scaled intensity is then used 
  729. in the various lighting calculations.
  730.  
  731. When jittered sampling is used, one shadow ray is traced to each extended source per shading calculation. The 
  732. element to be sampled is determined by the region of the pixel through which the eye ray at the top of the ray tree 
  733. passed.
  734.  
  735. When adaptive supersampling is used, the samples command controls how many shadow rays are traced to each 
  736. extended light source per shading calculation.
  737.  
  738. Specifically, each extended source is approximated by a square array consisting of samples * samples elements. 
  739. However, the corners of the array are skipped to save rendering time and to more closely approximate the circular 
  740. projection of an extended light source. Because the corners are skipped, samples must be at least 3 if adaptive 
  741. supersampling is being used. Not that the meaning of the samples command is different depending upon whether or 
  742. not jittered sampling is being used.
  743.  
  744. Sample level
  745.  
  746. The sample level determines the quality of the anti-aliasing. The higher the number the higher the quality of the 
  747. image. Default is 2. Remember that the trace time can rise by the square of the sample level.
  748.  
  749. Storage Format
  750.  
  751. Internally in the Merlin raytracer, scenes are stored by one of two means.  By default, the primitive objects which 
  752. make up a scene are stored in a simple list.  When a ray is intersected with such an object, the ray is tested for 
  753. intersection with each object in the list. While the  list  is the default method of object storage, one may emphasize this 
  754. fact in the input file by including the  list  keyword somewhere within the object-definition block.
  755.  
  756. The second form of internal object storage is the three-dimensional grid. The grid's total size is calculated by Merlin 
  757. and is equal to the bounding box of the entire World object. A grid subdivides the space in which an object lies into an 
  758. array of uniform box-shaped voxels. Each voxel contains a linked-list of objects and primitives which lie within that 
  759. voxel.  When intersecting a ray with an object whose constituents are stored in a grid, the ray is traced incrementally 
  760. from voxel-to-voxel, and the ray is intersected with each object in the linked list of each voxel that is visited.  In this 
  761. way the intersection of a ray with a collection of objects is generally made faster at the expense of increased storage 
  762. requirements.
  763.  
  764. Ray Maximum Depth
  765.  
  766. Controls the maximum depth of the ray tree, ie the number of times a ray can hit surfaces before it is ignored. The 
  767. default is 3, with eye rays considered to be of depth zero. This value needs to be raised if you have a lot of reflecting 
  768. or transparent surfaces in the scene. For instance, if you have 5 glass objects in the scene and you want to see 
  769. through these then you must set the value to a minimum of 5. If set to 0, no reflection or refraction rays will be traced.
  770.  
  771. Cutoff Contribution
  772.  
  773. Specifies the adaptive ray-depth cutoff threshold.  When any ray's maximum contribution to the final colour of a pixel 
  774. falls below this value, the ray and its children (specularly transmitted and reflected rays) are not spawned. The default 
  775. value is 0.001.
  776.  
  777. Contrast RGB
  778.  
  779. Specifies the maximum allowed contrast between samples in a (sub)pixel before subdivision takes place. The 
  780. contrast RGB is only used with anti-aliasing adaptive. The contrast may be used to decrease the number of instances 
  781. in which pixels are subdivided. Using these options, one may indicate the maximum normalized contrast which is 
  782. allowed before supersampling will occur. If the red, green or blue contrast between neighbouring samples (taken at 
  783. pixel corners) is greater than the maximum allowed, the pixel will be subdivided into four sub-pixels and the sampling 
  784. process will recurse until the sub-pixel contrast is acceptable or the maximum subdivision level is reached. The 
  785. defaults for the red, green and blue channels are 0.25, 0.2, and 0.4, respectively.
  786.  
  787. Field of View
  788.  
  789. The horizontal field of view specifies the angle, in degrees, between the left-most and right-most columns of pixels. If 
  790. present, the vertical field of view specifies the angle between the center of the top-most and bottom-most row of 
  791. pixels. If not present, the vertical field of view is calculated using the screen resolution and the aspect ratio of the 
  792. pixels in the mode selected for tracing. The default horizontal field-of-view is 45 degrees, while the default vertical 
  793. field-of-view is calculated as described above.
  794.  
  795. Trace Options
  796.  
  797. Here you can switch off some features of the tracer for faster tracing. Switching any of these off will produce a poorer 
  798. quality image but may be useful for rendering draft scenes quickly.
  799.  
  800. Trace Shadows
  801. This switches the tracing of shadows on and off.
  802.  
  803. Use Shadow Cache
  804. This switches the shadow cache on and off. With shadow cache on the tracing of shadows is faster, but uses more 
  805. memory.
  806.  
  807. Reflected Rays
  808. With this option you can switch on and off the reflection. This will reduce trace times if you have objects in the scene 
  809. with reflective surfaces.
  810.  
  811. Refracted Rays
  812. When switching this off transparent objects are not traced correctly anymore, but this could save a lot of time.
  813.  
  814. Specular Reflection
  815. Here you can switch on and off the specular reflection of direct light sources.
  816.  
  817. Textures
  818. With this option you switch off all texture effects, which can save also a lot of time.
  819.  
  820. Save
  821.  
  822. Report
  823. With this option on the trace report will be saved after rendering. The file will be saved in the !MerlinDat directory in 
  824. !Report. This file is useful if you need to know statistics about the computation done by the raytracer - for instance 
  825. how long it took to render.
  826.  
  827. RGB
  828. Switching this option on will save the traced picture in 24 bit format continuously during tracing. This format can be 
  829. read by Change-FSI. The file will be saved in the !MerlinDat directory in !RGB.
  830.  
  831. Sprite
  832. With this option on the picture will be saved after tracing in 256 colour sprite format. The file will be saved in the 
  833. !MerlinDat directory in !Image.
  834.  
  835.  
  836.  
  837.  
  838. Key shortcuts
  839.  
  840. F3    save file
  841. F4    trace in preview type 1
  842. SHIFT F4    trace in preview type 2
  843. F5    trace in trace type 1
  844. SHIFT F5    trace in trace type 2
  845. F6    trace in user define mode
  846. F9    display mode line
  847. F10    display mode hidden line
  848. F11    display mode gouraud shading
  849.  
  850. CTRL Z    clear selection
  851. CTRL G    group all selected objects
  852. CTRL U    ungroup all selected objects
  853. CTRL X    delete all selected objects
  854.  
  855. Delete    delete all selected objects
  856. CTRL E    center windows
  857. CTRL J    turn object into phong shaded
  858. CTRL Y    remove phong shading from object
  859. CTRL Q    turn polygons of object into double sided
  860. CTRL N    name group
  861. CTRL O    remove double sided polygons
  862. CTRL T    switch toolbox on / off
  863. CTRL P    switch parabox on / off
  864. CTRL W    clear scene
  865. CTRL -    activate measure tool
  866.  
  867. File formats
  868.  
  869. Merlin import format
  870.  
  871. MerlinEd allows you to import your own three dimensional data - whether produced by your own programs, a 
  872. database, or spreadsheet. You can for instance use MelinEd for scientific data visualization.
  873. There are two examples supplied with the programm to show how you can use the Merlin import format. These  are 
  874. !MakeFrac which uses the polyline function and !FracGen which uses polygons to create a fractal surface out of a 
  875. sprite.
  876.  
  877. General fromat rules
  878. All keywords must be in upper case. Each parameter is separated by a space. All parameters which belong to one 
  879. keyword should be in one line (not separated with a newline). Numbers should not be in exponential format (1.56E-3).
  880. The file type must be text (&FFF) and the first line must be:
  881.  
  882. MERLIN IMPORT V1.0    to identify the import format.
  883.  
  884. Surface
  885.  
  886. You can define your own object surfaces just like in the material editor. For this you need the keyword "SURFACE" 
  887. followed by a name, which must be less than 12 characters, and then followed by the surface attributes.
  888.  
  889. Syntax: SURFACE <name> <specular colour> <diffuse colour> <ambient colour> <transparency> <index of 
  890. refraction> <reflection> <coefficient> <translucent> <specular transmission coefficient>
  891.  
  892. If you want to give an object a surface that you have imported you add at the end of the line
  893. "SURFACE <name>".
  894.  
  895. In one Merlin import you can define a maximum of 500 new surfaces.
  896. You can use also the predefined surfaces. For this you must simply use the name of the predefined surface.
  897.  
  898. Polygon
  899.  
  900. The keyword is followed by a list of point numbers. The number of points is not limited, but it is recommended to have 
  901. a maximum of four points for each polygon. A polygon should have a minimum of three points. All points must lie in 
  902. the same plane - to make the polygon flat. When a point is specified by a negative number a move is made to that 
  903. point rather than drawing a line. This is similar to drawfile paths.
  904.  
  905. The points must be declared with POINTLIST before.
  906.  
  907. Syntax: POLYGON <point number> <point number> <point number>
  908. Example: POLYGON 1 2 -3 4
  909.  
  910.  
  911. Polyline
  912.  
  913. The keyword is followed by a list of point numbers. The number of points is not limited. When a point is specified by a 
  914. negative number a move is made to that point rather than drawing a line.
  915.  
  916. Syntax: POLYLINE <point number> <point number> <point number>
  917. Example: POLYLINE 1 2 -3 4
  918.  
  919.  
  920. Point list
  921.  
  922. Before you can declare polygons and lines you must define the points for them. This is done with the point list. After 
  923. the keyword you declare how many points you want to create. The first point has the index 1. Each point is separated 
  924. with newline. You can have more than one point list in an import file.
  925.  
  926. Syntax:     POINTLIST <number of points>
  927.     <x1> <y1> <z1>
  928.     <x2> <y2> <z2>
  929.        ...      ...     ...
  930.  
  931. Example:    POINTLIST 3
  932.     1 3 4
  933.     -2 4 0
  934.     3 11 -0.5
  935.  
  936. Cone
  937.  
  938. Syntax: CONE <x-center> <y-center> <z-center> <x-dimension> <y-dimension> <z-dimension> <x-rotation> <y-
  939. rotation> <z-rotation> <top radius> <bottom radius> [OPEN] [SURFACE name]
  940. Sphere object
  941.  
  942. Sphere
  943.  
  944. Syntax: SPHERE <x-center> <y-center> <z-center> <x-dimension> <y-dimension> <z-dimension> <x-rotation> <y-
  945. rotation> <z-rotation> [SURFACE name]
  946.  
  947. Box
  948.  
  949. Syntax: BOX <x-center> <y-center> <z-center> <x-dimension> <y-dimension> <z-dimension> <x-rotation> <y-
  950. rotation> <z-rotation> [SURFACE name]
  951.  
  952. Draw file import
  953.  
  954. MerlinEd is able to import draw files. Simply drag a draw file over a merlin window or the icon on the icon bar to start 
  955. the import it. A window will appear where you can choose if there should be a certain distance between the polygons 
  956. loaded and if they should be connected. The drawfile import interprets filled paths as polygons but does not 
  957. understand sprite or font objects. You can convert fonts to filled paths by using that facility in Acorn's !Draw program. 
  958. You should be aware that since fonts contain alot of curves these may use up alot of memory and so only short 
  959. pieces of text are recommended.
  960.  
  961. DXF import format
  962.  
  963. The DXF format is a widespread CAD export / import format, which is originally used by AutoCAD. Currently only the 
  964. 3D part of DXF is used by Merlin to import data. These are the objects VERTEX and 3DFACE. If you need others for 
  965. your import please contact us.
  966. If you import large DXF files which contain 3DFACE's it could take a while. 
  967.  
  968. High quality DXF files or 3D data can be purchased from:
  969.  
  970. Viewpoint Datalabs
  971. 870 West Center, Orem
  972. UT 84057
  973. USA
  974. Phone: 801 229 3000
  975. Fax: 801 229 3300
  976.  
  977. This company has a great library of 3D data. These incooperate aircraft, anatomy, animals, architecture, cars, people, 
  978. cycles, dinosaurs, geography, helicopters, landmarks, military vehicles, pick-ups (cars), sports, watercraft and motion 
  979. data.
  980. If they don't have the data you require, they can help you also by creating it for you.
  981. The average price for an object is around $400.
  982.  
  983. If you have internet access you can browse their World Wide Web site at "www.viewpoint.com"
  984. Viewpoint are kindly hosting the famous Avalon repository of free 3D models which was previously held at the US 
  985. navy site chinalake.
  986.  
  987. Merlin copy path format
  988.  
  989. This is a supplement to the multicopy tool. It processes all selected objects. You can specify the path on which the 
  990. selected objects are copied to. The copying starts relative from the original position of the selection. So the first point 
  991. of your path will not affect the position of the objects, but the relative movement will change the position of the objects. 
  992. The coordinates you give should be in absolute coordinate format.
  993. The objects can also be rotated. This will be added to the current orientation of the object.
  994.  
  995. To activate the copy path tool you simply select the objects you want to copy and drag the copy path text file to the 
  996. Merlin application.
  997.  
  998. The file type must be text format (&FFF = Text).
  999.  
  1000. Format:
  1001. MERLIN COPYPATH V1.0        first line of file, followed by a list of translations
  1002.  
  1003. TRANSLATE <X> <Y> <Z> <X-rotation> <Y-rotation> <Z-rotation> <X-scale> <Y-scale> <Z-scale>
  1004.  
  1005. TRANSLATE 0 0 0 0 0 0 1 1 1        start point
  1006. TRANSLATE 1 0 0 45 0 0 1 1 1        add 1 in x pos. turn 45° around x-axe
  1007. TRANSLATE 1 -1 2 10 0 0 1.5 1.5 1.5    subtract -1 in y pos. and add 2 in z pos, turn 10° around x-axe
  1008.             scale object by factor 1.5
  1009.  
  1010. RGB files
  1011.  
  1012. The most important output file is the RGB file and is continuously being updated during tracing. The RGB file enables 
  1013. the scene to be traced in more than one section, so you dont have to wait for the trace to finish before doing 
  1014. something else. The file consists of a header line terminated by a newline character (13) followed by triplets of bytes. 
  1015. The header line contains three integers each followed by a single space, and an identity string. The integers are the X 
  1016. resolution (Xres), Y resolution (Yres), and the tracing Mode. The identity string states the author of the program and 
  1017. the time the file was created. Xres and Yres determine the maximum number of byte triplets that follow, (Xres * Yres). 
  1018. The three bytes are the red, green and blue components of the pixel and are in the range 0-255. The first Xres triplets 
  1019. make up the top line of the image from left to right, the next Xres triplets constitute the next line down, etc. The 24 bits 
  1020. per pixel means a possible 16.7 million colours, enabling the RGB file to be used to create a perfectly smooth image 
  1021. on computers with this capability.
  1022.  
  1023. Colour Map files
  1024.  
  1025. A colour map file contains 256 lines of text (each terminated by a new line character). Each line consists of three 
  1026. integers in the range 0-255, each separated by a single space. The three integers indicate the red,green and blue 
  1027. components of a colour. This is used by the texture mapping functions. A point on the surface of an object is given an 
  1028. intensity value (n) in the range 0-255. The colour used at this point is then taken from the n'th line of the file.
  1029.  
  1030.  
  1031.  
  1032.