Playing with anaglyphs
Table of Contents

Playing with anaglyphs

I've been playing with anaglyphs to show depth levels when rendering the sky for ClearSky application. It's a very funny passtime and the results are really cool, never seen before in any other astronomical software. I remember I did it a long time ago, but I had poor knowledge about anaglyphs and the adequate combination of colors to create a simple anaglyph effect in a computer. The basic maths can be found at http://dogfeathers.com/java/3dproj.html, and my implementation is in jparsec.graphic.rendering2D.Graphics4D. The implementation is quite complete, allowing both the red-green and the cyan-magenta glasses versions. In both cases an almost white background is forced for the anaglyph effect to occur. Anyway, this implementation is only adequate to render basic shapes like circles or lines to a given depth position, above or behind the screen reference depth position. To render surfaces is more complicated, a good try for geometric figures can be found at http://3d-xplormath.org/j/applets/en/index.html, but to give a 3d effect to irregular shapes like nebula is other thing.

An example is given below, with a rendering of the Andromeda constellation with M31 'behind'. In fact, nebulas and shapes are currently drawn at the screen reference position (with no 3d effect), but since most of the stars are closer to the observer than the reference position it seems that M31 is behind. Andromeda is cool to see in 3d since it has stars at different distances in the same sky area (the same happens with Draco). You will need 3d glasses to see the anaglyph (red color for the right eye and green for the left one).

 

A complete implementation of anaglyph mode is desirable, allowing full color images to be seen in 3d, like movies. I'm not sure if this can be done without a lot of computing time, but I will give it a try. Different anaglyphs modes are possible in this case, as described in http://www.3dtv.at/knowhow/AnaglyphComparison_en.aspx. The optimized anaglyph equations seems the right choice, and the future implementation will probably follow the idea behind the anaglyph plugin of the ImageJ application. I don't know at this time if this will succeed, but I would love to apply that algorithm to planetary rendering.

 
blog/mail_name_date_playing_with_anaglyphs.txt · created: 2010/02/21 14:31 (Last modified 2011/10/15 10:49) by Tom├ís Alonso Albi
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki