Bitmask Filter Anaglyph

This Generator works the same as the old RedBlue library.

Consider this image:

/images/camera3D/regular_renderer/fourcubes-composite.png

Render it twice with the camera shifted slightly to the right and left. The camera shift is not blatantly obvious in this case but you can see it if you look at the left side of the gray cube.

/images/camera3D/bitmask_redcyan_anaglyph/fourcubes-left-component.png/images/camera3D/bitmask_redcyan_anaglyph/fourcubes-right-component.png

Filter each image. You will notice that the left red filtered image makes the green and blue cubes look black. The cyan filtered image makes the red cube look black.

/images/camera3D/bitmask_redcyan_anaglyph/fourcubes-left-component-modified.png/images/camera3D/bitmask_redcyan_anaglyph/fourcubes-right-component-modified.png

Add the two images together. If you open both of those images in Photoshop as two layers and set the Layers Mode to Addition, you will get:

/images/camera3D/bitmask_redcyan_anaglyph/fourcubes-composite.png

Add finishing touches to the result with the postDraw method:

/images/camera3D/bitmask_redcyan_anaglyph/fourcubes-final.png

If you are wearing red-cyan 3D Glasses you will notice that only the gray cube looks 3D. The primary colored cubes look terrible because the filtering made them look black in one of the two images. This is one of the weaknesses of this Generator: all colors need to be shades of gray or somewhat close to gray.

This generator can also make anaglyphs suitable for magenta-green 3D Glasses. The left image is filtered red and blue (magenta) and the right image is filtered green.

/images/camera3D/bitmask_magentagreen_anaglyph/fourcubes-left-component-modified.png/images/camera3D/bitmask_magentagreen_anaglyph/fourcubes-right-component-modified.png

Adding them together yields:

/images/camera3D/bitmask_magentagreen_anaglyph/fourcubes-composite.png

I'm not really a fan of magenta-green anaglyphs, but if you happen to have a pair of that kind of filtered glasses, you can find a use for them here.