1
Stereograph for linux, an advanced stereogram generator, v0.30a
2
(c) 2000 by Fabian Januszewski <fabian.linux@januszewski.de>
3
------------------------------------------------------------------------------
5
Stereograph comes with ABSOLUTELY NO WARRANTY;
6
This is free software under the GPL, and you are welcome to redistribute it
7
under certain conditions;
12
1.0 HOW TO INSTALL THIS PACKAGE
13
2.0 WHAT DOES STEREOGRAPH
18
6.0 SINGLE IMAGE STEREOGRAMS BASICS
20
For a VERY short summary of useful arguments ask the executable.
23
1.0 HOW TO INSTALL THIS PACKAGE
25
See INSTALL for a short reference. Since release 0.17 libpng is required.
26
There should be no problems if this library is installed under /usr/lib.
27
Otherwise please take a look to the Makefile and modify it to suit your
30
The current version of Stereograph is available at stereograph.sourceforge.net.
33
2.0 WHAT DOES STEREOGRAPH
35
Stereograph is a stereogram generator. In detail it is a single image
36
stereogram (SIS) generator. That's a program that produces twodimensional
37
images that seem to be threedimensional (surely you know the famous works of
38
"The Magic Eye", Stereograph produces the same output). You do _not_ need
39
any pair of colored spectacles to regard them - everyone can learn it.
44
Yes, that's an interesting question. I know that there are thousands of SIS
45
generators available out there. I bought one because I wanted to create
46
something special - but I was disappointed when I created my first
47
well-prepared composition. The quality was anything but useful. In the third
48
dimension (the depth of the image) I was able to see different rough steps
49
instead of really smooth transitions as expected. I couldn't believe that. I
50
had purchased a professional program that should complete a serious job for me.
51
So I took a pencil, a piece of paper and some time to find an optimized way of
52
processing stereograms. Stereograph is the result of all my inventions related
53
to this this problem. I implemented anti-aliasing for more realistic level
54
transitions and to follow exaclty the height structure that is described in the
55
base image. I added a zoom feature which has the same effect but is more or less
56
not useful for stereograms on a computer screen but interesting for printing.
57
Additionally I expanded the depth detail level of 256 levels to 765. If it
58
should be one day necessary to increase this level again, there are no limits to
59
extend this range up to 24 bits (16.7 millions) or even more.
61
I was pointed to tiff which supports floating point precision; I am working on
68
First of all we begin with a file describing the "relief" of our 3d model.
69
The base file should contain all information about our object(s). It is a
70
simple graphic where the brightness of a pixel defines its individual
71
depth. The darker a pixel is, the more far away it will seem to be in the
72
final stereogram - the brighter it is, the closer it will be. Usually only
73
gray scale images are used to keep this information. As there are only 256
74
tones I decided to terminate this limitation. Of course, any gray scale
75
image will be enough for a nice stereogram and can be used with
76
stereograph. But if you wanna go for real quality (I mean that quality
77
that is needed when you want to render a realistic tree and put an ant on
78
it) you can use the full bandwidth of 765 levels by using a special color
79
map for rendering (POVRAY does a good job - www.povray.org). Internally
80
the RGB values of each pixel are added to calculate the depth.
83
everybody identifies with a stereogram the beautiful textures that are
84
used to produce themselves. A good texture for a good stereogram needs a
85
lot of love and details and some know-how or enough intuitive feelings to
86
create one. The texture is that what everyone sees when regarding your
87
stereogram - even if he cannot get in the third dimensions of your
88
composition. Without an attractive texture you won't invite attractive
89
visitors for your personal art work. ;)
90
Technical note: the width of the texture stands for the maximum depth of
91
any steregram and it cannot be greater than the distance of your two
92
eyes - otherwise you won't be able to see anything in your stereogram but
93
your beautiful great texture. As a hand rule, 100 should work nice for
94
stereograms of 640*480 up to 800*600 pixels. Use 110 to 120 for greater
97
Hey, the random texture generator is implemented now! See below near '-w'
100
The file where the stereogram is written to. If it exists stereograph
101
won't ask you to allow it to overwrite it, it will simply do it. The
102
following file suffices are recognized by Stereograph: tga, png, ppm;
105
if no output file is specified stereograph writes the graphics data to
108
-f [output format: tga/png/ppm]
109
This optional argument let's you choose the output format Stereograph
110
should write. Possible values are: "tga" for 24 bit uncompressed TARGA
111
ouput, "png" for 32 bit compressed PNG output and finally "ppm" for
112
PPM output; otherwise Stereograph will try to select the output format
113
by the suffix of the output file name if there is one.
117
4.0 REDNERING OPTIONS
119
Quality controling arguments
123
describes a value between 1 and 32 that declares how many pixels shall
124
be calculated by the renderer virtually for ONE pixel. So 1 is the
125
absolute minimum, 4 is predefined. You can calculate easily: physically
126
you habe n depth levels, where n is the width of the texture used for
127
the stereogram. With the AA feature you now have theoretically a*n levels.
128
This feature increases _massively_ the color depth of the output file -
129
so always try to keep it in true color modes (24 bits or more). I've
130
already converted different stereograms processed with AA (7+) to indexed
131
ones and couldn't really feel a loss of 3d quality. It's always your
132
decision and your former free disk space or net resources, a compromise
137
based on the same idea as AA and has the same effects but physically
138
increases the file size. Here 1 the minimum is predefined. It increases
139
the width AND the height of the output stereogram by z - so be very
140
careful with your free resources, it could end up in a great colorful
143
btw, for AA and zoom only integer values are expected.
148
-d <greater than 0.0 up to 8.0>
150
describes the distance of your eyes and the virtual glass that is between
151
you and your stereogram. Default value is 5.0 since release 0.30a, feel
152
free to walk backwards up to 20.0 steps. 1.0 distance points reflect the
153
distance between the screen and the maximum depth.
155
-p <greater than 0.0 up to 1.0>
157
defines the depth of the nearest point (typically mere white). This value
158
should be rendered linear which means that for a doubled value depth
159
contrast of the scene should be doubled too.
163
controls the perspective along the x axis (left to right). That is if e is
164
positive the image is shifted slightly to the right. The predefined value
165
of 0.0 is exactly the centered perspective.
170
-x <0..(base image width) - (texture width) - 1>
172
where the texture is inserted the first time and where the rendering
173
process begins its rounds. standard: 0 (left image border);
175
-y <0..texture height - 1>
177
y offset of the texture. standard: 0 (top);
179
-w <1(theoretically)..texture width/base width - 1>
180
this argument specifies the texture width to use for the stereogram. This
181
option tells stereograph to generate a random texture or if a texture was
182
defined it resizes the texture to match your dimension. This can be very
183
useful when rendering transparent stereograms with a lot of different
184
textures that all differ in their width. Note that this can only reduce
185
the width and stereograph doesn't care about image ratios. It just cuts
186
your texture. Random textures cannot be used with transparent rendering.
189
use one of there flags to define which color type the random texture
190
should conform to. Use -M for monochrome, -G for a grayscale or -C for a
191
random color texture. Please note that the random texture feature cannot
192
be combined with transparent rendering and that anti-aliasing increases
193
the color depth of you image - even if you use a monochrome texture.
194
To disable anti-aliasing use '-a 1'.
195
The -S flag is experimental - it generates an artistic random texture.
200
-A this flag will add a pair of black triangles at the top of the stereogram
201
to make it easier for unexperienced eyes to achieve the magic view.
206
-I inverts a base (non-transparent rendering only);
208
-l [level adjust type: none/back/top]
209
adjusts the base levels for transparent rendering;
210
the keyword 'none' keeps the defined height levels of the base images;
211
the keyword 'back' adjusts the bottom area of all upper layers to the
212
level defined by the preceding layer;
213
the keyword 'top' adjusts the areas of upper layers that are not as far as
214
the preceeding layer to the level of the preceding layer;
217
disable linear rendering algorithm
219
-L this option disables linear rendering
222
the anti-artefacts feature
224
-R this feature is enabled via the -r flag and tells stereograph to process
225
every second line in reversed order to prevent artefacts. This flag should
226
be used only with random textures. I am working on a more stealth
227
algorithm that could be used with any texture. Please inform me about your
228
experiences with this feature! Your feedback is important in the further
229
development of this idea because as I know this implementation is really
235
-v orders stereograph to tell you everything he's doing;
240
Transparent stereograms are rendered in the same way as normal stereograms.
241
Stereograph accepts the same parametres, so the only difference for you is to
242
define more than one input base file and provide respectively the same number
243
of textures. The different bases must have the same dimensions, the textures
244
must equal themselves in the width. Otherwise stereograph will complain and
245
even not initialize the renderer.
246
Since release 0.29a transparent rendering needn't to be enabled via the -T
249
Example command line:
251
> stereograph [ADDITIONAL OPTIONS] -b glass0.png glass1.png glass2.png\
252
-t tex0.png tex1.png tex2.png -o glass_demo.png
254
or, running on a sh compatible shell you may simply use
256
> stereograph [ADDITIONAL OPTIONS] -b $(ls glass?.png) -t $(ls tex?.png)\
259
At the moment there's no modifier for manipulating the alhpa channels. The
260
alphas that may be defined in your png or targa files are ignored.
261
This feature is ALPHA. Please inform me about your experiences!
264
6.0 SINGLE IMAGE STEREOGRAMS BASICS
266
First of all, some basic rules.
268
As you can see any stereogram is composed of a texture that is repeated n times
269
on a horizontal line but not very regularly. There is a simple rule: the more
270
complex the scene, the more complex the resulting stereogram appears and the
271
more difficulty it becomes for a human being to regard it in its three
272
dimensions. The greater the contrast in the scene, the more artefacts are
273
produced as by-product of the rendering process and the fact that not every
274
pair of pixels on the screen is unequivocal for our eyes.
276
Before we discuss the necessary design properties of the three dimensional
277
scene you should know, that the texture design is at least as important as the
278
design of the scene. The more details a texture offers the more details from
279
your scene the final stereogram can offer to the spectator.
280
Finally the nicer your texture the more attractive your artwork becomes for the
283
There are a lot of ways to produce a useful scene. For your first steps you can
284
simply use a graphics program like the GIMP for example. You will learn how to
285
use the different depth values as effective as possible. Put some text in your
286
scene to test the ability of detail reproduction of your texture. Not every
287
text and every font is readable in a stereogram but feel free to play with it!
288
Use small differences in your scene and try to avoid huge contrasts on the
289
horizontal line. In vertical direction you can do what you want - this behavior
290
won't result in any artifacts that may attack your beautiful stereogram.
292
Artifacts result of symmetric pixel distance constellations that result of
293
typical height structures of a scene in combination with a typical texture
294
constellation. Some shifting of the texture along x or y, some changes in the
295
texture or some adjustments of the eye perspective or of the distance could
296
correct this. If nothing helps, alter the width of your texture by one or two
297
pixels, that should be enough.