home *** CD-ROM | disk | FTP | other *** search
/ Vectronix 2 / VECTRONIX2.iso / FILES_01 / SOL3_8_C.LZH / SPOFLT38.CRK / README / SOL_AEO1.TXT < prev    next >
Text File  |  1994-08-08  |  14KB  |  258 lines

  1. ADVANCED SPEED OF LIGHT 3.x
  2. Tips and Tricks
  3. PART I: Color
  4.  
  5. by Stuart Denman
  6. Internet: sdenman@cs.washington.edu
  7.  
  8. (c) Copyright 1994, Stuart Denman.  All rights reserved.
  9.  
  10. This is the first in a two part series on how to change and enhance images 
  11. with Speed of Light Image Processor.  I will assume that you have obtained a 
  12. registered or demonstration shareware copy of at least version 3.3 (version 
  13. 3.5 is the newest as of this writing.)  I will also assume that you have read 
  14. the manual and understand the basics of Speed of Light (SOL).  Since I am the 
  15. author, I have had many hours of experience using and playing with the 
  16. program.  So as you can imagine, I have come across quite a few interresting 
  17. ways to change the look of your images.  In this first intallment, I will take 
  18. a look at some of the ways in which you can use SOL's color manipulation 
  19. techniques to enhance or do really weird things to your image's colors.  In 
  20. part II, I will show you how to physically manipulate your images using 
  21. filtering (the most confusing, but powerful tool in SOL), warping, and other 
  22. tools.
  23.  
  24.  
  25. THE COLOR MANIPULATION TOOLS
  26. ============================
  27.  
  28. Speed of Light has three basic color altering areas, and I will discuss 
  29. how to make the most of each:
  30.  
  31. 1. Color Selection.  This is controlled on the Options Dialog via the color 
  32. contrast and color selection method (and color rankings).  Since SOL stores 
  33. the original image in memory, you can immediately see a change in these 
  34. settings without reloading the image.  As of version 3.5, you can also 
  35. specify how colors are selected from truecolor JPEGs as well.
  36.  
  37. 2. Color Transformations.  These are also controlled from the Options Dialog. 
  38. Complex color transformations (histograms) are applied to the colors in the 
  39. original image before selection occurs.  Additive color transformations (the 
  40. three slider bars that appear when "COMPLEX" is not highlighted) are simply 
  41. added or subtracted from the colors after color selection occurs.
  42.  
  43. 3. The Color Editor.  This dialog allows you to edit individual colors in your 
  44. image.  You can only edit the colors after selection occurs.  Once you edit 
  45. them, you can either have SOL attempt to match the image's colors to the new 
  46. ones you created, or you can just alter them as they appear in the image 
  47. without matching.
  48.  
  49.  
  50.  
  51. COLOR SELECTION
  52. ===============
  53.  
  54. This is the most important section to pay attention to if you have less than a
  55. 256 color display (i.e. 16 color Low Resolution ST).  I will give values below 
  56. with the assumption that you have only 16 colors.  The better you undertand 
  57. how SOL reacts to your settings, the better your image will look.  I almost 
  58. always use "Frequency" as a color selection method, so this is what I will 
  59. focus on.
  60.  
  61. Images vary in what their ideal color contrast value is.  To find it, I 
  62. usually set the three contrast slider bars at around 30 (40 on systems with a 
  63. palette of only 512 colors.)  Then, I make sure that SOL alerts me when it 
  64. throws out too many colors during selection due to a high contrast (this can 
  65. be turned on in the Preferences.)  Next I display the image.  If I get an 
  66. alert box saying that colors were lost, I reduce the color contrast down to 24 
  67. or so.  I keep reducing until I no longer get an alert box.  This ensures that 
  68. your colors are spread evenly (as far as their relative contrasts) over the 
  69. image.  This may sound like more trouble than it is worth, but if you really 
  70. need to have an image look good, this kind of fine user control is the only 
  71. way to go and is usually better than an automated approach.
  72.  
  73. Next, color contrast settings can be used for spreading out the colors in the 
  74. image in a more representative manor.  In other words, if your image has small 
  75. areas of blue (shaded from dark blue to light blue) and large areas of red 
  76. (shaded from dark red to light red), you would want more of your 16 colors 
  77. used for the shades of red than for blue.  To force SOL to select the colors 
  78. in this way, you would increase the blue color contrast slightly (forcing the 
  79. blues to be farther apart in brightness) and decrease the red contrast 
  80. slightly.  Using the contrast histograms (by selecting "COMPLEX" above the 
  81. slider bars) would allow even more fine control by allowing you to set the 
  82. contrast for each color depending on its intensity of red, green, and blue.
  83.  
  84.  
  85. COLOR TRANSFORMATIONS
  86. =====================
  87.  
  88. Color transformations can be used both with greyscale and with color modes.  
  89. In greyscale modes, additive color transformations can be used to add or 
  90. subtract red, green, and blue from the grey shades.  If I want to make a rough 
  91. change in the images colors, I will often use the additive color settings:
  92.  
  93. -=> To make your image brighter or darker, change the three slider bars to the 
  94. same value (you can do this by moving one slider bar to the value you want and 
  95. then double-clicking on that slider to set the other two to the same value).
  96.  
  97. -=> To create a warmer image, increase the red value a little, or darken green 
  98. and blue.
  99.  
  100. -=> You can also add blue, green, or combinations of the RGB colors to the 
  101. image to produce weird and interresting effects.
  102.  
  103.  
  104. The Complex Histogram Transformations are much more interresting.  As each 
  105. color is made up of Red, Green, and Blue (RGB) components, three color 
  106. transformation histograms are used.  Each histogram takes the value of a color 
  107. and transforms it to a new color.  For example, say the color intensities 
  108. range from 0 to 255.  A color with RGB intensities of R 0, G 255, and B 127 
  109. fed through a histogram that looked like this:
  110.  
  111. 255  HI|\
  112.        | \
  113.        |  \
  114.        |   \ 
  115. 0    LO+----
  116.        LO   HI
  117.        0    255
  118.        
  119. would produce a new value of R 255, G 0, and B 127.  This is because the low 
  120. values (0) map to the high values (255) and the high values map to the low 
  121. values.  The values in the middle tend to map to themselves (127 to 127).  
  122. This histogram effectively carries out the calculation Vnew = 255 - Vold.
  123. This is known as an inverting histogram, and it can be used for simple, but 
  124. interresting effects.
  125.  
  126. To get an inverting histogram, edit a color transformation histogram and 
  127. generate a 1-to-1 histogram.  You can do this by loading the file 1_TO_1.HST 
  128. included with SOL 3.x or create a Gamma preset histogram with a value of 1.  
  129. Then, Invert or Flip the histogram to get the inverted form.  You can also use 
  130. the red arrow above the three histograms in the Options Dialog to set all of 
  131. them to 1-to-1, then edit one of them and click on Flip to invert it.  
  132. Inverting one, some, or all of the RGB histograms can produce some neat 
  133. effects:
  134.  
  135. -=> The "Green People" effect.  Inverting the red histogram makes black into 
  136. red, and colors with red in them revert to their blue and green components.  
  137. Since flesh tones are made up of mostly red, inverting just the red will leave 
  138. green and a little blue left over; hence the "Green People" effect.
  139.  
  140. -=> The "Neon" effect.  Inverting the green histogram makes reds into yellows, 
  141. and dark colors into green, producing a brighter, glowing neon effect.
  142.  
  143. -=> The "Pastel" effect.  Inverting the blue histogram produces subtle blues 
  144. and yellows in the image.
  145.  
  146. -=> If two of the three histograms are inverted (any two) then it produces 
  147. effects of varying colors similar to the "neon" effect above except that there 
  148. is more of an inversion in the intensities (dark to light and light to dark.)
  149.  
  150. -=> Inversion of all three produces a "photo negative" effect.  This is what 
  151. is known as a full inversion of the palette.
  152.  
  153.  
  154. Brightening or darkening the red, green, or blue planes of the color palette 
  155. can be accomplished with the additive color transformations, but can be more 
  156. accurately be done using gamma correction histograms.  This is done by using 
  157. Gamma presets with a value greater than 1 for brightening, and less than 1 for 
  158. darkening.  Use a darkening gamma correction on green and blue (leave red at 
  159. 1-to-1) to produce a warmer image in much the same way as was done with the 
  160. additive color transformations.
  161.  
  162. Contrast can be applied to single color planes (R, G, or B) to produce 
  163. interresting results as well.  The files CONTRSTx.HST included with SOL 3.x 
  164. can be loaded in for a varying degree of contrast.  Using a contrast histogram 
  165. on green will bring out the reds, blues, and purples in the darker and lighter 
  166. colors.  This is often a more subtle effect than with using gamma correction.
  167.  
  168. Starting with these simple but interesting effects, you can learn to draw 
  169. custom histograms that fit your needs.  If even more control over your colors 
  170. is needed, you can move on to the color editor.
  171.  
  172.  
  173. THE COLOR EDITOR
  174. ================
  175.  
  176. The Color Editor can be used to alter the existing colors in your image, or to 
  177. create new colors to draw the image from.  Changing the existing colors is 
  178. straight-forward; just pick the color you want to change from the image using 
  179. "Select" from the color editor, then change it.  Make sure "Match" is NOT 
  180. highlighted so that your changes appear in the image when you display it.
  181.  
  182. Suppose that you are programming a game and you found a cool GIF that would 
  183. look great as a background.  The problem is that the GIF has 256 colors but 
  184. your game has 16 and you already know what those 16 colors are going to be. 
  185. Speed of Light can use your color palette to display the GIF in the best way 
  186. possible.  So how do you get your game's palette into SOL?  There are two 
  187. ways:
  188.  
  189. 1) Create the colors by hand using the editor.  Be sure to make any unused 
  190. colors the same as the first color (SOL will not use a duplicate color). 
  191. Creating them by hand can be a pain because you need to know what all your 
  192. colors are and where they are located in the palette order.  Versions before 
  193. 3.5 ordered the palette in DEVICE order (see below), but 3.5 allows you to 
  194. edit the colors in VDI order (this is the same order as the control panel.)  
  195. Be sure you know what order you are using.  XBIOS(7,...) palette setting 
  196. command sets the colors in DEVICE order, whereas vs_color() sets them in VDI 
  197. order.
  198.  
  199. 2) Create your own .PAL file using a program.  A .PAL file is composed of one 
  200. byte that tells how many colors are in the file (minus 1), followed by a set 
  201. of colors defined by 3 bytes each.  The first of the three bytes is red, then 
  202. green, then blue.  Another 3 bytes for the next color follows, and so on.  SOL 
  203. loads in however many colors are in the file, starting with color zero.  A 
  204. .PAL file is saved in whatever order the palette was in when you saved it. 
  205. Depending on your use, you can switch to a different ordering before loading 
  206. in a palette.  The following table shows how to convert from VDI to DEVICE 
  207. order (although Speed of Light will do all this work for you.)
  208.  
  209. VDI Color     0  1  2  3  4  5  6  7  8  9  10 11 12 13 14 15
  210. DEVICE Color  0  15 1  2  4  6  3  5  7  8  9  10 12 14 11 13
  211.  
  212. This is for 16 colors.  For 256 colors, entries 16-254 are the same for DEVICE 
  213. as for VDI, but VDI 255 goes to DEVICE 15 and VDI 1 goes to DEVICE 255.
  214.  
  215.  
  216. Once you have created or loaded in the palette, highlight "Match" so that SOL 
  217. will try to match the created palette to the GIF.  Click on "Display" to show 
  218. it.  Tinker with the settings to get the best picture (add dithering, etc).  
  219. If you go back to the color editor, you can see the results of SOL's attempts 
  220. to match the image to your palette.  Colors that SOL does not use in the image 
  221. will be marked with a small X.  This means that SOL found other colors that 
  222. were closer to the original colors than this one.
  223.  
  224. This is just a short example to get you started.  I often like to use the 
  225. "Gradient" tool to create shades of different colors that I think would match 
  226. the image nicely.  I then display it (with "Match" highlighted) and then go 
  227. back to the Editor.  From this point, I can easily change a set of colors to 
  228. something else, then view the image again with "Match" NOT highlighted to see 
  229. my changes.  Say you have an image of a red car, but you want it blue.  Just 
  230. use the editor to change all the reds to the same intensity of blue, then 
  231. redisplay the image, making sure "Match" is off.  If you leave "Match" 
  232. highlighted, SOL will try to find those red shades again, but since you 
  233. changed them to blue, SOL will use some other colors instead and your blue 
  234. colors will most likely be marked with X's when you return to the Editor.
  235.  
  236.  
  237.  
  238. CLOSING REMARKS
  239. ===============
  240.  
  241. With some experimenting, you can easily find other color effects that are not 
  242. obvious at first.  SOL provides a lot of tools; the key is to know which ones 
  243. to use, what your options are, and how the program will react to your 
  244. settings.  I hope this has given you some insite into SOL's color features.  
  245. Next time, I'll give you some insite into SOL's image manipulation features.
  246.  
  247. Please remember that Speed of Light is Shareware.  This means that if you use 
  248. the program, I request that you send a donation to become a registered user. 
  249. Your support helps me to produce more quality Atari software like SOL. 
  250. Complete registration information is included in the SOL manual.  The 
  251. unregistered version of SOL is available online on Genie, Delphi, and 
  252. Compuserve, as well as many Internet locations including ftp site 
  253. atari.archive.umich.edu.  The filename is SPOFLT35.ZIP.  Updates can also be 
  254. obtained from me (if you are registered) by sending a blank disk and 
  255. self-addressed stamped envelope. See the manual for complete mailing address.
  256.  
  257. Speed of Light is (c) Copyright 1993, 1994 by Stuart Denman.
  258.