I made a post recently and closed off saying that I wanted to find a way to make those Magic Eye photos (aka Stereograms). Although I did not find out how they exactly work, I did find some software that will allow you to create them.
Create two images. One being the pattern and the other a grey scale image showing depth. The lighter it is, the closer the 3D, the darker, the more it will be pushed in.
Here is the image I created using a default grey scale of a B52 plane that comes with the program.
Using Google, I found a number of Sterogram creators. I used this one from Olej's.