Stereograph for linux, an advanced stereogram generator, v0.14
(c) 2000 by Fabian Januszewski <fabian.linux@januszewski.de>
------------------------------------------------------------------------------

Stereograph comes with ABSOLUTELY NO WARRANTY;
This is free software under the GPL, and you are welcome to redistribute it
under certain conditions;


TABLE OF CONTENTS

1.0 HOW TO INSTALL THIS PACKAGE
2.0 WHAT DOES STEREOGRAPH
	2.1 WHY ADVANCED?
3.0 HOW TO PUT A PRE-STEREOGRAM INTO THE RENDERER
4.0 OPTIONS
5.0 SINGLE IMAGE STEREOGRAMS BASICS

For a VERY short summary of useful arguments ask the executable.


1.0 HOW TO INSTALL THIS PACKAGE

See INSTALL for a short reference.


2.0 WHAT DOES STEREOGRAPH

Stereograph is a stereogram generator. In detail it is a single image
stereogram (SIS) generator. That's a program that produces twodimensional
images that seem to be threedimensional (surely you know the famous works of
"The Magic Eye", Stereograph produces the same output). You do _not_ need
any pair of colored spectacles to regard them - everyone can learn it.


2.1 WHY ADVANCED?

Yes, that's an interesting question. I know that there are thousands of SIS
generators available out there. I bought one because I wanted to create
something special - but I was disappointed when I created my first
well-prepared composition. The quality was anything but useful. In the third
dimension (the depth of the image) I was able to see different rough steps
instead of really smooth transitions as expected. I couldn't believe that. I
had purchased a professional program that should complete a serious job for me.
So I took a pencil, a piece of paper and some time to find an optimized way of
processing stereograms. Stereograph is the result of all my inventions related
to this this problem. I implemented anti-aliasing for more realistic level
transitions and to follow exaclty the height structure that is described in the
base image. I added a zoom feature which has the same effect but is more or less
not useful for stereograms on a computer screen but interesting for printing.
Additionally I expanded the depth detail level of 256 levels to 765. If it
should be one day necessary to increase this level again, there are no limits to
extend this range up to 24 bits (16.7 millions) or even more.

To learn how to use all these useful features simply read on. :)


3.0 HOW TO PUT A PRE-STEREOGRAM INTO THE RENDERER

Before I begin with the explanation for each single flag I want you to notice
that I have only implemented TARGA graphics file i/o functions 'til now. The
output will be EVERYTIME in 24 bit TARGA type 2 (that's really uncompressed).
Also I didn't put in the Huffman-compression code, so there's no support for
other TARGA types than 1, 2, 3, 9, 10 and 11; that's all for now. Feel free to
add your own preferred formats and filters or simply send me a reference
library and I'll see what I can do. But for all the jpeg freaks out there: jpeg
uses a LOSSY compression algorithm that is anything but suitable for high
quality stereograms! Even gif is more useful even if it offers usually only 256
colors. I am looking straight ahead to PNG.

  -b base
     First of all we begin with a file describing the "relief" of our 3d model.
     The base file should contain all information about our object(s). It is a
     simple graphic where the brightness of a pixel defines its individual
     depth. The darker a pixel is, the more far away it will seem to be in the
     final stereogram - the brighter it is, the closer it will be. Usually only
     gray scale images are used to keep this information. As there are only 256
     tones I decided to terminate this limitation. Of course, any gray scale
     image will be enough for a nice stereogram and can be used with
     stereograph. But if you wanna go for real quality (I mean that quality
     that is needed when you want to render a realistic tree and put an ant on
     it) you can use the full bandwidth of 765 levels by using a special color
     map for rendering (POVRAY does a good job - www.povray.org). Internally
     the RGB values of each pixel are added to calculate the depth.

  -t texture
     everybody identifies with a stereogram the beautiful textures that are
     used to produce themselves. A good texture for a good stereogram needs a
     lot of love and details and some know-how or enough intuitive feelings to
     create one. The texture is that what everyone sees when regarding your
     stereogram - even if he cannot get in the third dimensions of your
     composition. Without an attractive texture you won't invite attractive
     visitors for your personal art work. ;)
     Technical note: the width of the texture stands for the maximum depth of
     any steregram and it cannot be greater than the distance of your two
     eyes - otherwise you won't be able to see anything in your stereogram but
     your beautiful great texture. As a hand rule, 100 should work nice for
     stereograms of 640*480 up to 800*600 pixels. Use 110 to 120 for greater
     ones.

     Sorry, there's still no random texture generator implemented yet!

  -o output
     The file where the stereogram is written to. If it exists stereograph
     won't ask you to allow it to overwrite it, it will simply do it.


4.0 OPTIONS

  Quality controling arguments

  -a <1 to 32>
     anti-aliasing
     describes a value between 1 and 32 that declares how many pixels shall
     be calculated by the renderer virtually for ONE pixel. So 1 is the
     absolute minimum, 4 is predefined. You can calculate easily: physically
     you habe n depth levels, where n is the width of the texture used for
     the stereogram. With the AA feature you now have theoretically a*n levels.
     This feature increases _massively_ the color depth of the output file -
     so always try to keep it in true color modes (24 bits or more). I've
     already converted different stereograms processed with AA (7+) to indexed
     ones and couldn't really feel a loss of 3d quality. It's always your
     decision and your former free disk space or net resources, a compromise
     with quality.

  -z <1 to 32>
     zoom
     based on the same idea as AA and has the same effects but physically
     increases the file size. Here 1 the minimum is predefined. It increases
     the width AND the height of the output stereogram by z - so be very
     careful with your free resources, it could end up in a great colorful
     mess...

     btw, for AA and zoom only integer values are expected.


  perspective

  -d <greater than 0.0 up to 8.0>
     distance
     describes the distance of your eyes and the virtual glass that is between
     you and your stereogram. Standard is 0.6, feel free to walk backwards up
     to 8.0 steps.

  -e <-1.0..1.0>
     eye shift
     controls the perspective along the x axis (left to right). That is if e is
     positive the image is shifted slightly to the right. The predefined value
     of 0.0 is exactly the centered perspective.


  layout

  -x <0..texture width - 1>
     texture instert x
     where the texture is inserted the first time and where the rendering
     process begins its rounds. standard: 0 (left image border);

  -y <0..texture height - 1>
     texture instert y
     y offset of the texture. standard: 0 (top);


5.0 SINGLE IMAGE STEREOGRAMS BASICS

First of all, some basic rules.

As you can see any stereogram is composed of a texture that is repeated n times
on a horizontal line but not very regularly. There is a simple rule: the more
complex the scene, the more complex the resulting stereogram appears and the
more difficulty it becomes for a human being to regard it in all of its three
dimensions. The greater the contrast in the scene, the more artefacts are
produced as by-product of the rendering process and the fact that not every
pair of pixels on the screen is unequivocal for our brains.

Before we discuss the necessary design properties of the threedimensional scene
you should know, that the texture design is at least as important as the scene
design. The more details a texture offers the more details of your scene the
final stereogram can offer to the spectator.
Finally the nicer your texture the more attractive your artwork becomes for the
people.

There are a lot of ways to produce a useful scene. For your first steps you can
simply use a graphics program like the GIMP for example. You will learn how to
use the different depth values as effective as possible. Put some text in your
scene to test the ability of detail reproduction of your texture. Not every
text and every font is readable in a stereogram but play with it. Use small
differences in your scene and try to avoid huge contrasts on the horizontal
line. On the vertical direction you can do what you want - this behavior won't
result in any artefacts that attack in your beautiful stereogram.

Artefacts result of symmetric pixel distance constellations that result of
typical height structures of a scene in combination with a typical texture
constellation. Some shifting of the texture along x or y, some changes in the
texture or some adjustments of the eye perspective or of the distance could
correct them. If nothing helps, alter the width of your texture by one or two
pixels, that should be enough.