home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 5 / DATAFILE_PDCD5.iso / utilities / t / texturegnd / Docs / Technical < prev    next >
Text File  |  1996-11-30  |  25KB  |  523 lines

  1.  
  2.                          Technical details
  3.                          =================
  4. .————————————.
  5. | Nº | Topic |
  6. '————+———————'
  7.   01 | Animations and animation viewers
  8.   02 | Exporting textures as JPEGs
  9.   03 | Creating 16 and 24 bpp files
  10.   04 | Menu tree conventions
  11.   05 | Animation Types - details
  12.   06 | Animation Types - file format
  13.   07 | The Mutator
  14.   08 | Breeding
  15.   09 | Three-dimensional sculpting
  16.   10 | Dithering
  17.   11 | Resizing
  18.   12 | Batch processing
  19.   13 | Using !ChangeFSI
  20.   14 | Virtual sprites and layering
  21.   15 | Milking the Freeware version
  22.   16 | Bump mapping
  23.  
  24.  
  25. 01 Animations and animation viewers
  26. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  27. Texture Garden contains extensive options for generating texture animations.
  28. Animations may have variable number of frames, and they may be controlled
  29. by using animation types.
  30.  
  31. Animations are always replayed cyclicly, but their direction may be reversed by
  32. the user.
  33.  
  34. Animations may be stored as directories of sprites, or as a single multiple
  35. image sprite file.
  36.  
  37. When saving animations as directories, Texture Garden does not offer support
  38. for going beyond the 76 file limit imposed by the filecore.  When playing back
  39. such animations, caching of images may be deselected, allowing replay from
  40. disc of animations which would otherwise not fit into memory.  These animations
  41.  may be played back on the backdrop by dragging a directory directly onto
  42. Texture Garden's icon bar icon.
  43.  
  44. When saving animations as multiple image sprite files, !ChangeFSI post-
  45. processing is not available, and when replaying these animations, there must
  46. be enough memory available to load the whole sequence.
  47.  
  48. Animations are generated mainly by altering the phase of the pseudo-random
  49. noise which is used in conjunction with filters when performing the program's
  50. fast-fourier-transforms.  Different frequencies are affected differently and
  51. the "Animation Type" specifies the way in which different frequencies are
  52. affected.
  53.  
  54. Two textures which look exactly the same may animate in different ways even
  55. if the same animation type is chosen; how they animate depends on their
  56. internal constitution, and not on their physical appearance.
  57.  
  58. The "Texture programmer" may design his own type of animation by using the
  59. "AnimationFrameNumber" variable which changes from &0 to &FFFF during the
  60. animation's course.
  61.  
  62. Texture Garden's batch processing options may be used for generating sequences
  63. of textures for animation purposes.  This can also be done from the command
  64. line if absolutely required.
  65.  
  66. Lastly, a word about alternatives to the animation viewing facilities provided.
  67.  
  68. Among the available Freeware on the platform are "!Picture" (written by mz
  69. Sophie Wilson and available from Acorn's FTP site) and "!Player" (Version
  70. 1.00 by Emmet Spier in 1990).  "!Picture" does not cache sprites, but is
  71. simple and neat.
  72.  
  73. "!Player" works well.  It is slightly faster than my own player due to its
  74. use of optimised plotting routines, it can scale plotted sprites and it has
  75. several other nifty widgets.  It needs to be fed a single multiple image 
  76. sprite file, and it takes its palette from the first sprite in the file.  This
  77. means you will probably need to edit the first sprite of an animation in
  78. !Paint to give it a palette.
  79.  
  80. "!Picture" too uses the default mode palette if none is specified by the
  81. sprite files.  One way of getting around this is to use the !ChangeFSI
  82. post-processing provided by Texture Garden which automatically adds the
  83. current desktop palette to the file.  Simpler, perhaps is to edit
  84. "!Picture"'s !RunImage program as follows:
  85.  
  86. 3250 spx%=-1:FOR Q%=0TO255:IFpixtrans%?Q%<>Q% spx%=pixtrans%
  87.  
  88. needs to be changed to:
  89.  
  90. 3250 spx%=-1:FOR Q%=0TO255:REM IFpixtrans%?Q%<>Q% spx%=pixtrans%
  91.  
  92. or similar (spx% should wind up as -1).
  93.  
  94.  
  95. 02 Exporting textures as JPEGs
  96. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  97. The fact that the program has a back-end interface to !ChangeFSI enables
  98. textures to be exported as JPEGs.  This is useful for use with World Wide Web
  99. pages.  JPEGs are usually to be preferred to GIFs for backgrounds as they
  100. have excellent colour depth and can be compressed very well.  Browsers
  101. lacking JPEG support are now rare.  Some synergy between the Fourier
  102. Transforms used by Textures Garden and the Discrete Cosine Transform used by
  103. JPEG may be partly responsible for this.  Compression is especially important
  104. for backgrounds as they are usually drawn first and consequentlt need to be
  105. downloaded before any navigation of the page can occur.  This is not true of
  106. other images as long as the "width" and "height" attributes are specified in
  107. the <img> tags.
  108.  
  109. There is explicit support for exporting JPEGs in the program.  Usually the user
  110. can just set the !ChangeFSI option and then select which JPEG options are
  111. required.  These options are overridden by any JPEG output commands specified
  112. in the options string.  For further documentation on the "JPEG" and "JPEGMONO"
  113. options, information is available inside !ChangeFSI.
  114.  
  115. Unfortunately, although the Computer Concepts "Colour Card Gold" graphics
  116. hardware is supported by Texture Garden, !ChangeFSI (v.1.15) does not recognise
  117. the CC-style 16bpp sprites and consequently fails to convert them to JPEGs
  118. correctly.  It seems to be confused about the aspect-ratio and the 
  119. colour-depth.  The aspect-ratio problem can be overcome using some of
  120. !ChangeFSI's resizing options, but colour-depth problem seems insoluble and
  121. the resulting washed out images are of little use.  Fortunately, a solution is
  122. at hand.  Texture Garden has options for forcing output to be in 16 or 24 bit
  123. colour.  When using these options, the output format follows Acorn's format,
  124. and consequently, !ChangeFSI can deal with the sprites.
  125.  
  126. When outputting images as JPEGs, it is important to make sure that you generate
  127. them at a high colour depth in the first place.  Using the force 24bpp option
  128. is recommended.  This is because JPEGs are 24 bit images, and using less than
  129. 24 bits in the source image actually generates larger files because the colour
  130. quantization introduced by using low colour depths is interpreted as being
  131. sharp edges, which JPEG does not compress well.
  132.  
  133. Animations may be exported as directories of JPEGs.  These may be played back
  134. using some programs (not Texture Garden), there seems to be little point in
  135. doing this.
  136.  
  137. 03 Creating 16 and 24 bpp files
  138. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  139. Texture Garden allows the export of 16 or 24 bit colour sprites from any display
  140. mode.  Old machines will have difficulty displaying these sprites, but they are
  141. recognised by !ChangeFSI.  Versions of RISC OS prior to version 3.5 are too
  142. primitive to display these "deep" sprites.  Fortunately, a patch for the
  143. operating system is available to allow them to be viewed as dithered images on
  144. older hardware.  This is called "Deeper" and is written by Sanjay Pattni.
  145. This patch is a module, and it was distributed recently on September's Acorn
  146. User cover disc.
  147.  
  148. The versions of the DragASprite module currently in existence do not seem to
  149. operate correctly on these pseudo-deep images.  If this does not look as though
  150. it will be rectified, reverting to dash boxes may be implemented.
  151.  
  152. Note that palette images are always created in the current mode, and are always
  153. displayed with Floyd-Steinberg dithering.  This may mean, that in modes with
  154. low colour depths they may look different from the textures they refer to.
  155.  
  156. This is because the textures are using simple dithering (usually for speed),
  157. and so the true colours of the palette are not being represented accurately.
  158.  
  159. Textures are not recreated in the current mode on a mode change.  A minor tip
  160. if you want a particular texture redrawn in its current position for some
  161. reason is that if you start to drag a texture, and press SHIFT as you drop it
  162. back onto its original position, then it gets redrawn in the current mode.
  163. If you also press ALT, then the texture is completely deleted.  This last may
  164. be of use to those working in conditions of restricted memory.
  165.  
  166.  
  167. 04 Menu tree conventions
  168. ~~~~~~~~~~~~~~~~~~~~~~~~
  169. When navigating through the palettes directory or the directory of animation
  170. types using the menu structures provided, some conventions are used for t