Stereograph for linux, an advanced stereogram generator, v0.10 (c) 2000 by Fabian Januszewski ------------------------------------------------------------------------------ Stereograph comes with ABSOLUTELY NO WARRANTY; This is free software under the GPL, and you are welcome to redistribute it under certain conditions; HOW TO INSTALL THIS PACKAGE See INSTALL for a short reference. 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). 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 to do a serios 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. 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 is no limit to extend it up to 24 bits (16.7 millions) or even more. To learn how to use all these useful features simply read on. :) 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. OPTIONS -a 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 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 exected. -d 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. -x texture_start_x where the texture is inserted the first time and where the rendering process begins its rounds. standard: 0 (left image border); -y texture_start_y y offset of the texture. standard: 0 (top); Care about your screen 'cause of the impressioning effects of stereograph! ;)