Stereograms consist of two parts: The depth-map and the tiled image. The tiled image is what you see at first. The depth-map is the hidden 3D image. This tutorial will show you how to create the depth-map with POV-Ray.
Create the scene

Now create and place all the objects you want to be in the scene. You can use all the light_sources and textures you want while modeling.
Apply gradient Z

Now apply a texture with a gradient z pigment to the union and "finish {ambient 1 diffuse 0}". The texture must be applied after all tranformations, that is, it must be the last thing before the last "}" in the union.
Tweak the gradient

Make a background

Fine-tuning

Keep changing the depth-map and test it until the stereogram looks as you wish.
Tips
256 shades of grey is usually fine for depth-maps. If you absolutely have to reduce the colors to less than that make sure that you don't use dithering or diffusion of any kind. That will make the sterograms appear very uneven because although the human eye blends the different colored pixels to a color in between, the stereogram generator doesn't.Don't use antialiasing!!! It can have strange consequences on the final stereogram. Objects may seem to blend together in the edges. So will use of resizing with resampling. Don't use any filters either or any postprocessing at all except for change of the brightness if you want.
Remember to let me know if you make some stereograms of your own! I would also like to know what you think of this tutorial. Please give me some feedback!