Making Anaglyphs

From Fs_wiki

Revision as of 19:58, 23 August 2007 by Goatchurch (Talk | contribs)
(diff) ←Older revision | Current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search

Making Anaglyphs

Examples for Red-Cyan coloured glasses:

  • coloured version, which has ghost images through the Red filter.
  • blue-yellow version which makes a better 3D impression, although is faint through the cyan filter. Also difficult to print properly.

An anaglyph is a stereo-scopic 3D image that can be resolved using red-green or red-cyan glasses. The colours of the filters and the images have to be compatible. The most common colour available now is red - cyan(blue+green) for obvious reasons that this corresponds to the channels on a VDU. These might not be the the optimal kind for poster printing.

To make the image requires two perspective views of the cave. The implementation of this is done by transforming the centrelines on import by perspective, and then morphing a cave survey to this centreline. (Possibly needs a morphing that doesn't preserve passage widths, but allows them to shrink where they are more distant.)

The focus of the perspective view is the centre of the bounding box containing all the legs. This is the point around which the model slightly rotates around.

The perspective view is done by starting with a New Empty Sketch, and drawing a centreline which controls the horizontal displacement (distance from your nose to your eye) and the depth (the amount of perspective). Use the "Snap To Grid" feature to draw a path in the empty sketch that goes 10m to the right and 90m up, (look at the squares and use the info tab).

Then use the drop-down box to set the linestyle to centreline. The Import centreline. Now you can import the proper sketch onto this image, Update Z, and Update areas.

If you want symbols, it's advisable to make a setup where none of the random symbols show (sand and boulders), because they won't be generated in the same places. Either that, or generate them only in one of the images (the cyan one), so there's nothing in the red channel to confuse it up.

Now you need to output as bitmap. There's a hack to make sure they align on line 439 of SketchPrint.java, where you'll need to hard-code the bounding box to something that will be the same for both the left and right images.

boundrect = new Rectangle2D.Float(-2221, -3776, 3921, 7571); 

You might not want anti-aliasing on.

Once you've made the left and right images (the other using a centreline on a new empty sketch that goes 10m left and 90m up), you can use the anaglyphcombine.py script in pythonbits to combine the channels

You might need to make a set of colours where the translucency is turned off (using the areamaskcolour, or setting the alpha channel on all the areas to ff, otherwise it's too much information for the brain to stick together. Also, colours need to be tuned to fit with the glasses, with a roughly similar balance in the red as in the green and blue channels, so that the spectrum of area colours for each eye is in the same order (the brightness relationship of each pair of areas is the same).

With very complicated caves, you have to give your brain time to work it out. Move your head side to side to help it along, and then it should click.

Here's one I prepared earlier: Here's one I prepared earlier. Anyone know how to do thumbnails in mediawiki?

Navigation

-->
Navigation
Toolbox