The Development of my Stereogram Algorithm

When I first figured out how to create Single Image Stereograms back in 1995, I started with random-dot stereograms with discrete steps and developed my algorithm to a point where I could create stereograms with smooth depth and nice backgrounds, such as the ones in 3D riDDle II. But that algorithm created the depth disparities from left to right, which leads to an imbalance of distortion. Then, in 2008, I decided to rewrite the entire program. I figured out how to center the disparities, and then moved on to enhance the stereograms with contours and mapped textures.

Note that almost all stereograms featured here are to be viewed cross-eyed. This is because I developed these images for display on large screens and posters of varying sizes, and cross-eyed stereograms are a lot more scalable than those designed for parallel viewing.

My first step was to recreate what my original algorithm could do, but this time by creating the depth disparities with reference to the center of the image. This results in nicely balanced image distortions and allows for more depth in the stereogram, because the disparities only accumulate over one half of the image.

These are the classic hidden image stereograms, where you really cannot tell what the 3D content might be until you fuse them. But the impact of the 3D experience could be enhanced if the texture of the image could correspond with its 3D structure. Our brain expects edges in depth to have visual edges as well. So if this correlation could be provided in the stereogram, that would make the 3D structure more credible to the brain. As a result, the stereogram would be easier to fuse and more enjoyable to view. I knew from other people's stereograms that this was possible, so I set out to figure out how I could do it myself.

The obvious approach was to outline the edges of the 3D structure. To do that, my program simply detects steps in depth above a defined threshold and darkens (or lightens) the texture of the image next to that step. This can lead to unexpected effects if the edges in the depth map are anti-aliased, but I eventually found a way to address that, too.

Then I went one step further and mapped the texture of the 3D object onto the 3D structure in the stereogram, blending it with the background image. Because this texture is repeated across the image, it may then come in conflict with that of other parts of the 3D object, so these overlaps had to be handled somehow, and I also wanted to be able to vary the transparency of the textures. My solution was to not only have a texture map, but also a texture priority map, so I can control which part of the 3D structure should be textured, and to what extent.

Since reaching this stage in the development, I have produced a number of stereograms that usually make use of both contours and textures. With each new stereogram, I tend to tweak and improve the algorithm a bit further, but there have not been any more major developments.

The program described above creates stereograms based on a background image, a depth map, a texture map and a texture priority map. Apart from this, I also experimented with a number of other ways to create stereograms, usually with the intent to eventually paint them by hand (which did not always happen...).

Throughout the Stereogram Gallery, view cross-eyed and view parallel indicate stereograms designed for cross-eyed and parallel viewing, respectively.