home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Datafile PD-CD 5
/
DATAFILE_PDCD5.iso
/
utilities
/
t
/
texturegnd
/
Docs
/
Technical
< prev
next >
Wrap
Text File
|
1996-11-30
|
25KB
|
523 lines
Technical details
=================
.————————————.
| Nº | Topic |
'————+———————'
01 | Animations and animation viewers
02 | Exporting textures as JPEGs
03 | Creating 16 and 24 bpp files
04 | Menu tree conventions
05 | Animation Types - details
06 | Animation Types - file format
07 | The Mutator
08 | Breeding
09 | Three-dimensional sculpting
10 | Dithering
11 | Resizing
12 | Batch processing
13 | Using !ChangeFSI
14 | Virtual sprites and layering
15 | Milking the Freeware version
16 | Bump mapping
01 Animations and animation viewers
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Texture Garden contains extensive options for generating texture animations.
Animations may have variable number of frames, and they may be controlled
by using animation types.
Animations are always replayed cyclicly, but their direction may be reversed by
the user.
Animations may be stored as directories of sprites, or as a single multiple
image sprite file.
When saving animations as directories, Texture Garden does not offer support
for going beyond the 76 file limit imposed by the filecore. When playing back
such animations, caching of images may be deselected, allowing replay from
disc of animations which would otherwise not fit into memory. These animations
may be played back on the backdrop by dragging a directory directly onto
Texture Garden's icon bar icon.
When saving animations as multiple image sprite files, !ChangeFSI post-
processing is not available, and when replaying these animations, there must
be enough memory available to load the whole sequence.
Animations are generated mainly by altering the phase of the pseudo-random
noise which is used in conjunction with filters when performing the program's
fast-fourier-transforms. Different frequencies are affected differently and
the "Animation Type" specifies the way in which different frequencies are
affected.
Two textures which look exactly the same may animate in different ways even
if the same animation type is chosen; how they animate depends on their
internal constitution, and not on their physical appearance.
The "Texture programmer" may design his own type of animation by using the
"AnimationFrameNumber" variable which changes from &0 to &FFFF during the
animation's course.
Texture Garden's batch processing options may be used for generating sequences
of textures for animation purposes. This can also be done from the command
line if absolutely required.
Lastly, a word about alternatives to the animation viewing facilities provided.
Among the available Freeware on the platform are "!Picture" (written by mz
Sophie Wilson and available from Acorn's FTP site) and "!Player" (Version
1.00 by Emmet Spier in 1990). "!Picture" does not cache sprites, but is
simple and neat.
"!Player" works well. It is slightly faster than my own player due to its
use of optimised plotting routines, it can scale plotted sprites and it has
several other nifty widgets. It needs to be fed a single multiple image
sprite file, and it takes its palette from the first sprite in the file. This
means you will probably need to edit the first sprite of an animation in
!Paint to give it a palette.
"!Picture" too uses the default mode palette if none is specified by the
sprite files. One way of getting around this is to use the !ChangeFSI
post-processing provided by Texture Garden which automatically adds the
current desktop palette to the file. Simpler, perhaps is to edit
"!Picture"'s !RunImage program as follows:
3250 spx%=-1:FOR Q%=0TO255:IFpixtrans%?Q%<>Q% spx%=pixtrans%
needs to be changed to:
3250 spx%=-1:FOR Q%=0TO255:REM IFpixtrans%?Q%<>Q% spx%=pixtrans%
or similar (spx% should wind up as -1).
02 Exporting textures as JPEGs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The fact that the program has a back-end interface to !ChangeFSI enables
textures to be exported as JPEGs. This is useful for use with World Wide Web
pages. JPEGs are usually to be preferred to GIFs for backgrounds as they
have excellent colour depth and can be compressed very well. Browsers
lacking JPEG support are now rare. Some synergy between the Fourier
Transforms used by Textures Garden and the Discrete Cosine Transform used by
JPEG may be partly responsible for this. Compression is especially important
for backgrounds as they are usually drawn first and consequentlt need to be
downloaded before any navigation of the page can occur. This is not true of
other images as long as the "width" and "height" attributes are specified in
the <img> tags.
There is explicit support for exporting JPEGs in the program. Usually the user
can just set the !ChangeFSI option and then select which JPEG options are
required. These options are overridden by any JPEG output commands specified
in the options string. For further documentation on the "JPEG" and "JPEGMONO"
options, information is available inside !ChangeFSI.
Unfortunately, although the Computer Concepts "Colour Card Gold" graphics
hardware is supported by Texture Garden, !ChangeFSI (v.1.15) does not recognise
the CC-style 16bpp sprites and consequently fails to convert them to JPEGs
correctly. It seems to be confused about the aspect-ratio and the
colour-depth. The aspect-ratio problem can be overcome using some of
!ChangeFSI's resizing options, but colour-depth problem seems insoluble and
the resulting washed out images are of little use. Fortunately, a solution is
at hand. Texture Garden has options for forcing output to be in 16 or 24 bit
colour. When using these options, the output format follows Acorn's format,
and consequently, !ChangeFSI can deal with the sprites.
When outputting images as JPEGs, it is important to make sure that you generate
them at a high colour depth in the first place. Using the force 24bpp option
is recommended. This is because JPEGs are 24 bit images, and using less than
24 bits in the source image actually generates larger files because the colour
quantization introduced by using low colour depths is interpreted as being
sharp edges, which JPEG does not compress well.
Animations may be exported as directories of JPEGs. These may be played back
using some programs (not Texture Garden), there seems to be little point in
doing this.
03 Creating 16 and 24 bpp files
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Texture Garden allows the export of 16 or 24 bit colour sprites from any display
mode. Old machines will have difficulty displaying these sprites, but they are
recognised by !ChangeFSI. Versions of RISC OS prior to version 3.5 are too
primitive to display these "deep" sprites. Fortunately, a patch for the
operating system is available to allow them to be viewed as dithered images on
older hardware. This is called "Deeper" and is written by Sanjay Pattni.
This patch is a module, and it was distributed recently on September's Acorn
User cover disc.
The versions of the DragASprite module currently in existence do not seem to
operate correctly on these pseudo-deep images. If this does not look as though
it will be rectified, reverting to dash boxes may be implemented.
Note that palette images are always created in the current mode, and are always
displayed with Floyd-Steinberg dithering. This may mean, that in modes with
low colour depths they may look different from the textures they refer to.
This is because the textures are using simple dithering (usually for speed),
and so the true colours of the palette are not being represented accurately.
Textures are not recreated in the current mode on a mode change. A minor tip
if you want a particular texture redrawn in its current position for some
reason is that if you start to drag a texture, and press SHIFT as you drop it
back onto its original position, then it gets redrawn in the current mode.
If you also press ALT, then the texture is completely deleted. This last may
be of use to those working in conditions of restricted memory.
04 Menu tree conventions
~~~~~~~~~~~~~~~~~~~~~~~~
When navigating through the palettes directory or the directory of animation
types using the menu structures provided, some conventions are used for t