home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 093.lha / DocNet.txt < prev    next >
Text File  |  1986-11-20  |  17KB  |  327 lines

  1.  
  2.  
  3.                            C-LIGHT
  4.               Copyright © 1987 by Ronald A. Peterson
  5.  
  6.  
  7.      This is a demonstration copy of a scene editor and ray tracing
  8. program called C-Light (version 1.0).  For those not familiar with ray
  9. tracing, it is a technique whereby very realistic three dimensional
  10. pictures of objects can be created by tracing the paths of rays of
  11. light through a scene.  The unique features of C-Light include:
  12.  
  13.    * Full Intuition interface for ease of use.
  14.    * Simple and quick scene creation using a powerful editor that lets you
  15.      visually place objects.
  16.    * Allows creation of scenes with up to 170 objects (spheres, cylinders
  17.      and cubes) each of which can be sized, rotated and located
  18.      independently in all three dimensions.
  19.    * Allows any number of light sources (up to object limit
  20.      of 170) with variable intensity and adjustable ambient light.
  21.    * Supports overscanned and interlaced-overscan images as well as
  22.      320 by 200 and 320 by 400 images, all in the standard IFF
  23.      format.
  24.    * Smoothly shaded objects with the color set selectable out of
  25.      4096 possible colors.
  26.    * Reflecting surfaces (mirrors).
  27.    * Shadows.
  28.    * Movable viewpoint (the observers eye.)
  29.    * Easy editing of scenes both during and after creation.
  30.    * Multitasking.
  31.  
  32. C-Light differs from other ray-tracers that have recently appeared
  33. in that it is extremely simple to use.  It requires no knowledge
  34. of three dimensional geometry (except that which you were born with)
  35. and presents the user with an interface similar to that found in the
  36. better paint programs available today.  In addition, C-Light can
  37. easily produce smooth curved shapes such as spheres, ellipsoids,
  38. and cylinders that are difficult to construct using polygon based
  39. systems.
  40.      C-Light is made up of several parts or modules.  The 
  41. C-Light scene editor allows the user to create a three 
  42. dimensional scene using simple primitive objects (currently spheres,
  43. cylinders, and cubes.)  These objects can be interactively 
  44. placed, stretched, shrunk and rotated using a very friendly mouse
  45. oriented interface.  The C-Light ray tracer then takes this scene
  46. description and calculates the resulting picture based on the 
  47. locations of the objects, light sources, and eyepoint.  Both 
  48. overscanned and PAL (European) formats are supported, with or 
  49. without interlace.  These pictures can then be saved to disk as 
  50. IFF picture files and viewed using the View utility which is 
  51. provided.  All programs are multitasking and will use fast RAM in
  52. place of chip memory where possible.
  53.  
  54.      This copyrighted version of C-Light is freely redistributable
  55. so long as it is not sold for profit or modified in any way and is
  56. accompanied by this text file which describes the software and its
  57. source.  All rights are reserved and reside with its author, Ronald
  58. A. Peterson.
  59.  
  60.      Since C-Light is a commercial product currently being 
  61. marketed, this demo version is slightly limited in that the 
  62. object editor will only allow the user to place ten objects in a 
  63. scene.  Anyone wishing to purchase a complete copy (which allows 
  64. placing up to 170 objects, includes complete documentation and is
  65. not copy protected---as yet) can do so by sending $59.95 to:
  66.  
  67.                       Ronald Peterson
  68.                       P.O. Box 614
  69.                       Milford, NH  03055
  70.  
  71.      Since C-Light is being independently marketed (inquiries from
  72. distributors are invited) please distribute this demo freely. 
  73. Posting to bulletin boards is also encouraged so long as this 
  74. text file remains with the software.  This version is already
  75. available on BIX and PeopleLink.
  76.  
  77.  Formalities aside, here is a brief description of how to use C-Light:
  78.  
  79.      It is necessary to use V1.2 of Workbench with C-Light and a
  80. Preferences setting for eighty column text is desirable.  C-Light
  81. is a complex program; if run on a 512K Amiga, it will require almost
  82. all memory to be available.  This means that you should have as few other
  83. windows as possible open and no other programs running.  Usually a
  84. requestor will warn you if there is not enough memory when calling up
  85. a function but in extreme cases the program may refuse to put up the
  86. requestor you have asked for.  This is not a fatal condition---just pop
  87. to the back screen and close some windows and you will be able to continue
  88. working.  The most likely place for this to occur is when calling up
  89. the Get File requestor in C-LightII when in the interlaced-overscanned
  90. screen mode.
  91.      On an Amiga with more than 512K RAM, C-Light will gracefully
  92. multitask with only a few side effects:
  93.  
  94.    1) Calculating an interlaced picture will cause all screens to be
  95.       interlaced.
  96.    2) Because of some peculiarities involved in opening overscanned
  97.       screens, if you notice a moving striped bar on the right edge of
  98.       the screen or if the mouse pointer changes to some weird shape,
  99.       you can remedy it by using Preferences to better center the screen.
  100.       This will only occur if you have moved the Preferences screen center
  101.       to the extreme far right or left however.
  102.    3) Programs that use sprites might be affected since overscanned
  103.       pictures sometimes intrude on sprites.
  104.  
  105. C-Light makes extensive use of Intuition (gadgets, sliders, menus,
  106. etc.) which means many functions can be easily understood just by
  107. trying the gadget or slider to see what it does.  The programs can
  108. be run from Workbench or from CLI.  C-Light is in two parts (C-LightI
  109. and C-LightII) and also includes two utilities: Video and View.
  110.  
  111. *---VIDEO ---*
  112.  
  113.      Calling up Video allows you to select screen resolution and
  114. PAL or USA compatability by responding to requestors which ask
  115. yes or no questions about your choices.  (Note that Video has no
  116. effect on pictures that have already been generated.)
  117.  
  118. *--- C-LightI ---*
  119.  
  120.      C-LightI is the scene editor.  Upon calling it up you will
  121. see some gadgets on the right side of the screen and a title
  122. bar.  There is a drag-down menu attached to the left side of the
  123. title bar.  This is the utilities menu which contains the
  124. following functions:
  125.  
  126.       Hide Title Bar - Hides/restores the title bar.
  127.       Hide Selectors - Hides/restores the gadgets on the right.
  128.       New Directory  - Change directory (drawer) or disk.
  129.       Colors         - Lets you change the CURRENT screen colors,
  130.                        not the colors used in the scene.
  131.       Reset All      - For starting a new scene.
  132.       Load file      - Load in a scene file.
  133.       Save file      - Save a scene file.
  134.       Exit           - Go have a look in the fridge.
  135.  
  136. Most of these menu selections call up requestors. The use of these
  137. requestors conforms to the rules outlined in the "Introduction to Amiga"
  138. manual.  Try loading in and playing with the example scene file
  139. included with the demo which is entitled "Columinaire".
  140.  
  141.   The function of the gadgets on the right side of the
  142. screen will be covered next:
  143.  
  144. BALL, CUBE, CAN - When clicked on, these gadgets will cause an 
  145. outline (wireframe image for the technical among you) of the 
  146. corresponding object to appear.  Using the mouse you can move the
  147. object left/right or up/down.  By clicking the right mouse button
  148. (when the cursor is NOT over the title bar) the object can be 
  149. moved in/out in depth with the mouse instead of up/down.  
  150. Clicking the right button again will restore up/down movement.  
  151. Because the space in which you are moving the object is much 
  152. larger than the screen of the Amiga, the object does not follow 
  153. the cursor position.  For example, if the object is in the center
  154. of the screen and the cursor is on the right edge of the screen, 
  155. you can keep moving the mouse to the right (picking it up and 
  156. moving it, picking it up and moving it, ...) and even though the 
  157. cursor doesn't move, the object will keep moving to the right 
  158. eventually going off the screen.  A mouse is inherently a device 
  159. for manipulating two dimensional objects so this is how I turn it
  160. into a 3D manipulator.  You can think of the object being moved 
  161. as a new, three dimensional cursor for the mouse if you like.
  162.      As you are moving the object around you will see the X, Y, Z
  163. coordinates of the CENTER of the object being displayed in screen
  164. coordinates.  Once you have the object somewhere near where you 
  165. want it, click the left mouse button and the Object Modification 
  166. Requestor will appear.  (Fancy name eh?  I thought that one up 
  167. myself.)  The sliders on this requestor let you change the size 
  168. of the object in the X, Y and Z directions and allow you to 
  169. rotate the object around the X, Y and Z axis.  The gadgets 
  170. labeled A, B, C, M let you pick the color for the object.  
  171. I will discuss later how to set these colors to whichever out of
  172. the 4096 possible colors that you choose and how to set
  173. the background color for a scene.  The "M" gadget makes the
  174. object have a mirror (almost perfectly reflecting) surface.
  175.      Hit the CANCEL gadget if you decide you don't want the
  176. object.  The requestor can be moved by dragging it via its
  177. title bar.  You can still move the object around when the object
  178. modification requestor is present by clicking with the left mouse
  179. button anywhere outside the requestor.  The requestor becomes 
  180. inactive and you can then move the object around using the mouse,
  181. just as you did before the requestor appeared.  Clicking the left
  182. button again activates the requestor again and stops the object 
  183. from moving when you move the mouse.  In this way you can 
  184. alternate between moving the object and sizing or rotating it 
  185. until you have it exactly as you want it.  Then, hit the close 
  186. gadget in the upper left corner of the requestor and the 
  187. requestor will disappear and the object will change color 
  188. indicating that it has been set in place.
  189.  
  190. DEL, CHG - Once you have placed an object you can still change 
  191. it.  Hit the DELete gadget and then click on the CENTER of the 
  192. object you want to delete with the left mouse button.  The object
  193. will be highlighted in a different color and a requestor will ask
  194. if this is the object you really want to delete.
  195.      The CHG gadget works in a similar fashion.  Hit CHG, then 
  196. click on the object you want to change.  It will be highlighted 
  197. in a different color and the object modification requestor will 
  198. appear.  From then on you can treat everything just as though you
  199. were placing the object for the first time.
  200.  
  201. VIEW - Once you have defined a scene you can use this gadget to 
  202. move, rotate, stretch or shrink the scene as a whole.  Click on 
  203. it and you will see the scene disappear, then a cube and the 
  204. object modification requestor take its place.  Imagine your scene
  205. is inside this cube.  You can then rotate it, move it, and size 
  206. it.  Hitting the close gadget on the requestor will cause the 
  207. scene to be redrawn using the new view.  This is also useful for
  208. rotating a scene to get at and change the parts of it that are in
  209. back of other objects.
  210.  
  211. EYE - This allows you to set how close or far the observers eye 
  212. is from the scene.  It uses the object modification requestor 
  213. again and works just like moving your own eye nearer or further 
  214. from a window (the screen of your monitor being the window.)  As 
  215. you move closer to the window you can see more of the scene.  It 
  216. also becomes more distorted by perspective (an effect like a fish
  217. eye lense on a camera.)  As you move further away you can see 
  218. less of the scene through the window and things become less 
  219. distorted and more natural looking.  Currently the eye point can 
  220. only be moved closer or further away; I may add up/down and 
  221. left/right movement to it if it seems useful.  Clicking on the 
  222. close gadget will cause the scene to be redrawn using the new 
  223. eyepoint.
  224.  
  225. COLR - This gadget calls up a requestor that allows you to change
  226. the color of the OBJECTS.  It does not affect the current colors 
  227. used on the screen.  This is where the colors A, B, C and the 
  228. background color are determined.  The colors you pick for A, B, 
  229. and C are the colors that will be used in your object at its 
  230. brightest spots.  The brightest spots will be those closest to 
  231. the light sources.  The rest of the object will be in blacker
  232. shades of this color, getting dimmer the further that part of the
  233. object is from the light.  (Just like in real life!)
  234.  
  235. LITE - This gadget allows you to place light sources in your 
  236. scene.  A light is treated just like an object (BALL, CUBE, CAN)
  237. and is placed in the same way.  Sizing and rotation of light 
  238. sources has no effect on the picture.  Lights are point sources 
  239. that radiate in all directions.  The only limit on the number of 
  240. light sources is the limit on the total number of objects (10 for
  241. this demo version, but then there would be no room for objects.) 
  242. More lights means a longer calculation time though.
  243.  
  244. *--- C-LightII ---*
  245.  
  246.      Once you have created a scene and saved it to disk, the 
  247. second part of the program comes into play - C-LightII.  
  248. C-LightII is the part that actually draws the scene.  Ray tracing
  249. is a complex mathematical process so this can take some time - 
  250. from a half hour up to several days.  When you call up C-LightII 
  251. you will see a requestor.  Hitting "Get File" calls up a 
  252. directory requestor that allows you to select the scene you want 
  253. to calculate.  (If you have trouble getting the directory requestor
  254. to appear you need to free up some memory and try again.)  After
  255. picking a scene you can set some of the overall characteristics
  256. of the scene with the sliders and gadgets:
  257.  
  258. LIGHT slider - This sets the intensity of all the lights in a 
  259. scene.  The number displayed near the slider is the range at 
  260. which the lights will be at half intensity.
  261. AMBIENT slider - This sets the background level of light that 
  262. illuminates ALL objects equally.
  263. BLEND slider - This one controls how much blending together of 
  264. colors occurs.  Given ten shades of each color with which to shade
  265. an object, randomly blending them a little makes the picture
  266. look smoother.  Too much and your picture will be lost in fuzz.
  267. Too little and you will see bands of color.
  268. ALIAS gadget - Turning this on enables anti-aliasing.  This is a 
  269. simple algorithm that tries to lessen the effects of jagged edges
  270. (caused by the fact that the screen is made up of a limited 
  271. number of rectangular dots.)  It doesn't always improve the picture.
  272. SHADOW gadget - Turning this gadget on will cause shadows to be 
  273. calculated for the scene.  Shadows are VERY time consuming and 
  274. can easily cause a complex picture to take days to calculate,
  275. particularly if there are many light sources.
  276. SAVE gadget - This allows you to name and save the created 
  277. picture as an IFF file.  The save requestor will also come up 
  278. automatically when the picture is done.
  279.      You can get back to the main requestor at any time (in order to
  280. exit, change settings or save an unfinished picture) by clicking
  281. once with the left mouse button anywhere in the lower three quarters
  282. of the screen.
  283.  
  284. *--- VIEW ---*
  285.  
  286.      Finally, the VIEW program is an IFF picture viewer that 
  287. allows you to look at the saved IFF picture files (overscanned 
  288. ones too!)  To view a picture from Workbench you can either just
  289. double-click on the pictures icon or click once on the 
  290. pictures icon while holding down the left Amiga and Shift keys 
  291. simultaneously, then double click on the View icon.  From CLI you
  292. can type: VIEW 'picture' where 'picture' is the name of the file
  293. you want to see (without the '.ilbm' extension.)  Click anywhere
  294. in the upper left corner to end it.
  295.  
  296.      So...that should be enough to get you started.  I have tried
  297. to make this program as simple to use as possible, modeling it 
  298. after paint programs like DeluxePaint.  In fact, because shading 
  299. is a tough thing to do with a mouse, C-Light makes a nice 
  300. addition to paint programs since it lets you easily create 
  301. backgrounds of shaded 3D objects.  Have fun with this demo 
  302. version and if you like it, send a check my way and tell a friend
  303. about it!
  304.  
  305.      Let me know of any bugs that you find and I will correct 
  306. them and repost a new demo version (and maybe send you a free 
  307. copy of C-Light if you find something serious.)  Also, not having
  308. a European Amiga, I have not been able to test overscan while in 
  309. PAL mode.  I would appreciate knowing if it works.  Future 
  310. enhancements will be offered for a small fee to registered users 
  311. and will include:
  312.  
  313.      More object primitives - Cones, Half spheres, Trapezoidal
  314.          patches.
  315.      Specular reflections (glossy surfaces)
  316.      Better memory management.
  317.      Animation editor & viewer - for making short, animated
  318.         movies on the Amiga (in the ANIM format) or long animated
  319.         movies on film or video tape.
  320.  
  321.  
  322.  
  323. Amiga, Workbench and Intuition are trademarks of Commodore-Amiga,
  324. Inc.
  325. DeluxePaint is a trademark of Electronic Arts.
  326.  
  327.