home *** CD-ROM | disk | FTP | other *** search
/ TOS Silver 2000 / TOS Silver 2000.iso / Anwendun / Pov / POVTOOLS / ATSIS / ATSIS.TXT < prev    next >
Encoding:
Text File  |  1995-02-10  |  6.1 KB  |  150 lines

  1.           ATsis -- Creating stereograms with the Atari ST/TT/Falcon
  2.          ===========================================================
  3.  
  4.      (C) Copyright 2/1995 Christian Perle <incp@sun.rz.tu-clausthal.de>
  5.  
  6.                   (Original SIRDS routine by W.A. Steer)
  7.  
  8.  
  9. INTRO
  10. -----
  11. The first time I ever heard of SIRDS (Single Image Random Dot Stereograms), 
  12. I thought "This is bulls**t, no-one can see them". A friend of mine gave me 
  13. a black/white print and what I saw was random pixels all over the paper. 
  14. "You have to look _behind_ the picture to see the image", he said, but I 
  15. still couldn't see it.
  16.  
  17. A few months later I was clicking around in WWW and found some SIRDS pages. 
  18. "Oh no, not again", I thought, and just for fun I looked at a very chaotic 
  19. picture. Then I saw it. The 3-D object literally jumped me in the eye. 
  20. "These things are getting interesting", I thought and immediately searched 
  21. a few ftp archives for SIRDS maker programs. There were many of them for 
  22. DOS, a few for Amiga and Unix, and not a single one for Atari.
  23.  
  24. Fortunately, I found a SIRDS FAQ on internet, with an excellent C++ source 
  25. for making high quality SIRDS. I ported the program to GNU C and added file 
  26. handling which was not present in the original code.
  27.  
  28.  
  29. WHAT IS SIRDS/SIS?
  30. ------------------
  31. SIRDS is a method to encode depth information in a single image. A random 
  32. pattern is repeated over each line of the image. When the image is watched 
  33. "parallel", so that the left eye focuses on a different point than the 
  34. right eye, shifts in the pattern can create different depths. The distance 
  35. between the left/right focus point should be exactly the pattern width. In 
  36. order to see the depth more easily, I have added two "help marks" showing 
  37. this width at the top of the image. Shift them until you see three marks. 
  38. On more information how to see SIRDS, read the SIRDS FAQ.
  39.  
  40. SIS is basically the same as SIRDS, but the pattern is not random. There 
  41. must be a picture file which is tiled across the image to create the 
  42. pattern.
  43.  
  44.  
  45. FILES
  46. -----
  47. ATSIRDS.C       Source (GNU C) for ATsirds
  48. ATSIS.C         Source (GNU C) for ATsis
  49. ATSIRDS.TTP     ATsirds program, writes PBM output file
  50. ATSIS.TTP       ATsis program, writes PPM output file
  51. AGATTILE.POV    POV-Ray scene for tile picture
  52. BOZOTILE.POV    POV-Ray scene for tile picture
  53. CARTILE.POV     POV-Ray scene for tile picture
  54. DEPTH1.POV      POV-Ray scene for depth data
  55. DEPTH2.POV      POV-Ray scene for depth data
  56. DEPTH3.POV      POV-Ray scene for depth data
  57. DEPTH4.POV      POV-Ray scene for depth data
  58. DEPTH5.POV      POV-Ray scene for depth data
  59. DEPTH6.POV      POV-Ray scene for depth data
  60. DEPTH7.POV      POV-Ray scene for depth data
  61. MARBTILE.POV    POV-Ray scene for tile picture
  62. OBJETILE.POV    POV-Ray scene for tile picture
  63. STONTILE.POV    POV-Ray scene for tile picture
  64. DEPTH1.RED      POV-created depth data for SIRDS/SIS
  65. DEPTH2.RED      POV-created depth data for SIRDS/SIS
  66. DEPTH3.RED      POV-created depth data for SIRDS/SIS
  67. STONTILE.TGA    POV-created tile picture for SIS
  68. ATSIS.TXT       this file
  69.  
  70.  
  71. GENERATING SIRDS
  72. ----------------
  73. ATsirds reads depth data from a raw file (more on this file type later). 
  74. Output goes to a PBM (portable bitmap) file 'SIRDS.PBM'. The size of the 
  75. depth data must be 640x470 pixels.
  76.  
  77. To render the SIRDS, just start a command line shell and say
  78.  
  79.   atsirds <depthfile>
  80.  
  81. where <depthfile> is the raw depth data filename.
  82.  
  83. GENERATING SIS
  84. --------------
  85. ATsis is used for the SIS type of stereograms. Depth data is read from a 
  86. raw file and the tile picture is read from an uncompressed 24-bit TGA file. 
  87. Tile size must be 96x470 pixels.
  88.  
  89. Using the right tile pictures creates the most beautiful looking 
  90. stereograms, far better than random dots. ATsis also uses a special 
  91. oversampling technique for smooth object surfaces. The PPM (portable 
  92. pixmap) output 'SIS.PPM' of ATsis looks best in true color or dithered to 
  93. 256 colors. I recommend GEM-View or PBMplus for post processing.
  94.  
  95. To render the SIS, just start a command line shell and say
  96.  
  97.   atsis <depthfile> <tilefile>
  98.  
  99. where <depthfile> is the raw depth data filename and <tilefile> is the TGA 
  100. tile filename.
  101.  
  102.  
  103. DEPTH FILE FORMAT
  104. -----------------
  105. A depth file is just headerless raw data, one byte per pixel. The byte 
  106. value (0..255) describes the distance from the observer. A lower value is 
  107. far away (background), a higher value is closer to the observer. Depth 
  108. files are read line by line from left to right.
  109.  
  110.  
  111. USING POV-RAY TO CREATE DEPTH DATA
  112. ----------------------------------
  113. Most of the input data for SIRDS is created by 3-D rendering programs. 
  114. ATsirds/sis is suited for using the output of POV-Ray, a superb free 
  115. raytracer. Both depth data and tile pictures can be created with POV-Ray.
  116.  
  117. To render depth data with POV-Ray, use the parameters:
  118.  
  119. povray +iDEPTH5.POV +oDEPTH5 +w640 +h470 +fr
  120.                                          ^^^
  121.                                   raw format, important!
  122.  
  123. This will create three files: DEPTH5.RED, DEPTH5.GRN and DEPTH5.BLU.
  124. Because the image is greyscale, files DEPTH5.GRN and DEPTH5.BLU can be 
  125. removed (red, green and blue parts contain the same information). Use 
  126. DEPTH5.RED with ATsirds/sis.
  127.  
  128. For those who are familiar with POV-Ray:
  129. All objects in the scene are ambient lighted. There is no light source. The 
  130. camera looks straight into Z direction. The objects must be placed in a 
  131. white/black gradient texture in front of the camera. If an object is placed 
  132. closer to the camera, it gets brighter. If it is placed far, it gets 
  133. darker. The problem is to fit all objects into one white/black range 
  134. (remember the gradient repeats). In scene DEPTH5.POV, there are two camera 
  135. declarations: One for normal view and depth data output, and one from the 
  136. side for checking if the objects are placed right.
  137.  
  138.  
  139. USING POV-RAY TO CREATE TILE PICTURES
  140. -------------------------------------
  141. To render a tile picture with POV-Ray, use the parameters:
  142.  
  143. povray +iAGATTILE.POV +oAGATTILE.TGA +w96 +h470 +ft
  144.  
  145.  
  146.  
  147. --
  148. That's it.
  149. Have fun with ATsis!
  150.